ATLAS Offline Software
Classes | Namespaces | Functions
AtlasPID.h File Reference
#include <vector>
#include <cmath>
#include <algorithm>
#include <array>
#include <cstdlib>
Include dependency graph for AtlasPID.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  DecodedPID
 Implementation of classification functions according to PDG2022. More...
 

Namespaces

 SUSY
 

Functions

template<class T >
bool isQuark (const T &p)
 PDG rule 2: Quarks and leptons are numbered consecutively starting from 1 and 11 respectively; to dothis they are first ordered by family and within families by weak isospin. More...
 
template<>
bool isQuark (const int &p)
 
template<>
bool isQuark (const DecodedPID &p)
 
template<class T >
bool isStrange (const T &p)
 
template<>
bool isStrange (const int &p)
 
template<class T >
bool isCharm (const T &p)
 
template<>
bool isCharm (const int &p)
 
template<class T >
bool isBottom (const T &p)
 
template<>
bool isBottom (const int &p)
 
template<class T >
bool isTop (const T &p)
 
template<>
bool isTop (const int &p)
 
template<class T >
bool isLepton (const T &p)
 APID: the fourth generation leptons are leptons. More...
 
template<>
bool isLepton (const int &p)
 
template<>
bool isLepton (const DecodedPID &p)
 
template<class T >
bool isSMLepton (const T &p)
 
template<>
bool isSMLepton (const int &p)
 
template<>
bool isSMLepton (const DecodedPID &p)
 
template<class T >
bool isChLepton (const T &p)
 APID: the fourth generation leptons are leptons. More...
 
template<>
bool isChLepton (const int &p)
 
template<class T >
bool isElectron (const T &p)
 
template<>
bool isElectron (const int &p)
 
template<class T >
bool isMuon (const T &p)
 
template<>
bool isMuon (const int &p)
 
template<class T >
bool isTau (const T &p)
 
template<>
bool isTau (const int &p)
 
template<class T >
bool isNeutrino (const T &p)
 APID: the fourth generation neutrinos are neutrinos. More...
 
template<>
bool isNeutrino (const int &p)
 
template<class T >
bool isSMNeutrino (const T &p)
 
template<>
bool isSMNeutrino (const int &p)
 
template<class T >
bool isGluon (const T &p)
 
template<>
bool isGluon (const int &p)
 
template<class T >
bool isPhoton (const T &p)
 
template<>
bool isPhoton (const int &p)
 
template<class T >
bool isZ (const T &p)
 
template<>
bool isZ (const int &p)
 
template<class T >
bool isW (const T &p)
 
template<>
bool isW (const int &p)
 
template<class T >
bool isDM (const T &p)
 PDG rule 11j: The nature of Dark Matter (DM) is not known, and therefore a definitive classificationis too early. More...
 
template<>
bool isDM (const int &p)
 
template<class T >
bool isTrajectory (const T &p)
 PDG rule 8: The pomeron and odderon trajectories and a generic reggeon trajectory of states in QCD areassigned codes 990, 9990, and 110 respectively. More...
 
template<>
bool isTrajectory (const int &p)
 
template<class T >
bool isHiggs (const T &p)
 APID: HIGGS boson is only one particle. More...
 
template<>
bool isHiggs (const int &p)
 
template<class T >
bool isResonance (const T &p)
 
template<class T >
bool isGraviton (const T &p)
 
template<>
bool isGraviton (const int &p)
 
template<class T >
bool isLeptoQuark (const T &p)
 
template<>
bool isLeptoQuark (const int &p)
 
template<class T >
bool isSUSY (const T &p)
 
template<class T >
bool isTechnicolor (const T &p)
 
template<class T >
bool isExcited (const T &p)
 
template<class T >
bool isKK (const T &p)
 
template<class T >
bool isMonopole (const T &p)
 
template<class T >
bool isHiddenValley (const T &p)
 
template<class T >
bool isGenericMultichargedParticle (const T &p)
 
template<class T >
bool isDiquark (const T &p)
 
template<class T >
bool isHadron (const T &p)
 
template<class T >
bool isMeson (const T &p)
 
template<class T >
bool isBaryon (const T &p)
 
template<class T >
bool isTetraquark (const T &p)
 
template<class T >
bool isPentaquark (const T &p)
 
template<class T >
bool isNucleus (const T &p)
 
template<class T >
bool isBSM (const T &p)
 
template<class T >
bool isValid (const T &p)
 
template<>
bool isValid (const DecodedPID &p)
 Av: we implement here an ATLAS-sepcific convention: all particles which are 99xxxxx are fine. More...
 
template<class T >
bool isTransportable (const T &p)
 
template<class T >
bool isGenSpecific (const T &p)
 
template<class T >
bool isGeantino (const T &p)
 
template<class T >
bool isPythia8Specific (const T &p)
 
template<>
bool isPythia8Specific (const DecodedPID &p)
 
template<>
bool isPythia8Specific (const int &p)
 
template<>
bool isGenSpecific (const int &p)
 Main Table for MC internal use 81–100,901–930,998-999,1901–1930,2901–2930, and 3901–3930. More...
 
template<>
bool isGeantino (const int &p)
 
template<class T >
bool isGlueball (const T &p)
 APID: Definition of Glueballs: SM glueballs 99X (X=1,3,5), 999Y (Y=3,5,7) More...
 
template<>
bool isGlueball (const DecodedPID &p)
 
template<>
bool isGlueball (const int &p)
 
template<>
bool isSUSY (const DecodedPID &p)
 PDG rule 11d Fundamental supersymmetric particles are identified by adding a nonzero n to the particle number. More...
 
template<>
bool isTechnicolor (const DecodedPID &p)
 PDG rule 11e Technicolor states have n = 3, with technifermions treated like ordinary fermions. More...
 
template<>
bool isTechnicolor (const int &p)
 
template<>
bool isExcited (const DecodedPID &p)
 PDG rule 11f Excited (composite) quarks and leptons are identified by setting n= 4 and nr= 0. More...
 
template<>
bool isExcited (const int &p)
 
template<>
bool isKK (const DecodedPID &p)
 PDG rule 11h A black hole in models with extra dimensions has code 5000040. More...
 
template<>
bool isKK (const int &p)
 
template<>
bool isMonopole (const DecodedPID &p)
 PDG rule 11i Magnetic monopoles and dyons are assumed to have one unit of Dirac monopole charge and a variable integer number nq1nq2 nq3 units of electric charge. More...
 
template<>
bool isMonopole (const int &p)
 
template<>
bool isHiddenValley (const DecodedPID &p)
 PDG rule 11k Hidden Valley particles have n = 4 and n_r = 9, and trailing numbers in agreement with their nearest-analog standard particles, as far as possible. More...
 
template<>
bool isHiddenValley (const int &p)
 
template<>
bool isGenericMultichargedParticle (const DecodedPID &p)
 In addition, there is a need to identify ”Q-ball” and similar very exotic (multi-charged) particles which may have large, non-integer charge. More...
 
template<>
bool isGenericMultichargedParticle (const int &p)
 
template<>
bool isDiquark (const DecodedPID &p)
 PDG rule 4 Diquarks have 4-digit numbers with nq1 >= nq2 and nq3 = 0 APID: the diquarks with fourth generation are not diquarks. More...
 
template<>
bool isMeson (const DecodedPID &p)
 Table 43.1 PDG rule 5a: The numbers specifying the meson’s quark content conform to the convention nq1= 0 and nq2 >= nq3. More...
 
template<>
bool isBaryon (const DecodedPID &p)
 Table 43.2. More...
 
template<>
bool isPentaquark (const DecodedPID &p)
 PDG rule 15 The 9-digit penta-quark codes are±1nrnLnq1nq2nq3nq4nq5nJ, sorted such thatnq1≥nq2≥nq3≥nq4. More...
 
template<>
bool isTetraquark (const DecodedPID &p)
 PDG rule 14 The 9-digit tetra-quark codes are±1nrnLnq1nq20nq3nq4nJ. More...
 
template<>
bool isNucleus (const DecodedPID &p)
 PDG rule 16: Nuclear codes are given as 10-digit numbers±10LZZZAAAI. More...
 
template<>
bool isBSM (const DecodedPID &p)
 APID: graviton and all Higgs extensions are BSM. More...
 
template<>
bool isSUSY (const int &p)
 
template<>
bool isDiquark (const int &p)
 
template<>
bool isMeson (const int &p)
 
template<>
bool isBaryon (const int &p)
 
template<>
bool isTetraquark (const int &p)
 
template<>
bool isPentaquark (const int &p)
 
template<>
bool isNucleus (const int &p)
 
template<>
bool isBSM (const int &p)
 
template<>
bool isHadron (const DecodedPID &p)
 
template<>
bool isHadron (const int &p)
 
template<>
bool isTransportable (const DecodedPID &p)
 
template<>
bool isTransportable (const int &p)
 
template<>
bool isValid (const int &p)
 
template<class T >
bool hasQuark (const T &p, const int &q)
 
template<>
bool hasQuark (const DecodedPID &p, const int &q)
 
template<>
bool hasQuark (const int &p, const int &q)
 
template<class T >
int leadingQuark (const T &p)
 
template<>
int leadingQuark (const DecodedPID &p)
 
template<>
int leadingQuark (const int &p)
 
