Rivet API documentation
![]() |
Rivet 4.1.3
|
SmearedJets.hh
42 SmearedJets(const JetFinder& ja, const JetEffFn& bTagEffFn, const JetEffFn& cTagEffFn, Args&& ... effSmearFns)
43 : _detFns({JetEffSmearFn(std::forward<Args>(effSmearFns))...}), _bTagEffFn(bTagEffFn), _cTagEffFn(cTagEffFn)
101 MSG_DEBUG("Truth jet: " << "mom=" << jdet.mom()/GeV << " GeV, pT=" << jdet.pT()/GeV << ", eta=" << jdet.eta());
105 // Re-add constituents & tags if (we assume accidentally) they were lost by the smearing function
108 MSG_DEBUG(" ->" << "mom=" << jdet.mom()/GeV << " GeV, pT=" << jdet.pT()/GeV << ", eta=" << jdet.eta());
114 if (jeff <= 0) { keep = false; break; } //< no need to roll expensive dice (and we deal with -ve probabilities, just in case)
115 if (jeff < 1 && rand01() > jeff) { keep = false; break; } //< roll dice (and deal with >1 probabilities, just in case)
125 if (!btag && j.bTagged()) j.tags().erase(std::remove_if(j.tags().begin(), j.tags().end(), hasBottom), j.tags().end());
Representation of a HepMC event, and enabler of Projection caching.
Definition Event.hh:22
JetFinder(const FinalState &fs, JetMuons usemuons=JetMuons::ALL, JetInvisibles useinvis=JetInvisibles::NONE)
Constructor.
Particles & tags()
Particles which have been tag-matched to this jet.
Definition Jet.hh:113
const FourMomentum & mom() const
Get the equivalent momentum four-vector (const) (alias).
Definition ParticleBase.hh:39
Particle representation, either from a HepMC::GenEvent or reconstructed.
Definition Particle.hh:45
const PROJ & getProjection(const std::string &name) const
Definition ProjectionApplier.hh:71
std::enable_if_t< std::is_base_of< Projection, PROJ >::value, const PROJ & > apply(const Event &evt, const Projection &proj) const
Apply the supplied projection on event evt.
Definition ProjectionApplier.hh:119
const PROJ & declare(const PROJ &proj, const std::string &name) const
Register a contained projection (user-facing version).
Definition ProjectionApplier.hh:184
Cmp< Projection > mkPCmp(const Projection &otherparent, const std::string &pname) const
void setName(const std::string &name)
Used by derived classes to set their name.
Definition Projection.hh:148
void project(const Event &e)
Perform the jet finding & smearing calculation.
Definition SmearedJets.hh:87
SmearedJets(const JetFinder &ja, const JetSmearFn &smearFn, const JetEffFn &bTagEffFn=JET_BTAG_PERFECT, const JetEffFn &cTagEffFn=JET_CTAG_PERFECT)
Constructor with a reco efficiency and optional tagging efficiencies.
Definition SmearedJets.hh:28
SmearedJets(const JetFinder &ja, const JetEffFn &bTagEffFn, const JetEffFn &cTagEffFn, Args &&... effSmearFns)
Constructor with a parameter pack of efficiency and smearing functions, plus optional tagging efficie...
Definition SmearedJets.hh:42
CmpState compare(const Projection &p) const
Compare to another SmearedJets.
Definition SmearedJets.hh:65
const Jets truthJets() const
Get the truth jets (sorted by pT).
Definition SmearedJets.hh:141
void reset()
Reset the projection. Smearing functions will be unchanged.
Definition SmearedJets.hh:146
#define MSG_DEBUG(x)
Debug messaging, not enabled by default, using MSG_LVL.
Definition Logging.hh:182
double p(const ParticleBase &p)
Unbound function access to p.
Definition ParticleBaseUtils.hh:653
double JET_CTAG_PERFECT(const Jet &j)
Return 1 if the given Jet contains a c, otherwise 0.
Definition JetSmearingFunctions.hh:63
double JET_BTAG_PERFECT(const Jet &j)
Return 1 if the given Jet contains a b, otherwise 0.
Definition JetSmearingFunctions.hh:56
function< Jet(const Jet &)> JetSmearFn
Typedef for Jet smearing functions/functors.
Definition JetSmearingFunctions.hh:20
function< double(const Jet &)> JetEffFn
Typedef for Jet efficiency functions/functors.
Definition JetSmearingFunctions.hh:23
T getEnvParam(const std::string name, const T &fallback)
Get a parameter from a named environment variable, with automatic type conversion.
Definition Utils.hh:874
Definition MC_CENT_PPB_Projections.hh:10
Cmp< T > cmp(const T &t1, const T &t2)
Global helper function for easy creation of Cmp objects.
Definition Cmp.hh:255
uintptr_t get_address(std::function< T(U...)> f)
Get a function pointer / hash integer from an std::function.
Definition RivetSTL.hh:320
Functor for simultaneous efficiency-filtering and smearing of Jets.
Definition JetSmearingFunctions.hh:105
Generated on for Rivet by
