rivet is hosted by Hepforge, IPPP Durham
NonHadronicFinalState.hh
Go to the documentation of this file.
00001 // -*- C++ -*-
00002 #ifndef RIVET_NonHadronicFinalState_HH
00003 #define RIVET_NonHadronicFinalState_HH
00004 
00005 #include "Rivet/Tools/Logging.hh"
00006 #include "Rivet/Rivet.hh"
00007 #include "Rivet/Particle.hh"
00008 #include "Rivet/Event.hh"
00009 #include "Rivet/Projection.hh"
00010 #include "Rivet/Projections/FinalState.hh"
00011 
00012 
00013 namespace Rivet {
00014 
00015   /// @brief Project only hadronic final state particles.
00016   class NonHadronicFinalState : public FinalState {
00017 
00018   public:
00019 
00020     /// Constructor: the supplied FinalState projection is assumed to live through the run.
00021     NonHadronicFinalState(FinalState& fsp)
00022     {
00023       setName("NonHadronicFinalState");
00024       addProjection(fsp, "FS");
00025     }
00026 
00027     NonHadronicFinalState(double mineta = -MAXRAPIDITY,
00028               double maxeta = MAXRAPIDITY,
00029               double minpt = 0.0*GeV)
00030     {
00031       setName("NonHadronicFinalState");
00032       addProjection(FinalState(mineta, maxeta, minpt), "FS");
00033     }
00034 
00035     /// Clone on the heap.
00036     virtual const Projection* clone() const {
00037       return new NonHadronicFinalState(*this);
00038     }
00039 
00040   protected:
00041 
00042     /// Apply the projection on the supplied event.
00043     void project(const Event& e);
00044 
00045     /// Compare projections.
00046     int compare(const Projection& p) const;
00047 
00048   };
00049 
00050 
00051 }
00052 
00053 
00054 #endif