template<class T >
bool hasStrange (const T &p)
 
template<class T >
bool hasCharm (const T &p)
 
template<class T >
bool hasBottom (const T &p)
 
template<class T >
bool hasTop (const T &p)
 
template<class T >
bool isLightHadron (const T &p)
 
template<class T >
bool isHeavyHadron (const T &p)
 
template<class T >
bool isStrangeHadron (const T &p)
 
template<class T >
bool isCharmHadron (const T &p)
 
template<class T >
bool isBottomHadron (const T &p)
 
template<class T >
bool isTopHadron (const T &p)
 
template<class T >
bool isLightMeson (const T &p)
 
template<class T >
bool isHeavyMeson (const T &p)
 
template<class T >
bool isStrangeMeson (const T &p)
 
template<class T >
bool isCharmMeson (const T &p)
 
template<class T >
bool isBottomMeson (const T &p)
 
template<class T >
bool isTopMeson (const T &p)
 
template<class T >
bool isCCbarMeson (const T &p)
 
template<>
bool isCCbarMeson (const DecodedPID &p)
 
template<>
bool isCCbarMeson (const int &p)
 
template<class T >
bool isBBbarMeson (const T &p)
 
template<>
bool isBBbarMeson (const DecodedPID &p)
 
template<>
bool isBBbarMeson (const int &p)
 
template<class T >
bool isLightBaryon (const T &p)
 
template<class T >
bool isHeavyBaryon (const T &p)
 
template<class T >
bool isStrangeBaryon (const T &p)
 
template<class T >
bool isCharmBaryon (const T &p)
 
template<class T >
bool isBottomBaryon (const T &p)
 
template<class T >
bool isTopBaryon (const T &p)
 
template<class T >
int charge3 (const T &p)
 
template<class T >
double fractionalCharge (const T &p)
 
template<class T >
double charge (const T &p)
 
template<class T >
double threeCharge (const T &p)
 
template<class T >
bool isCharged (const T &p)
 
template<class T >
bool isNeutral (const T &p)
 
template<>
int charge3 (const DecodedPID &p)
 
template<>
int charge3 (const int &p)
 
template<>
double fractionalCharge (const DecodedPID &p)
 
template<>
double fractionalCharge (const int &p)
 
template<class T >
bool isEMInteracting (const T &p)
 
template<>
bool isEMInteracting (const int &p)
 
template<class T >
bool isParton (const T &p)
 
template<class T >
bool SUSY::isRGlueball (const T &p)
 PDG rule 11g: Within several scenarios of new physics, it is possible to have colored particles sufficiently long-lived for color-singlet hadronic states to form around them. More...
 
template<>
bool SUSY::isRGlueball (const DecodedPID &p)
 
template<>
bool SUSY::isRGlueball (const int &p)
 
template<class T >
bool SUSY::isRHadron (const T &p)
 
template<>
bool SUSY::isRHadron (const DecodedPID &p)
 
template<>
bool SUSY::isRHadron (const int &p)
 
template<class T >
bool SUSY::isRMeson (const T &p)
 
template<>
bool SUSY::isRMeson (const DecodedPID &p)
 
template<>
bool SUSY::isRMeson (const int &p)
 
template<class T >
bool SUSY::isRBaryon (const T &p)
 
template<>
bool SUSY::isRBaryon (const DecodedPID &p)
 
template<>
bool SUSY::isRBaryon (const int &p)
 
template<class T >
bool SUSY::isSLepton (const T &p)
 
template<>
bool SUSY::isSLepton (const DecodedPID &p)
 
template<>
bool SUSY::isSLepton (const int &p)
 
template<class T >
bool SUSY::isSBaryon (const T &p)
 
template<>
bool SUSY::isSBaryon (const DecodedPID &p)
 
template<>
bool SUSY::isSBaryon (const int &p)
 
template<class T >
bool SUSY::isSMeson (const T &p)
 
template<>
bool SUSY::isSMeson (const DecodedPID &p)
 
template<>
bool SUSY::isSMeson (const int &p)
 
template<class T >
bool SUSY::spin (const T &p)
 
template<>
bool SUSY::spin (const int &p)
 
std::vector< int > SUSY::containedQuarks (int p)
 
template<class T >
bool SUSY::isSquark (const T &p)
 
template<>
bool SUSY::isSquark (const DecodedPID &p)
 
template<>
bool SUSY::isSquark (const int &p)
 
template<class T >
bool SUSY::hasSquark (const T &p, const int &q)
 
template<>
bool SUSY::hasSquark (const DecodedPID &p, const int &q)
 
template<>
bool SUSY::hasSquark (const int &p, const int &q)
 
template<class T >
bool isStrongInteracting (const T &p)
 
template<>
bool isStrongInteracting (const int &p)
 

Function Documentation

◆ charge()

template<class T >
double charge ( const T &  p)
inline

Definition at line 538 of file AtlasPID.h.

538  {
539  if (isGenericMultichargedParticle(p)) // BSM multi-charged particles might have a fractional charge that's not a multiple of 1/3
540  return fractionalCharge(p);
541  else
542  return 1.0*charge3(p)/3.0;
543 }

◆ charge3() [1/3]

template<>
int charge3 ( const DecodedPID p)
inline

Codes 411nq1nq2 nq3 0 are then used when the magnetic and electrical charge sign agree and 412nq1nq2 nq3 0 when they disagree, with the overall sign of the particle set by the magnetic charge.

Definition at line 550 of file AtlasPID.h.

550  {
551  auto ap = std::abs(p.pid());
552  if (ap < TABLESIZE ) return p.pid() > 0 ? triple_charge.at(ap) : -triple_charge.at(ap);
553  if (ap == K0) return 0;
554  if (ap == GEANTINO0) return 0;
555  if (ap == GEANTINOPLUS) return p.pid() > 0 ? 3 : -3;
556  if (ap == MAVTOP) return p.pid() > 0 ? 2 : -2;
557  size_t nq = 0;
558  int sign = 1;
559  int signmult = 1;
560  int result=0;
561  bool classified = false;
562  if (!classified && isMeson(p)) { classified = true; nq = 2; if ((*(p.second.rbegin()+2)) == 2||(*(p.second.rbegin()+2)) == 4 ) { sign=-1;} signmult =-1; }
563  if (!classified && isDiquark(p)) {return triple_charge.at(p(0))+triple_charge.at(p(1)); }
564  if (!classified && isBaryon(p)) { classified = true; nq = 3; }
565  if (!classified && isTetraquark(p)){ return triple_charge.at(p(3)) + triple_charge.at(p(4)) - triple_charge.at(p(6)) - triple_charge.at(p(7)); }
566  if (!classified && isPentaquark(p)){ return triple_charge.at(p(3)) + triple_charge.at(p(4)) + triple_charge.at(p(5)) + triple_charge.at(p(6)) - triple_charge.at(p(7)); }
567  if (!classified && isNucleus(p)) { classified = true; nq=0; result = 3*(p(3)*100 + p(4)*10 + p(5)) + (-1)*p(2);}
568  if (!classified && isSUSY(p)) { nq = 0;
569  classified = true;
570  auto pp = p.shift(1); if (pp.ndigits() > 2) pp = pp.shift(1);
571  return charge3(pp);
572  }
573  if (!classified && isMonopole(p)) {
576  result = 3*(p(3)*100 + p(4)*10 + p(5));
577  return ( (p.pid() > 0 && p(2) == 1) || (p.pid() < 0 && p(2) == 2) ) ? result : -result;
578  }
579  if (!classified && isGenericMultichargedParticle(p)) {
580  double abs_charge = 0.0;
581  if (p(0) == 1) abs_charge = p(3)*100. + p(4)*10. + p(5)*1 + p(6)*0.1; // multi-charged particle PDG ID is +/-100XXXY0, where the charge is XXX.Y
582  if (p(0) == 2) abs_charge = (p(3)*10. + p(4))/(p(5)*10.0 + p(6)); // multi-charged particle PDG ID is +/-200XXYY0, where the charge is XX/YY
583  int abs_threecharge = static_cast<int>(std::round(abs_charge * 3.)); // the multi-charged particles might have a fractional charge that's not a multiple of 1/3, in that case round to the closest multiple of 1/3 for charge3 and threecharge
584  return p.pid() > 0 ? abs_threecharge : -1 * abs_threecharge;
585  }
586  for (auto r = p.second.rbegin() + 1; r != p.second.rbegin() + 1 + nq; ++r) {
587  result += triple_charge.at(*r)*sign;
588  sign*=signmult;
589  }
590  return p.pid() > 0 ? result : -result;
591 }

◆ charge3() [2/3]

template<>
int charge3 ( const int &  p)
inline

Definition at line 592 of file AtlasPID.h.

592  {
593  int ap = std::abs(p);
594  if (ap < TABLESIZE) return p > 0 ? triple_charge.at(ap):-triple_charge.at(ap);
595  auto value_digits = DecodedPID(p);
596  return charge3(value_digits);
597 }

◆ charge3() [3/3]

template<class T >
int charge3 ( const T &  p)
inline

Definition at line 536 of file AtlasPID.h.

536 {return charge3(p->pdg_id());}

◆ fractionalCharge() [1/3]

template<>
double fractionalCharge ( const DecodedPID p)
inline

Definition at line 599 of file AtlasPID.h.

