rivet is hosted by Hepforge, IPPP Durham
FParameter.hh
Go to the documentation of this file.
00001 // -*- C++ -*-
00002 #ifndef RIVET_FParameter_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 
00016     /// @name Constructors etc.
00017     //@{
00018 
00019     /// Constructor
00020     FParameter(const FinalState& fsp);
00021 
00022     /// Clone on the heap.
00023     virtual const Projection* clone() const {
00024       return new FParameter(*this);
00025     }
00026 
00027     //@}
00028 
00029 
00030   protected:
00031 
00032     /// Perform the projection on the Event
00033     void project(const Event& e);
00034 
00035     /// Compare with other projections
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 
00043     /// Reset the projection
00044     void clear();
00045 
00046     /// @name Access the event shapes by name
00047     /// @{
00048     /// F-Parametr
00049     double F() const { return lambda1() >= lambda2() ? lambda2()/lambda1() : lambda1()/lambda2(); }
00050     /// @}
00051 
00052     /// @name Access the linearised transverse momentum tensor eigenvalues
00053     /// @{
00054     double lambda1() const { return _lambdas[0]; }
00055     double lambda2() const { return _lambdas[1]; }
00056     /// @}
00057 
00058 
00059     /// @name Direct methods
00060     /// Ways to do the calculation directly, without engaging the caching system
00061     //@{
00062  
00063     /// Manually calculate the sphericity, without engaging the caching system
00064     void calc(const FinalState& fs);
00065 
00066     /// Manually calculate the sphericity, without engaging the caching system
00067     void calc(const vector<Particle>& fsparticles);
00068 
00069     /// Manually calculate the sphericity, without engaging the caching system
00070     void calc(const vector<FourMomentum>& fsmomenta);
00071 
00072     /// Manually calculate the sphericity, without engaging the caching system
00073     void calc(const vector<Vector3>& fsmomenta);
00074 
00075     //@}
00076   private:
00077     /// Eigenvalues.
00078     vector<double> _lambdas;
00079 
00080   private:
00081 
00082     /// Actually do the calculation
00083     void _calcFParameter(const vector<Vector3>& fsmomenta);
00084 
00085   };
00086 }
00087 
00088 
00089 #endif