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()); }
272 inline bool isSameSign(const Particle& a, const Particle& b) { return PID::isSameSign(a.pid(), b.pid()); }
273 inline bool isOppSign(const Particle& a, const Particle& b) { return PID::isOppSign(a.pid(), b.pid()); }
274 inline bool isSameFlav(const Particle& a, const Particle& b) { return PID::isSameFlav(a.pid(), b.pid()); }
275 inline bool isOppFlav(const Particle& a, const Particle& b) { return PID::isOppFlav(a.pid(), b.pid()); }
277 inline bool isOSSF(const Particle& a, const Particle& b) { return PID::isOSSF(a.pid(), b.pid()); }
278 inline bool isSSSF(const Particle& a, const Particle& b) { return PID::isSSSF(a.pid(), b.pid()); }
279 inline bool isOSOF(const Particle& a, const Particle& b) { return PID::isOSOF(a.pid(), b.pid()); }
280 inline bool isSSOF(const Particle& a, const Particle& b) { return PID::isSSOF(a.pid(), b.pid()); }
352 inline bool hasAncestorWith(const Particle& p, const ParticleSelector& f, bool only_physical=true) {
357 inline bool hasAncestorWithout(const Particle& p, const ParticleSelector& f, bool only_physical=true) {
385 inline bool hasDescendantWith(const Particle& p, const ParticleSelector& f, bool remove_duplicates=true) {
390 inline bool hasDescendantWithout(const Particle& p, const ParticleSelector& f, bool remove_duplicates=true) {
484 BoolParticleAND(const ParticleSelector& a, const ParticleSelector& b, const ParticleSelector& c) : selectors({a,b,c}) {}
501 BoolParticleOR(const ParticleSelector& a, const ParticleSelector& b, const ParticleSelector& c) : selectors({a,b,c}) {}
587 HasParticleAncestorWith(const ParticleSelector& f, bool only_physical=true) : fn(f), onlyphysical(only_physical) { }
597 HasParticleAncestorWithout(const ParticleSelector& f, bool only_physical=true) : fn(f), onlyphysical(only_physical) { }
646 HasParticleDescendantWith(const ParticleSelector& f, bool remove_duplicates=true) : fn(f), rmduplicates(remove_duplicates) { }
656 HasParticleDescendantWithout(const ParticleSelector& f, bool remove_duplicates=true) : fn(f), rmduplicates(remove_duplicates) { }
Particle representation, either from a HepMC::GenEvent or reconstructed. Definition Particle.hh:45 Particles parents(const Cut &c=Cuts::OPEN) const Particles children(const Cut &c=Cuts::OPEN) const Get a list of the direct descendants from the current particle (with optional selection Cut) int charge3() const Three times the charge of this Particle (i.e. integer multiple of smallest quark charge). Definition Particle.hh:208 bool any(const CONTAINER &c) Return true if x is true for any x in container c, otherwise false. Definition Utils.hh:330 Jets & idiscard(Jets &jets, const Cut &c) Filter a jet collection in-place to the subset that fails the supplied Cut. 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:152 Jets & iselect(Jets &jets, const Cut &c) Filter a jet collection in-place to the subset that passes the supplied Cut. Jets discard(const Jets &jets, const Cut &c) Filter a jet collection in-place to the subset that fails the supplied Cut. Definition JetUtils.hh:171 double mass2(const FourMomentum &a, const FourMomentum &b) Calculate mass^2 of two 4-vectors. Definition Vector4.hh:1466 bool sameCharge(const Particle &a, const Particle &b) Definition ParticleUtils.hh:308 bool oppSign(const Particle &a, const Particle &b) Return true if Particles a and b have the opposite charge sign. Definition ParticleUtils.hh:290 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:313 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 bool isSame(const Particle &a, const Particle &b) Check Particle equivalence. Definition ParticleUtils.hh:878 bool isVisible(const Particle &p) Is this particle potentially visible in a detector? Definition ParticleUtils.hh:408 bool hasParentWith(const Particle &p, const ParticleSelector &f) Determine whether a particle has a parent which meets the function requirement. Definition ParticleUtils.hh:363 bool fromHadron(const Particle &p) Determine whether the particle is from a hadron decay. Definition ParticleUtils.hh:456 bool hasStableDescendantWith(const Particle &p, const ParticleSelector &f) Determine whether a particle has a stable descendant which meets the function requirement. Definition ParticleUtils.hh:396 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:334 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:345 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:418 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:329 bool fromTau(const Particle &p, bool prompt_taus_only=false) Determine whether the particle is from a tau decay. Definition ParticleUtils.hh:459 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:368 bool fromPromptTau(const Particle &p) Determine whether the particle is from a prompt tau decay. Definition ParticleUtils.hh:464 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:379 bool fromCharm(const Particle &p) Determine whether the particle is from a c-hadron decay. Definition ParticleUtils.hh:453 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:385 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:352 bool hasHadronicDecay(const Particle &p) Decide if a given particle decays hadronically. Definition ParticleUtils.hh:435 bool isStable(const Particle &p) Decide if a given particle is stable, via Particle::isStable() Definition ParticleUtils.hh:432 bool hasChildWith(const Particle &p, const ParticleSelector &f) Determine whether a particle has a child which meets the function requirement. Definition ParticleUtils.hh:374 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:426 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:340 bool hasLeptonicDecay(const Particle &p) Decide if a given particle decays leptonically (decays, and no hadrons) Definition ParticleUtils.hh:442 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:401 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:357 bool fromBottom(const Particle &p) Determine whether the particle is from a b-hadron decay. Definition ParticleUtils.hh:450 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:390 PdgIdPair pids(const ParticlePair &pp) Get the PDG ID codes of a ParticlePair. Definition ParticleUtils.hh:717 bool isRadiative(const Particle &part) Check whether a particle is radiative. Definition ParticleUtils.hh:896 bool containsPID(const Particles &parts, int id, bool abs=false) Check for pid membership in a list of particles. Definition ParticleUtils.hh:887 bool cascadeContains(const Particles &parts, const vector< int > &pids, bool absolute, bool ignorephoton) Check whether a set of particles' decay chains can contain the requested list of pids. Definition MC_CENT_PPB_Projections.hh:10 Cut operator&&(const Cut &aptr, const Cut &bptr) std::pair< Particle, Particle > ParticlePair Typedef for a pair of Particle objects. Definition Particle.hh:38 constexpr std::enable_if< std::is_arithmetic< NUM >::value, int >::type sign(NUM val) Find the sign of a number. Definition MathUtils.hh:265 T sum(const DressedLeptons &c, FN &&fn, const T &start=T()) Generic sum function, adding fn(x) for all x in container c, starting with start. Definition DressedLepton.hh:60 bool contains(const std::string &s, const std::string &sub) Does s contain sub as a substring? Definition RivetSTL.hh:97 Cut operator||(const Cut &aptr, const Cut &bptr) Determine whether a particle is the first in a decay chain to meet the cut/function. Definition ParticleUtils.hh:547 Determine whether a particle is the first in a decay chain not to meet the cut/function. Definition ParticleUtils.hh:556 Determine whether a particle has an ancestor which meets the cut/function. Definition ParticleUtils.hh:586 Determine whether a particle has an ancestor which doesn't meet the cut/function. Definition ParticleUtils.hh:596 Determine whether a particle has a child which meets the cut/function. Definition ParticleUtils.hh:626 Determine whether a particle has a child which doesn't meet the cut/function. Definition ParticleUtils.hh:635 Determine whether a particle has a descendant which meets the cut/function. Definition ParticleUtils.hh:645 Determine whether a particle has a descendant which doesn't meet the cut/function. Definition ParticleUtils.hh:655 Determine whether a particle has an parent which meets the cut/function. Definition ParticleUtils.hh:607 Determine whether a particle has an parent which doesn't meet the cut/function. Definition ParticleUtils.hh:616 Determine whether a particle is the last in a decay chain to meet the cut/function. Definition ParticleUtils.hh:566 Determine whether a particle is the last in a decay chain not to meet the cut/function. Definition ParticleUtils.hh:576 Generated on Thu Feb 29 2024 15:46:47 for Rivet by 1.9.8 |