599  {
600  if(!isGenericMultichargedParticle(p)) return 1.0*charge3(p)/3.0; // this method is written for multi-charged particles, still make sure other cases are handled properly
601  double abs_charge = 0;
602  if (p(0) == 1) abs_charge = p(3)*100. + p(4)*10. + p(5)*1 + p(6)*0.1; // multi-charged particle PDG ID is +/-100XXXY0, where the charge is XXX.Y
603  if (p(0) == 2) abs_charge = (p(3)*10. + p(4))/(p(5)*10.0 + p(6)); // multi-charged particle PDG ID is +/-200XXYY0, where the charge is XX/YY
604  return p.pid() > 0 ? abs_charge : -1 * abs_charge;
605 }

◆ fractionalCharge() [2/3]

template<>
double fractionalCharge ( const int &  p)
inline

Definition at line 606 of file AtlasPID.h.

606 {auto value_digits = DecodedPID(p); return fractionalCharge(value_digits);}

◆ fractionalCharge() [3/3]

template<class T >
double fractionalCharge ( const T &  p)
inline

Definition at line 537 of file AtlasPID.h.

537 {return fractionalCharge(p->pdg_id());}

◆ hasBottom()

template<class T >
bool hasBottom ( const T &  p)
inline

Definition at line 502 of file AtlasPID.h.

502 { return hasQuark(p,BQUARK); }

◆ hasCharm()

template<class T >
bool hasCharm ( const T &  p)
inline

Definition at line 501 of file AtlasPID.h.

501 { return hasQuark(p,CQUARK); }

◆ hasQuark() [1/3]

template<>
bool hasQuark ( const DecodedPID p,
const int &  q 
)
inline

Definition at line 474 of file AtlasPID.h.

474  {
475  if (isQuark(p.pid())) { return (std::abs(p.pid()) == q );}
476  if (isMeson(p)) { return *(p.second.rbegin() + 1) == q ||*(p.second.rbegin()+2) ==q;}
477  if (isDiquark(p)) { auto i = std::find(p.second.rbegin() + 1,p.second.rbegin()+3,q); return (i!=p.second.rbegin()+3);}
478  if (isBaryon(p)) { auto i = std::find(p.second.rbegin() + 1,p.second.rbegin()+4,q); return (i!=p.second.rbegin()+4);}
479  if (isTetraquark(p)) { auto i = std::find(p.second.rbegin() + 1,p.second.rbegin()+5,q); return (i!=p.second.rbegin()+5);}
480  if (isPentaquark(p)) { auto i = std::find(p.second.rbegin() + 1,p.second.rbegin()+6,q); return (i!=p.second.rbegin()+6);}
481  if (isNucleus(p) && p.first != PROTON) { return q==3 && p(2) > 0;}
482  return false;
483 }

◆ hasQuark() [2/3]

template<>
bool hasQuark ( const int &  p,
const int &  q 
)
inline

Definition at line 485 of file AtlasPID.h.

485 { auto value_digits = DecodedPID(p); return hasQuark(value_digits, q);}

◆ hasQuark() [3/3]

template<class T >
bool hasQuark ( const T &  p,
const int &  q 
)
inline

◆ hasStrange()

template<class T >
bool hasStrange ( const T &  p)
inline

Definition at line 500 of file AtlasPID.h.

500 { return hasQuark(p,SQUARK); }

◆ hasTop()

template<class T >
bool hasTop ( const T &  p)
inline

Definition at line 503 of file AtlasPID.h.

503 { return hasQuark(p,TQUARK); }

◆ isBaryon() [1/3]

template<>
bool isBaryon ( const DecodedPID p)
inline

Table 43.2.

Definition at line 359 of file AtlasPID.h.

359  {
360  if (p.ndigits() < 4 ) return false;
361  if (p.max_digit(1,4) >= 6 ) return false;
362  if (p.min_digit(1,4) == 0) return false;
363  if (p.ndigits() == 4 && (p.last() == 2 || p.last() == 4|| p.last() == 6|| p.last() == 8) ) return true;
364 
365  if (p.ndigits() == 5 && p(0) == 1 && (p.last() == 2 || p.last() == 4) ) return true;
366  if (p.ndigits() == 5 && p(0) == 3 && (p.last() == 2 || p.last() == 4) ) return true;
367 
368  if (p.ndigits() == 6 ) {
369  if (p(0) == 1 && p(1) == 0 && p.last() == 2 ) return true;
370  if (p(0) == 1 && p(1) == 1 && p.last() == 2 ) return true;
371  if (p(0) == 1 && p(1) == 2 && p.last() == 4 ) return true;
372 
373  if (p(0) == 2 && p(1) == 0 && p.last() == 2 ) return true;
374  if (p(0) == 2 && p(1) == 0 && p.last() == 4 ) return true;
375  if (p(0) == 2 && p(1) == 1 && p.last() == 2 ) return true;
376 
377  if (p(0) == 1 && p(1) == 0 && p.last() == 4 ) return true;
378  if (p(0) == 1 && p(1) == 0 && p.last() == 6 ) return true;
379  if (p(0) == 2 && p(1) == 0 && p.last() == 6 ) return true;
380  if (p(0) == 2 && p(1) == 0 && p.last() == 8 ) return true;
381  }
382 
383  if (p.ndigits() == 5 ) {
384  if (p(0) == 2 && p.last() == 2 ) return true;
385  if (p(0) == 2 && p.last() == 4 ) return true;
386  if (p(0) == 2 && p.last() == 6 ) return true;
387  if (p(0) == 5 && p.last() == 2 ) return true;
388  if (p(0) == 1 && p.last() == 6 ) return true;
389  if (p(0) == 4 && p.last() == 2 ) return true;
390  }
391  return false;
392 }

◆ isBaryon() [2/3]

template<>
bool isBaryon ( const int &  p)
inline

Definition at line 449 of file AtlasPID.h.

449 { auto value_digits = DecodedPID(p); return isBaryon(value_digits);}

◆ isBaryon() [3/3]

template<class T >
bool isBaryon ( const T &  p)
inline

Definition at line 220 of file AtlasPID.h.

220 {return isBaryon(p->pdg_id());}

◆ isBBbarMeson() [1/3]

template<>
bool isBBbarMeson ( const DecodedPID p)
inline

Definition at line 524 of file AtlasPID.h.

524 { return leadingQuark(p) == BQUARK && isMeson(p) && (*(p.second.rbegin()+2)) == BQUARK && (*(p.second.rbegin()+1)) == BQUARK; }

◆ isBBbarMeson() [2/3]

template<>
bool isBBbarMeson ( const int &  p)
inline

Definition at line 525 of file AtlasPID.h.

525 { return isBBbarMeson(DecodedPID(p)); }

◆ isBBbarMeson() [3/3]

template<class T >
bool isBBbarMeson ( const T &  p)
inline

Definition at line 523 of file AtlasPID.h.

523 { return isBBbarMeson(p->pdg_id());}

◆ isBottom() [1/2]

template<>
bool isBottom ( const int &  p)
inline

Definition at line 133 of file AtlasPID.h.

133 { return std::abs(p) == 5;}

◆ isBottom() [2/2]

template<class T >
bool isBottom ( const T &  p)
inline

Definition at line 132 of file AtlasPID.h.

132 {return isBottom(p->pdg_id());}

◆ isBottomBaryon()

template<class T >
bool isBottomBaryon ( const T &  p)
inline

Definition at line 532 of file AtlasPID.h.

532 { return leadingQuark(p) == BQUARK && isBaryon(p); }

◆ isBottomHadron()

template<class T >
bool isBottomHadron ( const T &  p)
inline

Definition at line 509 of file AtlasPID.h.

509 { return leadingQuark(p) == BQUARK && isHadron(p); }

◆ isBottomMeson()

template<class T >
bool isBottomMeson ( const T &  p)
inline

Definition at line 516 of file AtlasPID.h.

516 { return leadingQuark(p) == BQUARK && isMeson(p); }

◆ isBSM() [1/3]

template<>
bool isBSM ( const DecodedPID p)
inline

APID: graviton and all Higgs extensions are BSM.

Definition at line 431 of file AtlasPID.h.

431  {
432  if (p.pid() == GRAVITON || std::abs(p.pid()) == MAVTOP || p.pid() == DARKPHOTON) return true;
433  if (std::abs(p.pid()) > 16 && std::abs(p.pid()) < 19) return true;
434  if (std::abs(p.pid()) > 31 && std::abs(p.pid()) < 38) return true;
435  if (std::abs(p.pid()) > 39 && std::abs(p.pid()) < 81) return true;
436  if (std::abs(p.pid()) > 6 && std::abs(p.pid()) < 9) return true;
437  if (isSUSY(p)) return true;
438  if (isTechnicolor(p)) return true;
439  if (isExcited(p)) return true;
440  if (isKK(p)) return true;
441  if (isHiddenValley(p)) return true;
442  if (isGenericMultichargedParticle(p)) return true;
443  return false;
444 }

◆ isBSM() [2/3]

template<>
bool isBSM ( const int &  p)
inline

Definition at line 453 of file AtlasPID.h.

