Rivet  1.8.0
Sphericity.hh
00001 // -*- C++ -*-
00002 #ifndef RIVET_Sphericity_HH
00003 #define RIVET_Sphericity_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 
00011 namespace Rivet {
00012 
00051   class Sphericity : public AxesDefinition {
00052 
00053   public:
00054 
00056 
00057 
00059     Sphericity(const FinalState& fsp, double rparam=2.0);
00060 
00062     virtual const Projection* clone() const {
00063       return new Sphericity(*this);
00064     }
00065 
00067 
00068 
00069   protected:
00070 
00072     void project(const Event& e);
00073 
00075     int compare(const Projection& p) const;
00076 
00077   public:
00078 
00080     void clear();
00081 
00085     double sphericity() const { return 3.0 / 2.0 * (lambda2() + lambda3()); }
00087     double transSphericity() const { return 2.0 * lambda2() / ( lambda1() + lambda2() ); }
00089     double planarity() const { return 2 * (sphericity() - 2 * aplanarity()) / 3.0; }
00091     double aplanarity() const { return 3 / 2.0 * lambda3(); }
00093 
00097     const Vector3& sphericityAxis() const { return _sphAxes[0]; }
00099     const Vector3& sphericityMajorAxis() const { return _sphAxes[1]; }
00101     const Vector3& sphericityMinorAxis() const { return _sphAxes[2]; }
00103 
00105     const Vector3& axis1() const { return sphericityAxis(); }
00106     const Vector3& axis2() const { return sphericityMajorAxis(); }
00107     const Vector3& axis3() const { return sphericityMinorAxis(); }
00109 
00110 
00113     double lambda1() const { return _lambdas[0]; }
00114     double lambda2() const { return _lambdas[1]; }
00115     double lambda3() const { return _lambdas[2]; }
00117 
00118 
00121 
00122  
00124     void calc(const FinalState& fs);
00125 
00127     void calc(const vector<Particle>& fsparticles);
00128 
00130     void calc(const vector<FourMomentum>& fsmomenta);
00131 
00133     void calc(const vector<Vector3>& fsmomenta);
00134 
00136 
00137 
00138 
00139   private:
00141     vector<double> _lambdas;
00142 
00144     vector<Vector3> _sphAxes;
00145 
00147     const double _regparam;
00148 
00149   private:
00150 
00152     void _calcSphericity(const vector<Vector3>& fsmomenta);
00153 
00154   };
00155 
00156 }
00157 
00158 
00159 #endif