ParticleUtils.hh 9#define PARTICLE_TO_PID_BOOLFN(fname) inline bool fname (const Particle& p) { return PID:: fname (p.pid()); }
10#define PARTICLE_TO_PID_INTFN(fname) inline int fname (const Particle& p) { return PID:: fname (p.pid()); }
11#define PARTICLE_TO_PID_DBLFN(fname) inline double fname (const Particle& p) { return PID:: fname (p.pid()); }
273 inline bool isSameSign(const Particle& a, const Particle& b) { return PID::isSameSign(a.pid(), b.pid()); }
274 inline bool isOppSign(const Particle& a, const Particle& b) { return PID::isOppSign(a.pid(), b.pid()); }
275 inline bool isSameFlav(const Particle& a, const Particle& b) { return PID::isSameFlav(a.pid(), b.pid()); }
276 inline bool isOppFlav(const Particle& a, const Particle& b) { return PID::isOppFlav(a.pid(), b.pid()); }
278 inline bool isOSSF(const Particle& a, const Particle& b) { return PID::isOSSF(a.pid(), b.pid()); }
279 inline bool isSSSF(const Particle& a, const Particle& b) { return PID::isSSSF(a.pid(), b.pid()); }
280 inline bool isOSOF(const Particle& a, const Particle& b) { return PID::isOSOF(a.pid(), b.pid()); }
281 inline bool isSSOF(const Particle& a, const Particle& b) { return PID::isSSOF(a.pid(), b.pid()); }
353 inline bool hasAncestorWith(const Particle& p, const ParticleSelector& f, bool only_physical=true) {
358 inline bool hasAncestorWithout(const Particle& p, const ParticleSelector& f, bool only_physical=true) {
386 inline bool hasDescendantWith(const Particle& p, const ParticleSelector& f, bool remove_duplicates=true) {
391 inline bool hasDescendantWithout(const Particle& p, const ParticleSelector& f, bool remove_duplicates=true) {
419 inline bool isDirect(const Particle& p, bool allow_from_direct_tau=false, bool allow_from_direct_mu=false) {
427 inline bool isPrompt(const Particle& p, bool allow_from_prompt_tau=false, bool allow_from_prompt_mu=false) {
493 BoolParticleAND(const ParticleSelector& a, const ParticleSelector& b, const ParticleSelector& c) : selectors({a,b,c}) {}
510 BoolParticleOR(const ParticleSelector& a, const ParticleSelector& b, const ParticleSelector& c) : selectors({a,b,c}) {}
548 HasAbsPID(initializer_list<PdgId> pids) { for (PdgId pid : pids) targetapids.push_back(abs(pid)); }
596 HasParticleAncestorWith(const ParticleSelector& f, bool only_physical=true) : fn(f), onlyphysical(only_physical) { }
606 HasParticleAncestorWithout(const ParticleSelector& f, bool only_physical=true) : fn(f), onlyphysical(only_physical) { }
655 HasParticleDescendantWith(const ParticleSelector& f, bool remove_duplicates=true) : fn(f), rmduplicates(remove_duplicates) { }
665 HasParticleDescendantWithout(const ParticleSelector& f, bool remove_duplicates=true) : fn(f), rmduplicates(remove_duplicates) { }
683 inline Particles& ifilterBy(Particles& particles, const Cut& c) { return ifilter_select(particles, c); }
685 inline Particles& iselect(Particles& particles, const Cut& c) { return ifilter_select(particles, c); }
694 inline Particles filterBy(const Particles& particles, const Cut& c) { return filter_select(particles, c); }
696 inline Particles select(const Particles& particles, const Cut& c) { return filter_select(particles, c); }
705 inline Particles filterBy(const Particles& particles, const Cut& c, Particles& out) { return filter_select(particles, c, out); }
707 inline Particles select(const Particles& particles, const Cut& c, Particles& out) { return filter_select(particles, c, out); }
713 inline Particles& idiscard(Particles& particles, const Cut& c) { return ifilter_discard(particles, c); }
721 inline Particles discard(const Particles& particles, const Cut& c) { return filter_discard(particles, c); }
729 inline Particles discard(const Particles& particles, const Cut& c, Particles& out) { return filter_discard(particles, c, out); }
Particle representation, either from a HepMC::GenEvent or reconstructed. Definition: Particle.hh:53 int charge3() const Three times the charge of this Particle (i.e. integer multiple of smallest quark charge). Definition: Particle.hh:214 CONTAINER::value_type sum(const CONTAINER &c) Generic sum function, adding x for all x in container c. Definition: Utils.hh:445 Jets & idiscard(Jets &jets, const Cut &c) New alias for ifilter_discard. Definition: JetUtils.hh:184 Jets select(const Jets &jets, const Cut &c) New alias for filter_select. Definition: JetUtils.hh:165 Jets & iselect(Jets &jets, const Cut &c) New alias for ifilter_select. Definition: JetUtils.hh:153 Jets filter_discard(const Jets &jets, const Cut &c) Filter a jet collection in-place to the subset that fails the supplied Cut. Definition: JetUtils.hh:188 Jets discard(const Jets &jets, const Cut &c) New alias for filter_discard. Definition: JetUtils.hh:193 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. Jets & ifilter_discard(Jets &jets, const Cut &c) Filter a jet collection in-place to the subset that fails the supplied Cut. int sSpin(int pid) sSpin returns 2S+1, where S is the spin Definition: ParticleIdUtils.hh:741 int jSpin(int pid) jSpin returns 2J+1, where J is the total spin Definition: ParticleIdUtils.hh:725 int lSpin(int pid) lSpin returns 2L+1, where L is the orbital angular momentum Definition: ParticleIdUtils.hh:764 bool isCharged(int pid) Determine if the particle is electrically charged. Definition: ParticleIdUtils.hh:880 bool isNeutral(int pid) Determine if the particle is electrically neutral. Definition: ParticleIdUtils.hh:885 int abscharge3(int pid) Return the absolute value of 3 times the EM charge. Definition: ParticleIdUtils.hh:865 double charge(int pid) Return the EM charge (as floating point) Definition: ParticleIdUtils.hh:868 double abscharge(int pid) Return the EM charge (as floating point) Definition: ParticleIdUtils.hh:871 int charge3(int pid) Three times the EM charge (as integer) Definition: ParticleIdUtils.hh:800 bool isBottom(int pid) Determine if the PID is that of a b/bbar. Definition: ParticleIdUtils.hh:220 bool isParton(int pid) Determine if the PID is that of a parton (quark or gluon) Definition: ParticleIdUtils.hh:132 bool isW(int pid) Determine if the PID is that of a W+-. Definition: ParticleIdUtils.hh:184 bool isWminus(int pid) Determine if the PID is that of a W-. Definition: ParticleIdUtils.hh:179 bool isZ(int pid) Determine if the PID is that of a Z0. Definition: ParticleIdUtils.hh:189 bool isMuon(int pid) Determine if the PID is that of an muon or antimuon. Definition: ParticleIdUtils.hh:148 bool isHiggs(int pid) Determine if the PID is that of an SM/lightest SUSY Higgs. Definition: ParticleIdUtils.hh:194 bool isCharm(int pid) Determine if the PID is that of a c/cbar. Definition: ParticleIdUtils.hh:217 bool isTau(int pid) Determine if the PID is that of an tau or antitau. Definition: ParticleIdUtils.hh:153 bool isWplus(int pid) Determine if the PID is that of a W+. Definition: ParticleIdUtils.hh:174 bool isPhoton(int pid) Determine if the PID is that of a photon. Definition: ParticleIdUtils.hh:138 bool isNeutrino(int pid) Determine if the PID is that of a neutrino. Definition: ParticleIdUtils.hh:167 bool isElectron(int pid) Determine if the PID is that of an electron or positron. Definition: ParticleIdUtils.hh:143 bool isChargedLepton(int pid) Determine if the PID is that of a charged lepton. Definition: ParticleIdUtils.hh:158 bool isQuark(int pid) Determine if the PID is that of a quark. Definition: ParticleIdUtils.hh:122 bool isTop(int pid) Determine if the PID is that of a t/tbar. Definition: ParticleIdUtils.hh:223 bool isStrange(int pid) Determine if the PID is that of an s/sbar. Definition: ParticleIdUtils.hh:214 bool isSUSY(int pid) Is this a fundamental SUSY particle? Definition: ParticleIdUtils.hh:362 bool isKK(int pid) Is this a Kaluza-Klein excitation? Definition: ParticleIdUtils.hh:409 bool isTechnicolor(int pid) Is this a technicolor particle? Definition: ParticleIdUtils.hh:397 bool isBSM(int pid) Is this a BSM particle (including graviton)? Definition: ParticleIdUtils.hh:511 bool isExcited(int pid) Is this an excited (composite) quark or lepton? Definition: ParticleIdUtils.hh:403 bool isGenSpecific(int pid) Determine if the PID is in the generator-specific range. Definition: ParticleIdUtils.hh:920 bool isLightHadron(int pid) Determine if the PID is that of a light flavour (not b or c) hadron. Definition: ParticleIdUtils.hh:639 bool isHeavyHadron(int pid) Determine if the PID is that of a heavy flavour (b or c) hadron. Definition: ParticleIdUtils.hh:624 bool isCharmMeson(int pid) Determine if the PID is that of a c-meson. Definition: ParticleIdUtils.hh:664 bool isCharmBaryon(int pid) Determine if the PID is that of a c-baryon. Definition: ParticleIdUtils.hh:674 bool isHeavyBaryon(int pid) Determine if the PID is that of a heavy flavour (b or c) baryon. Definition: ParticleIdUtils.hh:619 bool isHeavyMeson(int pid) Determine if the PID is that of a heavy flavour (b or c) meson. Definition: ParticleIdUtils.hh:614 bool isLightBaryon(int pid) Determine if the PID is that of a light flavour (not b or c) baryon. Definition: ParticleIdUtils.hh:634 bool isBottomBaryon(int pid) Determine if the PID is that of a b-baryon. Definition: ParticleIdUtils.hh:650 bool isLightParton(int pid) Determine if the PID is that of a light parton (u,d,s) Definition: ParticleIdUtils.hh:608 bool isHeavyParton(int pid) Determine if the PID is that of a heavy parton (c,b,t) Definition: ParticleIdUtils.hh:603 bool isBottomHadron(int pid) Determine if the PID is that of a b-hadron. Definition: ParticleIdUtils.hh:655 bool isHeavyFlavour(int pid) Determine if the particle is a heavy flavour hadron or parton. Definition: ParticleIdUtils.hh:592 bool isBottomMeson(int pid) Determine if the PID is that of a b-meson. Definition: ParticleIdUtils.hh:645 bool isLightMeson(int pid) Determine if the PID is that of a light flavour (not b or c) meson. Definition: ParticleIdUtils.hh:629 bool hasUp(int pid) Does this particle contain an up quark? Definition: ParticleIdUtils.hh:575 bool hasTop(int pid) Does this particle contain a top quark? Definition: ParticleIdUtils.hh:583 bool hasBottom(int pid) Does this particle contain a bottom quark? Definition: ParticleIdUtils.hh:581 bool hasStrange(int pid) Does this particle contain a strange quark? Definition: ParticleIdUtils.hh:577 bool hasDown(int pid) Does this particle contain a down quark? Definition: ParticleIdUtils.hh:573 bool hasCharm(int pid) Does this particle contain a charm quark? Definition: ParticleIdUtils.hh:579 bool isBaryon(int pid) Check to see if this is a valid baryon. Definition: ParticleIdUtils.hh:260 bool isPentaquark(int pid) Check to see if this is a valid pentaquark. Definition: ParticleIdUtils.hh:300 bool isMeson(int pid) Check to see if this is a valid meson. Definition: ParticleIdUtils.hh:237 bool isReggeon(int pid) Is this a pomeron, odderon, or generic reggeon? Definition: ParticleIdUtils.hh:232 double pT(const ParticleBase &p) Unbound function access to pT. Definition: ParticleBaseUtils.hh:656 FourMomentum p4(const ParticleBase &p) Unbound function access to momentum. Definition: ParticleBaseUtils.hh:644 Vector3 p3(const ParticleBase &p) Unbound function access to p3. Definition: ParticleBaseUtils.hh:647 double p(const ParticleBase &p) Unbound function access to p. Definition: ParticleBaseUtils.hh:653 bool sameCharge(const Particle &a, const Particle &b) Definition: ParticleUtils.hh:309 bool oppCharge(const Particle &a, const Particle &b) Definition: ParticleUtils.hh:303 bool oppSign(const Particle &a, const Particle &b) Return true if Particles a and b have the opposite charge sign. Definition: ParticleUtils.hh:291 bool diffCharge(const Particle &a, const Particle &b) Return true if Particles a and b have a different (not necessarily opposite) charge. Definition: ParticleUtils.hh:314 bool isVisible(const Particle &p) Is this particle potentially visible in a detector? Definition: ParticleUtils.hh:409 bool hasParentWith(const Particle &p, const ParticleSelector &f) Determine whether a particle has a parent which meets the function requirement. Definition: ParticleUtils.hh:364 bool fromHadron(const Particle &p) Determine whether the particle is from a hadron decay. Definition: ParticleUtils.hh:461 bool hasStableDescendantWith(const Particle &p, const ParticleSelector &f) Determine whether a particle has a stable descendant which meets the function requirement. Definition: ParticleUtils.hh:397 bool isFirstWithout(const Particle &p, const ParticleSelector &f) Determine whether a particle is the first in a decay chain not to meet the function requirement. Definition: ParticleUtils.hh:335 bool isLastWithout(const Particle &p, const ParticleSelector &f) Determine whether a particle is the last in a decay chain not to meet the function requirement. Definition: ParticleUtils.hh:346 bool isDirect(const Particle &p, bool allow_from_direct_tau=false, bool allow_from_direct_mu=false) Decide if a given particle is direct, via Particle::isDirect() Definition: ParticleUtils.hh:419 bool isFirstWith(const Particle &p, const ParticleSelector &f) Determine whether a particle is the first in a decay chain to meet the function requirement. Definition: ParticleUtils.hh:330 bool fromTau(const Particle &p, bool prompt_taus_only=false) Determine whether the particle is from a tau decay. Definition: ParticleUtils.hh:464 bool hasParentWithout(const Particle &p, const ParticleSelector &f) Determine whether a particle has a parent which doesn't meet the function requirement. Definition: ParticleUtils.hh:369 bool fromPromptTau(const Particle &p) Determine whether the particle is from a prompt tau decay. Definition: ParticleUtils.hh:469 bool hasChildWithout(const Particle &p, const ParticleSelector &f) Determine whether a particle has a child which doesn't meet the function requirement. Definition: ParticleUtils.hh:380 bool fromCharm(const Particle &p) Determine whether the particle is from a c-hadron decay. Definition: ParticleUtils.hh:458 bool hasDescendantWith(const Particle &p, const ParticleSelector &f, bool remove_duplicates=true) Determine whether a particle has a descendant which meets the function requirement. Definition: ParticleUtils.hh:386 bool hasAncestorWith(const Particle &p, const ParticleSelector &f, bool only_physical=true) Determine whether a particle has an ancestor which meets the function requirement. Definition: ParticleUtils.hh:353 bool hasHadronicDecay(const Particle &p) Decide if a given particle decays hadronically. Definition: ParticleUtils.hh:436 bool isStable(const Particle &p) Decide if a given particle is stable, via Particle::isStable() Definition: ParticleUtils.hh:433 bool hasChildWith(const Particle &p, const ParticleSelector &f) Determine whether a particle has a child which meets the function requirement. Definition: ParticleUtils.hh:375 bool isPrompt(const Particle &p, bool allow_from_prompt_tau=false, bool allow_from_prompt_mu=false) Decide if a given particle is prompt, via Particle::isPrompt() Definition: ParticleUtils.hh:427 bool isLastWith(const Particle &p, const ParticleSelector &f) Determine whether a particle is the last in a decay chain to meet the function requirement. Definition: ParticleUtils.hh:341 bool hasLeptonicDecay(const Particle &p) Decide if a given particle decays leptonically (decays, and no hadrons) Definition: ParticleUtils.hh:443 bool hasStableDescendantWithout(const Particle &p, const ParticleSelector &f) Determine whether a particle has a stable descendant which doesn't meet the function requirement. Definition: ParticleUtils.hh:402 bool hasAncestorWithout(const Particle &p, const ParticleSelector &f, bool only_physical=true) Determine whether a particle has an ancestor which doesn't meet the function requirement. Definition: ParticleUtils.hh:358 bool fromBottom(const Particle &p) Determine whether the particle is from a b-hadron decay. Definition: ParticleUtils.hh:455 bool hasDescendantWithout(const Particle &p, const ParticleSelector &f, bool remove_duplicates=true) Determine whether a particle has a descendant which doesn't meet the function requirement. Definition: ParticleUtils.hh:391 int pid(const Particle &p) Unbound function access to PID code. Definition: ParticleUtils.hh:23 int abspid(const Particle &p) Unbound function access to abs PID code. Definition: ParticleUtils.hh:26 Definition: MC_Cent_pPb.hh:10 bool isSame(const Particle &a, const Particle &b) Check Particle equivalence. Definition: ParticleUtils.hh:787 Cut operator&&(const Cut &aptr, const Cut &bptr) std::pair< Particle, Particle > ParticlePair Typedef for a pair of Particle objects. Definition: Particle.hh:42 bool contains(const std::string &s, const std::string &sub) Does s contain sub as a substring? Definition: RivetSTL.hh:93 std::enable_if< std::is_arithmetic< NUM >::value, int >::type sign(NUM val) Find the sign of a number. Definition: MathUtils.hh:266 Cut operator||(const Cut &aptr, const Cut &bptr) Functor for and-combination of selector logic. Definition: ParticleUtils.hh:490 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 first in a decay chain not to meet the cut/function. Definition: ParticleUtils.hh:565 Determine whether a particle has an ancestor which meets the cut/function. Definition: ParticleUtils.hh:595 Determine whether a particle has an ancestor which doesn't meet the cut/function. Definition: ParticleUtils.hh:605 Determine whether a particle has a child which meets the cut/function. Definition: ParticleUtils.hh:635 Determine whether a particle has a child which doesn't meet the cut/function. Definition: ParticleUtils.hh:644 Determine whether a particle has a descendant which meets the cut/function. Definition: ParticleUtils.hh:654 Determine whether a particle has a descendant which doesn't meet the cut/function. Definition: ParticleUtils.hh:664 Determine whether a particle has an parent which meets the cut/function. Definition: ParticleUtils.hh:616 Determine whether a particle has an parent which doesn't meet the cut/function. Definition: ParticleUtils.hh:625 Determine whether a particle is the last in a decay chain to meet the cut/function. Definition: ParticleUtils.hh:575 Determine whether a particle is the last in a decay chain not to meet the cut/function. Definition: ParticleUtils.hh:585 Generated on Fri May 13 2022 23:02:06 for Rivet by |