453  {
454  if (p == GRAVITON || std::abs(p) == MAVTOP || p == DARKPHOTON) return true;
455  if (std::abs(p) > 16 && std::abs(p) < 19) return true;
456  if (std::abs(p) > 31 && std::abs(p) < 38) return true;
457  if (std::abs(p) > 39 && std::abs(p) < 81) return true;
458  if (std::abs(p) > 6 && std::abs(p) < 9) return true;
459  auto value_digits = DecodedPID(p); return isBSM(value_digits);
460 }

◆ isBSM() [3/3]

template<class T >
bool isBSM ( const T &  p)
inline

Definition at line 224 of file AtlasPID.h.

224 {return isBSM(p->pdg_id());}

◆ isCCbarMeson() [1/3]

template<>
bool isCCbarMeson ( const DecodedPID p)
inline

Definition at line 520 of file AtlasPID.h.

520 { return leadingQuark(p) == CQUARK && isMeson(p) && (*(p.second.rbegin()+2)) == CQUARK && (*(p.second.rbegin()+1)) == CQUARK; }

◆ isCCbarMeson() [2/3]

template<>
bool isCCbarMeson ( const int &  p)
inline

Definition at line 521 of file AtlasPID.h.

521 { return isCCbarMeson(DecodedPID(p)); }

◆ isCCbarMeson() [3/3]

template<class T >
bool isCCbarMeson ( const T &  p)
inline

Definition at line 519 of file AtlasPID.h.

519 { return isCCbarMeson(p->pdg_id());}

◆ isCharged()

template<class T >
bool isCharged ( const T &  p)
inline

Definition at line 545 of file AtlasPID.h.

545 { return charge3(p) != 0;}

◆ isCharm() [1/2]

template<>
bool isCharm ( const int &  p)
inline

Definition at line 130 of file AtlasPID.h.

130 { return std::abs(p) == 4;}

◆ isCharm() [2/2]

template<class T >
bool isCharm ( const T &  p)
inline

Definition at line 129 of file AtlasPID.h.

129 {return isCharm(p->pdg_id());}

◆ isCharmBaryon()

template<class T >
bool isCharmBaryon ( const T &  p)
inline

Definition at line 531 of file AtlasPID.h.

531 { return leadingQuark(p) == CQUARK && isBaryon(p); }

◆ isCharmHadron()

template<class T >
bool isCharmHadron ( const T &  p)
inline

Definition at line 508 of file AtlasPID.h.

508 { return leadingQuark(p) == CQUARK && isHadron(p); }

◆ isCharmMeson()

template<class T >
bool isCharmMeson ( const T &  p)
inline

Definition at line 515 of file AtlasPID.h.

515 { return leadingQuark(p) == CQUARK && isMeson(p); }

◆ isChLepton() [1/2]

template<>
bool isChLepton ( const int &  p)
inline

Definition at line 149 of file AtlasPID.h.

149 { auto sp = std::abs(p); return sp >= 11 && sp <= 18 && sp%2 == 1; }

◆ isChLepton() [2/2]

template<class T >
bool isChLepton ( const T &  p)
inline

APID: the fourth generation leptons are leptons.

Definition at line 148 of file AtlasPID.h.

148 {return isChLepton(p->pdg_id());}

◆ isDiquark() [1/3]

template<>
bool isDiquark ( const DecodedPID p)
inline

PDG rule 4 Diquarks have 4-digit numbers with nq1 >= nq2 and nq3 = 0 APID: the diquarks with fourth generation are not diquarks.

Definition at line 318 of file AtlasPID.h.

318  {
319  if ( p.ndigits() == 4 && p(0) >= p(1) && p(2) == 0 && p.last() % 2 == 1
320  && p.max_digit(1,3) <= 6
321  ) return true;
322  return false;
323 }

◆ isDiquark() [2/3]

template<>
bool isDiquark ( const int &  p)
inline

Definition at line 447 of file AtlasPID.h.

447 { auto value_digits = DecodedPID(p); return isDiquark(value_digits);}

◆ isDiquark() [3/3]

template<class T >
bool isDiquark ( const T &  p)
inline

Definition at line 217 of file AtlasPID.h.

217 {return isDiquark(p->pdg_id());}

◆ isDM() [1/2]

template<>
bool isDM ( const int &  p)
inline

Definition at line 190 of file AtlasPID.h.

190 { auto sp = std::abs(p); return (sp >= 51 && sp <= 60) || sp == DARKPHOTON; }

◆ isDM() [2/2]

template<class T >
bool isDM ( const T &  p)
inline

PDG rule 11j: The nature of Dark Matter (DM) is not known, and therefore a definitive classificationis too early.

Candidates within specific scenarios are classified therein, such as 1000022 for the lightest neutralino. Generic fundamental states can be given temporary codes in the range 51 - 60, with 51, 52 and 53 reserved for spin 0, 1/2 and 1 ones (this could also be an axion state). Generic mediators of s-channel DM pair creation of annihilationcan be given codes 54 and 55 for spin 0 or 1 ones. Separate antiparticles, with negativecodes, may or may not exist. More elaborate new scenarios should be constructed with n= 5 and nr = 9. APID: Only the 51-60 range is considered DM. The antiparticles are assumed to be existing.

Definition at line 189 of file AtlasPID.h.

189 {return isDM(p->pdg_id());}

◆ isElectron() [1/2]

template<>
bool isElectron ( const int &  p)
inline

Definition at line 152 of file AtlasPID.h.

152 { return std::abs(p) == ELECTRON;}

◆ isElectron() [2/2]

template<class T >
bool isElectron ( const T &  p)
inline

Definition at line 151 of file AtlasPID.h.

151 {return isElectron(p->pdg_id());}

◆ isEMInteracting() [1/2]

template<>
bool isEMInteracting ( const int &  p)
inline

Definition at line 609 of file AtlasPID.h.

609 {return (isPhoton(p) || isZ(p) || std::abs(charge(p))>std::numeric_limits<double>::epsilon() || isMonopole(p));}

◆ isEMInteracting() [2/2]

template<class T >
bool isEMInteracting ( const T &  p)
inline

Definition at line 608 of file AtlasPID.h.

608 {return isEMInteracting(p->pdg_id());}

◆ isExcited() [1/3]

template<>
bool isExcited ( const DecodedPID p)
inline

PDG rule 11f Excited (composite) quarks and leptons are identified by setting n= 4 and nr= 0.

Definition at line 276 of file AtlasPID.h.

276 {return (p.ndigits() == 7 && (p(0) == 4 && p(1) == 0 ) && (isLepton(p.shift(2))||isQuark(p.shift(2))) );}

◆ isExcited() [2/3]

template<>
bool isExcited ( const int &  p)
inline

Definition at line 277 of file AtlasPID.h.

277 { auto value_digits = DecodedPID(p); return isExcited(value_digits);}

◆ isExcited() [3/3]

template<class T >
bool isExcited ( const T &  p)
inline

Definition at line 212 of file AtlasPID.h.

212 {return isExcited(p->pdg_id());}

◆ isGeantino() [1/2]

template<>
bool isGeantino ( const int &  p)
inline

Definition at line 245 of file AtlasPID.h.

245 { return (std::abs(p) == GEANTINO0 || std::abs(p) == GEANTINOPLUS);}

◆ isGeantino() [2/2]

template<class T >
bool isGeantino ( const T &  p)
inline

Definition at line 229 of file AtlasPID.h.

229 {return isGeantino(p->pdg_id());}

◆ isGenericMultichargedParticle() [1/3]

template<>
bool isGenericMultichargedParticle ( const DecodedPID p)
inline

In addition, there is a need to identify ”Q-ball” and similar very exotic (multi-charged) particles which may have large, non-integer charge.

These particles are assigned the ad-hoc numbering +/-100XXXY0, where the charge is XXX.Y. or +/-200XXYY0, where the charge is XX/YY. The case of +/-200XXYY0 is legacy, see https://gitlab.cern.ch/atlas/athena/-/merge_requests/25862 Note that no other quantum numbers besides the charge are considered for these generic multi-charged particles (e.g. isSUSY() is false for them). Such a model was used in previous Run-1 (1301.5272,1504.04188) and Run-2 (1812.03673,2303.13613) ATLAS searches.

Definition at line 312 of file AtlasPID.h.

312 {return (p.ndigits() == 8 && (p(0) == 1 || p(0) == 2) && p(1) == 0 && p(2) == 0 && p(7) == 0);}

◆ isGenericMultichargedParticle() [2/3]

template<>
bool isGenericMultichargedParticle ( const int &  p)
inline

Definition at line 313 of file AtlasPID.h.

313 { auto value_digits = DecodedPID(p); return isGenericMultichargedParticle(value_digits);}

◆ isGenericMultichargedParticle() [3/3]

template<class T >
bool isGenericMultichargedParticle ( const T &  p)
inline

Definition at line 216 of file AtlasPID.h.

216 {return isGenericMultichargedParticle(p->pdg_id());}

◆ isGenSpecific() [1/2]

template<>
bool isGenSpecific ( const int &  p)
inline

Main Table for MC internal use 81–100,901–930,998-999,1901–1930,2901–2930, and 3901–3930.

Definition at line 235 of file AtlasPID.h.

235  {
236  if (p >= 81 && p <= 100) return true;
237  if (p >= 901 && p <= 930) return true;
238  if (p >= 998 && p <= 999) return true;
239  if (p >= 1901 && p <= 1930) return true;
240  if (p >= 2901 && p <= 2930) return true;
241  if (p >= 3901 && p <= 3930) return true;
242  return false;
243 }

