CentralEtHCM.cc

Go to the documentation of this file.
00001 // -*- C++ -*-
00002 #include "Rivet/Rivet.hh"
00003 #include "Rivet/Projections/CentralEtHCM.hh"
00004 #include "Rivet/Cmp.hh"
00005 
00006 
00007 namespace Rivet {
00008 
00009   int CentralEtHCM::compare(const Projection& p) const {
00010     return mkNamedPCmp(p, "FS");
00011   }
00012 
00013 
00014   void CentralEtHCM::project(const Event& e) {
00015     const FinalStateHCM& fs = applyProjection<FinalStateHCM>(e, "FS");
00016     _sumet = 0.0;
00017     for (ParticleVector::const_iterator p = fs.particles().begin(); p != fs.particles().end(); ++p) {
00018       /// @todo Can this extra rapidity cut be implemented so as to use the cached rapidity result?
00019       // Rapidity cut: |rapidity| < 0.5
00020       const FourMomentum p4 = p->momentum();
00021       if (fabs(p4.rapidity()) < 0.5) _sumet += p4.Et();
00022     }
00023   }
00024 
00025 }