rivet is hosted by Hepforge, IPPP Durham
Rivet  2.7.0
Thrust.hh
1 // -*- C++ -*-
2 #ifndef RIVET_Thrust_HH
3 #define RIVET_Thrust_HH
4 
5 #include "Rivet/Projection.hh"
6 #include "Rivet/Projections/AxesDefinition.hh"
7 #include "Rivet/Projections/FinalState.hh"
8 #include "Rivet/Event.hh"
9 
10 namespace Rivet {
11 
12 
44  class Thrust : public AxesDefinition {
45  public:
46 
48  Thrust() {}
49 
50  Thrust(const FinalState& fsp) {
51  setName("Thrust");
52  addProjection(fsp, "FS");
53  }
54 
57 
58  protected:
59 
61  void project(const Event& e) {
62  const vector<Particle> ps
63  = applyProjection<FinalState>(e, "FS").particles();
64  calc(ps);
65  }
66 
68  int compare(const Projection& p) const {
69  return mkNamedPCmp(p, "FS");
70  }
71 
72 
73  public:
74 
77  double thrust() const { return _thrusts[0]; }
79  double thrustMajor() const { return _thrusts[1]; }
81  double thrustMinor() const { return _thrusts[2]; }
83  double oblateness() const { return _thrusts[1] - _thrusts[2]; }
85 
88  const Vector3& thrustAxis() const { return _thrustAxes[0]; }
90  const Vector3& thrustMajorAxis() const { return _thrustAxes[1]; }
92  const Vector3& thrustMinorAxis() const { return _thrustAxes[2]; }
94 
96  const Vector3& axis1() const { return thrustAxis(); }
97  const Vector3& axis2() const { return thrustMajorAxis(); }
98  const Vector3& axis3() const { return thrustMinorAxis(); }
100 
101 
102  public:
103 
106 
107 
109  void calc(const FinalState& fs);
110 
112  void calc(const vector<Particle>& fsparticles);
113 
115  void calc(const vector<FourMomentum>& fsmomenta);
116 
118  void calc(const vector<Vector3>& threeMomenta);
119 
121 
122 
123  private:
124 
126  vector<double> _thrusts;
127 
129  vector<Vector3> _thrustAxes;
130 
131  private:
132 
134  void _calcThrust(const vector<Vector3>& fsmomenta);
135 
136  };
137 
138 }
139 
140 #endif
void setName(const std::string &name)
Used by derived classes to set their name.
Definition: Projection.hh:133
Definition: ALICE_2010_I880049.cc:13
double thrustMinor() const
The thrust minor scalar, , (thrust along thrust minor axis).
Definition: Thrust.hh:81
const Vector3 & thrustMajorAxis() const
The thrust major axis (axis of max thrust perpendicular to thrust axis).
Definition: Thrust.hh:90
int compare(const Projection &p) const
Compare projections.
Definition: Thrust.hh:68
const Vector3 & axis1() const
AxesDefinition axis accessors.
Definition: Thrust.hh:96
Base class for projections which define a spatial basis.
Definition: AxesDefinition.hh:19
DEFAULT_RIVET_PROJ_CLONE(Thrust)
Clone on the heap.
std::vector< GenParticle const * > particles(const GenEvent *ge)
Definition: RivetHepMC.hh:36
Thrust()
Constructor.
Definition: Thrust.hh:48
double oblateness() const
The oblateness, .
Definition: Thrust.hh:83
Definition: Event.hh:22
void calc(const FinalState &fs)
Manually calculate the thrust, without engaging the caching system.
Definition: Thrust.cc:9
void project(const Event &e)
Perform the projection on the Event.
Definition: Thrust.hh:61
Get the e+ e- thrust basis and the thrust, thrust major and thrust minor scalars. ...
Definition: Thrust.hh:44
Cmp< Projection > mkNamedPCmp(const Projection &otherparent, const std::string &pname) const
Definition: Projection.cc:51
Project out all final-state particles in an event. Probably the most important projection in Rivet! ...
Definition: FinalState.hh:12
const PROJ & addProjection(const PROJ &proj, const std::string &name)
Register a contained projection (user-facing version)
Definition: ProjectionApplier.hh:170
double thrustMajor() const
The thrust major scalar, , (thrust along thrust major axis).
Definition: Thrust.hh:79
double thrust() const
Definition: Thrust.hh:77
const Vector3 & axis3() const
The least significant ("minor") axis.
Definition: Thrust.hh:98
const Vector3 & axis2() const
The 2nd most significant ("major") axis.
Definition: Thrust.hh:97
const Vector3 & thrustAxis() const
Definition: Thrust.hh:88
Base class for all Rivet projections.
Definition: Projection.hh:29
Three-dimensional specialisation of Vector.
Definition: Vector3.hh:26
const Vector3 & thrustMinorAxis() const
The thrust minor axis (axis perpendicular to thrust and thrust major).
Definition: Thrust.hh:92