◆ isGenSpecific() [2/2]

template<class T >
bool isGenSpecific ( const T &  p)
inline

Definition at line 228 of file AtlasPID.h.

228 {return isGenSpecific(p->pdg_id());}

◆ isGlueball() [1/3]

template<>
bool isGlueball ( const DecodedPID p)
inline

Definition at line 249 of file AtlasPID.h.

249  {
250  if (p.ndigits() > 4) return false; // APID avoid classifying R-Glueballs as SM Glueballs
251  size_t ng = 0;
252  for (size_t i = 1; i + 1 < p.ndigits(); ++i) {
253  if (p(i) == COMPOSITEGLUON) ng++;
254  }
255  return (*(p.second.rbegin()+2)) == COMPOSITEGLUON && (*(p.second.rbegin()+1)) == COMPOSITEGLUON && ng > 0;
256 }

◆ isGlueball() [2/3]

template<>
bool isGlueball ( const int &  p)
inline

Definition at line 257 of file AtlasPID.h.

257 { auto value_digits = DecodedPID(p); return isGlueball(value_digits); }

◆ isGlueball() [3/3]

template<class T >
bool isGlueball ( const T &  p)
inline

APID: Definition of Glueballs: SM glueballs 99X (X=1,3,5), 999Y (Y=3,5,7)

Definition at line 248 of file AtlasPID.h.

248 { return isGlueball(p->pdg_id()); }

◆ isGluon() [1/2]

template<>
bool isGluon ( const int &  p)
inline

Definition at line 168 of file AtlasPID.h.

168 { return p == GLUON; }

◆ isGluon() [2/2]

template<class T >
bool isGluon ( const T &  p)
inline

Definition at line 167 of file AtlasPID.h.

167 {return isGluon(p->pdg_id());}

◆ isGraviton() [1/2]

template<>
bool isGraviton ( const int &  p)
inline

Definition at line 205 of file AtlasPID.h.

205 { return p == GRAVITON; }

◆ isGraviton() [2/2]

template<class T >
bool isGraviton ( const T &  p)
inline

Definition at line 204 of file AtlasPID.h.

204 {return isGraviton(p->pdg_id());}

◆ isHadron() [1/3]

template<>
bool isHadron ( const DecodedPID p)
inline

Definition at line 462 of file AtlasPID.h.

462 { return isMeson(p)||isBaryon(p)||isTetraquark(p)||isPentaquark(p);}

◆ isHadron() [2/3]

template<>
bool isHadron ( const int &  p)
inline

Definition at line 463 of file AtlasPID.h.

463 { auto value_digits = DecodedPID(p); return isHadron(value_digits);}

◆ isHadron() [3/3]

template<class T >
bool isHadron ( const T &  p)
inline

Definition at line 218 of file AtlasPID.h.

218 {return isHadron(p->pdg_id());}

◆ isHeavyBaryon()

template<class T >
bool isHeavyBaryon ( const T &  p)
inline

Definition at line 529 of file AtlasPID.h.

529 { auto lq = leadingQuark(p); return (lq == CQUARK || lq == BQUARK || lq == TQUARK) && isBaryon(p); }

◆ isHeavyHadron()

template<class T >
bool isHeavyHadron ( const T &  p)
inline

Definition at line 506 of file AtlasPID.h.

506 { auto lq = leadingQuark(p); return (lq == CQUARK || lq == BQUARK || lq == TQUARK ) && isHadron(p); }

◆ isHeavyMeson()

template<class T >
bool isHeavyMeson ( const T &  p)
inline

Definition at line 513 of file AtlasPID.h.

513 { auto lq = leadingQuark(p); return (lq == CQUARK || lq == BQUARK || lq == TQUARK) && isMeson(p); }

◆ isHiddenValley() [1/3]

template<>
bool isHiddenValley ( const DecodedPID p)
inline

PDG rule 11k Hidden Valley particles have n = 4 and n_r = 9, and trailing numbers in agreement with their nearest-analog standard particles, as far as possible.

Thus 4900021 is the gauge boson gv of a confining gauge field, 490000 nqv and 490001 nlv fundamental constituents charged or not under this, 4900022 is the γv of a non-confining field, and 4900 nqv1 nqv2 nJ a Hidden Valley meson.

Definition at line 303 of file AtlasPID.h.

303 {return (p.ndigits() == 7 && p(0) == 4 && p(1) == 9 && isValid(p.shift(2)));}

◆ isHiddenValley() [2/3]

template<>
bool isHiddenValley ( const int &  p)
inline

Definition at line 304 of file AtlasPID.h.

304 { auto value_digits = DecodedPID(p); return isHiddenValley(value_digits);}

◆ isHiddenValley() [3/3]

template<class T >
bool isHiddenValley ( const T &  p)
inline

Definition at line 215 of file AtlasPID.h.

215 {return isHiddenValley(p->pdg_id());}

◆ isHiggs() [1/2]

template<>
bool isHiggs ( const int &  p)
inline

Definition at line 200 of file AtlasPID.h.

200 { return p == HIGGSBOSON; }

◆ isHiggs() [2/2]

template<class T >
bool isHiggs ( const T &  p)
inline

APID: HIGGS boson is only one particle.

Definition at line 199 of file AtlasPID.h.

199 {return isHiggs(p->pdg_id());}

◆ isKK() [1/3]

template<>
bool isKK ( const DecodedPID p)
inline

PDG rule 11h A black hole in models with extra dimensions has code 5000040.

Kaluza-Klein excitations in models with extra dimensions have n = 5 or n = 6, to distinguish excitations of left-or right-handed fermions or, in case of mixing, the lighter or heavier state (cf. 11d). The non zero nr digit gives the radial excitation number, in scenarios where the level spacing allows these to be distinguished. Should the model also contain supersymmetry, excited SUSY states would be denoted by a nn_r > 0, with n = 1 or 2 as usual. Should some colored states be long-lived enough that hadrons would form around them, the coding strategy of 11g applies, with the initial two nnr digits preserved in the combined code.

Definition at line 286 of file AtlasPID.h.

286 {return (p.ndigits() == 7 && (p(0) == 5 || p(0) == 6 ) );}

◆ isKK() [2/3]

template<>
bool isKK ( const int &  p)
inline

Definition at line 287 of file AtlasPID.h.

287 { auto value_digits = DecodedPID(p); return isKK(value_digits);}

◆ isKK() [3/3]

template<class T >
bool isKK ( const T &  p)
inline

Definition at line 213 of file AtlasPID.h.

213 {return isKK(p->pdg_id());}

◆ isLepton() [1/3]

template<>
bool isLepton ( const DecodedPID p)
inline

Definition at line 141 of file AtlasPID.h.

141 { return isLepton(p.pid()); }

◆ isLepton() [2/3]

template<>
bool isLepton ( const int &  p)
inline

Definition at line 140 of file AtlasPID.h.

140 { auto sp = std::abs(p); return sp >= 11 && sp <= 18; }

◆ isLepton() [3/3]

template<class T >
bool isLepton ( const T &  p)
inline

APID: the fourth generation leptons are leptons.

Definition at line 139 of file AtlasPID.h.

139 {return isLepton(p->pdg_id());}

◆ isLeptoQuark() [1/2]

template<>
bool isLeptoQuark ( const int &  p)
inline

Definition at line 208 of file AtlasPID.h.

208 { return std::abs(p) == LEPTOQUARK; }

◆ isLeptoQuark() [2/2]

template<class T >
bool isLeptoQuark ( const T &  p)
inline

Definition at line 207 of file AtlasPID.h.

207 {return isLeptoQuark(p->pdg_id());}

◆ isLightBaryon()

template<class T >
bool isLightBaryon ( const T &  p)
inline

Definition at line 528 of file AtlasPID.h.

528 { auto lq = leadingQuark(p); return (lq == DQUARK || lq == UQUARK||lq == SQUARK) && isBaryon(p); }

◆ isLightHadron()

template<class T >
bool isLightHadron ( const T &  p)
inline

Definition at line 505 of file AtlasPID.h.

505 { auto lq = leadingQuark(p); return (lq == DQUARK || lq == UQUARK||lq == SQUARK) && isHadron(p); }

◆ isLightMeson()

template<class T >
bool isLightMeson ( const T &  p)
inline

Definition at line 512 of file AtlasPID.h.

512 { auto lq = leadingQuark(p); return (lq == DQUARK || lq == UQUARK||lq == SQUARK) && isMeson(p); }

◆ isMeson() [1/3]

template<>
bool isMeson ( const DecodedPID p)
inline

Table 43.1 PDG rule 5a: The numbers specifying the meson’s quark content conform to the convention nq1= 0 and nq2 >= nq3.

The special case K0L is the sole exception to this rule. PDG rule 5C: The special numbers 310 and 130 are given to the K0S and K0L respectively. APID: The special code K0 is used when a generator uses K0S/K0L

Definition at line 333 of file AtlasPID.h.

