154 return { m_extra, m_nj, m_nq3, m_nq2, m_nq1, m_nl, m_nr, m_n };
275 static const int q[101] = { 0, -1, 2, -1, 2, -1, 2, -1, 2, 6, 0,
276 -3, 0, -3, 0, -3, 0, -3, 0, 0, 0,
277 0, 0, 0, 3, 0, 0, 0, 0, 0, 0,
278 0, 0, 0, 3, 0, 0, 3, 0, 0, 0,
279 0, -1, 0, 3, 0, 0, 0, 0, 0, 0,
280 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
281 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
282 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
283 0, 0, 0, 2, -1, 2, -1, 0, 0, 0,
284 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 };
288 DATA data = decode( *
this );
303 charge = abs( q[m_nq2] - q[m_nq3] );
307 charge = q[m_nq3] + q[m_nq2] + q[m_nq1];
310 return (
pid() < 0 ? -1 : 1 ) * charge;
319 static const unsigned int j[101] = { 0, 2, 2, 2, 2, 2, 2, 2, 2, 1, 4,
320 2, 2, 2, 2, 2, 2, 2, 2, 0, 0,
321 3, 3, 3, 3, 1, 0, 0, 0, 0, 0,
322 0, 3, 3, 3, 1, 1, 1, 1, 5, 0,
323 3, 1, 0, 0, 1, 1, 0, 0, 0, 0,
324 1, 2, 3, 1, 3, 1, 1, 1, 1, 1,
325 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
326 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
327 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
328 0, 0, 3, 0, 0, 0, 0, 0, 0, 0 };
332 DATA data = decode( *
this );
340 if ( m_n == 1 || m_n == 2 || m_n == 3 ) {
341 spin = j[fid] % 2 + 1;
350 spin = m_nq3 % 2 + 1;
Holds PDG + LHCb extension particle code, following the PDG particle numbering scheme (pdg....
bool isHadron() const
Return if the PID is for a hadron.
std::string toString() const
Return the PID stream representation as a string.
int Z() const
Return the atomic number for a nucleus.
int extraBits() const
Return everything beyond the 7th PDG ID digit.
static std::ostream & printLocation(const long l, std::ostream &s)
Fill a stream with the PID digit enumeration.
bool hasQuarks() const
Return if the PID is a particle with quarks, but not a nucleus.
bool isSM() const
Return if the PID is from the standard model.
int fundamentalID() const
Return the fundamental ID.
bool isDiQuark() const
Return if the PID is for a di-quark.
int jSpin() const
Return 2J+1, where J is the total spin, valid for all particles.
bool isValid() const
Return if the PID is valid.
static std::ostream & printQuark(const long q, std::ostream &s)
Fill a stream with the PID quark enumeration.
bool isQuark() const
Return if the PID is for a bare quark.
constexpr unsigned int abspid() const
Absolute value of the PDG ID.
int nLambda() const
Return the number of strange quarks for a nucleus.
bool isBaryon() const
Return if the PID is for a baryon.
bool isNucleus() const
Return if the PID is for a nucleus.
int lSpin() const
Return 2L+1, where L is the orbital angular momentum, valid only for mesons.
bool hasQuark(const Quark &q) const
Return if the PID is a particle containing a specified quark flavor.
bool isMeson() const
Return if the PID is for a meson.
constexpr unsigned short digit(const Location &loc) const
Return the digit for a given PDG ID digit location.
int A() const
Return the nucleon number for a nucleus.
int threeCharge() const
Return three times the charge, in units of e+, valid for all particles.
int sSpin() const
Return 2S+1, where S is the spin, valid only for mesons.
bool isLepton() const
Return if the PID is for a lepton.
std::ostream & fillStream(std::ostream &s) const
Fill a stream with the PID.
void swap(GaudiUtils::VectorMap< KEY, VALUE, KEYCOMPARE, ALLOCATOR > &left, GaudiUtils::VectorMap< KEY, VALUE, KEYCOMPARE, ALLOCATOR > &right)
the definition of specialized algorithm for swapping