2#ifndef RIVET_LossyFinalState_HH
3#define RIVET_LossyFinalState_HH
5#include "Rivet/Tools/Logging.hh"
6#include "Rivet/Config/RivetCommon.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>
50 const FinalState& fs = applyProjection<FinalState>(e,
"FS");
51 getLog() << Log::DEBUG <<
"Pre-loss number of FS particles = " << fs.
particles().size() <<
'\n';
52 _theParticles.clear();
54 std::back_inserter(_theParticles), _filter);
55 getLog() << Log::DEBUG <<
"Filtered number of FS particles = " << _theParticles.size() <<
'\n';
63 if (fscmp != CmpState::EQ)
return fscmp;
64 return _filter.compare(other._filter);
Representation of a HepMC event, and enabler of Projection caching.
Definition: Event.hh:22
Project out all final-state particles in an event. Probably the most important projection in Rivet!
Definition: FinalState.hh:12
FinalState(const Cut &c=Cuts::open())
Construction using Cuts object.
Templated FS projection which can lose some of the supplied particles.
Definition: LossyFinalState.hh:17
CmpState compare(const Projection &p) const
Compare projections.
Definition: LossyFinalState.hh:60
virtual ~LossyFinalState()
Virtual destructor, to allow subclassing.
Definition: LossyFinalState.hh:40
LossyFinalState(const FinalState &fsp, FILTER filter)
Constructor from FinalState.
Definition: LossyFinalState.hh:24
void project(const Event &e)
Apply the projection on the supplied event.
Definition: LossyFinalState.hh:49
LossyFinalState(FILTER filter, const Cut &c=Cuts::open())
Stand-alone constructor. Initialises the base FinalState projection.
Definition: LossyFinalState.hh:32
DEFAULT_RIVET_PROJ_CLONE(LossyFinalState)
Clone on the heap.
virtual const Particles & particles() const
Get the particles in no particular order, with no cuts.
Definition: ParticleFinder.hh:49
const PROJ & declare(const PROJ &proj, const std::string &name)
Register a contained projection (user-facing version)
Definition: ProjectionApplier.hh:170
Base class for all Rivet projections.
Definition: Projection.hh:29
void setName(const std::string &name)
Used by derived classes to set their name.
Definition: Projection.hh:142
Log & getLog() const
Get a Log object based on the getName() property of the calling projection object.
Definition: Projection.hh:136
Cmp< Projection > mkNamedPCmp(const Projection &otherparent, const std::string &pname) const
double p(const ParticleBase &p)
Unbound function access to p.
Definition: ParticleBaseUtils.hh:653
const Cut & open()
Fully open cut singleton, accepts everything.
Definition: MC_Cent_pPb.hh:10