333  {
334  if (p.ndigits() < 3 ) return false;
335  if (std::abs(p.pid()) == K0S) return true;
336  if (std::abs(p.pid()) == K0L) return true;
337  if (std::abs(p.pid()) == K0) return true;
338  if (p.last() % 2 != 1 ) return false;
339  if (p.max_digit(1,3) >= 6 ) return false;
340  if (p.max_digit(1,3) == 0 ) return false;
341 
342  if (p.ndigits() == 3 && p(0) == p(1) && p.pid() < 0 ) return false;
343  if (p.ndigits() == 5 && p(2) == p(3) && p.pid() < 0 ) return false;
344  if (p.ndigits() == 7 && p(4) == p(5) && p.pid() < 0 ) return false;
345 
346 
347  if (p.ndigits() == 3 && p(0) >= p(1) && p(1) != 0 ) return true;
348  if (p.ndigits() == 5 && p(2) >= p(3) && p(3) != 0 && p(0) == 1 && p(1) == 0) return true;
349  if (p.ndigits() == 5 && p(2) >= p(3) && p(3) != 0 && p(0) == 2 && p(1) == 0 && p.last() > 1 ) return true;
350  if (p.ndigits() == 5 && p(2) >= p(3) && p(3) != 0 && p(0) == 3 && p(1) == 0 && p.last() > 1 ) return true;
351 
352  if (p.ndigits() == 6 && p(3) >= p(4) && p(4) != 0 && p.last() % 2 == 1 ) return true;
353 
354  if (p.ndigits() == 7 && p(4) >= p(5) && p(5) != 0) return true;
355 
356  return false;
357 }

◆ isMeson() [2/3]

template<>
bool isMeson ( const int &  p)
inline

Definition at line 448 of file AtlasPID.h.

448 { auto value_digits = DecodedPID(p); return isMeson(value_digits);}

◆ isMeson() [3/3]

template<class T >
bool isMeson ( const T &  p)
inline

Definition at line 219 of file AtlasPID.h.

219 {return isMeson(p->pdg_id());}

◆ isMonopole() [1/3]

template<>
bool isMonopole ( const DecodedPID p)
inline

PDG rule 11i Magnetic monopoles and dyons are assumed to have one unit of Dirac monopole charge and a variable integer number nq1nq2 nq3 units of electric charge.

Codes 411nq1nq2 nq3 0 are then used when the magnetic and electrical charge sign agree and 412nq1nq2 nq3 0 when they disagree, with the overall sign of the particle set by the magnetic charge. For now no spin information is provided.

Definition at line 295 of file AtlasPID.h.

295 {return (p.ndigits() == 7 && p(0) == 4 && p(1) == 1 && (p(2) == 1 || p(2) == 2 ) && p(6) == 0);}

◆ isMonopole() [2/3]

template<>
bool isMonopole ( const int &  p)
inline

Definition at line 296 of file AtlasPID.h.

296 { auto value_digits = DecodedPID(p); return isMonopole(value_digits);}

◆ isMonopole() [3/3]

template<class T >
bool isMonopole ( const T &  p)
inline

Definition at line 214 of file AtlasPID.h.

214 {return isMonopole(p->pdg_id());}

◆ isMuon() [1/2]

template<>
bool isMuon ( const int &  p)
inline

Definition at line 155 of file AtlasPID.h.

155 { return std::abs(p) == MUON;}

◆ isMuon() [2/2]

template<class T >
bool isMuon ( const T &  p)
inline

Definition at line 154 of file AtlasPID.h.

154 {return isMuon(p->pdg_id());}

◆ isNeutral()

template<class T >
bool isNeutral ( const T &  p)
inline

Definition at line 546 of file AtlasPID.h.

546 { return charge3(p) == 0;}

◆ isNeutrino() [1/2]

template<>
bool isNeutrino ( const int &  p)
inline

Definition at line 162 of file AtlasPID.h.

162 { auto sp = std::abs(p); return sp == NU_E || sp == NU_MU || sp == NU_TAU || sp == 18; }

◆ isNeutrino() [2/2]

template<class T >
bool isNeutrino ( const T &  p)
inline

APID: the fourth generation neutrinos are neutrinos.

Definition at line 161 of file AtlasPID.h.

161 {return isNeutrino(p->pdg_id());}

◆ isNucleus() [1/3]

template<>
bool isNucleus ( const DecodedPID p)
inline

PDG rule 16: Nuclear codes are given as 10-digit numbers±10LZZZAAAI.

For a (hyper)nucleus consistingofnpprotons,nnneutrons andnΛΛ’s,A=np+nn+nΛgives the total baryon number, Z=np the total charge andL=nΛthe total number of strange quarks.Igives the isomerlevel, withI= 0corresponding to the ground state andI >0to excitations, see [2], wherestates denotedm,n,p,qtranslate toI= 1–4. As examples, the deuteron is 1000010020 and 235U is

  1. To avoid ambiguities, nuclear codes should not be applied to a singlehadron, like p,n or Λ0, where quark-contents-based codes already exist.

Definition at line 426 of file AtlasPID.h.

426  {
427  if (std::abs(p.pid()) == PROTON) return true;
428  return (p.ndigits() == 10 && p(0) == 1 && p(1) == 0 );
429 }

◆ isNucleus() [2/3]

template<>
bool isNucleus ( const int &  p)
inline

Definition at line 452 of file AtlasPID.h.

452 { auto value_digits = DecodedPID(p); return isNucleus(value_digits);}

◆ isNucleus() [3/3]

template<class T >
bool isNucleus ( const T &  p)
inline

Definition at line 223 of file AtlasPID.h.

223 {return isNucleus(p->pdg_id());}

◆ isParton()

template<class T >
bool isParton ( const T &  p)
inline

Definition at line 611 of file AtlasPID.h.

611 { return isQuark(p)||isGluon(p);}

◆ isPentaquark() [1/3]

template<>
bool isPentaquark ( const DecodedPID p)
inline

PDG rule 15 The 9-digit penta-quark codes are±1nrnLnq1nq2nq3nq4nq5nJ, sorted such thatnq1≥nq2≥nq3≥nq4.

In the particle the first four are quarks and the fifth an antiquark while t heopposite holds in the antiparticle, which is given with a negative sign. Thenr,nL, andnJnumbers have the same meaning as for ordinary hadrons.

Definition at line 399 of file AtlasPID.h.

399  {
400  return (p.ndigits() == 9 && p(0) == 1 &&
401  p.max_digit(1,6) <= 6 && p.min_digit(1,6) > 0 &&
402  ( p(3) >= p(4) && p(4) >= p(5) && p(5) >= p(6)) );
403 }

◆ isPentaquark() [2/3]

template<>
bool isPentaquark ( const int &  p)
inline

Definition at line 451 of file AtlasPID.h.

451 { auto value_digits = DecodedPID(p); return isPentaquark(value_digits);}

◆ isPentaquark() [3/3]

template<class T >
bool isPentaquark ( const T &  p)
inline

Definition at line 222 of file AtlasPID.h.

222 {return isPentaquark(p->pdg_id());}

◆ isPhoton() [1/2]

template<>
bool isPhoton ( const int &  p)
inline

Definition at line 171 of file AtlasPID.h.

171 { return p == PHOTON; }

◆ isPhoton() [2/2]

template<class T >
bool isPhoton ( const T &  p)
inline

Definition at line 170 of file AtlasPID.h.

170 {return isPhoton(p->pdg_id());}

◆ isPythia8Specific() [1/3]

template<>
bool isPythia8Specific ( const DecodedPID p)
inline

Definition at line 231 of file AtlasPID.h.

231 { return (p.ndigits() == 7 && p(0) == 9 && p(1) == 9);}

◆ isPythia8Specific() [2/3]

template<>
bool isPythia8Specific ( const int &  p)
inline

Definition at line 232 of file AtlasPID.h.

232 { auto value_digits = DecodedPID(p); return isPythia8Specific(value_digits);}

◆ isPythia8Specific() [3/3]

template<class T >
bool isPythia8Specific ( const T &  p)
inline

Definition at line 230 of file AtlasPID.h.

230 {return isPythia8Specific(p->pdg_id());}

◆ isQuark() [1/3]

template<>
bool isQuark ( const DecodedPID p)
inline

Definition at line 124 of file AtlasPID.h.

124 { return isQuark(p.pid()); }

◆ isQuark() [2/3]

template<>
bool isQuark ( const int &  p)
inline

Definition at line 123 of file AtlasPID.h.

123 { return p != 0 && (std::abs(p) <= 8 || std::abs(p) == MAVTOP);}

◆ isQuark() [3/3]

template<class T >
bool isQuark ( const T &  p)
inline

PDG rule 2: Quarks and leptons are numbered consecutively starting from 1 and 11 respectively; to dothis they are first ordered by family and within families by weak isospin.

APID: the fourth generation quarks are quarks.

Definition at line 122 of file AtlasPID.h.

122 {return isQuark(p->pdg_id());}

◆ isResonance()

template<class T >
bool isResonance ( const T &  p)
inline

Definition at line 202 of file AtlasPID.h.

202 { return isZ(p) || isW(p) || isHiggs(p) || isTop(p); } // APID: not including t' (pdg_id=8)

◆ isSMLepton() [1/3]

template<>
bool isSMLepton ( const DecodedPID p)
inline

Definition at line 145 of file AtlasPID.h.

145 { return isSMLepton(p.pid()); }

◆ isSMLepton() [2/3]

template<>
bool isSMLepton ( const int &  p)
inline

