CentralEtHCM.hh

Go to the documentation of this file.
00001 // -*- C++ -*-
00002 #ifndef RIVET_CentralEtHCM_HH
00003 #define RIVET_CentralEtHCM_HH
00004 
00005 #include "Rivet/Particle.hh"
00006 #include "Rivet/Event.hh"
00007 #include "Rivet/Projections/FinalStateHCM.hh"
00008 
00009 
00010 namespace Rivet {
00011 
00012 
00013   /// Sum up Et of all particles in the hadronic final state in the
00014   /// central rapidity bin of the HCM system.
00015   class CentralEtHCM : public Projection {
00016 
00017   public:
00018 
00019     /// The default constructor. Must specify a FinalStateHCM projection
00020     /// object which is guaranteed to live throughout the run.
00021     CentralEtHCM(const FinalStateHCM& fs)
00022     {
00023       setName("CentralEtHCM");
00024       addProjection(fs, "FS");
00025     }
00026 
00027     /// Clone on the heap.
00028     virtual const Projection* clone() const {
00029       return new CentralEtHCM(*this);
00030     }
00031 
00032   protected:
00033 
00034     /// Apply the projection on to the Event.
00035     void project(const Event& e);
00036 
00037     /// Compare with other projections
00038     int compare(const Projection& p) const;
00039 
00040   public:
00041 
00042     /// The sum of the Et in the central rapidity bin.
00043     double sumEt() const { return _sumet; }
00044 
00045   private:
00046 
00047     /// The sum of the Et in the central rapidity bin.
00048     double _sumet;
00049 
00050   };
00051 
00052 }
00053 
00054 
00055 #endif