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()); } 274 inline bool isSameSign(const Particle& a, const Particle& b) { return PID::isSameSign(a.pid(), b.pid()); } 275 inline bool isOppSign(const Particle& a, const Particle& b) { return PID::isOppSign(a.pid(), b.pid()); } 276 inline bool isSameFlav(const Particle& a, const Particle& b) { return PID::isSameFlav(a.pid(), b.pid()); } 277 inline bool isOppFlav(const Particle& a, const Particle& b) { return PID::isOppFlav(a.pid(), b.pid()); } 279 inline bool isOSSF(const Particle& a, const Particle& b) { return PID::isOSSF(a.pid(), b.pid()); } 280 inline bool isSSSF(const Particle& a, const Particle& b) { return PID::isSSSF(a.pid(), b.pid()); } 281 inline bool isOSOF(const Particle& a, const Particle& b) { return PID::isOSOF(a.pid(), b.pid()); } 282 inline bool isSSOF(const Particle& a, const Particle& b) { return PID::isSSOF(a.pid(), b.pid()); } 421 inline bool isDirect(const Particle& p, bool allow_from_direct_tau=false, bool allow_from_direct_mu=false) { 429 inline bool isPrompt(const Particle& p, bool allow_from_prompt_tau=false, bool allow_from_prompt_mu=false) { 495 BoolParticleAND(const ParticleSelector& a, const ParticleSelector& b, const ParticleSelector& c) : selectors({a,b,c}) {} 512 BoolParticleOR(const ParticleSelector& a, const ParticleSelector& b, const ParticleSelector& c) : selectors({a,b,c}) {} 550 HasAbsPID(initializer_list<PdgId> pids) { for (PdgId pid : pids) targetapids.push_back(abs(pid)); } 681 inline Particles& ifilterBy(Particles& particles, const Cut& c) { return ifilter_select(particles, c); } 690 inline Particles filterBy(const Particles& particles, const Cut& c) { return filter_select(particles, c); } 699 inline Particles filterBy(const Particles& particles, const Cut& c, Particles& out) { return filter_select(particles, c, out); } Definition: ALICE_2010_I880049.cc:13 bool oppSign(const Particle &a, const Particle &b) Return true if Particles a and b have the opposite charge sign. Definition: ParticleUtils.hh:292 bool hasHadronicDecay(const Particle &p) Decide if a given particle decays hadronically. Definition: ParticleUtils.hh:438 bool fromHadron(const Particle &p) Determine whether the particle is from a hadron decay. Definition: ParticleUtils.hh:463 bool hasLeptonicDecay(const Particle &p) Decide if a given particle decays leptonically (decays, and no hadrons) Definition: ParticleUtils.hh:445 bool oppCharge(const Particle &a, const Particle &b) Definition: ParticleUtils.hh:304 int abspid(const Particle &p) Unbound function access to abs PID code. Definition: ParticleUtils.hh:23 bool fromHadron() const Determine whether the particle is from a hadron decay. Definition: Particle.cc:229 Cut operator!(const Cut &cptr) Logical NOT operation on a cut. Definition: Cuts.cc:324 bool fromCharm() const Determine whether the particle is from a c-hadron decay. Definition: Particle.cc:223 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:404 bool isFirstWithout(const ParticleSelector &f) const Determine whether a particle is the first in a decay chain not to meet the function requirement... Definition: Particle.hh:653 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:336 bool hasDescendantWith(const ParticleSelector &f, bool remove_duplicates=true) const Definition: Particle.hh:568 bool hasDescendantWithout(const Particle &p, const ParticleSelector &f) Determine whether a particle has a descendant which doesn't meet the function requirement. Definition: ParticleUtils.hh:393 bool isStable() const Whether this particle is stable according to the generator. Definition: Particle.cc:57 Determine whether a particle is the last in a decay chain not to meet the cut/function. Definition: ParticleUtils.hh:587 bool fromBottom(const Particle &p) Determine whether the particle is from a b-hadron decay. Definition: ParticleUtils.hh:457 std::vector< GenParticle const * > particles(const GenEvent *ge) Definition: RivetHepMC.hh:36 bool hasAncestorWith(const ParticleSelector &f, bool only_physical=true) const Definition: Particle.hh:384 Particle representation, either from a HepMC::GenEvent or reconstructed. Definition: Particle.hh:18 Functor for and-combination of selector logic. Definition: ParticleUtils.hh:492 int pid(const Particle &p) Unbound function access to PID code. Definition: ParticleUtils.hh:20 bool isVisible(const Particle &p) Is this particle potentially visible in a detector? Definition: ParticleUtils.hh:411 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:370 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:429 bool fromTau(const Particle &p, bool prompt_taus_only=false) Determine whether the particle is from a tau decay. Definition: ParticleUtils.hh:466 Jets & ifilter_discard(Jets &jets, const Cut &c) Filter a jet collection in-place to the subset that fails the supplied Cut. Definition: JetUtils.cc:14 bool hasStableDescendantWith(const Particle &p, const ParticleSelector &f) Determine whether a particle has a stable descendant which meets the function requirement. Definition: ParticleUtils.hh:399 bool hasStableDescendantWith(const ParticleSelector &f) const Definition: Particle.hh:610 bool hasChildWith(const ParticleSelector &f) const Definition: Particle.hh:529 bool sameCharge(const Particle &a, const Particle &b) Definition: ParticleUtils.hh:310 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:165 bool hasStableDescendantWithout(const ParticleSelector &f) const Definition: Particle.hh:625 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:381 bool hasDescendantWith(const Particle &p, const ParticleSelector &f) Determine whether a particle has a descendant which meets the function requirement. Definition: ParticleUtils.hh:387 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:143 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:421 bool hasParentWith(const Particle &p, const ParticleSelector &f) Determine whether a particle has a parent which meets the function requirement. Definition: ParticleUtils.hh:365 Determine whether a particle has an ancestor which doesn't meet the cut/function. ... Definition: ParticleUtils.hh:606 bool fromDecay(const Particle &p) Determine whether the particle is from a hadron or tau decay. Definition: ParticleUtils.hh:475 bool fromPromptTau() const Determine whether the particle is from a prompt tau decay. Definition: Particle.hh:466 bool isStable(const Particle &p) Decide if a given particle is stable, via Particle::isStable() Definition: ParticleUtils.hh:435 Determine whether a particle is the first in a decay chain to meet the cut/function. Definition: ParticleUtils.hh:558 Determine whether a particle is the first in a decay chain not to meet the cut/function. Definition: ParticleUtils.hh:567 T sum(const CONTAINER &c, const T &start=T()) Generic sum function, adding x for all x in container c, starting with start. Definition: Utils.hh:345 Determine whether a particle has a child which meets the cut/function. Definition: ParticleUtils.hh:635 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:347 bool isVisible() const Is this particle potentially visible in a detector? Definition: Particle.cc:43 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:663 Determine whether a particle has an parent which meets the cut/function. Definition: ParticleUtils.hh:616 bool isLastWith(const ParticleSelector &f) const Determine whether a particle is the last in a decay chain to meet the function requirement. Definition: Particle.hh:658 bool hasDescendantWithout(const ParticleSelector &f, bool remove_duplicates=true) const Definition: Particle.hh:583 Determine whether a particle has an ancestor which meets the cut/function. Definition: ParticleUtils.hh:597 int charge3() const Three times the charge of this Particle (i.e. integer multiple of smallest quark charge). Definition: Particle.hh:155 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:315 bool contains(const std::string &s, const std::string &sub) Does s contain sub as a substring? Definition: RivetSTL.hh:76 bool hasAncestorWithout(const ParticleSelector &f, bool only_physical=true) const Definition: Particle.hh:399 bool isLastWithout(const ParticleSelector &f) const Determine whether a particle is the last in a decay chain not to meet the function requirement... Definition: Particle.hh:665 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:331 bool hasAncestorWith(const Particle &p, const ParticleSelector &f) Determine whether a particle has an ancestor which meets the function requirement. Definition: ParticleUtils.hh:354 Determine whether a particle has a child which doesn't meet the cut/function. Definition: ParticleUtils.hh:644 bool isFirstWith(const ParticleSelector &f) const Determine whether a particle is the first in a decay chain to meet the function requirement. Definition: Particle.hh:646 bool hasAncestorWithout(const Particle &p, const ParticleSelector &f) Determine whether a particle has an ancestor which doesn't meet the function requirement. Definition: ParticleUtils.hh:359 Determine whether a particle is the last in a decay chain to meet the cut/function. Definition: ParticleUtils.hh:577 bool hasChildWithout(const ParticleSelector &f) const Definition: Particle.hh:544 bool fromCharm(const Particle &p) Determine whether the particle is from a c-hadron decay. Definition: ParticleUtils.hh:460 Determine whether a particle has an parent which doesn't meet the cut/function. Definition: ParticleUtils.hh:625 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:342 PdgId abspid() const Absolute value of the PDG ID code. Definition: Particle.hh:137 bool fromTau(bool prompt_taus_only=false) const Determine whether the particle is from a tau decay. Definition: Particle.cc:235 bool isDirect(bool allow_from_direct_tau=false, bool allow_from_direct_mu=false) const Shorthand definition of 'promptness' based on set definition flags. Definition: Particle.cc:249 bool hasParentWithout(const ParticleSelector &f) const Definition: Particle.hh:339 Specialized version of the FourVector with momentum/energy functionality. Definition: Vector4.hh:301 bool isPrompt(bool allow_from_prompt_tau=false, bool allow_from_prompt_mu=false) const Alias for isDirect. Definition: Particle.hh:500 Jets & ifilter_select(Jets &jets, const Cut &c) Filter a jet collection in-place to the subset that passes the supplied Cut. Definition: JetUtils.cc:7 bool hasChildWith(const Particle &p, const ParticleSelector &f) Determine whether a particle has a child which meets the function requirement. Definition: ParticleUtils.hh:376 bool hasAncestor(PdgId pid, bool only_physical=true) const Definition: Particle.cc:193 bool fromDecay() const Determine whether the particle is from a hadron or tau decay. Definition: Particle.hh:485 bool fromPromptTau(const Particle &p) Determine whether the particle is from a prompt tau decay. Definition: ParticleUtils.hh:471 bool hasParentWith(const ParticleSelector &f) const Definition: Particle.hh:324 std::enable_if< std::is_arithmetic< NUM >::value, int >::type sign(NUM val) Find the sign of a number. Definition: MathUtils.hh:236 bool fromBottom() const Determine whether the particle is from a b-hadron decay. Definition: Particle.cc:217 Generated on Sun Feb 17 2019 21:04:56 for Rivet by ![]() |