Definition at line 144 of file AtlasPID.h.

144 { auto sp = std::abs(p); return sp >= 11 && sp <= 16; }

◆ isSMLepton() [3/3]

template<class T >
bool isSMLepton ( const T &  p)
inline

Definition at line 143 of file AtlasPID.h.

143 {return isSMLepton(p->pdg_id());}

◆ isSMNeutrino() [1/2]

template<>
bool isSMNeutrino ( const int &  p)
inline

Definition at line 165 of file AtlasPID.h.

165 { auto sp = std::abs(p); return sp == NU_E || sp == NU_MU || sp == NU_TAU; }

◆ isSMNeutrino() [2/2]

template<class T >
bool isSMNeutrino ( const T &  p)
inline

Definition at line 164 of file AtlasPID.h.

164 {return isSMNeutrino(p->pdg_id());}

◆ isStrange() [1/2]

template<>
bool isStrange ( const int &  p)
inline

Definition at line 127 of file AtlasPID.h.

127 { return std::abs(p) == 3;}

◆ isStrange() [2/2]

template<class T >
bool isStrange ( const T &  p)
inline

Definition at line 126 of file AtlasPID.h.

126 {return isStrange(p->pdg_id());}

◆ isStrangeBaryon()

template<class T >
bool isStrangeBaryon ( const T &  p)
inline

Definition at line 530 of file AtlasPID.h.

530 { return leadingQuark(p) == SQUARK && isBaryon(p); }

◆ isStrangeHadron()

template<class T >
bool isStrangeHadron ( const T &  p)
inline

Definition at line 507 of file AtlasPID.h.

507 { return leadingQuark(p) == SQUARK && isHadron(p); }

◆ isStrangeMeson()

template<class T >
bool isStrangeMeson ( const T &  p)
inline

Definition at line 514 of file AtlasPID.h.

514 { return leadingQuark(p) == SQUARK && isMeson(p); }

◆ isStrongInteracting() [1/2]

template<>
bool isStrongInteracting ( const int &  p)
inline

Definition at line 698 of file AtlasPID.h.

698 { return (isGluon(p) || isQuark(p) || isDiquark(p) || isGlueball(p) || isLeptoQuark(p) || isHadron(p) || SUSY::isRHadron(p));} // APID: Glueballs and R-Hadrons are also strong-interacting

◆ isStrongInteracting() [2/2]

template<class T >
bool isStrongInteracting ( const T &  p)
inline

Definition at line 697 of file AtlasPID.h.

697 {return isStrongInteracting(p->pdg_id());}

◆ isSUSY() [1/3]

template<>
bool isSUSY ( const DecodedPID p)
inline

PDG rule 11d Fundamental supersymmetric particles are identified by adding a nonzero n to the particle number.

The superpartner of a boson or a left-handed fermion has n = 1 while the superpartner of a right-handed fermion has n = 2. When mixing occurs, such as between the winos and charged Higgsinos to give charginos, or between left and right sfermions, the lighter physical state is given the smaller basis state number.

Definition at line 264 of file AtlasPID.h.

264 {return (p.ndigits() == 7 && (p(0) == 1 || p(0) == 2 ) && ((isValid(p.shift(2)) && !isGenSpecific(p.shift(2).pid())) || isGlueball(p.shift(2))) );}

◆ isSUSY() [2/3]

template<>
bool isSUSY ( const int &  p)
inline

Definition at line 446 of file AtlasPID.h.

446 { auto value_digits = DecodedPID(p); return isSUSY(value_digits);}

◆ isSUSY() [3/3]

template<class T >
bool isSUSY ( const T &  p)
inline

Definition at line 210 of file AtlasPID.h.

210 {return isSUSY(p->pdg_id());}

◆ isTau() [1/2]

template<>
bool isTau ( const int &  p)
inline

Definition at line 158 of file AtlasPID.h.

158 { return std::abs(p) == TAU;}

◆ isTau() [2/2]

template<class T >
bool isTau ( const T &  p)
inline

Definition at line 157 of file AtlasPID.h.

157 {return isTau(p->pdg_id());}

◆ isTechnicolor() [1/3]

template<>
bool isTechnicolor ( const DecodedPID p)
inline

PDG rule 11e Technicolor states have n = 3, with technifermions treated like ordinary fermions.

States which are ordinary color singlets have n_r = 0. Color octets have n_r = 1. If a state has non-trivial quantum numbers under the topcolor groups SU(3)1×SU(3)2, the quantum numbers are specified by tech, ij, where i and j are 1 or 2. nLis then 2i+j. The coloron V8, is a heavy gluon color octet and thus is 3100021

Definition at line 271 of file AtlasPID.h.

271 {return (p.ndigits() == 7 && p(0) == 3 && (p(1) == 0 || p(0) == 1) && isValid(p.shift(2)) && !isGenSpecific(p.shift(2).pid()));}

◆ isTechnicolor() [2/3]

template<>
bool isTechnicolor ( const int &  p)
inline

Definition at line 272 of file AtlasPID.h.

272 { auto value_digits = DecodedPID(p); return isTechnicolor(value_digits);}

◆ isTechnicolor() [3/3]

template<class T >
bool isTechnicolor ( const T &  p)
inline

Definition at line 211 of file AtlasPID.h.

211 {return isTechnicolor(p->pdg_id());}

◆ isTetraquark() [1/3]

template<>
bool isTetraquark ( const DecodedPID p)
inline

PDG rule 14 The 9-digit tetra-quark codes are±1nrnLnq1nq20nq3nq4nJ.

For the particleq1q2is a diquarkand ̄q3 ̄q4an antidiquark, sorted such thatnq1≥nq2,nq3≥nq4,nq1≥nq3, andnq2≥nq4ifnq1=nq3. For the antiparticle, given with a negative sign, ̄q1 ̄q2is an antidiquark andq3q4a diquark, with the same sorting except that eithernq1> nq3ornq2> nq4(so thatflavour-diagonal states are particles). Thenr,nL, andnJnumbers have the same meaningas for ordinary hadrons.

Definition at line 410 of file AtlasPID.h.

410  {
411  return (p.ndigits() == 9 && p(0) == 1 && p(5) == 0 &&
412  p.max_digit(1,3) <= 6 && p.min_digit(1,3) > 0 &&
413  p.max_digit(1+3,3+3) <= 6 && p.min_digit(1+3,3+3) > 0 &&
414  ( p(3) >= p(4) && p(6) >= p(7) ) && ( ( p(3) > p(6) ) || ( p(3) == p(6) && (p(4) >= p(7))))
415  );
416 }

◆ isTetraquark() [2/3]

template<>
bool isTetraquark ( const int &  p)
inline

Definition at line 450 of file AtlasPID.h.

450 { auto value_digits = DecodedPID(p); return isTetraquark(value_digits);}

◆ isTetraquark() [3/3]

template<class T >
bool isTetraquark ( const T &  p)
inline

Definition at line 221 of file AtlasPID.h.

221 {return isTetraquark(p->pdg_id());}

◆ isTop() [1/2]

template<>
bool isTop ( const int &  p)
inline

Definition at line 136 of file AtlasPID.h.

136 { return std::abs(p) == 6;}

◆ isTop() [2/2]

template<class T >
bool isTop ( const T &  p)
inline

Definition at line 135 of file AtlasPID.h.

135 {return isTop(p->pdg_id());}

◆ isTopBaryon()

template<class T >
bool isTopBaryon ( const T &  p)
inline

Definition at line 533 of file AtlasPID.h.

533 { return leadingQuark(p) == TQUARK && isBaryon(p); }

◆ isTopHadron()

template<class T >
bool isTopHadron ( const T &  p)
inline

Definition at line 510 of file AtlasPID.h.

510 { return leadingQuark(p) == TQUARK && isHadron(p); }

◆ isTopMeson()

template<class T >
bool isTopMeson ( const T &  p)
inline

Definition at line 517 of file AtlasPID.h.

517 { return leadingQuark(p) == TQUARK && isMeson(p); }

◆ isTrajectory() [1/2]

template<>
bool isTrajectory ( const int &  p)
inline

Definition at line 196 of file AtlasPID.h.

196 { return std::abs(p) == POMERON || std::abs(p) == ODDERON || std::abs(p) == REGGEON; }

◆ isTrajectory() [2/2]

template<class T >
bool isTrajectory ( const T &  p)
inline

PDG rule 8: The pomeron and odderon trajectories and a generic reggeon trajectory of states in QCD areassigned codes 990, 9990, and 110 respectively.

Definition at line 195 of file AtlasPID.h.

195 {return isTrajectory(p->pdg_id());}

◆ isTransportable() [1/3]

template<>
bool isTransportable ( const DecodedPID p)
inline

Definition at line 464 of file AtlasPID.h.

464 { return isPhoton(p.pid()) || isGeantino(p.pid()) || isHadron(p) || isLepton(p.pid()) || p.pid() == DARKPHOTON;}

◆ isTransportable() [2/3]

template<>
bool isTransportable ( const int &  p)
inline

Definition at line 465 of file AtlasPID.h.

465 { auto value_digits = DecodedPID(p); return isTransportable(value_digits);}

◆ isTransportable() [3/3]

template<class T >
bool isTransportable ( const T &  p)
inline

Definition at line 227 of file AtlasPID.h.

