00001 // -*- C++ -*- 00002 #ifndef RIVET_UnstableFinalState_HH 00003 #define RIVET_UnstableFinalState_HH 00004 00005 #include "Rivet/Projections/FinalState.hh" 00006 #include "Rivet/Particle.hh" 00007 #include "Rivet/Event.hh" 00008 00009 namespace Rivet { 00010 00011 00012 /// @brief Project out all physical-but-decayed particles in an event. 00013 class UnstableFinalState : public FinalState { 00014 public: 00015 00016 /// @name Standard constructors and destructors. 00017 //@{ 00018 /// The default constructor. May specify the minimum and maximum 00019 /// pseudorapidity \f$ \eta \f$ and the min \f$ p_T \f$ (in GeV). 00020 UnstableFinalState(double mineta = -MAXRAPIDITY, 00021 double maxeta = MAXRAPIDITY, 00022 double minpt = 0.0*GeV) 00023 : _etamin(mineta), _etamax(maxeta), _ptmin(minpt) 00024 { 00025 setName("UnstableFinalState"); 00026 // addCut("eta", MORE_EQ, mineta); 00027 // addCut("eta", LESS_EQ, maxeta); 00028 // addCut("pT", MORE_EQ, minpt); 00029 } 00030 00031 00032 /// Clone on the heap. 00033 virtual const Projection* clone() const { 00034 return new UnstableFinalState(*this); 00035 } 00036 //@} 00037 00038 /// Access the projected final-state particles. 00039 virtual const ParticleVector& particles() const { return _theParticles; } 00040 00041 /// Is this final state empty? 00042 virtual bool empty() const { return _theParticles.empty(); } 00043 00044 /// @deprecated Is this final state empty? 00045 virtual bool isEmpty() const { return _theParticles.empty(); } 00046 00047 00048 protected: 00049 00050 /// Apply the projection to the event. 00051 virtual void project(const Event& e); 00052 00053 /// Compare projections. 00054 virtual int compare(const Projection& p) const; 00055 00056 00057 protected: 00058 00059 /// The minimum allowed pseudorapidity. 00060 double _etamin; 00061 00062 /// The maximum allowed pseudorapidity. 00063 double _etamax; 00064 00065 /// The minimum allowed transverse momentum. 00066 double _ptmin; 00067 00068 /// The final-state particles. 00069 ParticleVector _theParticles; 00070 00071 }; 00072 00073 00074 } 00075 00076 00077 #endif