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 inline CentralEtHCM(FinalStateHCM& fs) 00022 : _fshcm(&fs) 00023 { 00024 addProjection(fs); 00025 addCut("eta", MORE_EQ, -0.5); 00026 addCut("eta", LESS_EQ, 0.5); 00027 } 00028 00029 public: 00030 /// Return the name of the projection 00031 inline string getName() const { 00032 return "CentralEtHCM"; 00033 } 00034 00035 protected: 00036 00037 /// Apply the projection on to the Event. 00038 void project(const Event& e); 00039 00040 /// Compare with other projections 00041 int compare(const Projection& p) const; 00042 00043 public: 00044 00045 /// The sum of the Et in the central rapidity bin. 00046 inline double sumEt() const { return _sumet; } 00047 00048 private: 00049 00050 /// The projector for the full final state. 00051 FinalStateHCM* _fshcm; 00052 00053 /// The sum of the Et in the central rapidity bin. 00054 double _sumet; 00055 00056 }; 00057 00058 } 00059 00060 00061 #endif