![]() |
The Gaudi Framework
master (902e3694)
|
#include </builds/gaudi/Gaudi/GaudiPartProp/include/Gaudi/ParticleID.h>
Public Types | |
enum | Location { nj = 1, nq3, nq2, nq1, nl, nr, n, n8, n9, n10 } |
PDG ID digits (base 10) are: n nr nl nq1 ne2 nq3 nj. More... | |
enum | Quark { down = 1, up, strange, charm, bottom, top, bottom_prime, top_prime, first = down, last = top_prime } |
Quark PDG IDs. More... | |
Public Member Functions | |
ParticleID (const int pid=0) | |
Constructor with PDG code. More... | |
int | pid () const |
Retrieve the PDG ID. More... | |
constexpr unsigned int | abspid () const |
Absolute value of the PDG ID. More... | |
void | setPid (const int pid) |
Update the PDG ID. More... | |
bool | isValid () const |
Return if the PID is valid. More... | |
bool | isSM () const |
Return if the PID is from the standard model. More... | |
bool | isMeson () const |
Return if the PID is for a meson. More... | |
bool | isBaryon () const |
Return if the PID is for a baryon. More... | |
bool | isDiQuark () const |
Return if the PID is for a di-quark. More... | |
bool | isHadron () const |
Return if the PID is for a hadron. More... | |
bool | isLepton () const |
Return if the PID is for a lepton. More... | |
bool | isNucleus () const |
Return if the PID is for a nucleus. More... | |
bool | isQuark () const |
Return if the PID is for a bare quark. More... | |
bool | hasQuarks () const |
Return if the PID is a particle with quarks, but not a nucleus. More... | |
bool | hasQuark (const Quark &q) const |
Return if the PID is a particle containing a specified quark flavor. More... | |
bool | hasDown () const |
Return if the PID is a particle with a down quark. More... | |
bool | hasUp () const |
Return if the PID is a particle with an up quark. More... | |
bool | hasStrange () const |
Return if the PID is a particle with a down quark. More... | |
bool | hasCharm () const |
Return if the PID is a particle with a charm quark. More... | |
bool | hasBottom () const |
Return if the PID is a particle with a bottom quark. More... | |
bool | hasTop () const |
Return if the PID is a particle with a top quark. More... | |
bool | hasBottomPrime () const |
Return if the PID is a particle with a bottom' quark. More... | |
bool | hasTopPrime () const |
Return if the PID is a particle with a top' quark. More... | |
int | threeCharge () const |
Return three times the charge, in units of e+, valid for all particles. More... | |
int | jSpin () const |
Return 2J+1, where J is the total spin, valid for all particles. More... | |
int | sSpin () const |
Return 2S+1, where S is the spin, valid only for mesons. More... | |
int | lSpin () const |
Return 2L+1, where L is the orbital angular momentum, valid only for mesons. More... | |
int | Z () const |
Return the atomic number for a nucleus. More... | |
int | A () const |
Return the nucleon number for a nucleus. More... | |
int | nLambda () const |
Return the number of strange quarks for a nucleus. More... | |
int | fundamentalID () const |
Return the fundamental ID. More... | |
int | extraBits () const |
Return everything beyond the 7th PDG ID digit. More... | |
constexpr unsigned short | digit (const Location &loc) const |
Return the digit for a given PDG ID digit location. More... | |
bool | operator== (const ParticleID &o) const |
Equality operator. More... | |
bool | operator!= (const ParticleID &o) const |
Non-equality operator. More... | |
bool | operator< (const ParticleID &o) const |
Comparison operator. More... | |
std::ostream & | fillStream (std::ostream &s) const |
Fill a stream with the PID. More... | |
std::string | toString () const |
Return the PID stream representation as a string. More... | |
Static Public Member Functions | |
static std::ostream & | printLocation (const long l, std::ostream &s) |
Fill a stream with the PID digit enumeration. More... | |
static std::string | printLocation (const long l) |
Return the PID digit enumeration stream representation as a string. More... | |
static std::ostream & | printQuark (const long q, std::ostream &s) |
Fill a stream with the PID quark enumeration. More... | |
static std::string | printQuark (const long q) |
Return the PID quark enumeration stream representation as a string. More... | |
Private Attributes | |
int | m_pid { 0 } |
PDG ID. More... | |
Holds PDG + LHCb extension particle code, following the PDG particle numbering scheme (pdg.lbl.gov/2017/reviews/rpp2017-rev-monte-carlo-numbering.pdf). Specific conventions followed by Pythia 8 for beyond the standard model physics and color-octet quarkonia have been introduced.
Nuclei with the PDG 2017 convention (following the 2006 Monte Carlo nuclear code scheme) have the numbering +/- 10LZZZAAAI. Where AAA is A - the total baryon number, ZZZ is Z - the total number of protons, L is the total number of strange quarks, and I is the isomer number where I = 0 corresponds to the ground state. Backwards compatibility with the old heavy ion scheme has also been kept.
Definition at line 43 of file ParticleID.h.
|
inlineexplicit |
int Gaudi::ParticleID::A | ( | ) | const |
|
inlineconstexpr |
Absolute value of the PDG ID.
Definition at line 56 of file ParticleID.h.
|
inlineconstexpr |
Return the digit for a given PDG ID digit location.
Definition at line 125 of file ParticleID.h.
int Gaudi::ParticleID::extraBits | ( | ) | const |
Return everything beyond the 7th PDG ID digit.
Definition at line 158 of file ParticleID.cpp.
std::ostream & Gaudi::ParticleID::fillStream | ( | std::ostream & | s | ) | const |
Fill a stream with the PID.
Definition at line 432 of file ParticleID.cpp.
int Gaudi::ParticleID::fundamentalID | ( | ) | const |
Return the fundamental ID.
This is 0 for nuclei, mesons, baryons, and di-quarks. Otherwise, this is the first two digits of the PDG ID
Definition at line 166 of file ParticleID.cpp.
|
inline |
Return if the PID is a particle with a bottom quark.
Definition at line 92 of file ParticleID.h.
|
inline |
|
inline |
Return if the PID is a particle with a charm quark.
Definition at line 90 of file ParticleID.h.
|
inline |
Return if the PID is a particle with a down quark.
Definition at line 84 of file ParticleID.h.
bool Gaudi::ParticleID::hasQuark | ( | const Quark & | q | ) | const |
Return if the PID is a particle containing a specified quark flavor.
Definition at line 257 of file ParticleID.cpp.
bool Gaudi::ParticleID::hasQuarks | ( | ) | const |
Return if the PID is a particle with quarks, but not a nucleus.
Definition at line 255 of file ParticleID.cpp.
|
inline |
Return if the PID is a particle with a down quark.
Definition at line 88 of file ParticleID.h.
|
inline |
Return if the PID is a particle with a top quark.
Definition at line 94 of file ParticleID.h.
|
inline |
Return if the PID is a particle with a top' quark.
Definition at line 98 of file ParticleID.h.
|
inline |
Return if the PID is a particle with an up quark.
Definition at line 86 of file ParticleID.h.
bool Gaudi::ParticleID::isBaryon | ( | ) | const |
bool Gaudi::ParticleID::isDiQuark | ( | ) | const |
bool Gaudi::ParticleID::isHadron | ( | ) | const |
Return if the PID is for a hadron.
Definition at line 241 of file ParticleID.cpp.
bool Gaudi::ParticleID::isLepton | ( | ) | const |
Return if the PID is for a lepton.
Definition at line 243 of file ParticleID.cpp.
bool Gaudi::ParticleID::isMeson | ( | ) | const |
bool Gaudi::ParticleID::isNucleus | ( | ) | const |
Return if the PID is for a nucleus.
Definition at line 248 of file ParticleID.cpp.
bool Gaudi::ParticleID::isQuark | ( | ) | const |
bool Gaudi::ParticleID::isSM | ( | ) | const |
bool Gaudi::ParticleID::isValid | ( | ) | const |
int Gaudi::ParticleID::jSpin | ( | ) | const |
Return 2J+1, where J is the total spin, valid for all particles.
Definition at line 313 of file ParticleID.cpp.
int Gaudi::ParticleID::lSpin | ( | ) | const |
Return 2L+1, where L is the orbital angular momentum, valid only for mesons.
Definition at line 382 of file ParticleID.cpp.
int Gaudi::ParticleID::nLambda | ( | ) | const |
|
inline |
|
inline |
|
inline |
|
inline |
|
static |
Return the PID digit enumeration stream representation as a string.
Definition at line 471 of file ParticleID.cpp.
|
static |
|
static |
Return the PID quark enumeration stream representation as a string.
Definition at line 502 of file ParticleID.cpp.
|
static |
|
inline |
int Gaudi::ParticleID::sSpin | ( | ) | const |
Return 2S+1, where S is the spin, valid only for mesons.
Definition at line 361 of file ParticleID.cpp.
int Gaudi::ParticleID::threeCharge | ( | ) | const |
Return three times the charge, in units of e+, valid for all particles.
Definition at line 269 of file ParticleID.cpp.
std::string Gaudi::ParticleID::toString | ( | ) | const |
Return the PID stream representation as a string.
Definition at line 436 of file ParticleID.cpp.
int Gaudi::ParticleID::Z | ( | ) | const |
|
private |
PDG ID.
Definition at line 155 of file ParticleID.h.