2#ifndef RIVET_JetFinder_HH
3#define RIVET_JetFinder_HH
5#include "Rivet/Projection.hh"
6#include "Rivet/Projections/FinalState.hh"
7#include "Rivet/Projections/VisibleFinalState.hh"
8#include "Rivet/Particle.hh"
19 enum class Muons { NONE, DECAY, ALL };
28 Muons usemuons = Muons::ALL,
35 virtual unique_ptr<Projection>
clone()
const = 0;
41 using Projection::operator =;
67 _useInvisibles = useinvis;
71 DEPRECATED(
"make an explicit choice from Invisibles::{NONE,DECAY,ALL}. This boolean call does not allow for ALL")
73 _useInvisibles = useinvis ? Invisibles::DECAY : Invisibles::NONE;
106 return jets(c, sorter);
119 return jets(selector, sorter);
157 virtual Jets _jets()
const = 0;
165 size_t size(
const Cut& c)
const {
return jets(c).size(); }
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
Abstract base class for projections which can return a set of Jets.
Definition JetFinder.hh:15
Jets jetsByPt(const Cut &c=Cuts::open()) const
Definition JetFinder.hh:128
Muons
Enum for the treatment of muons: whether to include all, some, or none in jet-finding.
Definition JetFinder.hh:19
size_t size(const Cut &c) const
Count the jets after a Cut is applied.
Definition JetFinder.hh:165
virtual CmpState compare(const Projection &p) const =0
Compare projections.
virtual void project(const Event &e)=0
Perform the projection on the Event.
size_t size() const
Count the jets.
Definition JetFinder.hh:163
size_t size(const JetSelector &s) const
Count the jets after a selection functor is applied.
Definition JetFinder.hh:167
Jets jets(const JetSelector &selector, const JetSorter &sorter) const
Definition JetFinder.hh:111
Jets jets(const Cut &c, const JetSorter &sorter) const
Definition JetFinder.hh:97
Jets jetsByPt(double ptmin) const
Definition JetFinder.hh:147
virtual Jets jets(const Cut &c=Cuts::open()) const
Definition JetFinder.hh:84
virtual Jets jets(const JetSelector &selector) const
Definition JetFinder.hh:90
virtual unique_ptr< Projection > clone() const =0
Clone on the heap.
Invisibles
Enum for the treatment of invisible particles: whether to include all, some, or none in jet-finding.
Definition JetFinder.hh:22
bool empty(const JetSelector &s) const
Is this jet finder empty after a selection functor is applied?
Definition JetFinder.hh:174
Jets jets(const JetSorter &sorter, const JetSelector selector) const
Definition JetFinder.hh:118
Jets jetsByPt(const JetSelector &selector) const
Definition JetFinder.hh:137
void useInvisibles(Invisibles useinvis=Invisibles::DECAY)
Include (some) invisible particles in jet construction.
Definition JetFinder.hh:66
Jets jets(const JetSorter &sorter, const Cut &c=Cuts::open()) const
Definition JetFinder.hh:104
virtual ~JetFinder()=default
Destructor.
virtual void reset()=0
Clear the projection.
bool empty(const Cut &c) const
Is this jet finder empty after a Cut is applied?
Definition JetFinder.hh:172
JetFinder(const FinalState &fs, Muons usemuons=Muons::ALL, Invisibles useinvis=Invisibles::NONE)
Constructor.
collection_type entities() const
Template-usable interface common to FinalState.
Definition JetFinder.hh:183
void useMuons(Muons usemuons=Muons::ALL)
Include (some) muons in jet construction.
Definition JetFinder.hh:56
bool empty() const
Is this jet finder empty?
Definition JetFinder.hh:170
JetFinder()=default
Default constructor.
Representation of a clustered jet of particles.
Definition Jet.hh:48
Specialised vector of Jet objects.
Definition Jet.hh:23
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
function< bool(const Jet &)> JetSelector
std::function instantiation for functors taking a Jet and returning a bool
Definition JetUtils.hh:41
function< bool(const Jet &, const Jet &)> JetSorter
std::function instantiation for functors taking two Jets and returning a bool
Definition JetUtils.hh:43
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:1451
bool cmpMomByPt(const FourMomentum &a, const FourMomentum &b)
Comparison to give a sorting by decreasing pT.
Definition Vector4.hh:1356
double p(const ParticleBase &p)
Unbound function access to p.
Definition ParticleBaseUtils.hh:684
const Cut & open()
Fully open cut singleton, accepts everything.
Definition MC_Cent_pPb.hh:10