Rivet  1.8.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 
56  virtual const Projection* clone() const {
57  return new Thrust(*this);
58  }
59 
60  protected:
61 
63  void project(const Event& e) {
64  const vector<Particle> ps
65  = applyProjection<FinalState>(e, "FS").particles();
66  calc(ps);
67  }
68 
70  int compare(const Projection& p) const {
71  return mkNamedPCmp(p, "FS");
72  }
73 
74 
75  public:
76 
79  double thrust() const { return _thrusts[0]; }
81  double thrustMajor() const { return _thrusts[1]; }
83  double thrustMinor() const { return _thrusts[2]; }
85  double oblateness() const { return _thrusts[1] - _thrusts[2]; }
87 
90  const Vector3& thrustAxis() const { return _thrustAxes[0]; }
92  const Vector3& thrustMajorAxis() const { return _thrustAxes[1]; }
94  const Vector3& thrustMinorAxis() const { return _thrustAxes[2]; }
96 
98  const Vector3& axis1() const { return thrustAxis(); }
99  const Vector3& axis2() const { return thrustMajorAxis(); }
100  const Vector3& axis3() const { return thrustMinorAxis(); }
102 
103 
104  public:
105 
108 
109 
111  void calc(const FinalState& fs);
112 
114  void calc(const vector<Particle>& fsparticles);
115 
117  void calc(const vector<FourMomentum>& fsmomenta);
118 
120  void calc(const vector<Vector3>& threeMomenta);
121 
123 
124 
125  private:
126 
128  vector<double> _thrusts;
129 
131  vector<Vector3> _thrustAxes;
132 
133  private:
134 
136  void _calcThrust(const vector<Vector3>& fsmomenta);
137 
138  };
139 
140 }
141 
142 #endif