Rivet  1.8.0
FParameter.hh
00001 // -*- C++ -*-
00002 #ifndef RIVET_Sphericity_HH
00003 #define RIVET_FParameter_HH
00004 
00005 #include "Rivet/Projection.hh"
00006 #include "Rivet/Projections/FinalState.hh"
00007 #include "Rivet/Event.hh"
00008 
00009 
00010 namespace Rivet {
00011 
00012   class FParameter : public Projection {
00013 
00014   public:
00015 
00017 
00018 
00020     FParameter(const FinalState& fsp);
00021 
00023     virtual const Projection* clone() const {
00024       return new FParameter(*this);
00025     }
00026 
00028 
00029 
00030   protected:
00031 
00033     void project(const Event& e);
00034 
00036     //int compare(const Projection& p) const;
00037     // Taken from Thrust.hh
00038     int compare(const Projection& p) const {
00039       return mkNamedPCmp(p, "FS");
00040     }
00041   public:
00042 
00044     void clear();
00045 
00049     double F() const { return lambda1() >= lambda2() ? lambda2()/lambda1() : lambda1()/lambda2(); }
00051 
00054     double lambda1() const { return _lambdas[0]; }
00055     double lambda2() const { return _lambdas[1]; }
00057 
00058 
00061 
00062  
00064     void calc(const FinalState& fs);
00065 
00067     void calc(const vector<Particle>& fsparticles);
00068 
00070     void calc(const vector<FourMomentum>& fsmomenta);
00071 
00073     void calc(const vector<Vector3>& fsmomenta);
00074 
00076   private:
00078     vector<double> _lambdas;
00079 
00080   private:
00081 
00083     void _calcFParameter(const vector<Vector3>& fsmomenta);
00084 
00085   };
00086 }
00087 
00088 
00089 #endif