UnstableFinalState.hh

Go to the documentation of this file.
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   /// @brief Project out all physical-but-decayed particles in an event.
00013   class UnstableFinalState : public Projection {
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     /// @deprecated Is this final state empty?
00044     virtual bool isEmpty() const { return _theParticles.empty(); }
00045 
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 
00056   protected:
00057 
00058     /// The minimum allowed pseudorapidity.
00059     double _etamin;
00060 
00061     /// The maximum allowed pseudorapidity.
00062     double _etamax;
00063 
00064     /// The minimum allowed transverse momentum.
00065     double _ptmin;
00066 
00067     /// The final-state particles.
00068     ParticleVector _theParticles;
00069 
00070   };
00071 
00072 
00073 }
00074 
00075 
00076 #endif