2 #ifndef RIVET_LossyFinalState_HH 3 #define RIVET_LossyFinalState_HH 5 #include "Rivet/Tools/Logging.hh" 6 #include "Rivet/Rivet.hh" 7 #include "Rivet/Particle.hh" 8 #include "Rivet/Event.hh" 9 #include "Rivet/Projection.hh" 10 #include "Rivet/Projections/FinalState.hh" 16 template <
typename FILTER>
57 const FinalState& fs = applyProjection<FinalState>(e,
"FS");
58 getLog() << Log::DEBUG <<
"Pre-loss number of FS particles = " << fs.
particles().size() << endl;
59 _theParticles.clear();
61 std::back_inserter(_theParticles), _filter);
62 getLog() << Log::DEBUG <<
"Filtered number of FS particles = " << _theParticles.size() << endl;
70 if (fscmp)
return fscmp;
71 return _filter.compare(other._filter);
void setName(const std::string &name)
Used by derived classes to set their name.
Definition: Projection.hh:120
Definition: MC_JetAnalysis.hh:9
virtual ~LossyFinalState()
Virtual destructor, to allow subclassing.
Definition: LossyFinalState.hh:43
Templated FS projection which can lose some of the supplied particles.
Definition: LossyFinalState.hh:17
int compare(const Projection &p) const
Compare projections.
Definition: LossyFinalState.hh:67
void project(const Event &e)
Apply the projection on the supplied event.
Definition: LossyFinalState.hh:56
virtual const ParticleVector & particles() const
Get the final-state particles.
Definition: FinalState.hh:39
LossyFinalState(const FinalState &fsp, FILTER filter)
Constructor from FinalState.
Definition: LossyFinalState.hh:24
Project out all final-state particles in an event. Probably the most important projection in Rivet! ...
Definition: FinalState.hh:14
const PROJ & addProjection(const PROJ &proj, const std::string &name)
Definition: ProjectionApplier.hh:113
virtual const Projection * clone() const
Clone on the heap.
Definition: LossyFinalState.hh:46
Cmp< Projection > mkNamedPCmp(const Projection &otherparent, const std::string &pname) const
Definition: Projection.cc:51
FinalState(double mineta=-MAXRAPIDITY, double maxeta=MAXRAPIDITY, double minpt=0.0 *GeV)
Definition: FinalState.cc:9
static const double MAXRAPIDITY
A sensible default maximum value of rapidity for Rivet analyses to use.
Definition: Rivet.hh:24
LossyFinalState(FILTER filter, double mineta=-MAXRAPIDITY, double maxeta=MAXRAPIDITY, double minpt=0.0)
Stand-alone constructor. Initialises the base FinalState projection.
Definition: LossyFinalState.hh:32
Base class for all Rivet projections.
Definition: Projection.hh:28
Log & getLog() const
Get a Log object based on the getName() property of the calling projection object.
Definition: Projection.hh:114