DressedLepton Class Reference A charged lepton meta-particle created by clustering photons close to the bare lepton. More...
Detailed DescriptionA charged lepton meta-particle created by clustering photons close to the bare lepton. Definition at line 14 of file DressedLeptons.hh. Constructor & Destructor Documentation
Definition at line 17 of file DressedLeptons.hh. : Particle(lepton.pid(), lepton.momentum()), _constituentLepton(lepton) {} Member Function Documentation
Definition at line 371 of file Particle.hh. { for (const GenParticle* ancestor : particles(genParticle(), relation)) { if (f(Particle(ancestor))) return true; } return false; }
The absolute charge of this Particle. Definition at line 153 of file Particle.hh. { return PID::abscharge(pid()); }
Three times the absolute charge of this Particle (i.e. integer multiple of smallest quark charge). Definition at line 163 of file Particle.hh. { return PID::abscharge3(pid()); }
Get the Definition at line 81 of file ParticleBase.hh. Absolute value of the PDG ID code. Definition at line 138 of file Particle.hh. { return std::abs(_id); }
Get the Definition at line 79 of file ParticleBase.hh. { return momentum().abspseudorapidity(); }
Get the Definition at line 90 of file ParticleBase.hh.
Get the Definition at line 88 of file ParticleBase.hh. { return momentum().absrapidity(); } Definition at line 21 of file DressedLeptons.hh. { _constituentPhotons.push_back(p); if (cluster) setMomentum(momentum() + p.momentum()); }
Get a list of all the descendants from the current particle (with optional selection Cut)
Definition at line 72 of file Particle.cc. { vector<Particle> rtn; if (isStable()) return rtn; /// @todo Remove this const mess crap when HepMC doesn't suck GenVertexPtr gv = const_cast<GenVertexPtr>( genParticle()->end_vertex() ); if (gv == NULL) return rtn; /// @todo Would like to do this, but the range objects are broken // foreach (const GenParticlePtr gp, gv->particles(HepMC::descendants)) for (GenVertex::particle_iterator it = gv->particles_begin(HepMC::descendants); it != gv->particles_end(HepMC::descendants); ++it) { const Particle p(*it); if (c != Cuts::OPEN && !c->accept(p)) continue; if (remove_duplicates && (*it)->end_vertex() != NULL) { // size_t n = 0; ///< @todo Only remove 1-to-1 duplicates? bool dup = false; /// @todo Yuck, HepMC for (GenVertex::particle_iterator it2 = (*it)->end_vertex()->particles_begin(HepMC::children); it2 != (*it)->end_vertex()->particles_end(HepMC::children); ++it2) { // n += 1; if (n > 1) break; if ((*it)->pdg_id() == (*it2)->pdg_id()) { dup = true; break; } } if (dup) continue; } rtn += p; } return rtn; }
Get a list of all the descendants from the current particle (with selector function) Definition at line 346 of file Particle.hh. { return filter_select(allDescendants(Cuts::OPEN, remove_duplicates), f); }
Angle between this vector and another. Definition at line 125 of file ParticleBase.hh.
Angle between this vector and another. Definition at line 127 of file ParticleBase.hh. Angle between this vector and another (3-vector) Definition at line 129 of file ParticleBase.hh.
Azimuthal angle Definition at line 93 of file ParticleBase.hh. { return momentum().azimuthalAngle(mapping); }
The charge of this Particle. Definition at line 150 of file Particle.hh. { return PID::charge(pid()); }
Three times the charge of this Particle (i.e. integer multiple of smallest quark charge). Definition at line 156 of file Particle.hh. { return PID::charge3(pid()); }
Get a list of the direct descendants from the current particle (with optional selection Cut)
Definition at line 52 of file Particle.cc. { vector<Particle> rtn; if (isStable()) return rtn; /// @todo Remove this const mess crap when HepMC doesn't suck GenVertexPtr gv = const_cast<GenVertexPtr>( genParticle()->end_vertex() ); if (gv == NULL) return rtn; /// @todo Would like to do this, but the range objects are broken // foreach (const GenParticlePtr gp, gv->particles(HepMC::children)) // rtn += Particle(gp); for (GenVertex::particle_iterator it = gv->particles_begin(HepMC::children); it != gv->particles_end(HepMC::children); ++it) { const Particle p(*it); if (c != Cuts::OPEN && !c->accept(p)) continue; rtn += p; } return rtn; } Get a list of the direct descendants from the current particle (with selector function) Definition at line 337 of file Particle.hh. { return filter_select(children(), f); }
Definition at line 26 of file DressedLeptons.hh. { return _constituentLepton; }
Definition at line 27 of file DressedLeptons.hh. { return _constituentPhotons; }
Get the energy directly (alias). Definition at line 43 of file ParticleBase.hh.
Get the energy-squared (alias). Definition at line 48 of file ParticleBase.hh.
Get the Definition at line 77 of file ParticleBase.hh.
Flight length (divide by mm or cm to get the appropriate units) Definition at line 119 of file Particle.cc. { if (isStable()) return -1; if (genParticle() == NULL) return 0; if (genParticle()->production_vertex() == NULL) return 0; const HepMC::FourVector v1 = genParticle()->production_vertex()->position(); const HepMC::FourVector v2 = genParticle()->end_vertex()->position(); return sqrt(sqr(v2.x()-v1.x()) + sqr(v2.y()-v1.y()) + sqr(v2.z()-v1.z())); }
Determine whether the particle is from a b-hadron decay.
Definition at line 147 of file Particle.cc. { return _hasRelativeWith(HepMC::ancestors, [](const Particle& p){ return p.genParticle()->status() == 2 && p.isHadron() && p.hasBottom(); }); // const GenVertexPtr prodVtx = genParticle()->production_vertex(); // if (prodVtx == NULL) return false; // foreach (const GenParticlePtr ancestor, particles(prodVtx, HepMC::ancestors)) { // const PdgId pid = ancestor->pdg_id(); // if (ancestor->status() == 2 && (PID::isHadron(pid) && PID::hasBottom(pid))) return true; // } // return false; }
Determine whether the particle is from a c-hadron decay.
Definition at line 161 of file Particle.cc. { return _hasRelativeWith(HepMC::ancestors, [](const Particle& p){ return p.genParticle()->status() == 2 && p.isHadron() && p.hasCharm(); }); // const GenVertexPtr prodVtx = genParticle()->production_vertex(); // if (prodVtx == NULL) return false; // foreach (const GenParticlePtr ancestor, particles(prodVtx, HepMC::ancestors)) { // const PdgId pid = ancestor->pdg_id(); // if (ancestor->status() == 2 && (PID::isHadron(pid) && PID::hasCharm(pid) && !PID::hasBottom(pid))) return true; // } // return false; }
Determine whether the particle is from a hadron or tau decay. Specifically, walk up the ancestor chain until a status 2 hadron or tau is found, if at all.
Definition at line 313 of file Particle.hh. { return fromHadron() || fromPromptTau(); }
Determine whether the particle is from a hadron decay.
Definition at line 175 of file Particle.cc. { return _hasRelativeWith(HepMC::ancestors, [](const Particle& p){ return p.genParticle()->status() == 2 && p.isHadron(); }); // const GenVertexPtr prodVtx = genParticle()->production_vertex(); // if (prodVtx == NULL) return false; // foreach (const GenParticlePtr ancestor, particles(prodVtx, HepMC::ancestors)) { // const PdgId pid = ancestor->pdg_id(); // if (ancestor->status() == 2 && PID::isHadron(pid)) return true; // } // return false; }
Determine whether the particle is from a prompt tau decay.
Definition at line 303 of file Particle.hh. { return fromTau(true); }
Determine whether the particle is from a tau decay.
Definition at line 189 of file Particle.cc. { if (prompt_taus_only && fromHadron()) return false; return _hasRelativeWith(HepMC::ancestors, [](const Particle& p){ return p.genParticle()->status() == 2 && isTau(p); }); // const GenVertexPtr prodVtx = genParticle()->production_vertex(); // if (prodVtx == NULL) return false; // foreach (const GenParticlePtr ancestor, particles(prodVtx, HepMC::ancestors)) { // const PdgId pid = ancestor->pdg_id(); // if (ancestor->status() == 2 && abs(pid) == PID::TAU) return true; // } // return false; }
Get a const pointer to the original GenParticle. Definition at line 75 of file Particle.hh. { return _original; }
Check whether a given PID is found in the particle's ancestor list
Definition at line 138 of file Particle.cc. { return _hasRelativeWith(HepMC::ancestors, hasPID(pid)); }
Check whether a particle in the particle's ancestor list has the requested property
Definition at line 252 of file Particle.hh. { return _hasRelativeWith(HepMC::ancestors, f); }
Definition at line 142 of file Particle.cc. { return hasAncestorWith([&](const Particle& p){return c->accept(p);}); }
Does this (hadron) contain a b quark? Definition at line 181 of file Particle.hh. { return PID::hasBottom(pid()); }
Does this (hadron) contain a c quark? Definition at line 184 of file Particle.hh. { return PID::hasCharm(pid()); } Check whether a given PID is found in the particle's parent list
Definition at line 129 of file Particle.cc. { return _hasRelativeWith(HepMC::parents, hasPID(pid)); }
Check whether a particle in the particle's parent list has the requested property
Definition at line 234 of file Particle.hh. { return _hasRelativeWith(HepMC::parents, f); }
Definition at line 133 of file Particle.cc. { return hasParentWith([&](const Particle& p){return c->accept(p);}); }
Shorthand definition of 'promptness' based on set definition flags. The boolean arguments allow a decay lepton to be considered prompt if its parent was a "real" prompt lepton.
Definition at line 215 of file Particle.cc. { if (genParticle() == NULL) return false; // no HepMC connection, give up! Throw UserError exception? const GenVertexPtr prodVtx = genParticle()->production_vertex(); if (prodVtx == NULL) return false; // orphaned particle, has to be assume false const pair<GenParticlePtr, GenParticlePtr> beams = prodVtx->parent_event()->beam_particles(); /// @todo Would be nicer to be able to write this recursively up the chain, exiting as soon as a parton or string/cluster is seen for (const GenParticlePtr ancestor : Rivet::particles(prodVtx, HepMC::ancestors)) { const PdgId pid = ancestor->pdg_id(); if (ancestor->status() != 2) continue; // no non-standard statuses or beams to be used in decision making if (ancestor == beams.first || ancestor == beams.second) continue; // PYTHIA6 uses status 2 for beams, I think... (sigh) if (PID::isParton(pid)) continue; // PYTHIA6 also uses status 2 for some partons, I think... (sigh) if (PID::isHadron(pid)) return false; // prompt particles can't be from hadron decays if (abs(pid) == PID::TAU && abspid() != PID::TAU && !allow_from_prompt_tau) return false; // allow or ban particles from tau decays (permitting tau copies) if (abs(pid) == PID::MUON && abspid() != PID::MUON && !allow_from_prompt_mu) return false; // allow or ban particles from muon decays (permitting muon copies) } return true; }
Whether this particle is stable according to the generator. Definition at line 28 of file Particle.cc. { return genParticle() != NULL && genParticle()->status() == 1 && genParticle()->end_vertex() == NULL; }
Is this particle potentially visible in a detector? Definition at line 14 of file Particle.cc. { // Charged particles are visible if ( PID::threeCharge(pid()) != 0 ) return true; // Neutral hadrons are visible if ( PID::isHadron(pid()) ) return true; // Photons are visible if ( pid() == PID::PHOTON ) return true; // Gluons are visible (for parton level analyses) if ( pid() == PID::GLUON ) return true; // Everything else is invisible return false; }
Get the mass**2 directly. Definition at line 72 of file ParticleBase.hh.
Get equivalent single momentum four-vector (const) (alias). Definition at line 29 of file ParticleBase.hh. { return momentum(); };
The momentum. Implements ParticleBase. Definition at line 89 of file Particle.hh. { return _momentum; }
Cast operator for conversion to FourMomentum. Definition at line 32 of file ParticleBase.hh. { return momentum(); }
Cast operator for conversion to GenParticle*. Definition at line 80 of file Particle.hh. { return genParticle(); }
Cast operator to FastJet3 PseudoJet. Definition at line 71 of file Particle.hh. { return pseudojet(); }
Get the 3-momentum magnitude directly. Definition at line 101 of file ParticleBase.hh.
Get the 3-momentum magnitude-squared directly. Definition at line 103 of file ParticleBase.hh. Get the 3-momentum directly. Definition at line 99 of file ParticleBase.hh.
Get a list of the direct parents of the current particle (with optional selection Cut)
Definition at line 35 of file Particle.cc. { vector<Particle> rtn; /// @todo Remove this const mess crap when HepMC doesn't suck GenVertexPtr gv = const_cast<GenVertexPtr>( genParticle()->production_vertex() ); if (gv == NULL) return rtn; /// @todo Would like to do this, but the range objects are broken // foreach (const GenParticlePtr gp, gv->particles(HepMC::children)) // rtn += Particle(gp); for (GenVertex::particle_iterator it = gv->particles_begin(HepMC::parents); it != gv->particles_end(HepMC::parents); ++it) { const Particle p(*it); if (c != Cuts::OPEN && !c->accept(p)) continue; rtn += p; } return rtn; } Get a list of the direct parents of the current particle (with selector function)
Definition at line 213 of file Particle.hh. { return filter_select(parents(), f); } This Particle's PDG ID code (alias).
Definition at line 141 of file Particle.hh. { return _id; }
Get the Definition at line 95 of file ParticleBase.hh.
Angle subtended by the 3-vector and the z-axis. Definition at line 120 of file ParticleBase.hh. { return momentum().polarAngle(); }
x component of momentum, squared. Definition at line 113 of file ParticleBase.hh.
y component of momentum, squared. Definition at line 115 of file ParticleBase.hh.
z component of momentum, squared. Definition at line 117 of file ParticleBase.hh.
Get the Definition at line 86 of file ParticleBase.hh.
Set the momentum. Definition at line 94 of file Particle.hh.
Set the origin position. Definition at line 119 of file Particle.hh. { _origin = position; return *this; } Set the origin position via components. Definition at line 124 of file Particle.hh. { _origin = FourMomentum(t, x, y, z); return *this; }
Get a list of all the stable descendants from the current particle (with optional selection Cut)
Definition at line 100 of file Particle.cc. { vector<Particle> rtn; if (isStable()) return rtn; /// @todo Remove this const mess crap when HepMC doesn't suck GenVertexPtr gv = const_cast<GenVertexPtr>( genParticle()->end_vertex() ); if (gv == NULL) return rtn; /// @todo Would like to do this, but the range objects are broken // foreach (const GenParticlePtr gp, gv->particles(HepMC::descendants)) for (GenVertex::particle_iterator it = gv->particles_begin(HepMC::descendants); it != gv->particles_end(HepMC::descendants); ++it) { // if ((*it)->status() != 1 || (*it)->end_vertex() != NULL) continue; const Particle p(*it); if (!p.isStable()) continue; if (c != Cuts::OPEN && !c->accept(p)) continue; rtn += p; } return rtn; }
Get a list of all the stable descendants from the current particle (with selector function) Definition at line 358 of file Particle.hh. { return filter_select(stableDescendants(), f); }
Synonym for polarAngle. Definition at line 122 of file ParticleBase.hh.
Alias for charge3
Definition at line 160 of file Particle.hh. { return PID::threeCharge(pid()); }
Apply an active Lorentz transform to this particle. Definition at line 8 of file Particle.cc. Member Data Documentation
Definition at line 32 of file DressedLeptons.hh.
Definition at line 31 of file DressedLeptons.hh. The PDG ID code for this Particle. Definition at line 382 of file Particle.hh.
The momentum of this particle. Definition at line 385 of file Particle.hh.
The creation position of this particle. Definition at line 388 of file Particle.hh.
A pointer to the original GenParticle from which this Particle is projected. Definition at line 379 of file Particle.hh. The documentation for this class was generated from the following file: Generated on Tue Dec 13 2016 16:32:47 for The Rivet MC analysis system by ![]() |