2#ifndef RIVET_ParticleFinder_HH
3#define RIVET_ParticleFinder_HH
5#include "Rivet/Projection.hh"
19 : _cuts(c), _theParticles()
26 virtual unique_ptr<Projection>
clone()
const = 0;
39 size_t size(
const ParticleSelector& s)
const {
return particles(s).size(); }
44 bool empty(
const Cut& c)
const {
return size(c) == 0; }
46 bool empty(
const ParticleSelector& s)
const {
return size(s) == 0; }
Representation of a HepMC event, and enabler of Projection caching.
Definition: Event.hh:22
Base class for projections which return subsets of an event's particles.
Definition: ParticleFinder.hh:11
bool empty() const
Is this final state empty?
Definition: ParticleFinder.hh:42
Particles particles(const Cut &c) const
Get the particles with selection cuts.
Definition: ParticleFinder.hh:63
Particles particles(const ParticleSelector &selector, const ParticleSorter &sorter) const
Definition: ParticleFinder.hh:87
bool empty(const Cut &c) const
Is this final state empty after a Cut is applied?
Definition: ParticleFinder.hh:44
Particles particles(const Cut &c, const ParticleSorter &sorter) const
Definition: ParticleFinder.hh:81
size_t size() const
Count the final-state particles.
Definition: ParticleFinder.hh:35
Particles particlesByPt(const Cut &c=Cuts::open()) const
Definition: ParticleFinder.hh:100
virtual void project(const Event &e)=0
Apply the projection to the event.
ParticleFinder(const Cut &c=Cuts::OPEN)
Construction using Cuts object.
Definition: ParticleFinder.hh:18
Particles particles(const ParticleSelector &selector) const
Get the particles with selection cuts via a functor.
Definition: ParticleFinder.hh:69
Particles particlesByPt(const ParticleSelector &selector) const
Definition: ParticleFinder.hh:107
Particles particlesByPt(double ptmin) const
Definition: ParticleFinder.hh:114
virtual CmpState compare(const Projection &p) const
Compare projections.
const collection_type & entities() const
Template-usable interface common to JetAlg.
Definition: ParticleFinder.hh:132
virtual ~ParticleFinder()
Virtual destructor for inheritance.
Definition: ParticleFinder.hh:23
Particles particles(const ParticleSorter &sorter, const ParticleSelector &selector) const
Definition: ParticleFinder.hh:93
size_t size(const ParticleSelector &s) const
Count the final-state particles after a selection functor is applied.
Definition: ParticleFinder.hh:39
bool empty(const ParticleSelector &s) const
Is this final state empty after a selection functor is applied?
Definition: ParticleFinder.hh:46
Particles rawParticles() const
Definition: ParticleFinder.hh:55
virtual unique_ptr< Projection > clone() const =0
Clone on the heap.
virtual const Particles & particles() const
Get the particles in no particular order, with no cuts.
Definition: ParticleFinder.hh:49
size_t size(const Cut &c) const
Count the final-state particles after a Cut is applied.
Definition: ParticleFinder.hh:37
Particles particles(const ParticleSorter &sorter, const Cut &c=Cuts::open()) const
Definition: ParticleFinder.hh:75
Particle representation, either from a HepMC::GenEvent or reconstructed.
Definition: Particle.hh:53
Specialised vector of Particle objects.
Definition: Particle.hh:25
Base class for all Rivet projections.
Definition: Projection.hh:29
Jets filter_select(const Jets &jets, const Cut &c)
Filter a jet collection in-place to the subset that passes the supplied Cut.
Definition: JetUtils.hh:157
MOMS sortBy(const MOMS &pbs, const CMP &cmp)
Sort a container of momenta by cmp and return by value for const inputs.
Definition: Vector4.hh:1441
bool cmpMomByPt(const FourMomentum &a, const FourMomentum &b)
Comparison to give a sorting by decreasing pT.
Definition: Vector4.hh:1346
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