2#ifndef RIVET_FastJets_HH
3#define RIVET_FastJets_HH
6#include "Rivet/Particle.hh"
7#include "Rivet/Projection.hh"
8#include "Rivet/Projections/JetAlg.hh"
9#include "Rivet/Projections/FinalState.hh"
10#include "Rivet/Tools/RivetFastJet.hh"
12#include "fastjet/SISConePlugin.hh"
13#include "fastjet/ATLASConePlugin.hh"
14#include "fastjet/CMSIterativeConePlugin.hh"
15#include "fastjet/CDFJetCluPlugin.hh"
16#include "fastjet/CDFMidPointPlugin.hh"
17#include "fastjet/D0RunIIConePlugin.hh"
18#include "fastjet/TrackJetPlugin.hh"
19#include "fastjet/JadePlugin.hh"
21#include "Rivet/Projections/PxConePlugin.hh"
22#include "Rivet/Tools/TypeTraits.hh"
35 CA=2, CAM=2, CAMBRIDGE=2,
38 CDFJETCLU, CDFMIDPOINT, D0ILCONE,
39 JADE, DURHAM, TRACKJET, GENKTEE ,
50 const fastjet::JetDefinition& jdef,
53 fastjet::AreaDefinition* adef=
nullptr)
54 :
JetAlg(fsp, usemuons, useinvis), _jdef(jdef), _adef(adef)
63 const fastjet::JetDefinition& jdef,
64 fastjet::AreaDefinition* adef,
67 :
FastJets(fsp, jdef, usemuons, useinvis, adef)
74 fastjet::JetAlgorithm type,
75 fastjet::RecombinationScheme recom,
double rparameter,
78 fastjet::AreaDefinition* adef=
nullptr)
79 :
FastJets(fsp, fastjet::JetDefinition(type, rparameter, recom), usemuons, useinvis, adef)
86 fastjet::JetAlgorithm type,
87 fastjet::RecombinationScheme recom,
double rparameter,
88 fastjet::AreaDefinition* adef,
91 :
FastJets(fsp, type, recom, rparameter, usemuons, useinvis, adef)
98 fastjet::JetDefinition::Plugin* plugin,
101 fastjet::AreaDefinition* adef=
nullptr)
102 :
FastJets(fsp, fastjet::JetDefinition(plugin), usemuons, useinvis, adef)
104 _plugin.
reset(plugin);
111 fastjet::JetDefinition::Plugin* plugin,
112 fastjet::AreaDefinition* adef,
115 :
FastJets(fsp, plugin, usemuons, useinvis, adef)
126 Algo alg,
double rparameter,
129 fastjet::AreaDefinition* adef=
nullptr,
130 double seed_threshold=1.0)
131 :
JetAlg(fsp, usemuons, useinvis)
134 _initJdef(alg, rparameter, seed_threshold);
159 using Projection::operator =;
206 _trfs.push_back(shared_ptr<fastjet::Transformer>(trf));
213 template<
typename TRFS,
typename TRF=
typename TRFS::value_type>
214 typename std::enable_if<Derefable<TRF>::value,
void>::type
216 for (
auto& trf : trfs)
addTrf(trf);
276 const shared_ptr<fastjet::ClusterSequence>
clusterSeq()
const {
283 return areaDef() ? dynamic_pointer_cast<fastjet::ClusterSequenceArea>(_cseq) :
nullptr;
287 const fastjet::JetDefinition&
jetDef()
const {
295 const shared_ptr<fastjet::AreaDefinition>
areaDef()
const {
306 void _initJdef(
Algo alg,
double rparameter,
double seed_threshold);
325 fastjet::JetDefinition _jdef;
328 std::shared_ptr<fastjet::AreaDefinition> _adef;
331 std::shared_ptr<fastjet::ClusterSequence> _cseq;
334 std::shared_ptr<fastjet::JetDefinition::Plugin> _plugin;
337 std::vector< std::shared_ptr<fastjet::Transformer> > _trfs;
340 mutable std::map<int, vector<double> > _yscales;
Representation of a HepMC event, and enabler of Projection caching.
Definition Event.hh:22
Project out jets found using the FastJet package jet algorithms.
Definition FastJets.hh:28
static Jet mkJet(const PseudoJet &pj, const Particles &fsparticles, const Particles &tagparticles=Particles())
Make a Rivet Jet from a PseudoJet holding a user_index code for lookup of Rivet fsparticle or tagpart...
CmpState compare(const Projection &p) const
Compare projections.
PseudoJets pseudojetsByE(double ptmin=0.0) const
Alias.
Definition FastJets.hh:258
FastJets(const FinalState &fsp, fastjet::JetAlgorithm type, fastjet::RecombinationScheme recom, double rparameter, fastjet::AreaDefinition *adef, JetAlg::Muons usemuons=JetAlg::Muons::ALL, JetAlg::Invisibles useinvis=JetAlg::Invisibles::NONE)
Definition FastJets.hh:85
Algo
Definition FastJets.hh:33
void clearTrfs()
Don't apply any jet transformers.
Definition FastJets.hh:220
FastJets(const FinalState &fsp, const fastjet::JetDefinition &jdef, fastjet::AreaDefinition *adef, JetAlg::Muons usemuons=JetAlg::Muons::ALL, JetAlg::Invisibles useinvis=JetAlg::Invisibles::NONE)
Definition FastJets.hh:62
PseudoJets pseudojetsByRapidity(double ptmin=0.0) const
Alias.
Definition FastJets.hh:266
FastJets(const FinalState &fsp, fastjet::JetAlgorithm type, fastjet::RecombinationScheme recom, double rparameter, JetAlg::Muons usemuons=JetAlg::Muons::ALL, JetAlg::Invisibles useinvis=JetAlg::Invisibles::NONE, fastjet::AreaDefinition *adef=nullptr)
Definition FastJets.hh:73
FastJets(const FinalState &fsp, fastjet::JetDefinition::Plugin *plugin, fastjet::AreaDefinition *adef, JetAlg::Muons usemuons=JetAlg::Muons::ALL, JetAlg::Invisibles useinvis=JetAlg::Invisibles::NONE)
Explicitly pass in an externally-constructed plugin, with reordered args for easier specification of ...
Definition FastJets.hh:110
std::enable_if< Derefable< TRF >::value, void >::type addTrfs(const TRFS &trfs)
Add a list of grooming transformers.
Definition FastJets.hh:215
void clearJetArea()
Don't calculate a jet area.
Definition FastJets.hh:191
static Jets mkJets(const PseudoJets &pjs, const Particles &fsparticles, const Particles &tagparticles=Particles())
Convert a whole list of PseudoJets to a list of Jets, with mkJet-style unpacking.
const shared_ptr< fastjet::ClusterSequence > clusterSeq() const
Definition FastJets.hh:276
DEFAULT_RIVET_PROJ_CLONE(FastJets)
Clone on the heap.
PseudoJets pseudojets(double ptmin=0.0) const
Alias.
Definition FastJets.hh:242
PseudoJets pseudoJets(double ptmin=0.0) const
FastJets(const FinalState &fsp, Algo alg, double rparameter, JetAlg::Muons usemuons=JetAlg::Muons::ALL, JetAlg::Invisibles useinvis=JetAlg::Invisibles::NONE, fastjet::AreaDefinition *adef=nullptr, double seed_threshold=1.0)
Convenience constructor using Rivet enums for most common jet algs (including some plugins).
Definition FastJets.hh:125
PseudoJets pseudoJetsByRapidity(double ptmin=0.0) const
Definition FastJets.hh:262
PseudoJets pseudoJetsByE(double ptmin=0.0) const
Definition FastJets.hh:254
PseudoJets pseudoJetsByPt(double ptmin=0.0) const
Definition FastJets.hh:246
void calc(const Particles &fsparticles, const Particles &tagparticles=Particles())
Do the calculation locally (no caching).
const shared_ptr< fastjet::ClusterSequenceArea > clusterSeqArea() const
Definition FastJets.hh:282
void project(const Event &e)
Perform the projection on the Event.
void useJetArea(fastjet::AreaDefinition *adef)
Use provided jet area definition.
Definition FastJets.hh:186
FastJets(const FinalState &fsp, fastjet::JetDefinition::Plugin *plugin, JetAlg::Muons usemuons=JetAlg::Muons::ALL, JetAlg::Invisibles useinvis=JetAlg::Invisibles::NONE, fastjet::AreaDefinition *adef=nullptr)
Explicitly pass in an externally-constructed plugin.
Definition FastJets.hh:97
static PseudoJets mkClusterInputs(const Particles &fsparticles, const Particles &tagparticles=Particles())
Make PseudoJets for input to a ClusterSequence, with user_index codes for constituent- and tag-partic...
FastJets(const FinalState &fsp, const fastjet::JetDefinition &jdef, JetAlg::Muons usemuons=JetAlg::Muons::ALL, JetAlg::Invisibles useinvis=JetAlg::Invisibles::NONE, fastjet::AreaDefinition *adef=nullptr)
Definition FastJets.hh:49
const fastjet::JetDefinition & jetDef() const
Return the jet definition.
Definition FastJets.hh:287
void addTrf(fastjet::Transformer *trf)
Add a grooming transformer (base class of fastjet::Filter, etc.)
Definition FastJets.hh:205
PseudoJets pseudojetsByPt(double ptmin=0.0) const
Alias.
Definition FastJets.hh:250
Jet trimJet(const Jet &input, const fastjet::Filter &trimmer) const
Trim (filter) a jet, keeping tag and constituent info in the resulting jet.
void reset()
Reset the projection. Jet def, etc. are unchanged.
const shared_ptr< fastjet::AreaDefinition > areaDef() const
Return the area definition.
Definition FastJets.hh:295
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
Muons
Enum for the treatment of muons: whether to include all, some, or none in jet-finding.
Definition JetFinder.hh:19
Invisibles
Enum for the treatment of invisible particles: whether to include all, some, or none in jet-finding.
Definition JetFinder.hh:22
Representation of a clustered jet of particles.
Definition Jet.hh:48
Specialised vector of Jet objects.
Definition Jet.hh:23
Specialised vector of Particle objects.
Definition Particle.hh:25
Base class for all Rivet projections.
Definition Projection.hh:29
double p(const ParticleBase &p)
Unbound function access to p.
Definition ParticleBaseUtils.hh:684
Definition MC_Cent_pPb.hh:10
std::vector< PseudoJet > PseudoJets
Definition RivetFastJet.hh:30