Rivet API documentation
![]() |
Rivet 4.1.3
|
SimpleAnalysis.hh
111 declare(SmearedJets(jetfs, _smears_jet[jditem.first], _effs_btag[jditem.first]), "Jets"+jditem.first);
141 void setElectronReco(const ParticleEffFn& eff, const ParticleSmearFn& smear=PARTICLE_SMEAR_IDENTITY, IDClass idc=IDClass::MEDIUM) {
146 void setMuonReco(const ParticleEffFn& eff, const ParticleSmearFn& smear=PARTICLE_SMEAR_IDENTITY, IDClass idc=IDClass::MEDIUM) {
151 void setPhotonReco(const ParticleEffFn& eff, const ParticleSmearFn& smear=PARTICLE_SMEAR_IDENTITY, IDClass idc=IDClass::MEDIUM) {
156 void setTauReco(const ParticleEffFn& eff, const ParticleSmearFn& smear=PARTICLE_SMEAR_IDENTITY, IDClass idc=IDClass::MEDIUM) {
161 void setTrkReco(const ParticleEffFn& eff, const ParticleSmearFn& smear=PARTICLE_SMEAR_IDENTITY) {
166 void setJetReco(const JetSmearFn& smear, const JetEffFn& btageff, const std::string& jetname="DEFAULT") {
193 void setJetDef(const JetScheme& jdef, const std::string& jetname="DEFAULT") { _jdefs[jetname] = jdef; }
413 const ParticleFinder& electronsProj(IDClass eclass=IDClass::MEDIUM, bool include_indirect=false) {
425 const ParticleFinder& photonsProj(IDClass phoclass=IDClass::MEDIUM, bool include_indirect=false) {
446 std::map<IDClass, ParticleEffFn> _effs_electron{ { IDClass::LOOSE, PARTICLE_EFF_ONE }, { IDClass::MEDIUM, PARTICLE_EFF_ONE }, { IDClass::TIGHT, PARTICLE_EFF_ONE } };
447 std::map<IDClass, ParticleEffFn> _effs_muon{ { IDClass::LOOSE, PARTICLE_EFF_ONE }, { IDClass::MEDIUM, PARTICLE_EFF_ONE }, { IDClass::TIGHT, PARTICLE_EFF_ONE } };
448 std::map<IDClass, ParticleEffFn> _effs_photon{ { IDClass::LOOSE, PARTICLE_EFF_ONE }, { IDClass::MEDIUM, PARTICLE_EFF_ONE }, { IDClass::TIGHT, PARTICLE_EFF_ONE } };
449 std::map<IDClass, ParticleEffFn> _effs_tau{ { IDClass::LOOSE, PARTICLE_EFF_ONE }, { IDClass::MEDIUM, PARTICLE_EFF_ONE }, { IDClass::TIGHT, PARTICLE_EFF_ONE } };
450 ParticleSmearFn _smear_electron{PARTICLE_SMEAR_IDENTITY}, _smear_muon{PARTICLE_SMEAR_IDENTITY}, _smear_photon{PARTICLE_SMEAR_IDENTITY}, _smear_tau{PARTICLE_SMEAR_IDENTITY};
double crossSection() const
Get the process cross-section in pb. Throws if this hasn't been set.
const Event & currentEvent() const
Access the current event.
Definition Analysis.hh:427
void scale(MultiplexPtr< Multiplexer< T > > &ao, CounterAdapter factor)
Multiplicatively scale the given AnalysisObject, ao, by factor factor.
Definition Analysis.hh:1291
virtual std::string name() const
Get the name of the analysis.
Definition Analysis.hh:163
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:41
Reconstruct leptons, generally including "dressing" with clustered photons.
Definition LeptonFinder.hh:29
Interface for projections that find missing transverse energy/momentum.
Definition METFinder.hh:11
Calculate missing , etc. as complements to the total visible momentum.
Definition MissingMomentum.hh:22
Base class for projections which return subsets of an event's particles.
Definition ParticleFinder.hh:11
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
bool hasProjection(const std::string &name) const
Does this applier have a projection registered under the name name?
Definition ProjectionApplier.hh:55
Particles electrons(const Cut &cut, IDClass eclass=IDClass::MEDIUM, bool include_indirect=false) const
Get the pT-ordered set of reconstructed direct electrons, with extra cuts.
Definition SimpleAnalysis.hh:213
const ParticleFinder & tracksProj()
Direct access to the underlying projection.
Definition SimpleAnalysis.hh:429
const ParticleFinder & electronsProj(IDClass eclass=IDClass::MEDIUM, bool include_indirect=false)
Direct access to the underlying projection.
Definition SimpleAnalysis.hh:413
void doSimpleOverlapRemoval(IDClass eclass=IDClass::MEDIUM, IDClass muclass=IDClass::MEDIUM, IDClass phoclass=IDClass::MEDIUM, bool include_indirect=false, const std::string &jetname="DEFAULT")
Perform a simple, in-place overlap removal between all physics objects.
Definition SimpleAnalysis.hh:364
const Jets & bjets(const std::string &jetname="DEFAULT") const
Get a pT-ordered named set of reconstructed b-tagged jets.
Definition SimpleAnalysis.hh:309
const Particles & photons(IDClass phoclass=IDClass::MEDIUM, bool include_indirect=false, double dRiso=0.4, double isofrac=0.1) const
Get the pT-ordered set of reconstructed direct and isolated photons.
Definition SimpleAnalysis.hh:233
void setTauReco(const ParticleEffFn &eff, const ParticleSmearFn &smear=PARTICLE_SMEAR_IDENTITY, IDClass idc=IDClass::MEDIUM)
Set the tau reco functions for a given ID class.
Definition SimpleAnalysis.hh:156
void setPhotonReco(const ParticleEffFn &eff, const ParticleSmearFn &smear=PARTICLE_SMEAR_IDENTITY, IDClass idc=IDClass::MEDIUM)
Set the photon reco functions for a given ID class.
Definition SimpleAnalysis.hh:151
const Jets & jets(const std::string &jetname="DEFAULT") const
Get a pT-ordered named set of reconstructed jets.
Definition SimpleAnalysis.hh:295
Particles muons(const Cut &cut, IDClass muclass=IDClass::MEDIUM, bool include_indirect=false) const
Get the pT-ordered set of reconstructed muons, with extra cuts.
Definition SimpleAnalysis.hh:227
double metSignf() const
Get the MET significance.
Definition SimpleAnalysis.hh:337
Jets bjets(const Cut &cut, const std::string &jetname="DEFAULT") const
Get a pT-ordered named set of reconstructed b-tagged jets, with extra cuts.
Definition SimpleAnalysis.hh:316
const ParticleFinder & muonsProj(IDClass muclass=IDClass::MEDIUM, bool include_indirect=false)
Direct access to the underlying projection.
Definition SimpleAnalysis.hh:417
void scaleToIntLumi(T &ao, double intlumi)
Helper function to elide the xsec/sumW scalefactor.
Definition SimpleAnalysis.hh:402
const std::vector< std::string > jetnames() const
Get the set of jet-collection names (also usable for b-jets).
Definition SimpleAnalysis.hh:287
const JetFinder & jetsProj(const std::string &jetname="DEFAULT")
Direct access to the underlying projection.
Definition SimpleAnalysis.hh:433
Jets jets(const Cut &cut, const std::string &jetname="DEFAULT") const
Get a pT-ordered named set of reconstructed jets, with extra cuts.
Definition SimpleAnalysis.hh:303
const METFinder & metProj()
Direct access to the underlying projection.
Definition SimpleAnalysis.hh:437
void setTrkReco(const ParticleEffFn &eff, const ParticleSmearFn &smear=PARTICLE_SMEAR_IDENTITY)
Set the track reco functions for a given jet name.
Definition SimpleAnalysis.hh:161
const ParticleFinder & photonsProj(IDClass phoclass=IDClass::MEDIUM, bool include_indirect=false)
Direct access to the underlying projection.
Definition SimpleAnalysis.hh:425
const Particles & electrons(IDClass eclass=IDClass::MEDIUM, bool include_indirect=false) const
Get the pT-ordered set of reconstructed direct electrons.
Definition SimpleAnalysis.hh:205
void setElectronReco(const ParticleEffFn &eff, const ParticleSmearFn &smear=PARTICLE_SMEAR_IDENTITY, IDClass idc=IDClass::MEDIUM)
Set the electron reco functions for a given ID class.
Definition SimpleAnalysis.hh:141
void preAnalyze(const Event &event)
Reset per-event members, before the user analyze().
Definition SimpleAnalysis.hh:121
virtual ~SimpleAnalysis()
Destructor to support subclassing.
Definition SimpleAnalysis.hh:28
void setJetReco(const JetSmearFn &smear, const JetEffFn &btageff, const std::string &jetname="DEFAULT")
Set the jet reco functions for a given jet name.
Definition SimpleAnalysis.hh:166
const Particles & taus(IDClass tauclass=IDClass::MEDIUM, bool include_indirect=false) const
Get the pT-ordered set of reconstructed direct (hadronic) taus.
Definition SimpleAnalysis.hh:257
void setMETReco(const METSmearParamsFn &smearps, const METSmearFn &smear)
Set the MET reco functions.
Definition SimpleAnalysis.hh:175
Particles taus(const Cut &cut, IDClass tauclass=IDClass::MEDIUM, bool include_indirect=false) const
Get the pT-ordered set of reconstructed direct (hadronic) taus, with extra cuts.
Definition SimpleAnalysis.hh:265
Particles photons(const Cut &cut, IDClass phoclass=IDClass::MEDIUM, bool include_indirect=false) const
Get the pT-ordered set of reconstructed direct and isolated photons, with extra cuts.
Definition SimpleAnalysis.hh:251
const ParticleFinder & tausProj(IDClass tauclass=IDClass::MEDIUM, bool include_indirect=false)
Direct access to the underlying projection.
Definition SimpleAnalysis.hh:421
SimpleAnalysis(const std::string &name)
Constructor, passing arg to base class and supporting subclassing.
Definition SimpleAnalysis.hh:23
const Particles & muons(IDClass muclass=IDClass::MEDIUM, bool include_indirect=false) const
Get the pT-ordered set of reconstructed muons.
Definition SimpleAnalysis.hh:219
void setMuonReco(const ParticleEffFn &eff, const ParticleSmearFn &smear=PARTICLE_SMEAR_IDENTITY, IDClass idc=IDClass::MEDIUM)
Set the muon reco functions for a given ID class.
Definition SimpleAnalysis.hh:146
void setMETReco(const METSmearParamsFn &smearps)
Set the MET reco-params function.
Definition SimpleAnalysis.hh:171
Wrapper projection for smearing Jets with detector resolutions and efficiencies.
Definition SmearedJets.hh:19
Wrapper projection for smearing missing (transverse) energy/momentum with detector resolutions.
Definition SmearedMET.hh:15
Wrapper projection for smearing Jets with detector resolutions and efficiencies.
Definition SmearedParticles.hh:14
Jets 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
Vector3 MET_SMEAR_IDENTITY(const Vector3 &met, double)
Identity MET smearing just returns the input.
Definition MomentumSmearingFunctions.hh:177
METSmearParams MET_SMEARPARAMS_IDENTITY(const Vector3 &met, double)
Identity resolution is 0 (perfect delta function, no offset).
Definition MomentumSmearingFunctions.hh:172
function< Vector3(const Vector3 &, double)> METSmearFn
Definition MomentumSmearingFunctions.hh:139
function< METSmearParams(const Vector3 &, double)> METSmearParamsFn
Definition MomentumSmearingFunctions.hh:134
double PARTICLE_EFF_ONE(const Particle &)
Take a Particle and return 1.
Definition ParticleSmearingFunctions.hh:33
function< Particle(const Particle &)> ParticleSmearFn
Typedef for Particle smearing functions/functors.
Definition ParticleSmearingFunctions.hh:19
Particle PARTICLE_SMEAR_IDENTITY(const Particle &p)
Take a Particle and return it unmodified.
Definition ParticleSmearingFunctions.hh:50
double JET_BTAG_IDENTITY(const Jet &j)
Alias for JET_BTAG_PERFECT.
Definition JetSmearingFunctions.hh:58
function< double(const Particle &)> ParticleEffFn
Typedef for Particle efficiency functions/functors.
Definition ParticleSmearingFunctions.hh:22
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
Definition MC_CENT_PPB_Projections.hh:10
double deltaR(double rap1, double phi1, double rap2, double phi2)
Definition MathUtils.hh:708
PromptFinalState DirectFinalState
Alias with a more correct name.
Definition DirectFinalState.hh:10
Convenience container of params for simple jet definitions.
Definition JetFinder.hh:22
Generated on for Rivet by
