ChargedFinalState.hh

Go to the documentation of this file.
00001 // -*- C++ -*-
00002 #ifndef RIVET_ChargedFinalState_HH
00003 #define RIVET_ChargedFinalState_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   /// Project only charged final state particles.
00016   class ChargedFinalState : public FinalState {
00017 
00018   public:
00019     
00020     /// Constructor: the supplied FinalState projection is assumed to live through the run.
00021     inline ChargedFinalState(FinalState& fsp)
00022       : _fsproj(fsp)
00023     {
00024       addProjection(_fsproj);
00025     }
00026     
00027     /// Return the name of the projection.
00028     inline string getName() const {
00029       return "ChargedFinalState";
00030     }
00031 
00032   protected:
00033     
00034     /// Apply the projection on the supplied event.
00035     void project(const Event& e);
00036     
00037     /// Compare projections.
00038     int compare(const Projection& p) const;
00039     
00040   private:
00041     
00042     /// The projector for the full final state.
00043     FinalState _fsproj;
00044     
00045   };
00046 
00047   
00048 }
00049 
00050 
00051 #endif