![]() |
HepPDT Reference DocumentationHepPDT |
#include <ParticleID.hh>
Public Member Functions | |
ParticleID (int pid=0) | |
create from an integer ID | |
ParticleID (const ParticleID &orig) | |
ParticleID & | operator= (const ParticleID &) |
void | swap (ParticleID &other) |
bool | operator< (ParticleID const &other) const |
bool | operator== (ParticleID const &other) const |
int | pid () const |
get the integer ID | |
int | abspid () const |
get the absolute value | |
bool | isValid () const |
is this a valid ID? | |
bool | isMeson () const |
is this a valid meson ID? | |
bool | isBaryon () const |
is this a valid baryon ID? | |
bool | isDiQuark () const |
is this a valid diquark ID? | |
bool | isHadron () const |
is this a valid hadron ID? | |
bool | isLepton () const |
is this a valid lepton ID? | |
bool | isNucleus () const |
is this a valid ion ID? | |
bool | isPentaquark () const |
is this a valid pentaquark ID? | |
bool | isSUSY () const |
is this a valid SUSY ID? | |
bool | isRhadron () const |
is this a valid R-hadron ID? | |
bool | hasUp () const |
does this particle contain an up quark? | |
bool | hasDown () const |
does this particle contain a down quark? | |
bool | hasStrange () const |
does this particle contain a strange quark? | |
bool | hasCharm () const |
does this particle contain a charm quark? | |
bool | hasBottom () const |
does this particle contain a bottom quark? | |
bool | hasTop () const |
does this particle contain a top quark? | |
int | jSpin () const |
jSpin returns 2J+1, where J is the total spin | |
int | sSpin () const |
sSpin returns 2S+1, where S is the spin | |
int | lSpin () const |
lSpin returns 2L+1, where L is the orbital angular momentum | |
int | fundamentalID () const |
return the first two digits if this is a "fundamental" particle | |
int | extraBits () const |
Quarks | quarks () const |
returns a list of 3 constituent quarks | |
int | threeCharge () const |
int | A () const |
if this is a nucleus (ion), get A | |
int | Z () const |
if this is a nucleus (ion), get Z | |
int | lambda () const |
if this is a nucleus (ion), get nLambda | |
unsigned short | digit (location) const |
return the digit at a named location in the PID | |
const std::string | PDTname () const |
standard particle name |
In the standard numbering scheme, the PID digits (base 10) are: +/- n nr nl nq1 nq2 nq3 nj It is expected that any 7 digit number used as a PID will adhere to the Monte Carlo numbering scheme documented by the PDG. Note that particles not already explicitly defined can be expressed within this numbering scheme.
examMyPDT.cc, testHepPDT.cc, testPID.cc, and testReadParticleTable.cc.in.
Definition at line 64 of file ParticleID.hh.
HepPDT::ParticleID::ParticleID | ( | int | pid = 0 |
) |
HepPDT::ParticleID::ParticleID | ( | const ParticleID & | orig | ) |
Definition at line 20 of file ParticleID.cc.
ParticleID & HepPDT::ParticleID::operator= | ( | const ParticleID & | ) |
void HepPDT::ParticleID::swap | ( | ParticleID & | other | ) |
Definition at line 31 of file ParticleID.cc.
References itsPID, and HepPDT::swap().
Referenced by operator=(), HepPDT::swap(), and HepPDT::ParticleData::swap().
bool HepPDT::ParticleID::operator< | ( | ParticleID const & | other | ) | const |
bool HepPDT::ParticleID::operator== | ( | ParticleID const & | other | ) | const |
int HepPDT::ParticleID::pid | ( | ) | const [inline] |
get the integer ID
Definition at line 85 of file ParticleID.hh.
Referenced by HepPDT::TempParticleData::antiparticle(), HepPDT::TableBuilder::getAntiParticle(), isMeson(), HepPDT::ParticleDataTableComparison::operator()(), HepPDT::parseEvtGenDecayLine(), HepPDT::parseEvtGenLine(), HepPDT::detail::parseIsajetLine(), HepPDT::detail::parseParticleLine(), HepPDT::detail::parsePythiaDecayLine(), HepPDT::detail::parsePythiaLine(), HepPDT::parseQQParticle(), HepPDT::ParticleData::pid(), HepPDT::TempParticleData::processPID(), testHadron(), testHasMethods(), threeCharge(), and HepPDT::ParticleData::write().
int HepPDT::ParticleID::abspid | ( | ) | const |
get the absolute value
return a value greater than or equal to zero
Definition at line 46 of file ParticleID.cc.
Referenced by A(), digit(), extraBits(), fundamentalID(), hasBottom(), hasCharm(), hasDown(), hasStrange(), hasTop(), hasUp(), isBaryon(), isDiQuark(), isMeson(), isNucleus(), jSpin(), lambda(), lSpin(), HepPDT::ParticleDataTableComparison::operator()(), quarks(), sSpin(), threeCharge(), and Z().
bool HepPDT::ParticleID::isValid | ( | ) | const |
is this a valid ID?
Definition at line 137 of file ParticleID.cc.
References extraBits(), fundamentalID(), isBaryon(), isDiQuark(), isMeson(), isNucleus(), isPentaquark(), isRhadron(), and isSUSY().
Referenced by HepPDT::addParticleTable(), testValid(), and HepPDT::ParticleData::write().
bool HepPDT::ParticleID::isMeson | ( | ) | const |
is this a valid meson ID?
Definition at line 256 of file ParticleID.cc.
References abspid(), digit(), extraBits(), fundamentalID(), HepPDT::nj, HepPDT::nq1, HepPDT::nq2, HepPDT::nq3, and pid().
Referenced by isHadron(), HepPDT::ParticleData::isMeson(), isValid(), lSpin(), sSpin(), and testHadron().
bool HepPDT::ParticleID::isBaryon | ( | ) | const |
is this a valid baryon ID?
Definition at line 316 of file ParticleID.cc.
References abspid(), digit(), extraBits(), fundamentalID(), HepPDT::nj, HepPDT::nq1, HepPDT::nq2, and HepPDT::nq3.
Referenced by HepPDT::ParticleData::isBaryon(), isHadron(), isValid(), and testHadron().
bool HepPDT::ParticleID::isDiQuark | ( | ) | const |
is this a valid diquark ID?
Definition at line 298 of file ParticleID.cc.
References abspid(), digit(), extraBits(), fundamentalID(), HepPDT::nj, HepPDT::nq1, HepPDT::nq2, and HepPDT::nq3.
Referenced by HepPDT::ParticleData::isDiQuark(), isValid(), testDiQuark(), and testUnknown().
bool HepPDT::ParticleID::isHadron | ( | ) | const |
is this a valid hadron ID?
Definition at line 288 of file ParticleID.cc.
References extraBits(), isBaryon(), isMeson(), and isPentaquark().
Referenced by HepPDT::ParticleData::isHadron(), testHadron(), and testUnknown().
bool HepPDT::ParticleID::isLepton | ( | ) | const |
is this a valid lepton ID?
Definition at line 280 of file ParticleID.cc.
References extraBits(), and fundamentalID().
Referenced by HepPDT::ParticleData::isLepton(), testLepton(), and testUnknown().
bool HepPDT::ParticleID::isNucleus | ( | ) | const |
is this a valid ion ID?
Definition at line 216 of file ParticleID.cc.
References A(), abspid(), digit(), HepPDT::n10, HepPDT::n9, and Z().
Referenced by HepPDT::ParticleData::isNucleus(), isValid(), lambda(), HepPDT::TestNuclearFragment::processUnknownID(), HepPDT::HeavyIonUnknownID::processUnknownID(), testNucleus(), testUnknown(), and threeCharge().
bool HepPDT::ParticleID::isPentaquark | ( | ) | const |
is this a valid pentaquark ID?
Definition at line 162 of file ParticleID.cc.
References digit(), extraBits(), HepPDT::n, HepPDT::nj, HepPDT::nl, HepPDT::nq1, HepPDT::nq2, HepPDT::nq3, and HepPDT::nr.
Referenced by isHadron(), and isValid().
bool HepPDT::ParticleID::isSUSY | ( | ) | const |
is this a valid SUSY ID?
Definition at line 199 of file ParticleID.cc.
References digit(), extraBits(), fundamentalID(), HepPDT::n, and HepPDT::nr.
Referenced by isRhadron(), and isValid().
bool HepPDT::ParticleID::isRhadron | ( | ) | const |
is this a valid R-hadron ID?
Definition at line 182 of file ParticleID.cc.
References digit(), extraBits(), isSUSY(), HepPDT::n, HepPDT::nj, HepPDT::nq2, HepPDT::nq3, and HepPDT::nr.
Referenced by isValid().
bool HepPDT::ParticleID::hasUp | ( | ) | const |
does this particle contain an up quark?
Definition at line 82 of file ParticleID.cc.
References abspid(), digit(), extraBits(), fundamentalID(), HepPDT::nq1, HepPDT::nq2, and HepPDT::nq3.
Referenced by testHasMethods().
bool HepPDT::ParticleID::hasDown | ( | ) | const |
does this particle contain a down quark?
Definition at line 91 of file ParticleID.cc.
References abspid(), digit(), extraBits(), fundamentalID(), HepPDT::nq1, HepPDT::nq2, and HepPDT::nq3.
Referenced by testHasMethods().
bool HepPDT::ParticleID::hasStrange | ( | ) | const |
does this particle contain a strange quark?
Definition at line 100 of file ParticleID.cc.
References abspid(), digit(), extraBits(), fundamentalID(), HepPDT::nq1, HepPDT::nq2, and HepPDT::nq3.
Referenced by testHasMethods().
bool HepPDT::ParticleID::hasCharm | ( | ) | const |
does this particle contain a charm quark?
Definition at line 109 of file ParticleID.cc.
References abspid(), digit(), extraBits(), fundamentalID(), HepPDT::nq1, HepPDT::nq2, and HepPDT::nq3.
Referenced by testHasMethods().
bool HepPDT::ParticleID::hasBottom | ( | ) | const |
does this particle contain a bottom quark?
Definition at line 118 of file ParticleID.cc.
References abspid(), digit(), extraBits(), fundamentalID(), HepPDT::nq1, HepPDT::nq2, and HepPDT::nq3.
Referenced by testHasMethods().
bool HepPDT::ParticleID::hasTop | ( | ) | const |
does this particle contain a top quark?
Definition at line 127 of file ParticleID.cc.
References abspid(), digit(), extraBits(), fundamentalID(), HepPDT::nq1, HepPDT::nq2, and HepPDT::nq3.
Referenced by testHasMethods().
int HepPDT::ParticleID::jSpin | ( | ) | const |
jSpin returns 2J+1, where J is the total spin
Definition at line 327 of file ParticleID.cc.
References abspid(), extraBits(), and fundamentalID().
Referenced by HepPDT::TempParticleData::processPID(), testDiQuark(), testHadron(), testLepton(), testNucleus(), testUnknown(), and testValid().
int HepPDT::ParticleID::sSpin | ( | ) | const |
sSpin returns 2S+1, where S is the spin
Definition at line 394 of file ParticleID.cc.
References abspid(), isMeson(), and HepPDT::nl.
Referenced by HepPDT::TempParticleData::processPID(), and testValid().
int HepPDT::ParticleID::lSpin | ( | ) | const |
lSpin returns 2L+1, where L is the orbital angular momentum
Definition at line 344 of file ParticleID.cc.
References abspid(), isMeson(), and HepPDT::nl.
Referenced by HepPDT::TempParticleData::processPID(), testDiQuark(), testHadron(), testLepton(), testUnknown(), and testValid().
int HepPDT::ParticleID::fundamentalID | ( | ) | const |
return the first two digits if this is a "fundamental" particle
Definition at line 70 of file ParticleID.cc.
References abspid(), digit(), HepPDT::n10, HepPDT::n9, HepPDT::nq1, and HepPDT::nq2.
Referenced by hasBottom(), hasCharm(), hasDown(), hasStrange(), hasTop(), hasUp(), isBaryon(), HepPDT::Constituent::isBottom(), HepPDT::Constituent::isCharm(), isDiQuark(), HepPDT::Constituent::isDown(), isLepton(), isMeson(), HepPDT::Constituent::isStrange(), isSUSY(), HepPDT::Constituent::isTop(), HepPDT::Constituent::isUp(), isValid(), jSpin(), quarks(), testDiQuark(), testHadron(), testLepton(), testNucleus(), testUnknown(), and threeCharge().
int HepPDT::ParticleID::extraBits | ( | ) | const |
returns everything beyond the 7th digit (e.g. outside the standard numbering scheme)
Definition at line 62 of file ParticleID.cc.
References abspid().
Referenced by hasBottom(), hasCharm(), hasDown(), hasStrange(), hasTop(), hasUp(), isBaryon(), isDiQuark(), isHadron(), isLepton(), isMeson(), isPentaquark(), isRhadron(), isSUSY(), isValid(), jSpin(), quarks(), testDiQuark(), testHadron(), testLepton(), testNucleus(), testUnknown(), and threeCharge().
Quarks HepPDT::ParticleID::quarks | ( | ) | const |
returns a list of 3 constituent quarks
Definition at line 14 of file quarks.cc.
References abspid(), digit(), extraBits(), fundamentalID(), HepPDT::nq1, HepPDT::Quarks::nq1, HepPDT::nq2, HepPDT::Quarks::nq2, HepPDT::nq3, and HepPDT::Quarks::nq3.
Referenced by HepPDT::TempParticleData::processPID(), testDiQuark(), testHadron(), testLepton(), testNucleus(), testUnknown(), and testValid().
int HepPDT::ParticleID::threeCharge | ( | ) | const |
this is mostly for use by functions like addPDGParticles that have to figure out the charge from the PID
Definition at line 419 of file ParticleID.cc.
References abspid(), digit(), extraBits(), fundamentalID(), isNucleus(), HepPDT::nj, HepPDT::nq1, HepPDT::nq2, HepPDT::nq3, pid(), and Z().
Referenced by HepPDT::TempParticleData::processPID(), testDiQuark(), testHadron(), testLepton(), testNucleus(), testUnknown(), and testValid().
int HepPDT::ParticleID::A | ( | ) | const |
if this is a nucleus (ion), get A
Definition at line 229 of file ParticleID.cc.
References abspid(), digit(), HepPDT::n10, and HepPDT::n9.
Referenced by isNucleus(), and testNucleus().
int HepPDT::ParticleID::Z | ( | ) | const |
if this is a nucleus (ion), get Z
Definition at line 238 of file ParticleID.cc.
References abspid(), digit(), HepPDT::n10, and HepPDT::n9.
Referenced by isNucleus(), testNucleus(), and threeCharge().
int HepPDT::ParticleID::lambda | ( | ) | const |
if this is a nucleus (ion), get nLambda
Definition at line 247 of file ParticleID.cc.
References abspid(), digit(), isNucleus(), and HepPDT::n8.
Referenced by testNucleus().
unsigned short HepPDT::ParticleID::digit | ( | location | ) | const |
return the digit at a named location in the PID
Definition at line 53 of file ParticleID.cc.
References abspid().
Referenced by A(), fundamentalID(), hasBottom(), hasCharm(), hasDown(), hasStrange(), hasTop(), hasUp(), isBaryon(), isDiQuark(), isMeson(), isNucleus(), isPentaquark(), isRhadron(), isSUSY(), lambda(), quarks(), testDiQuark(), testHadron(), testLepton(), testNucleus(), testUnknown(), threeCharge(), and Z().
const std::string HepPDT::ParticleID::PDTname | ( | ) | const [inline] |
standard particle name
Definition at line 150 of file ParticleID.hh.
References HepPID::particleName().
Referenced by HepPDT::ParticleData::PDTname(), and testHasMethods().