227 {return isTransportable(p->pdg_id());}

◆ isValid() [1/3]

template<>
bool isValid ( const DecodedPID p)
inline

Av: we implement here an ATLAS-sepcific convention: all particles which are 99xxxxx are fine.

Definition at line 467 of file AtlasPID.h.

467 { return isHadron(p) || isTrajectory(p.pid()) || isDiquark(p) || isBSM(p) || isNucleus(p) || (std::abs(p.pid()) < 42) || isGenSpecific(p.pid()) || isGeantino(p.pid()) || isPythia8Specific(p) || isGlueball(p); }

◆ isValid() [2/3]

template<>
bool isValid ( const int &  p)
inline

Definition at line 468 of file AtlasPID.h.

468  { if (!p) return false; if (std::abs(p) < 42) return true;
469  if (isGenSpecific(p)) return true;
470  auto value_digits = DecodedPID(p); return isValid(value_digits);
471 }

◆ isValid() [3/3]

template<class T >
bool isValid ( const T &  p)
inline

Definition at line 225 of file AtlasPID.h.

225 {return isValid(p->pdg_id());}

◆ isW() [1/2]

template<>
bool isW ( const int &  p)
inline

Definition at line 177 of file AtlasPID.h.

177 { return std::abs(p) == WPLUSBOSON; }

◆ isW() [2/2]

template<class T >
bool isW ( const T &  p)
inline

Definition at line 176 of file AtlasPID.h.

176 {return isW(p->pdg_id());}

◆ isZ() [1/2]

template<>
bool isZ ( const int &  p)
inline

Definition at line 174 of file AtlasPID.h.

174 { return p == Z0BOSON; }

◆ isZ() [2/2]

template<class T >
bool isZ ( const T &  p)
inline

Definition at line 173 of file AtlasPID.h.

173 {return isZ(p->pdg_id());}

◆ leadingQuark() [1/3]

template<>
int leadingQuark ( const DecodedPID p)
inline

Definition at line 488 of file AtlasPID.h.

488  {
489  if (isQuark(p.pid())) { return std::abs(p.pid());}
490  if (isMeson(p)) {return p.max_digit(1,3);}
491  if (isDiquark(p)) {return p.max_digit(1,3);}
492  if (isBaryon(p)) {return p.max_digit(1,4); }
493  if (isTetraquark(p)) { return p.max_digit(1,5);}
494  if (isPentaquark(p)) { return p.max_digit(1,6);}
495  return 0;
496 }

◆ leadingQuark() [2/3]

template<>
int leadingQuark ( const int &  p)
inline

Definition at line 498 of file AtlasPID.h.

498 { auto value_digits = DecodedPID(p); return leadingQuark(value_digits);}

◆ leadingQuark() [3/3]

template<class T >
int leadingQuark ( const T &  p)
inline

Definition at line 487 of file AtlasPID.h.

487 {return leadingQuark(p->pdg_id());}

◆ threeCharge()

template<class T >
double threeCharge ( const T &  p)
inline

Definition at line 544 of file AtlasPID.h.

544 { return charge3(p);}
isStrange
bool isStrange(const T &p)
Definition: AtlasPID.h:126
beamspotman.r
def r
Definition: beamspotman.py:676
SUSY::isRHadron
bool isRHadron(const T &p)
Definition: AtlasPID.h:634
isStrongInteracting
bool isStrongInteracting(const T &p)
Definition: AtlasPID.h:697
isNucleus
bool isNucleus(const T &p)
Definition: AtlasPID.h:223
get_generator_info.result
result
Definition: get_generator_info.py:21
isTetraquark
bool isTetraquark(const T &p)
Definition: AtlasPID.h:221
find
std::string find(const std::string &s)
return a remapped string
Definition: hcg.cxx:135
isBSM
bool isBSM(const T &p)
Definition: AtlasPID.h:224
isHiddenValley
bool isHiddenValley(const T &p)
Definition: AtlasPID.h:215
isGenSpecific
bool isGenSpecific(const T &p)
Definition: AtlasPID.h:228
isMeson
bool isMeson(const T &p)
Definition: AtlasPID.h:219
hasQuark
bool hasQuark(const T &p, const int &q)
isKK
bool isKK(const T &p)
Definition: AtlasPID.h:213
MuonGM::round
float round(const float toRound, const unsigned int decimals)
Definition: Mdt.cxx:27
isNeutrino
bool isNeutrino(const T &p)
APID: the fourth generation neutrinos are neutrinos.
Definition: AtlasPID.h:161
isValid
bool isValid(const T &p)
Definition: AtlasPID.h:225
python.AtlRunQueryParser.ap
ap
Definition: AtlRunQueryParser.py:826
xAOD::Muon_v1
Class describing a Muon.
Definition: Muon_v1.h:38
isGenericMultichargedParticle
bool isGenericMultichargedParticle(const T &p)
Definition: AtlasPID.h:216
isSMLepton
bool isSMLepton(const T &p)
Definition: AtlasPID.h:143
isGluon
bool isGluon(const T &p)
Definition: AtlasPID.h:167
isHiggs
bool isHiggs(const T &p)
APID: HIGGS boson is only one particle.
Definition: AtlasPID.h:199
fractionalCharge
double fractionalCharge(const T &p)
Definition: AtlasPID.h:537
isQuark
bool isQuark(const T &p)
PDG rule 2: Quarks and leptons are numbered consecutively starting from 1 and 11 respectively; to dot...
Definition: AtlasPID.h:122
python.utils.AtlRunQueryDQUtils.p
p
Definition: AtlRunQueryDQUtils.py:210
isCCbarMeson
bool isCCbarMeson(const T &p)
Definition: AtlasPID.h:519
isBottom
bool isBottom(const T &p)
Definition: AtlasPID.h:132
lumiFormat.i
int i
Definition: lumiFormat.py:85
leadingQuark
int leadingQuark(const T &p)
Definition: AtlasPID.h:487
isPythia8Specific
bool isPythia8Specific(const T &p)
Definition: AtlasPID.h:230
isMonopole
bool isMonopole(const T &p)
Definition: AtlasPID.h:214
isZ
bool isZ(const T &p)
Definition: AtlasPID.h:173
isPentaquark
bool isPentaquark(const T &p)
Definition: AtlasPID.h:222
isGlueball
bool isGlueball(const T &p)
APID: Definition of Glueballs: SM glueballs 99X (X=1,3,5), 999Y (Y=3,5,7)
Definition: AtlasPID.h:248
sign
int sign(int a)
Definition: TRT_StrawNeighbourSvc.h:107
isBBbarMeson
bool isBBbarMeson(const T &p)
Definition: AtlasPID.h:523
isChLepton
bool isChLepton(const T &p)
APID: the fourth generation leptons are leptons.
Definition: AtlasPID.h:148
isSUSY
bool isSUSY(const T &p)
Definition: AtlasPID.h:210
isTau
bool isTau(const T &p)
Definition: AtlasPID.h:157
isGraviton
bool isGraviton(const T &p)
Definition: AtlasPID.h:204
isDM
bool isDM(const T &p)
PDG rule 11j: The nature of Dark Matter (DM) is not known, and therefore a definitive classificationi...
Definition: AtlasPID.h:189
DecodedPID
Implementation of classification functions according to PDG2022.
Definition: AtlasPID.h:16
isExcited
bool isExcited(const T &p)
Definition: AtlasPID.h:212
isHadron
bool isHadron(const T &p)
Definition: AtlasPID.h:218
charge
double charge(const T &p)
Definition: AtlasPID.h:538
isBaryon
bool isBaryon(const T &p)
Definition: AtlasPID.h:220
isGeantino
bool isGeantino(const T &p)
Definition: AtlasPID.h:229
isW
bool isW(const T &p)
Definition: AtlasPID.h:176
isTop
bool isTop(const T &p)
Definition: AtlasPID.h:135
isTransportable
bool isTransportable(const T &p)
Definition: AtlasPID.h:227
isLepton
bool isLepton(const T &p)
APID: the fourth generation leptons are leptons.
Definition: AtlasPID.h:139
isCharm
bool isCharm(const T &p)
Definition: AtlasPID.h:129
isPhoton
bool isPhoton(const T &p)
Definition: AtlasPID.h:170
charge3
int charge3(const T &p)
Definition: AtlasPID.h:536
isSMNeutrino
bool isSMNeutrino(const T &p)
Definition: AtlasPID.h:164
extractSporadic.q
list q
Definition: extractSporadic.py:98
isTechnicolor
bool isTechnicolor(const T &p)
Definition: AtlasPID.h:211
isTrajectory
bool isTrajectory(const T &p)
PDG rule 8: The pomeron and odderon trajectories and a generic reggeon trajectory of states in QCD ar...
Definition: AtlasPID.h:195
isElectron
bool isElectron(const T &p)
Definition: AtlasPID.h:151
isDiquark
bool isDiquark(const T &p)
Definition: AtlasPID.h:217
isEMInteracting
bool isEMInteracting(const T &p)
Definition: AtlasPID.h:608
ReadFromCoolCompare.ng
ng
Definition: ReadFromCoolCompare.py:234
isMuon
bool isMuon(const T &p)
Definition: AtlasPID.h:154
isLeptoQuark
bool isLeptoQuark(const T &p)
Definition: AtlasPID.h:207