Rivet
1.8.0
|
00001 // -*- C++ -*- 00002 #ifndef RIVET_Thrust_HH 00003 #define RIVET_Thrust_HH 00004 00005 #include "Rivet/Projection.hh" 00006 #include "Rivet/Projections/AxesDefinition.hh" 00007 #include "Rivet/Projections/FinalState.hh" 00008 #include "Rivet/Event.hh" 00009 00010 namespace Rivet { 00011 00012 00044 class Thrust : public AxesDefinition { 00045 public: 00046 00048 Thrust() {} 00049 00050 Thrust(const FinalState& fsp) { 00051 setName("Thrust"); 00052 addProjection(fsp, "FS"); 00053 } 00054 00056 virtual const Projection* clone() const { 00057 return new Thrust(*this); 00058 } 00059 00060 protected: 00061 00063 void project(const Event& e) { 00064 const vector<Particle> ps 00065 = applyProjection<FinalState>(e, "FS").particles(); 00066 calc(ps); 00067 } 00068 00070 int compare(const Projection& p) const { 00071 return mkNamedPCmp(p, "FS"); 00072 } 00073 00074 00075 public: 00076 00079 double thrust() const { return _thrusts[0]; } 00081 double thrustMajor() const { return _thrusts[1]; } 00083 double thrustMinor() const { return _thrusts[2]; } 00085 double oblateness() const { return _thrusts[1] - _thrusts[2]; } 00087 00090 const Vector3& thrustAxis() const { return _thrustAxes[0]; } 00092 const Vector3& thrustMajorAxis() const { return _thrustAxes[1]; } 00094 const Vector3& thrustMinorAxis() const { return _thrustAxes[2]; } 00096 00098 const Vector3& axis1() const { return thrustAxis(); } 00099 const Vector3& axis2() const { return thrustMajorAxis(); } 00100 const Vector3& axis3() const { return thrustMinorAxis(); } 00102 00103 00104 public: 00105 00108 00109 00111 void calc(const FinalState& fs); 00112 00114 void calc(const vector<Particle>& fsparticles); 00115 00117 void calc(const vector<FourMomentum>& fsmomenta); 00118 00120 void calc(const vector<Vector3>& threeMomenta); 00121 00123 00124 00125 private: 00126 00128 vector<double> _thrusts; 00129 00131 vector<Vector3> _thrustAxes; 00132 00133 private: 00134 00136 void _calcThrust(const vector<Vector3>& fsmomenta); 00137 00138 }; 00139 00140 } 00141 00142 #endif