![]() |
The Gaudi Framework
master (ff829712)
|
Holds PDG + LHCb extension particle code, following the PDG particle numbering scheme (pdg.lbl.gov/2017/reviews/rpp2017-rev-monte-carlo-numbering.pdf). More...
#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. | |
int | pid () const |
Retrieve the PDG ID. | |
constexpr unsigned int | abspid () const |
Absolute value of the PDG ID. | |
void | setPid (const int pid) |
Update the PDG ID. | |
bool | isValid () const |
Return if the PID is valid. | |
bool | isSM () const |
Return if the PID is from the standard model. | |
bool | isMeson () const |
Return if the PID is for a meson. | |
bool | isBaryon () const |
Return if the PID is for a baryon. | |
bool | isDiQuark () const |
Return if the PID is for a di-quark. | |
bool | isHadron () const |
Return if the PID is for a hadron. | |
bool | isLepton () const |
Return if the PID is for a lepton. | |
bool | isNucleus () const |
Return if the PID is for a nucleus. | |
bool | isQuark () const |
Return if the PID is for a bare quark. | |
bool | hasQuarks () const |
Return if the PID is a particle with quarks, but not a nucleus. | |
bool | hasQuark (const Quark &q) const |
Return if the PID is a particle containing a specified quark flavor. | |
bool | hasDown () const |
Return if the PID is a particle with a down quark. | |
bool | hasUp () const |
Return if the PID is a particle with an up quark. | |
bool | hasStrange () const |
Return if the PID is a particle with a down quark. | |
bool | hasCharm () const |
Return if the PID is a particle with a charm quark. | |
bool | hasBottom () const |
Return if the PID is a particle with a bottom quark. | |
bool | hasTop () const |
Return if the PID is a particle with a top quark. | |
bool | hasBottomPrime () const |
Return if the PID is a particle with a bottom' quark. | |
bool | hasTopPrime () const |
Return if the PID is a particle with a top' quark. | |
int | threeCharge () const |
Return three times the charge, in units of e+, valid for all particles. | |
int | jSpin () const |
Return 2J+1, where J is the total spin, valid for all particles. | |
int | sSpin () const |
Return 2S+1, where S is the spin, valid only for mesons. | |
int | lSpin () const |
Return 2L+1, where L is the orbital angular momentum, valid only for mesons. | |
int | Z () const |
Return the atomic number for a nucleus. | |
int | A () const |
Return the nucleon number for a nucleus. | |
int | nLambda () const |
Return the number of strange quarks for a nucleus. | |
int | fundamentalID () const |
Return the fundamental ID. | |
int | extraBits () const |
Return everything beyond the 7th PDG ID digit. | |
constexpr unsigned short | digit (const Location &loc) const |
Return the digit for a given PDG ID digit location. | |
bool | operator== (const ParticleID &o) const |
Equality operator. | |
bool | operator!= (const ParticleID &o) const |
Non-equality operator. | |
bool | operator< (const ParticleID &o) const |
Comparison operator. | |
std::ostream & | fillStream (std::ostream &s) const |
Fill a stream with the PID. | |
std::string | toString () const |
Return the PID stream representation as a string. | |
Static Public Member Functions | |
static std::ostream & | printLocation (const long l, std::ostream &s) |
Fill a stream with the PID digit enumeration. | |
static std::string | printLocation (const long l) |
Return the PID digit enumeration stream representation as a string. | |
static std::ostream & | printQuark (const long q, std::ostream &s) |
Fill a stream with the PID quark enumeration. | |
static std::string | printQuark (const long q) |
Return the PID quark enumeration stream representation as a string. | |
Private Attributes | |
int | m_pid { 0 } |
PDG ID. | |
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.
PDG ID digits (base 10) are: n nr nl nq1 ne2 nq3 nj.
Enumerator | |
---|---|
nj | |
nq3 | |
nq2 | |
nq1 | |
nl | |
nr | |
n | |
n8 | |
n9 | |
n10 |
Definition at line 46 of file ParticleID.h.
|
inlineexplicit |
int Gaudi::ParticleID::A | ( | ) | const |
Return the nucleon number for a nucleus.
Definition at line 416 of file ParticleID.cpp.
|
inlineconstexpr |
|
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 |
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 |
Return if the PID is for a baryon.
Definition at line 215 of file ParticleID.cpp.
bool Gaudi::ParticleID::isDiQuark | ( | ) | const |
Return if the PID is for a di-quark.
Definition at line 228 of file ParticleID.cpp.
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 |
Return if the PID is for a meson.
Definition at line 202 of file ParticleID.cpp.
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 |
Return if the PID is from the standard model.
Definition at line 194 of file ParticleID.cpp.
bool Gaudi::ParticleID::isValid | ( | ) | const |
Return if the PID is valid.
Definition at line 179 of file ParticleID.cpp.
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 |
Return the number of strange quarks for a nucleus.
Definition at line 427 of file ParticleID.cpp.
|
inline |
|
inline |
Comparison operator.
Definition at line 135 of file ParticleID.h.
|
inline |
|
inline |
|
static |
Return the PID digit enumeration stream representation as a string.
Definition at line 471 of file ParticleID.cpp.
|
static |
Fill a stream with the PID digit enumeration.
Definition at line 443 of file ParticleID.cpp.
|
static |
Return the PID quark enumeration stream representation as a string.
Definition at line 502 of file ParticleID.cpp.
|
static |
Fill a stream with the PID quark enumeration.
Definition at line 478 of file ParticleID.cpp.
|
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 |
Return the atomic number for a nucleus.
Definition at line 404 of file ParticleID.cpp.
|
private |