PartonicTops.hh 44 PartonicTops(DecayMode decaymode, bool emu_from_prompt_tau=true, bool include_hadronic_taus=false, const Cut& c=Cuts::OPEN, WhichTop whichtop=WhichTop::LAST)
50 PartonicTops(DecayMode decaymode, const Cut& c, bool emu_from_prompt_tau=true, bool include_hadronic_taus=false, WhichTop whichtop=WhichTop::LAST)
84 MSG_WARNING("PartonicTops is not recommended: MC generators do not guarantee physical properties for, or even the existence of, partonic event-record entries. Caveat emptor!");
89 _theParticles = filter_select(event.allParticles(_cuts), (_topmode == WhichTop::LAST ? lastParticleWith(isTop) : firstParticleWith(isTop)));
95 const bool prompt_e = any(descendants, [&](const Particle& p){ return p.abspid() == PID::ELECTRON && p.isPrompt(_emu_from_prompt_tau) && !p.hasAncestor(PID::PHOTON, false); });
96 const bool prompt_mu = any(descendants, [&](const Particle& p){ return p.abspid() == PID::MUON && p.isPrompt(_emu_from_prompt_tau) && !p.hasAncestor(PID::PHOTON, false); });
97 if (prompt_e && (_decaymode == DecayMode::ELECTRON || _decaymode == DecayMode::E_MU || _decaymode == DecayMode::E_MU_TAU)) return true;
98 if (prompt_mu && (_decaymode == DecayMode::MUON || _decaymode == DecayMode::E_MU || _decaymode == DecayMode::E_MU_TAU)) return true;
99 const bool prompt_tau = any(descendants, [&](const Particle& p){ return p.abspid() == PID::TAU && p.isPrompt() && !p.hasAncestor(PID::PHOTON, false); });
100 const bool prompt_hadronic_tau = any(descendants, [&](const Particle& p){ return p.abspid() == PID::TAU && p.isPrompt() && !p.hasAncestor(PID::PHOTON, false) && none(p.children(), isChargedLepton); });
101 if (prompt_tau && (_decaymode == DecayMode::TAU || _decaymode == DecayMode::E_MU_TAU)) return (_include_hadronic_taus || !prompt_hadronic_tau);
102 if (_decaymode == DecayMode::HADRONIC && (!prompt_e && !prompt_mu && (!prompt_tau || (_include_hadronic_taus && prompt_hadronic_tau)))) return true; //< logical hairiness...
Representation of a HepMC event, and enabler of Projection caching. Definition: Event.hh:22 const Particles & allParticles() const All the raw GenEvent particles, wrapped in Rivet::Particle objects. 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:53 DecayMode Enum for categorising top quark decay modes. Definition: PartonicTops.hh:25 const Particles & tops() const Access to the found partonic tops. Definition: PartonicTops.hh:67 PartonicTops(DecayMode decaymode, const Cut &c, bool emu_from_prompt_tau=true, bool include_hadronic_taus=false, WhichTop whichtop=WhichTop::LAST) Constructor taking decay mode details (and a non-optional cuts object) Definition: PartonicTops.hh:50 DEFAULT_RIVET_PROJ_CLONE(PartonicTops) Clone on the heap. CmpState compare(const Projection &p) const Compare projections. Definition: PartonicTops.hh:121 WhichTop Enum for categorising which top quark to be selected: last (weakly decaying) or first? Definition: PartonicTops.hh:37 PartonicTops(DecayMode decaymode, bool emu_from_prompt_tau=true, bool include_hadronic_taus=false, const Cut &c=Cuts::OPEN, WhichTop whichtop=WhichTop::LAST) Constructor taking decay mode details (and an optional cuts object) Definition: PartonicTops.hh:44 PartonicTops(const Cut &c=Cuts::OPEN, WhichTop whichtop=WhichTop::LAST) Simple constructor optionally taking cuts object. Definition: PartonicTops.hh:55 void project(const Event &event) Apply the projection on the supplied event. Definition: PartonicTops.hh:79 bool none(const CONTAINER &c) Return true if x is false for all x in container c, otherwise false. Definition: Utils.hh:378 bool any(const CONTAINER &c) Return true if x is true for any x in container c, otherwise false. Definition: Utils.hh:334 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 Jets & ifilter_select(Jets &jets, const Cut &c) Filter a jet collection in-place to the subset that passes the supplied Cut. #define MSG_WARNING(x) Warning messages for non-fatal bad things, using MSG_LVL. Definition: Logging.hh:200 bool isChargedLepton(int pid) Determine if the PID is that of a charged lepton. Definition: ParticleIdUtils.hh:158 bool isTop(int pid) Determine if the PID is that of a t/tbar. Definition: ParticleIdUtils.hh:223 double p(const ParticleBase &p) Unbound function access to p. Definition: ParticleBaseUtils.hh:653 Definition: MC_Cent_pPb.hh:10 Cmp< T > cmp(const T &t1, const T &t2) Global helper function for easy creation of Cmp objects. Definition: Cmp.hh:255 Determine whether a particle is the first in a decay chain to meet the cut/function. Definition: ParticleUtils.hh:556 Determine whether a particle is the last in a decay chain to meet the cut/function. Definition: ParticleUtils.hh:575 Generated on Fri May 13 2022 23:02:06 for Rivet by |