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