ATLAS Offline Software
AtlasPID.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
3 */
4 #ifndef TRUTHUTILS_ATLASPID_H
5 #define TRUTHUTILS_ATLASPID_H
6 #include <vector>
7 #include <cmath>
8 #include <algorithm>
9 #include <array>
10 #include <cstdlib>
16 class DecodedPID: public std::pair<int,std::vector<int>> {
17 public:
18  inline DecodedPID(const int& p){
19  this->first=p;
20  this->second.reserve(10);
21  int ap = std::abs(p);
22  for(; ap; ap/=10) this->second.push_back( ap%10 );
23  std::reverse(this->second.begin(), this->second.end());
24  }
25  inline DecodedPID shift(const size_t n) const { return DecodedPID(this->first%int(std::pow(10,ndigits()-n)));}
26  inline const int& operator()(const size_t n) const { return this->second.at(n);}
27  inline const int& last() const { return this->second.back();}
28  inline const int& pid() const { return this->first;}
29  inline int max_digit(const int m,const int n) const { return *std::max_element(second.rbegin() + m, second.rbegin() + n);}
30  inline int min_digit(const int m,const int n) const { return *std::min_element(second.rbegin() + m, second.rbegin() + n);}
31  inline size_t ndigits() const { return this->second.size();}
32 };
33 
34 static const int TABLESIZE = 100;
35 static const std::array<int,TABLESIZE> triple_charge = {
36  +0, -1, +2, -1, +2, -1, +2, -1, +2, +0,
37  +0, -3, +0, -3, +0, -3, +0, -3, +0, +0,
38  +0, +0, +0, +0, +3, +0, +0, +0, +0, +0,
39  +0, +0, +0, +0, +3, +0, +0, +3, +0, +0,
40  +0, +0, -1, +0, +0, +0, +0, +0, +0, +0,
41  +0, +0, +0, +0, +0, +0, +0, +0, +0, +0,
42  +0, +0, +0, +0, +0, +0, +0, +0, +0, +0,
43  +0, +0, +0, +0, +0, +0, +0, +0, +0, +0,
44  +0, +0, +0, +0, +0, +0, +0, +0, +0, +0,
45  +0, +0, +0, +0, +0, +0, +0, +0, +0, +0
46 };
47 
48 
49 static const int UQUARK = 1;
50 static const int DQUARK = 2;
51 static const int SQUARK = 3;
52 static const int CQUARK = 4;
53 static const int BQUARK = 5;
54 static const int TQUARK = 6;
55 
56 static const int ELECTRON = 11;
57 static const int POSITRON = -ELECTRON;
58 static const int NU_E = 12;
59 static const int MUON = 13;
60 static const int NU_MU = 14;
61 static const int TAU = 15;
62 static const int NU_TAU = 16;
63 
64 static const int GLUON = 21;
65 // APID: 9 rather than 21 is used to denote a gluon/gluino in composite states. (From PDG 11g)
66 static const int COMPOSITEGLUON = 9;
67 static const int PHOTON = 22;
68 static const int Z0BOSON = 23;
69 static const int WPLUSBOSON = 24;
70 static const int HIGGSBOSON = 25;
71 static const int GRAVITON = 39;
72 static const int LEPTOQUARK = 42;
73 
78 static const int DARKPHOTON = 60000;
79 static const int MAVTOP = 60001;
80 
81 static const int PIPLUS = 211;
82 static const int PIMINUS = -PIPLUS;
83 static const int PI0 = 111;
84 static const int K0L = 130;
85 
86 static const int K0S = 310;
87 static const int K0 = 311;
88 static const int KPLUS = 321;
89 static const int DPLUS = 411;
90 static const int DSTAR = 413;
91 static const int D0 = 421;
92 static const int DSPLUS = 431;
93 static const int JPSI = 443;
94 static const int B0 = 511;
95 static const int BCPLUS = 541;
96 static const int PROTON = 2212;
97 static const int LAMBDA0 = 3122;
98 static const int LAMBDACPLUS = 4122;
99 static const int LAMBDAB0 = 5122;
100 static const int PSI2S = 20443;
104 static const int POMERON = 990;
105 static const int ODDERON = 9990;
106 static const int REGGEON = 110;
107 
113 static const int GEANTINOPLUS = 998;
114 static const int GEANTINO0 = 999;
115 
116 
122 template<class T> inline bool isQuark(const T& p) {return isQuark(p->pdg_id());}
123 template<> inline bool isQuark(const int& p) { return p != 0 && (std::abs(p) <= 8 || std::abs(p) == MAVTOP);}
124 template<> inline bool isQuark(const DecodedPID& p){ return isQuark(p.pid()); }
125 
126 template<class T> inline bool isStrange(const T& p) {return isStrange(p->pdg_id());}
127 template<> inline bool isStrange(const int& p){ return std::abs(p) == 3;}
128 
129 template<class T> inline bool isCharm(const T& p){return isCharm(p->pdg_id());}
130 template<> inline bool isCharm(const int& p){ return std::abs(p) == 4;}
131 
132 template<class T> inline bool isBottom(const T& p){return isBottom(p->pdg_id());}
133 template<> inline bool isBottom(const int& p){ return std::abs(p) == 5;}
134 
135 template<class T> inline bool isTop(const T& p){return isTop(p->pdg_id());}
136 template<> inline bool isTop(const int& p){ return std::abs(p) == 6;}
137 
139 template<class T> inline bool isLepton(const T& p){return isLepton(p->pdg_id());}
140 template<> inline bool isLepton(const int& p){ auto sp = std::abs(p); return sp >= 11 && sp <= 18; }
141 template<> inline bool isLepton(const DecodedPID& p){ return isLepton(p.pid()); }
142 
143 template<class T> inline bool isSMLepton(const T& p){return isSMLepton(p->pdg_id());}
144 template<> inline bool isSMLepton(const int& p){ auto sp = std::abs(p); return sp >= 11 && sp <= 16; }
145 template<> inline bool isSMLepton(const DecodedPID& p){ return isSMLepton(p.pid()); }
146 
148 template<class T> inline bool isChLepton(const T& p){return isChLepton(p->pdg_id());}
149 template<> inline bool isChLepton(const int& p){ auto sp = std::abs(p); return sp >= 11 && sp <= 18 && sp%2 == 1; }
150 
151 template<class T> inline bool isElectron(const T& p){return isElectron(p->pdg_id());}
152 template<> inline bool isElectron(const int& p){ return std::abs(p) == ELECTRON;}
153 
154 template<class T> inline bool isMuon(const T& p){return isMuon(p->pdg_id());}
155 template<> inline bool isMuon(const int& p){ return std::abs(p) == MUON;}
156 
157 template<class T> inline bool isTau(const T& p){return isTau(p->pdg_id());}
158 template<> inline bool isTau(const int& p){ return std::abs(p) == TAU;}
159 
161 template<class T> inline bool isNeutrino(const T& p){return isNeutrino(p->pdg_id());}
162 template<> inline bool isNeutrino(const int& p){ auto sp = std::abs(p); return sp == NU_E || sp == NU_MU || sp == NU_TAU || sp == 18; }
163 
164 template<class T> inline bool isSMNeutrino(const T& p){return isSMNeutrino(p->pdg_id());}
165 template<> inline bool isSMNeutrino(const int& p){ auto sp = std::abs(p); return sp == NU_E || sp == NU_MU || sp == NU_TAU; }
166 
167 template<class T> inline bool isGluon(const T& p){return isGluon(p->pdg_id());}
168 template<> inline bool isGluon(const int& p){ return p == GLUON; }
169 
170 template<class T> inline bool isPhoton(const T& p){return isPhoton(p->pdg_id());}
171 template<> inline bool isPhoton(const int& p){ return p == PHOTON; }
172 
173 template<class T> inline bool isZ(const T& p){return isZ(p->pdg_id());}
174 template<> inline bool isZ(const int& p){ return p == Z0BOSON; }
175 
176 template<class T> inline bool isW(const T& p){return isW(p->pdg_id());}
177 template<> inline bool isW(const int& p){ return std::abs(p) == WPLUSBOSON; }
178 
189 template<class T> inline bool isDM(const T& p){return isDM(p->pdg_id());}
190 template<> inline bool isDM(const int& p){ auto sp = std::abs(p); return (sp >= 51 && sp <= 60) || sp == DARKPHOTON; }
191 
195 template<class T> inline bool isTrajectory(const T& p){return isTrajectory(p->pdg_id());}
196 template<> inline bool isTrajectory(const int& p){ return std::abs(p) == POMERON || std::abs(p) == ODDERON || std::abs(p) == REGGEON; }
197 
199 template<class T> inline bool isHiggs(const T& p){return isHiggs(p->pdg_id());}
200 template<> inline bool isHiggs(const int& p){ return p == HIGGSBOSON; }
201 
202 template<class T> inline bool isResonance(const T& p) { return isZ(p) || isW(p) || isHiggs(p) || isTop(p); } // APID: not including t' (pdg_id=8)
203 
204 template<class T> inline bool isGraviton(const T& p) {return isGraviton(p->pdg_id());}
205 template<> inline bool isGraviton(const int& p){ return p == GRAVITON; }
206 
207 template<class T> inline bool isLeptoQuark(const T& p){return isLeptoQuark(p->pdg_id());}
208 template<> inline bool isLeptoQuark(const int& p){ return std::abs(p) == LEPTOQUARK; }
209 
210 template<class T> inline bool isSUSY(const T& p){return isSUSY(p->pdg_id());}
211 template<class T> inline bool isTechnicolor(const T& p){return isTechnicolor(p->pdg_id());}
212 template<class T> inline bool isExcited(const T& p){return isExcited(p->pdg_id());}
213 template<class T> inline bool isKK(const T& p){return isKK(p->pdg_id());}
214 template<class T> inline bool isMonopole(const T& p){return isMonopole(p->pdg_id());}
215 template<class T> inline bool isHiddenValley(const T& p){return isHiddenValley(p->pdg_id());}
216 template<class T> inline bool isGenericMultichargedParticle(const T& p){return isGenericMultichargedParticle(p->pdg_id());}
217 template<class T> inline bool isDiquark(const T& p){return isDiquark(p->pdg_id());}
218 template<class T> inline bool isHadron(const T& p){return isHadron(p->pdg_id());}
219 template<class T> inline bool isMeson(const T& p){return isMeson(p->pdg_id());}
220 template<class T> inline bool isBaryon(const T& p){return isBaryon(p->pdg_id());}
221 template<class T> inline bool isTetraquark(const T& p){return isTetraquark(p->pdg_id());}
222 template<class T> inline bool isPentaquark(const T& p){return isPentaquark(p->pdg_id());}
223 template<class T> inline bool isNucleus(const T& p){return isNucleus(p->pdg_id());}
224 template<class T> inline bool isBSM(const T& p){return isBSM(p->pdg_id());}
225 template<class T> inline bool isValid(const T& p){return isValid(p->pdg_id());}
226 template<> inline bool isValid(const DecodedPID& p);
227 template<class T> inline bool isTransportable(const T& p){return isTransportable(p->pdg_id());}
228 template<class T> inline bool isGenSpecific(const T& p){return isGenSpecific(p->pdg_id());}
229 template<class T> inline bool isGeantino(const T& p){return isGeantino(p->pdg_id());}
230 template<class T> inline bool isPythia8Specific(const T& p){return isPythia8Specific(p->pdg_id());}
231 template<> inline bool isPythia8Specific(const DecodedPID& p){ return (p.ndigits() == 7 && p(0) == 9 && p(1) == 9);}
232 template<> inline bool isPythia8Specific(const int& p){ auto value_digits = DecodedPID(p); return isPythia8Specific(value_digits);}
235 template<> inline bool isGenSpecific(const int& p){
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 }
244 
245 template<> inline bool isGeantino(const int& p){ return (std::abs(p) == GEANTINO0 || std::abs(p) == GEANTINOPLUS);}
246 
248 template<class T> inline bool isGlueball(const T& p) { return isGlueball(p->pdg_id()); }
249 template<> inline bool isGlueball(const DecodedPID& p) {
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 }
257 template<> inline bool isGlueball(const int& p) { auto value_digits = DecodedPID(p); return isGlueball(value_digits); }
258 
264 template<> inline bool isSUSY(const DecodedPID& p){return (p.ndigits() == 7 && (p(0) == 1 || p(0) == 2 ) && ((isValid(p.shift(2)) && !isGenSpecific(p.shift(2).pid())) || isGlueball(p.shift(2))) );}
265 
271 template<> inline bool isTechnicolor(const DecodedPID& p){return (p.ndigits() == 7 && p(0) == 3 && (p(1) == 0 || p(0) == 1) && isValid(p.shift(2)) && !isGenSpecific(p.shift(2).pid()));}
272 template<> inline bool isTechnicolor(const int& p){ auto value_digits = DecodedPID(p); return isTechnicolor(value_digits);}
273 
276 template<> inline bool isExcited(const DecodedPID& p){return (p.ndigits() == 7 && (p(0) == 4 && p(1) == 0 ) && (isLepton(p.shift(2))||isQuark(p.shift(2))) );}
277 template<> inline bool isExcited(const int& p){ auto value_digits = DecodedPID(p); return isExcited(value_digits);}
278 
286 template<> inline bool isKK(const DecodedPID& p){return (p.ndigits() == 7 && (p(0) == 5 || p(0) == 6 ) );}
287 template<> inline bool isKK(const int& p){ auto value_digits = DecodedPID(p); return isKK(value_digits);}
288 
295 template<> inline bool isMonopole(const DecodedPID& p){return (p.ndigits() == 7 && p(0) == 4 && p(1) == 1 && (p(2) == 1 || p(2) == 2 ) && p(6) == 0);}
296 template<> inline bool isMonopole(const int& p){ auto value_digits = DecodedPID(p); return isMonopole(value_digits);}
297 
298 
303 template<> inline bool isHiddenValley(const DecodedPID& p){return (p.ndigits() == 7 && p(0) == 4 && p(1) == 9 && isValid(p.shift(2)));}
304 template<> inline bool isHiddenValley(const int& p){ auto value_digits = DecodedPID(p); return isHiddenValley(value_digits);}
305 
312 template<> inline bool isGenericMultichargedParticle(const DecodedPID& p){return (p.ndigits() == 8 && (p(0) == 1 || p(0) == 2) && p(1) == 0 && p(2) == 0 && p(7) == 0);}
313 template<> inline bool isGenericMultichargedParticle(const int& p){ auto value_digits = DecodedPID(p); return isGenericMultichargedParticle(value_digits);}
314 
318 template<> inline bool isDiquark(const DecodedPID& p){
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 }
324 
325 
333 template<> inline bool isMeson(const DecodedPID& p){
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 }
359 template<> inline bool isBaryon(const DecodedPID& p){
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 }
398 
399 template<> inline bool isPentaquark(const DecodedPID& p){
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 }
410 template<> inline bool isTetraquark(const DecodedPID& p){
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 }
417 
426 template<> inline bool isNucleus(const DecodedPID& p){
427  if (std::abs(p.pid()) == PROTON) return true;
428  return (p.ndigits() == 10 && p(0) == 1 && p(1) == 0 );
429 }
431 template<> inline bool isBSM(const DecodedPID& p){
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 }
445 
446 template<> inline bool isSUSY(const int& p){ auto value_digits = DecodedPID(p); return isSUSY(value_digits);}
447 template<> inline bool isDiquark(const int& p){ auto value_digits = DecodedPID(p); return isDiquark(value_digits);}
448 template<> inline bool isMeson(const int& p){ auto value_digits = DecodedPID(p); return isMeson(value_digits);}
449 template<> inline bool isBaryon(const int& p){ auto value_digits = DecodedPID(p); return isBaryon(value_digits);}
450 template<> inline bool isTetraquark(const int& p){ auto value_digits = DecodedPID(p); return isTetraquark(value_digits);}
451 template<> inline bool isPentaquark(const int& p){ auto value_digits = DecodedPID(p); return isPentaquark(value_digits);}
452 template<> inline bool isNucleus(const int& p){ auto value_digits = DecodedPID(p); return isNucleus(value_digits);}
453 template<> inline bool isBSM(const int& p){
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 }
461 
462 template<> inline bool isHadron(const DecodedPID& p){ return isMeson(p)||isBaryon(p)||isTetraquark(p)||isPentaquark(p);}
463 template<> inline bool isHadron(const int& p){ auto value_digits = DecodedPID(p); return isHadron(value_digits);}
464 template<> inline bool isTransportable(const DecodedPID& p){ return isPhoton(p.pid()) || isGeantino(p.pid()) || isHadron(p) || isLepton(p.pid()) || p.pid() == DARKPHOTON;}
465 template<> inline bool isTransportable(const int& p){ auto value_digits = DecodedPID(p); return isTransportable(value_digits);}
467 template<> inline bool isValid(const DecodedPID& p){ 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); }
468 template<> inline bool isValid(const int& p){ 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 }
472 template<class T> inline bool hasQuark(const T& p, const int& q);
473 
474 template<> inline bool hasQuark(const DecodedPID& p, const int& q){
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 }
484 
485 template<> inline bool hasQuark(const int& p, const int& q){ auto value_digits = DecodedPID(p); return hasQuark(value_digits, q);}
486 
487 template<class T> inline int leadingQuark(const T& p) {return leadingQuark(p->pdg_id());}
488 template<> inline int leadingQuark(const DecodedPID& p){
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 }
497 
498 template<> inline int leadingQuark(const int& p){ auto value_digits = DecodedPID(p); return leadingQuark(value_digits);}
499 
500 template<class T> inline bool hasStrange(const T& p) { return hasQuark(p,SQUARK); }
501 template<class T> inline bool hasCharm(const T& p) { return hasQuark(p,CQUARK); }
502 template<class T> inline bool hasBottom(const T& p) { return hasQuark(p,BQUARK); }
503 template<class T> inline bool hasTop(const T& p) { return hasQuark(p,TQUARK); }
504 
505 template<class T> inline bool isLightHadron(const T& p) { auto lq = leadingQuark(p); return (lq == DQUARK || lq == UQUARK||lq == SQUARK) && isHadron(p); }
506 template<class T> inline bool isHeavyHadron(const T& p) { auto lq = leadingQuark(p); return (lq == CQUARK || lq == BQUARK || lq == TQUARK ) && isHadron(p); }
507 template<class T> inline bool isStrangeHadron(const T& p) { return leadingQuark(p) == SQUARK && isHadron(p); }
508 template<class T> inline bool isCharmHadron(const T& p) { return leadingQuark(p) == CQUARK && isHadron(p); }
509 template<class T> inline bool isBottomHadron(const T& p) { return leadingQuark(p) == BQUARK && isHadron(p); }
510 template<class T> inline bool isTopHadron(const T& p) { return leadingQuark(p) == TQUARK && isHadron(p); }
511 
512 template<class T> inline bool isLightMeson(const T& p) { auto lq = leadingQuark(p); return (lq == DQUARK || lq == UQUARK||lq == SQUARK) && isMeson(p); }
513 template<class T> inline bool isHeavyMeson(const T& p) { auto lq = leadingQuark(p); return (lq == CQUARK || lq == BQUARK || lq == TQUARK) && isMeson(p); }
514 template<class T> inline bool isStrangeMeson(const T& p) { return leadingQuark(p) == SQUARK && isMeson(p); }
515 template<class T> inline bool isCharmMeson(const T& p) { return leadingQuark(p) == CQUARK && isMeson(p); }
516 template<class T> inline bool isBottomMeson(const T& p) { return leadingQuark(p) == BQUARK && isMeson(p); }
517 template<class T> inline bool isTopMeson(const T& p) { return leadingQuark(p) == TQUARK && isMeson(p); }
518 
519 template<class T> inline bool isCCbarMeson(const T& p) { return isCCbarMeson(p->pdg_id());}
520 template<> inline bool isCCbarMeson(const DecodedPID& p) { return leadingQuark(p) == CQUARK && isMeson(p) && (*(p.second.rbegin()+2)) == CQUARK && (*(p.second.rbegin()+1)) == CQUARK; }
521 template<> inline bool isCCbarMeson(const int& p) { return isCCbarMeson(DecodedPID(p)); }
522 
523 template<class T> inline bool isBBbarMeson(const T& p){ return isBBbarMeson(p->pdg_id());}
524 template<> inline bool isBBbarMeson(const DecodedPID& p) { return leadingQuark(p) == BQUARK && isMeson(p) && (*(p.second.rbegin()+2)) == BQUARK && (*(p.second.rbegin()+1)) == BQUARK; }
525 template<> inline bool isBBbarMeson(const int& p) { return isBBbarMeson(DecodedPID(p)); }
526 
527 
528 template<class T> inline bool isLightBaryon(const T& p) { auto lq = leadingQuark(p); return (lq == DQUARK || lq == UQUARK||lq == SQUARK) && isBaryon(p); }
529 template<class T> inline bool isHeavyBaryon(const T& p) { auto lq = leadingQuark(p); return (lq == CQUARK || lq == BQUARK || lq == TQUARK) && isBaryon(p); }
530 template<class T> inline bool isStrangeBaryon(const T& p) { return leadingQuark(p) == SQUARK && isBaryon(p); }
531 template<class T> inline bool isCharmBaryon(const T& p) { return leadingQuark(p) == CQUARK && isBaryon(p); }
532 template<class T> inline bool isBottomBaryon(const T& p) { return leadingQuark(p) == BQUARK && isBaryon(p); }
533 template<class T> inline bool isTopBaryon(const T& p) { return leadingQuark(p) == TQUARK && isBaryon(p); }
534 
535 
536 template<class T> inline int charge3( const T& p){return charge3(p->pdg_id());}
537 template<class T> inline double fractionalCharge(const T& p){return fractionalCharge(p->pdg_id());}
538 template<class T> inline double charge( const T& p){
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 }
544 template<class T> inline double threeCharge( const T& p){ return charge3(p);}
545 template<class T> inline bool isCharged( const T& p){ return charge3(p) != 0;}
546 template<class T> inline bool isNeutral( const T& p){ return charge3(p) == 0;}
547 
548 
549 
550 template<> inline int charge3(const DecodedPID& p) {
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 }
592 template<> inline int charge3(const int& p){
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 }
598 
599 template<> inline double fractionalCharge(const DecodedPID& p) {
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 }
606 template<> inline double fractionalCharge(const int& p){auto value_digits = DecodedPID(p); return fractionalCharge(value_digits);}
607 
608 template<class T> inline bool isEMInteracting(const T& p){return isEMInteracting(p->pdg_id());}
609 template<> inline bool isEMInteracting(const int& p) {return (isPhoton(p) || isZ(p) || std::abs(charge(p))>std::numeric_limits<double>::epsilon() || isMonopole(p));}
610 
611 template<class T> inline bool isParton(const T& p) { return isQuark(p)||isGluon(p);}
612 
613 namespace SUSY {
627  template<class T> inline bool isRGlueball(const T& p) { return isRGlueball(p->pdg_id()); }
628  template<> inline bool isRGlueball(const DecodedPID& p) {
629  if (p.ndigits() != 7) return false;
630  auto pp = p.shift(2);
631  return isGlueball(pp);
632  }
633  template<> inline bool isRGlueball(const int& p) { auto value_digits = DecodedPID(p); return isRGlueball(value_digits); }
634  template<class T> inline bool isRHadron(const T& p) { return isRHadron(p->pdg_id()); }
635  template<> inline bool isRHadron(const DecodedPID& p) { if (!isSUSY(p)) return false; auto pp = p.shift(1); if (pp.ndigits() < 2) return false; if ( pp(1) == 7 || pp(1) == 8 ) return false; if (pp.ndigits() > 2) pp = pp.shift(1); return (isHadron(pp) || isRGlueball(p)); }
636  template<> inline bool isRHadron(const int& p) { auto value_digits = DecodedPID(p); return isRHadron(value_digits); }
637 
638  template<class T> inline bool isRMeson(const T& p) { return isRMeson(p->pdg_id()); }
639  template<> inline bool isRMeson(const DecodedPID& p) { if (!isSUSY(p)) return false; auto pp = p.shift(1); if (pp.ndigits() < 2) return false;if ( pp(1) == 7 || pp(1) == 8 ) return false; if (pp.ndigits() > 2) pp = pp.shift(1); return isMeson(pp); }
640  template<> inline bool isRMeson(const int& p) { auto value_digits = DecodedPID(p); return isRMeson(value_digits); }
641 
642  template<class T> inline bool isRBaryon(const T& p) { return isRBaryon(p->pdg_id()); }
643  template<> inline bool isRBaryon(const DecodedPID& p) { if (!isSUSY(p)) return false; auto pp = p.shift(1); if (pp.ndigits() < 2) return false; if ( pp(1) == 7 || pp(1) == 8 ) return false; if (pp.ndigits() > 2) pp = pp.shift(1); return isBaryon(pp); }
644  template<> inline bool isRBaryon(const int& p) { auto value_digits = DecodedPID(p); return isRBaryon(value_digits); }
645 
646  template<class T> inline bool isSLepton(const T& p) { return isSLepton(p->pdg_id()); }
647  template<> inline bool isSLepton(const DecodedPID& p){ auto pp = p.shift(1); return isSUSY(p) && isLepton(pp);}
648  template<> inline bool isSLepton(const int& p){ auto value_digits = DecodedPID(p); return isSLepton(value_digits);}
649 
650  template<class T> inline bool isSBaryon(const T& p) { return isSBaryon(p->pdg_id()); }
651  template<> inline bool isSBaryon(const DecodedPID& p){ auto pp = p.shift(1); return isSUSY(p) && isBaryon(pp);}
652  template<> inline bool isSBaryon(const int& p){ auto value_digits = DecodedPID(p); return isSBaryon(value_digits);}
653 
654 
655  template<class T> inline bool isSMeson(const T& p) { return isSMeson(p->pdg_id()); }
656  template<> inline bool isSMeson(const DecodedPID& p){ auto pp = p.shift(1); return isSUSY(p) && isMeson(pp);}
657  template<> inline bool isSMeson(const int& p){ auto value_digits = DecodedPID(p); return isSMeson(value_digits);}
658 
659  template<class T> inline bool spin(const T& p) { return spin(p->pdg_id()); }
660  template<> inline bool spin(const int& p) { return p%10; }
661 
662  inline std::vector<int> containedQuarks(int p) {
663  auto pp = DecodedPID(p);
664  if (isSUSY(pp)) {
665  pp = pp.shift(1);
666  if (pp.ndigits() > 2) pp = pp.shift(1);
667  }
668  std::vector<int> quarks;
669  for (int i = 1; i<=6; ++i)
670  if (hasQuark(pp, i)) quarks.push_back(i);
671  return quarks;
672  }
673 
674  template<class T> inline bool isSquark(const T& p);
675  template<> inline bool isSquark(const DecodedPID& p){
676  if (p.ndigits() == 7 && (p(0) == 1 || p(0) == 2)) { // APID SUSY case
677  auto pp = p.shift(1);
678  return ( pp.ndigits() == 1 && isQuark(pp) );
679  }
680  return false;
681  }
682  template<> inline bool isSquark(const int& p){ auto value_digits = DecodedPID(p); return isSquark(value_digits);}
683 
684  template<class T> inline bool hasSquark(const T& p, const int& q);
685  template<> inline bool hasSquark(const DecodedPID& p, const int& q){
686  if (p.ndigits() == 7 && (p(0) == 1 || p(0) == 2)) { // APID SUSY case
687  auto pp = p.shift(1);
688  if ( pp.ndigits() == 2) { return false; } // skip boson super-partners
689  return (pp(0) == q); // The second non-zero digit in the pdg_id represents the flavour of the Squark in Squark and RHadron pdg_ids
690  }
691  return false;
692  }
693  template<> inline bool hasSquark(const int& p, const int& q){ auto value_digits = DecodedPID(p); return hasSquark(value_digits, q);}
694 
695 } // namespace SUSY
696 
697 template<class T> inline bool isStrongInteracting(const T& p){return isStrongInteracting(p->pdg_id());}
698 template<> inline bool isStrongInteracting(const int& p) { 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
699 
700 #endif
isStrange
bool isStrange(const T &p)
Definition: AtlasPID.h:126
isStrangeMeson
bool isStrangeMeson(const T &p)
Definition: AtlasPID.h:514
beamspotman.r
def r
Definition: beamspotman.py:676
python.SystemOfUnits.second
int second
Definition: SystemOfUnits.py:120
SUSY::isRHadron
bool isRHadron(const T &p)
Definition: AtlasPID.h:634
isBottomMeson
bool isBottomMeson(const T &p)
Definition: AtlasPID.h:516
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
python.SystemOfUnits.m
int m
Definition: SystemOfUnits.py:91
isHeavyHadron
bool isHeavyHadron(const T &p)
Definition: AtlasPID.h:506
isTetraquark
bool isTetraquark(const T &p)
Definition: AtlasPID.h:221
SUSY::isRMeson
bool isRMeson(const T &p)
Definition: AtlasPID.h:638
isBottomBaryon
bool isBottomBaryon(const T &p)
Definition: AtlasPID.h:532
find
std::string find(const std::string &s)
return a remapped string
Definition: hcg.cxx:135
SUSY::isRBaryon
bool isRBaryon(const T &p)
Definition: AtlasPID.h:642
isTopBaryon
bool isTopBaryon(const T &p)
Definition: AtlasPID.h:533
hasCharm
bool hasCharm(const T &p)
Definition: AtlasPID.h:501
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
DecodedPID::shift
DecodedPID shift(const size_t n) const
Definition: AtlasPID.h:25
isMeson
bool isMeson(const T &p)
Definition: AtlasPID.h:219
hasQuark
bool hasQuark(const T &p, const int &q)
conifer::pow
constexpr int pow(int x)
Definition: conifer.h:20
isKK
bool isKK(const T &p)
Definition: AtlasPID.h:213
threeCharge
double threeCharge(const T &p)
Definition: AtlasPID.h:544
isCharmMeson
bool isCharmMeson(const T &p)
Definition: AtlasPID.h:515
MuonGM::round
float round(const float toRound, const unsigned int decimals)
Definition: Mdt.cxx:27
hasBottom
bool hasBottom(const T &p)
Definition: AtlasPID.h:502
isNeutrino
bool isNeutrino(const T &p)
APID: the fourth generation neutrinos are neutrinos.
Definition: AtlasPID.h:161
isResonance
bool isResonance(const T &p)
Definition: AtlasPID.h:202
isParton
bool isParton(const T &p)
Definition: AtlasPID.h:611
isHeavyBaryon
bool isHeavyBaryon(const T &p)
Definition: AtlasPID.h:529
isValid
bool isValid(const T &p)
Definition: AtlasPID.h:225
isLightBaryon
bool isLightBaryon(const T &p)
Definition: AtlasPID.h:528
python.AtlRunQueryParser.ap
ap
Definition: AtlRunQueryParser.py:826
SUSY
Definition: AtlasPID.h:613
xAOD::Muon_v1
Class describing a Muon.
Definition: Muon_v1.h:38
isBottomHadron
bool isBottomHadron(const T &p)
Definition: AtlasPID.h:509
isLightMeson
bool isLightMeson(const T &p)
Definition: AtlasPID.h:512
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
DeMoUpdate.reverse
reverse
Definition: DeMoUpdate.py:563
isHiggs
bool isHiggs(const T &p)
APID: HIGGS boson is only one particle.
Definition: AtlasPID.h:199
SUSY::spin
bool spin(const T &p)
Definition: AtlasPID.h:659
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
SUSY::hasSquark
bool hasSquark(const T &p, const int &q)
python.utils.AtlRunQueryDQUtils.p
p
Definition: AtlRunQueryDQUtils.py:210
isLightHadron
bool isLightHadron(const T &p)
Definition: AtlasPID.h:505
isCCbarMeson
bool isCCbarMeson(const T &p)
Definition: AtlasPID.h:519
isBottom
bool isBottom(const T &p)
Definition: AtlasPID.h:132
isTopHadron
bool isTopHadron(const T &p)
Definition: AtlasPID.h:510
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
beamspotman.n
n
Definition: beamspotman.py:731
isMonopole
bool isMonopole(const T &p)
Definition: AtlasPID.h:214
hasTop
bool hasTop(const T &p)
Definition: AtlasPID.h:503
isZ
bool isZ(const T &p)
Definition: AtlasPID.h:173
DecodedPID::pid
const int & pid() const
Definition: AtlasPID.h:28
isPentaquark
bool isPentaquark(const T &p)
Definition: AtlasPID.h:222
isCharmBaryon
bool isCharmBaryon(const T &p)
Definition: AtlasPID.h:531
SUSY::isSquark
bool isSquark(const T &p)
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
DecodedPID::max_digit
int max_digit(const int m, const int n) const
Definition: AtlasPID.h:29
sign
int sign(int a)
Definition: TRT_StrawNeighbourSvc.h:107
isBBbarMeson
bool isBBbarMeson(const T &p)
Definition: AtlasPID.h:523
isNeutral
bool isNeutral(const T &p)
Definition: AtlasPID.h:546
hasStrange
bool hasStrange(const T &p)
Definition: AtlasPID.h:500
SUSY::isSLepton
bool isSLepton(const T &p)
Definition: AtlasPID.h:646
SUSY::containedQuarks
std::vector< int > containedQuarks(int p)
Definition: AtlasPID.h:662
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
DecodedPID::DecodedPID
DecodedPID(const int &p)
Definition: AtlasPID.h:18
DecodedPID::min_digit
int min_digit(const int m, const int n) const
Definition: AtlasPID.h:30
isStrangeHadron
bool isStrangeHadron(const T &p)
Definition: AtlasPID.h:507
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
isTopMeson
bool isTopMeson(const T &p)
Definition: AtlasPID.h:517
isHadron
bool isHadron(const T &p)
Definition: AtlasPID.h:218
charge
double charge(const T &p)
Definition: AtlasPID.h:538
DecodedPID::ndigits
size_t ndigits() const
Definition: AtlasPID.h:31
isBaryon
bool isBaryon(const T &p)
Definition: AtlasPID.h:220
isGeantino
bool isGeantino(const T &p)
Definition: AtlasPID.h:229
SUSY::isSBaryon
bool isSBaryon(const T &p)
Definition: AtlasPID.h:650
isW
bool isW(const T &p)
Definition: AtlasPID.h:176
isCharged
bool isCharged(const T &p)
Definition: AtlasPID.h:545
isTop
bool isTop(const T &p)
Definition: AtlasPID.h:135
SUSY::isRGlueball
bool isRGlueball(const T &p)
PDG rule 11g: Within several scenarios of new physics, it is possible to have colored particles suffici...
Definition: AtlasPID.h:627
isTransportable
bool isTransportable(const T &p)
Definition: AtlasPID.h:227
DeMoScan.first
bool first
Definition: DeMoScan.py:536
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
isCharmHadron
bool isCharmHadron(const T &p)
Definition: AtlasPID.h:508
SUSY::isSMeson
bool isSMeson(const T &p)
Definition: AtlasPID.h:655
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
isHeavyMeson
bool isHeavyMeson(const T &p)
Definition: AtlasPID.h:513
isStrangeBaryon
bool isStrangeBaryon(const T &p)
Definition: AtlasPID.h:530
DecodedPID::last
const int & last() const
Definition: AtlasPID.h:27
isElectron
bool isElectron(const T &p)
Definition: AtlasPID.h:151
DecodedPID::operator()
const int & operator()(const size_t n) const
Definition: AtlasPID.h:26
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
TSU::T
unsigned long long T
Definition: L1TopoDataTypes.h:35
isMuon
bool isMuon(const T &p)
Definition: AtlasPID.h:154
isLeptoQuark
bool isLeptoQuark(const T &p)
Definition: AtlasPID.h:207