#include <Particle.hh>
Definition at line 16 of file Particle.hh.
Public Member Functions | |
Particle () | |
Particle (PdgId pid, const FourMomentum &mom) | |
Constructor without GenParticle. | |
Particle (const GenParticle &gp) | |
Constructor from a HepMC GenParticle. | |
const GenParticle & | genParticle () const |
Get a const reference to the original GenParticle. | |
bool | hasGenParticle () const |
Check if the particle corresponds to a GenParticle. | |
long | pdgId () const |
The PDG ID code for this Particle. | |
const FourMomentum & | momentum () const |
The momentum of this Particle. | |
Particle & | setMomentum (const FourMomentum &momentum) |
Set the momentum of this Particle. | |
double | mass () const |
The mass of this Particle. | |
bool | hasAncestor (PdgId pdg_id) const |
Check whether a given PID is found in the GenParticle's ancestor list. | |
Private Attributes | |
const GenParticle * | _original |
A pointer to the original GenParticle from which this Particle is projected. | |
long | _id |
The PDG ID code for this Particle. | |
FourMomentum | _momentum |
The momentum of this projection of the Particle. |
Particle | ( | ) | [inline] |
Default constructor.
Definition at line 21 of file Particle.hh.
00021 : ParticleBase(), 00022 _original(0), _id(0), _momentum() 00023 { }
Particle | ( | PdgId | pid, | |
const FourMomentum & | mom | |||
) | [inline] |
Constructor without GenParticle.
Definition at line 26 of file Particle.hh.
00026 : ParticleBase(), 00027 _original(0), _id(pid), _momentum(mom) 00028 { }
Particle | ( | const GenParticle & | gp | ) | [inline] |
Constructor from a HepMC GenParticle.
Definition at line 31 of file Particle.hh.
00031 : ParticleBase(), 00032 _original(&gp), _id(gp.pdg_id()), 00033 _momentum(gp.momentum()) 00034 { }
const GenParticle& genParticle | ( | ) | const [inline] |
Get a const reference to the original GenParticle.
Definition at line 40 of file Particle.hh.
References Particle::_original.
Referenced by SVertex::_applyVtxTrackCuts(), FinalState::accept(), H1_1994_S2919893::analyze(), CDF_2008_S7540469::analyze(), BELLE_2006_S6265367::analyze(), Particle::hasAncestor(), SVertex::project(), MergedFinalState::project(), InvMassFinalState::project(), and FinalStateHCM::project().
bool hasGenParticle | ( | ) | const [inline] |
Check if the particle corresponds to a GenParticle.
Definition at line 47 of file Particle.hh.
References Particle::_original.
Referenced by DISLepton::project().
00047 { 00048 return bool(_original); 00049 }
long pdgId | ( | ) | const [inline] |
The PDG ID code for this Particle.
Definition at line 53 of file Particle.hh.
References Particle::_id.
Referenced by Rivet::PID::abspid(), STAR_2006_S6860818::analyze(), STAR_2006_S6500200::analyze(), PDG_HADRON_MULTIPLICITIES_RATIOS::analyze(), PDG_HADRON_MULTIPLICITIES::analyze(), OPAL_1998_S3780481::analyze(), MC_SUSY::analyze(), H1_1994_S2919893::analyze(), DELPHI_1995_S3137023::analyze(), D0_2010_S8570965::analyze(), D0_2008_S7837160::analyze(), D0_1998_S3711838::analyze(), CDF_2008_S7541902::analyze(), CDF_2008_S7540469::analyze(), CDF_1991_S2313472::analyze(), BELLE_2006_S6265367::analyze(), ALEPH_1996_S3486095::analyze(), Rivet::chargedParticleFilter(), Rivet::hadronFilter(), Rivet::PID::hasBottom(), Rivet::PID::hasCharm(), Rivet::PID::hasDown(), Rivet::PID::hasStrange(), Rivet::PID::hasTop(), Rivet::PID::hasUp(), LeadingParticlesFinalState::inList(), Rivet::PID::isBaryon(), Rivet::PID::isDiQuark(), Rivet::PID::isHadron(), Rivet::PID::isLepton(), Rivet::PID::isMeson(), Rivet::PID::isNucleus(), Rivet::PID::isPentaquark(), Rivet::PID::isRhadron(), Rivet::PID::isSUSY(), Rivet::PID::jSpin(), Rivet::PID::lSpin(), ZFinder::project(), WFinder::project(), VetoedFinalState::project(), NeutralFinalState::project(), InvMassFinalState::project(), IdentifiedFinalState::project(), FinalState::project(), DISLepton::project(), ClusteredPhotons::project(), ChargedLeptons::project(), Rivet::PID::sSpin(), and Rivet::PID::threeCharge().
00053 { 00054 return _id; 00055 }
const FourMomentum& momentum | ( | ) | const [inline, virtual] |
The momentum of this Particle.
Implements ParticleBase.
Definition at line 59 of file Particle.hh.
References Particle::_momentum.
Referenced by SVertex::_applyVtxTrackCuts(), CDF_2004_S5839831::_calcTransCones(), FinalState::accept(), UA5_1986_S1583476::analyze(), UA5_1982_S875503::analyze(), UA1_1990_S2044935::analyze(), STAR_2009_UE_HELEN::analyze(), STAR_2008_S7993412::analyze(), STAR_2006_S6860818::analyze(), STAR_2006_S6500200::analyze(), SFM_1984_S1178091::analyze(), OPAL_1998_S3780481::analyze(), MC_ZJETS::analyze(), MC_WJETS::analyze(), MC_TTBAR::analyze(), MC_SUSY::analyze(), MC_PHOTONJETUE::analyze(), MC_PHOTONJETS::analyze(), MC_LEADINGJETS::analyze(), MC_DIPHOTON::analyze(), MC_DIJET::analyze(), H1_2000_S4129130::analyze(), H1_1994_S2919893::analyze(), DELPHI_1995_S3137023::analyze(), D0_2010_S8570965::analyze(), D0_2009_S8349509::analyze(), D0_2008_S7863608::analyze(), D0_2008_S7837160::analyze(), D0_2008_S7719523::analyze(), D0_2006_S6438750::analyze(), D0_1998_S3711838::analyze(), CDF_2009_S8436959::analyze(), CDF_2009_S8233977::analyze(), CDF_2008_S8095620::analyze(), CDF_2008_S7541902::analyze(), CDF_2008_S7540469::analyze(), CDF_2008_LEADINGJETS::analyze(), CDF_2006_S6653332::analyze(), CDF_2005_S6080774::analyze(), CDF_2004_S5839831::analyze(), CDF_2002_S4796047::analyze(), CDF_2001_S4751469::analyze(), CDF_1991_S2313472::analyze(), CDF_1990_S2089246::analyze(), CDF_1988_S1865951::analyze(), BELLE_2006_S6265367::analyze(), ATLAS_2010_S8591806::analyze(), ALEPH_1996_S3486095::analyze(), ALEPH_1996_S3196992::analyze(), Thrust::calc(), Sphericity::calc(), FastJets::calc(), Rivet::cmpParticleByAscAbsPseudorapidity(), Rivet::cmpParticleByAscAbsRapidity(), Rivet::cmpParticleByAscE(), Rivet::cmpParticleByAscEt(), Rivet::cmpParticleByAscPseudorapidity(), Rivet::cmpParticleByAscPt(), Rivet::cmpParticleByAscRapidity(), Rivet::cmpParticleByDescAbsPseudorapidity(), Rivet::cmpParticleByDescAbsRapidity(), Rivet::cmpParticleByDescPseudorapidity(), Rivet::cmpParticleByDescRapidity(), Rivet::cmpParticleByE(), Rivet::cmpParticleByEt(), Rivet::cmpParticleByPt(), Particle::mass(), ALEPH_1996_S3196992::particleInJet(), ZFinder::project(), WFinder::project(), VetoedFinalState::project(), TriggerUA5::project(), TriggerCDFRun0Run1::project(), TotalVisibleMomentum::project(), SVertex::project(), NeutralFinalState::project(), JetShape::project(), InvMassFinalState::project(), Hemispheres::project(), FinalStateHCM::project(), FinalState::project(), DISLepton::project(), DISKinematics::project(), and ClusteredPhotons::project().
00059 { 00060 return _momentum; 00061 }
Particle& setMomentum | ( | const FourMomentum & | momentum | ) | [inline] |
Set the momentum of this Particle.
Definition at line 65 of file Particle.hh.
References Particle::_momentum.
Referenced by ZFinder::project(), and FinalStateHCM::project().
double mass | ( | ) | const [inline] |
The mass of this Particle.
Definition at line 72 of file Particle.hh.
References FourMomentum::mass(), and Particle::momentum().
00072 { 00073 return momentum().mass(); 00074 }
bool hasAncestor | ( | PdgId | pdg_id | ) | const |
Check whether a given PID is found in the GenParticle's ancestor list.
Definition at line 7 of file Particle.cc.
References Particle::genParticle(), and Rivet::particles().
00007 { 00008 GenVertex* prodVtx = genParticle().production_vertex(); 00009 if (prodVtx == 0) return false; 00010 foreach (const GenParticle* ancestor, particles(prodVtx, HepMC::ancestors)) { 00011 if (ancestor->pdg_id() == pdg_id) return true; 00012 } 00013 return false; 00014 }
const GenParticle* _original [private] |
A pointer to the original GenParticle from which this Particle is projected.
Definition at line 94 of file Particle.hh.
Referenced by Particle::genParticle(), and Particle::hasGenParticle().
long _id [private] |
The PDG ID code for this Particle.
Definition at line 97 of file Particle.hh.
Referenced by Particle::pdgId().
FourMomentum _momentum [private] |
The momentum of this projection of the Particle.
Definition at line 100 of file Particle.hh.
Referenced by Particle::momentum(), and Particle::setMomentum().