9#ifndef RIVET_PARTICLEIDUTILS_HH
10#define RIVET_PARTICLEIDUTILS_HH
15#include "Rivet/Tools/ParticleName.hh"
16#include "Rivet/Math/MathUtils.hh"
37 inline size_t _pow10(
unsigned int power) {
39 assert(power < 16 &&
"_pow10 only defined for powers < 16");
40 static const size_t POWS10[] = {1, 10, 100, 1000, 10000, 100000, 1000000,
41 10000000, 100000000, 1000000000, 10000000000,
42 100000000000, 1000000000000, 10000000000000,
43 100000000000000, 1000000000000000, 10000000000000000};
54 enum Location { nj=1, nq3, nq2, nq1, nl, nr, n, n8, n9, n10 };
61 inline unsigned short _digit(
Location loc,
int pid) {
62 const int div = _pow10(loc-1);
63 return (abs(
pid)/div) % 10;
67 inline int _extraBits(
int pid) {
68 return abs(
pid)/10000000;
73 inline int _fundamentalID(
int pid) {
74 if (_extraBits(
pid) > 0)
return 0;
75 if (_digit(nq2,
pid) == 0 && _digit(nq1,
pid) == 0) {
76 return abs(
pid) % 10000;
77 }
else if (abs(
pid) <= 100) {
104 if (abs(
pid) == 2212)
return true;
106 if (_digit(n10,
pid) == 1 && _digit(n9,
pid) == 0) {
109 if ((abs(
pid)/10) % 1000 >= (abs(
pid)/10000) % 1000)
return true;
118 if (abs(
pid) == 2212) {
129 if (abs(
pid) == 2212) {
140 if (abs(
pid) == 2212) {
171 return pid == PHOTON;
176 return abs(
pid) == ELECTRON;
181 return abs(
pid) == MUON;
186 return abs(
pid) == TAU;
191 const long apid = abs(
pid);
192 return apid == 11 || apid == 13 || apid == 15 || apid == 17;
197 const long apid = abs(
pid);
198 return apid == 12 || apid == 14 || apid == 16 || apid == 18;
204 return pid == WPLUSBOSON;
209 return pid == WMINUSBOSON;
214 return abs(
pid) == WPLUSBOSON;
219 return pid == Z0BOSON;
224 return pid == HIGGSBOSON ||
pid == 26;
232 return pid == GRAVITON;
244 return abs(
pid) == SQUARK;
249 return abs(
pid) == CQUARK;
254 return abs(
pid) == BQUARK;
259 return abs(
pid) == TQUARK;
270 return pid == 110 ||
pid == 990 ||
pid == 9990;
275 if (_extraBits(
pid) > 0)
return false;
277 const int aid = abs(
pid);
278 if (aid == 130 || aid == 310 || aid == 210)
return true;
279 if (aid <= 100)
return false;
280 if (_digit(nq1,
pid) != 0)
return false;
281 if (_digit(nq2,
pid) == 0)
return false;
282 if (_digit(nq3,
pid) == 0)
return false;
283 if (_digit(nq2,
pid) < _digit(nq3,
pid))
return false;
286 if (aid == 150 || aid == 350 || aid == 510 || aid == 530)
return true;
290 if (_digit(nj,
pid) > 0 && _digit(nq3,
pid) > 0 && _digit(nq2,
pid) > 0 && _digit(nq1,
pid) == 0) {
291 return !(_digit(nq3,
pid) == _digit(nq2,
pid) &&
pid < 0);
298 if (_extraBits(
pid) > 0)
return false;
300 if (abs(
pid) <= 100)
return false;
301 if (_fundamentalID(
pid) <= 100 && _fundamentalID(
pid) > 0)
return false;
302 if (abs(
pid) == 2110 || abs(
pid) == 2210)
return true;
303 if (_digit(nj,
pid) == 0)
return false;
304 if (_digit(nq1,
pid) == 0 || _digit(nq2,
pid) == 0 || _digit(nq3,
pid) == 0)
return false;
315 inline bool isDiquark(
int pid) {
316 if (_extraBits(
pid) > 0)
return false;
318 if (abs(
pid) <= 100)
return false;
319 if (_fundamentalID(
pid) <= 100 && _fundamentalID(
pid) > 0)
return false;
320 if (_digit(nq1,
pid) == 0)
return false;
321 if (_digit(nq2,
pid) == 0)
return false;
322 if (_digit(nq3,
pid) != 0)
return false;
323 if (_digit(nq1,
pid) < _digit(nq2,
pid))
return false;
324 if (_digit(nj,
pid) > 0 && _digit(nq3,
pid) == 0 && _digit(nq2,
pid) > 0 && _digit(nq1,
pid) > 0)
return true;
338 if (_extraBits(
pid) > 0)
return false;
340 if (_digit(n,
pid) != 9)
return false;
341 if (_digit(nr,
pid) == 9 || _digit(nr,
pid) == 0)
return false;
342 if (_digit(nj,
pid) == 9 || _digit(nl,
pid) == 0)
return false;
343 if (_digit(nq1,
pid) == 0)
return false;
344 if (_digit(nq2,
pid) == 0)
return false;
345 if (_digit(nq3,
pid) == 0)
return false;
346 if (_digit(nj,
pid) == 0)
return false;
348 if (_digit(nq2,
pid) > _digit(nq1,
pid))
return false;
349 if (_digit(nq1,
pid) > _digit(nl,
pid))
return false;
350 if (_digit(nl,
pid) > _digit(nr,
pid))
return false;
358 if (_extraBits(
pid) > 0)
return false;
376 if (_extraBits(
pid) > 0)
return false;
378 if (_fundamentalID(
pid) >= 11 && _fundamentalID(
pid) <= 18)
return true;
399 if (_extraBits(
pid) > 0)
return false;
400 if (_digit(n,
pid) != 1 && _digit(n,
pid) != 2)
return false;
401 if (_digit(nr,
pid) != 0)
return false;
403 const int fundId = _fundamentalID(
pid);
404 if (fundId == 0)
return false;
405 if (_digit(n,
pid) == 1) {
407 }
else if (_digit(n,
pid) == 2) {
417 if (_extraBits(
pid) > 0)
return false;
418 if (_digit(n,
pid) != 1)
return false;
419 if (_digit(nr,
pid) != 0)
return false;
423 if (_digit(nq2,
pid) == 0)
return false;
424 if (_digit(nq3,
pid) == 0)
return false;
425 if (_digit(nj,
pid) == 0)
return false;
435 if (_extraBits(
pid) > 0)
return false;
436 return _digit(n,
pid) == 3;
441 if (_extraBits(
pid) > 0)
return false;
442 return _digit(n,
pid) == 4 && _digit(nr,
pid) == 0;
447 if (_extraBits(
pid) > 0)
return false;
448 const int ndigit = _digit(n,
pid);
449 return ndigit == 5 || ndigit == 6;
455 return abs(
pid) == 42;
463 const int ndigit = _digit(n,
pid);
464 const int nrdigit = _digit(nr,
pid);
465 if ((ndigit == 0 && nrdigit == 0) || (ndigit == 5 && nrdigit == 9))
476 return (_digit(n,
pid) == 4 && _digit(nr,
pid) == 9);
489 return abs(
pid) == BPRIME || abs(
pid) == TPRIME || abs(
pid) == LPRIME || abs(
pid) == NUPRIME;
494 if (_digit(n,
pid) != 4)
return false;
495 if (_digit(nr,
pid) != 1)
return false;
496 if (_digit(nl,
pid) != 1 && _digit(nl,
pid) != 2)
return false;
501 if (_digit(nj,
pid) != 0)
return false;
512 if (_extraBits(
pid) != 1)
return false;
513 if (_digit(n,
pid) != 0)
return false;
514 if (_digit(nr,
pid) != 0)
return false;
516 if ((abs(
pid)/10) % 10000 == 0)
return false;
518 if (_digit(nj,
pid) != 0)
return false;
534 if (_digit(n,
pid) != 5 && _digit(n,
pid) != 6)
return false;
535 if (_digit(nl,
pid) != 0)
return false;
536 return _fundamentalID(
pid)==40;
541 if (_digit( n,
pid) != 1)
return false;
542 if (_digit(nr,
pid) != 0)
return false;
543 if (_digit(nl,
pid) != 0)
return false;
544 if (_digit(nj,
pid) != 0)
return false;
558 inline bool _isValid(
int pid) {
560 if (_digit(n,
pid) == 9 && _digit(nr,
pid) == 9)
return true;
566 if (_digit(n,
pid) == 9 && _digit(nr,
pid) == 0)
return false;
567 if (isDiquark(
pid))
return true;
574 return (_fundamentalID(
pid) > 0);
576 inline bool isValid(
int pid) {
577 return _isValid(
pid);
586 inline bool _hasQ(
int pid,
int q) {
587 if (abs(
pid) == q)
return true;
588 if (!_isValid(
pid))
return false;
594 for (
int i = 6; i > 1; --i) {
597 }
else if ( i == iz-1 ) {
605 if (_digit(nq3,
pid) == q || _digit(nq2,
pid) == q || _digit(nq1,
pid) == q )
return true;
607 if (_digit(nl,
pid) == q || _digit(nr,
pid) == q)
return true;
784 const int fund = _fundamentalID(
pid);
787 if (fund > 0 && fund < 7)
return 2;
788 if (fund == 9)
return 3;
789 if (fund > 10 && fund < 17)
return 2;
790 if (fund > 20 && fund < 25)
return 3;
792 }
else if (_extraBits(
pid) > 0) {
795 return abs(
pid) % 10;
802 if (_digit(n,
pid) == 9 && _digit(nr,
pid) == 0)
return 0;
804 const int fund = _fundamentalID(
pid);
805 if (fund == 51 || fund == 54)
return 1;
806 if (fund == 52)
return 2;
807 if (fund == 53 || fund == 55)
return 3;
809 const int inl = _digit(nl,
pid);
810 const int js = _digit(nj,
pid);
811 if (inl == 0 && js >= 3)
return 1;
812 else if (inl == 0 && js == 1)
return 0;
813 else if (inl == 1 && js >= 3)
return 0;
814 else if (inl == 2 && js >= 3)
return 1;
815 else if (inl == 1 && js == 1)
return 1;
816 else if (inl == 3 && js >= 3)
return 1;
825 if (_digit(n,
pid) == 9 && _digit(nr,
pid) == 0)
return 0;
827 const int inl = _digit(nl,
pid);
828 const int js = _digit(nj,
pid);
829 if (inl == 0 && js == 3)
return 0;
830 else if (inl == 0 && js == 5)
return 1;
831 else if (inl == 0 && js == 7)
return 2;
832 else if (inl == 0 && js == 9)
return 3;
833 else if (inl == 0 && js == 1)
return 0;
834 else if (inl == 1 && js == 3)
return 1;
835 else if (inl == 1 && js == 5)
return 2;
836 else if (inl == 1 && js == 7)
return 3;
837 else if (inl == 1 && js == 9)
return 4;
838 else if (inl == 2 && js == 3)
return 1;
839 else if (inl == 2 && js == 5)
return 2;
840 else if (inl == 2 && js == 7)
return 3;
841 else if (inl == 2 && js == 9)
return 4;
842 else if (inl == 1 && js == 1)
return 1;
843 else if (inl == 3 && js == 3)
return 2;
844 else if (inl == 3 && js == 5)
return 3;
845 else if (inl == 3 && js == 7)
return 4;
846 else if (inl == 3 && js == 9)
return 5;
859 static int ch100[100] = { -1, 2, -1, 2, -1, 2, -1, 2, 0, 0,
860 -3, 0, -3, 0, -3, 0, -3, 0, 0, 0,
861 0, 0, 0, 3, 0, 0, 0, 0, 0, 0,
862 0, 0, 0, 3, 0, 0, 3, 0, 0, 0,
863 0, -1, 0, 0, 0, 0, 0, 0, 0, 0,
864 0, 6, 3, 6, 0, 0, 0, 0, 0, 0,
865 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
866 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
867 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
868 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 };
870 const int ida = abs(
pid);
871 if (
pid == 21 ||
pid == 22)
return 0;
872 if (ida == 211)
return std::signbit(
pid) ? -3 : 3;
873 if (
pid == 111)
return 0;
879 const unsigned short q1 = _digit(nq1,
pid);
880 const unsigned short q2 = _digit(nq2,
pid);
881 const unsigned short q3 = _digit(nq3,
pid);
882 const unsigned short ql = _digit(nl,
pid);
883 const int sid = _fundamentalID(
pid);
885 if (ida == 0 || _extraBits(
pid) > 0) {
887 }
else if (sid > 0 && sid <= 100) {
888 if (ida == 1000017 || ida == 1000018 || ida == 1000034) ch3 = 0;
889 else if (ida > 1000050 && ida <= 1000060) ch3 = 0;
890 else if (ida > 50 && ida <= 60) ch3 = 0;
891 else if (ida == 5100061 || ida == 5100062) ch3 = 6;
892 else ch3 = ch100[sid-1];
893 }
else if (_digit(nj,
pid) == 0) {
896 ch3 = ((q2 == 3 || q2 == 5) ? -1 : 1) * (ch100[q2-1] - ch100[q3-1]);
898 ch3 = ch100[q3-1] + ch100[q2-1] + ch100[q1-1];
900 ch3 = 3*( (ida/10) % 10000);
904 ch3 = 3*( (ida/10) % 1000) * (ql == 2 ? -1 : 1);
907 if (q1 == 0 || q1 == 9) {
908 if (q2 == 3 || q2 == 5) {
909 ch3 = ch100[q3-1] - ch100[q2-1];
911 ch3 = ch100[q2-1] - ch100[q3-1];
913 }
else if (ql == 0) {
914 ch3 = ch100[q3-1] + ch100[q2-1] + ch100[q1-1];
915 }
else if (_digit(nr,
pid) == 0) {
916 ch3 = ch100[q3-1] + ch100[q2-1] + ch100[q1-1] + ch100[ql-1];
918 }
else if (isDiquark(
pid)) {
919 ch3 = ch100[q2-1] + ch100[q1-1];
923 if (
pid < 0) ch3 *= -1;
951 if (
pid >= -8 &&
pid <= 8)
return true;
1019 inline bool isSameSign(PdgId a, PdgId b) {
return a*b >= 0; }
1020 inline bool isOppSign(PdgId a, PdgId b) {
return !isSameSign(a, b); }
1021 inline bool isSameFlav(PdgId a, PdgId b) {
return abs(a) == abs(b); }
1022 inline bool isOppFlav(PdgId a, PdgId b) {
return !isSameFlav(a, b); }
1024 inline bool isOSSF(PdgId a, PdgId b) {
return isOppSign(a, b) && isSameFlav(a, b); }
1025 inline bool isSSSF(PdgId a, PdgId b) {
return isSameSign(a, b) && isSameFlav(a, b); }
1026 inline bool isOSOF(PdgId a, PdgId b) {
return isOppSign(a, b) && isOppFlav(a, b); }
1027 inline bool isSSOF(PdgId a, PdgId b) {
return isSameSign(a, b) && isOppFlav(a, b); }
int sSpin(int pid)
sSpin returns 2S+1, where S is the spin
Definition ParticleIdUtils.hh:799
int jSpin(int pid)
jSpin returns 2J+1, where J is the total spin
Definition ParticleIdUtils.hh:783
int lSpin(int pid)
lSpin returns 2L+1, where L is the orbital angular momentum
Definition ParticleIdUtils.hh:822
bool isCharged(int pid)
Determine if the particle is electrically charged.
Definition ParticleIdUtils.hh:949
bool isNeutral(int pid)
Determine if the particle is electrically neutral.
Definition ParticleIdUtils.hh:956
int abscharge3(int pid)
Return the absolute value of 3 times the EM charge.
Definition ParticleIdUtils.hh:928
double charge(int pid)
Return the EM charge (as floating point)
Definition ParticleIdUtils.hh:933
double abscharge(int pid)
Return the EM charge (as floating point)
Definition ParticleIdUtils.hh:938
int charge3(int pid)
Three times the EM charge (as integer)
Definition ParticleIdUtils.hh:858
bool isBottom(int pid)
Determine if the PID is that of a b/bbar.
Definition ParticleIdUtils.hh:253
bool isParton(int pid)
Determine if the PID is that of a parton (quark or gluon)
Definition ParticleIdUtils.hh:164
bool isW(int pid)
Determine if the PID is that of a W+-.
Definition ParticleIdUtils.hh:213
bool isWminus(int pid)
Determine if the PID is that of a W-.
Definition ParticleIdUtils.hh:208
bool isZ(int pid)
Determine if the PID is that of a Z0.
Definition ParticleIdUtils.hh:218
bool isMuon(int pid)
Determine if the PID is that of an muon or antimuon.
Definition ParticleIdUtils.hh:180
bool isHiggs(int pid)
Determine if the PID is that of an SM/lightest SUSY Higgs.
Definition ParticleIdUtils.hh:223
bool isCharm(int pid)
Determine if the PID is that of a c/cbar.
Definition ParticleIdUtils.hh:248
bool isGraviton(int pid)
Is this a graviton?
Definition ParticleIdUtils.hh:231
bool isTau(int pid)
Determine if the PID is that of an tau or antitau.
Definition ParticleIdUtils.hh:185
bool isGluon(int pid)
Determine if the PID is that of a gluon.
Definition ParticleIdUtils.hh:159
bool isWplus(int pid)
Determine if the PID is that of a W+.
Definition ParticleIdUtils.hh:203
bool isPhoton(int pid)
Determine if the PID is that of a photon.
Definition ParticleIdUtils.hh:170
bool isNeutrino(int pid)
Determine if the PID is that of a neutrino.
Definition ParticleIdUtils.hh:196
bool isElectron(int pid)
Determine if the PID is that of an electron or positron.
Definition ParticleIdUtils.hh:175
bool isChargedLepton(int pid)
Determine if the PID is that of a charged lepton.
Definition ParticleIdUtils.hh:190
bool isQuark(int pid)
Determine if the PID is that of a quark.
Definition ParticleIdUtils.hh:154
bool isTop(int pid)
Determine if the PID is that of a t/tbar.
Definition ParticleIdUtils.hh:258
bool isStrange(int pid)
Determine if the PID is that of an s/sbar.
Definition ParticleIdUtils.hh:243
bool isRHadron(int pid)
Is this an R-hadron?
Definition ParticleIdUtils.hh:414
bool isQBall(int pid)
Definition ParticleIdUtils.hh:511
bool isSMFundamental(int pid)
Is this an SM fundamental particle?
Definition ParticleIdUtils.hh:388
bool isMagMonopole(int pid)
Is this from a magnetic monopole or dyon?
Definition ParticleIdUtils.hh:493
bool isLepton(int pid)
Definition ParticleIdUtils.hh:375
bool isSUSY(int pid)
Is this a fundamental SUSY particle?
Definition ParticleIdUtils.hh:397
bool isKK(int pid)
Is this a Kaluza-Klein excitation?
Definition ParticleIdUtils.hh:446
bool isRhadron(int pid)
Alias.
Definition ParticleIdUtils.hh:429
bool isExotic(int pid)
Is this an exotic particle?
Definition ParticleIdUtils.hh:480
bool isTechnicolor(int pid)
Is this a technicolor particle?
Definition ParticleIdUtils.hh:434
bool isLeptoQuark(int pid)
Is this a lepto-quark?
Definition ParticleIdUtils.hh:453
bool isAECO(int pid)
Is this an anomalously electrically charged particle (AECO)?
Definition ParticleIdUtils.hh:540
bool isExcitedLepton(int pid)
Is this an excited lepton?
Definition ParticleIdUtils.hh:527
bool isBSM(int pid)
Is this a BSM particle (including graviton)?
Definition ParticleIdUtils.hh:549
bool isFourthGen(int pid)
Is this a 4th generation particle?
Definition ParticleIdUtils.hh:488
bool isBSMBoson(int pid)
Is this a valid BSM boson (SUSY Higgs, W', Z')?
Definition ParticleIdUtils.hh:383
bool isExcited(int pid)
Is this an excited (composite) quark or lepton?
Definition ParticleIdUtils.hh:440
bool isDM(int pid)
Convenience alias.
Definition ParticleIdUtils.hh:470
bool isBlackHole(int pid)
Is this a black hole?
Definition ParticleIdUtils.hh:533
bool isHiddenValley(int pid)
Is this a Hidden Valley particle?
Definition ParticleIdUtils.hh:475
bool isQball(int pid)
Alias.
Definition ParticleIdUtils.hh:522
bool isDyon(int pid)
Just treat a dyon as an alias for magmonopole for now.
Definition ParticleIdUtils.hh:505
bool isDarkMatter(int pid)
Definition ParticleIdUtils.hh:462
bool isEMInteracting(int pid)
Determine if the PID is that of a electromagnetically interacting particle.
Definition ParticleIdUtils.hh:972
bool isWeakInteracting(int pid)
Definition ParticleIdUtils.hh:980
bool isStrongInteracting(int pid)
Determine if the PID is that of a strongly interacting particle.
Definition ParticleIdUtils.hh:967
int nuclA(int pid)
Definition ParticleIdUtils.hh:127
int nuclNlambda(int pid)
Definition ParticleIdUtils.hh:138
bool isNucleus(int pid)
Is this a nucleus PID?
Definition ParticleIdUtils.hh:102
int nuclZ(int pid)
Definition ParticleIdUtils.hh:116
bool isResonance(int pid)
Definition ParticleIdUtils.hh:999
bool isGenSpecific(int pid)
Determine if the PID is in the generator-specific range.
Definition ParticleIdUtils.hh:991
bool isTransportable(int pid)
Definition ParticleIdUtils.hh:1007
bool isLightHadron(int pid)
Determine if the PID is that of a light flavour (not b or c) hadron.
Definition ParticleIdUtils.hh:697
bool isCharmHadron(int pid)
Definition ParticleIdUtils.hh:742
bool isStrangeBaryon(int pid)
Definition ParticleIdUtils.hh:761
bool isHeavyFlavor(int pid)
Determine if the particle is a heavy flavour hadron or parton.
Definition ParticleIdUtils.hh:644
bool isHeavyHadron(int pid)
Determine if the PID is that of a heavy flavour (b or c) hadron.
Definition ParticleIdUtils.hh:682
bool isCharmMeson(int pid)
Determine if the PID is that of a c-meson.
Definition ParticleIdUtils.hh:722
bool isStrangeHadron(int pid)
Definition ParticleIdUtils.hh:770
bool isCharmBaryon(int pid)
Determine if the PID is that of a c-baryon.
Definition ParticleIdUtils.hh:732
bool isHeavyBaryon(int pid)
Determine if the PID is that of a heavy flavour (b or c) baryon.
Definition ParticleIdUtils.hh:677
bool isHeavyMeson(int pid)
Determine if the PID is that of a heavy flavour (b or c) meson.
Definition ParticleIdUtils.hh:672
bool isLightBaryon(int pid)
Determine if the PID is that of a light flavour (not b or c) baryon.
Definition ParticleIdUtils.hh:692
bool isBottomBaryon(int pid)
Determine if the PID is that of a b-baryon.
Definition ParticleIdUtils.hh:708
bool isLightParton(int pid)
Determine if the PID is that of a light parton (u,d,s)
Definition ParticleIdUtils.hh:666
bool isStrangeMeson(int pid)
Definition ParticleIdUtils.hh:752
bool isHeavyParton(int pid)
Determine if the PID is that of a heavy parton (c,b,t)
Definition ParticleIdUtils.hh:661
bool isBottomHadron(int pid)
Determine if the PID is that of a b-hadron.
Definition ParticleIdUtils.hh:713
bool isHeavyFlavour(int pid)
British-spelling alias for isHeavyFlavor.
Definition ParticleIdUtils.hh:649
bool isBottomMeson(int pid)
Determine if the PID is that of a b-meson.
Definition ParticleIdUtils.hh:703
bool isLightMeson(int pid)
Determine if the PID is that of a light flavour (not b or c) meson.
Definition ParticleIdUtils.hh:687
bool hasUp(int pid)
Does this particle contain an up quark?
Definition ParticleIdUtils.hh:617
bool hasTop(int pid)
Does this particle contain a top quark?
Definition ParticleIdUtils.hh:633
bool hasBottom(int pid)
Does this particle contain a bottom quark?
Definition ParticleIdUtils.hh:629
bool hasStrange(int pid)
Does this particle contain a strange quark?
Definition ParticleIdUtils.hh:621
bool hasDown(int pid)
Does this particle contain a down quark?
Definition ParticleIdUtils.hh:613
bool hasCharm(int pid)
Does this particle contain a charm quark?
Definition ParticleIdUtils.hh:625
bool isBaryon(int pid)
Check to see if this is a valid baryon.
Definition ParticleIdUtils.hh:297
bool isPentaquark(int pid)
Check to see if this is a valid pentaquark.
Definition ParticleIdUtils.hh:335
bool isMeson(int pid)
Check to see if this is a valid meson.
Definition ParticleIdUtils.hh:274
bool isHadron(int pid)
Definition ParticleIdUtils.hh:357
bool isReggeon(int pid)
Is this a pomeron, odderon, or generic reggeon?
Definition ParticleIdUtils.hh:269
Location
Definition ParticleIdUtils.hh:54
int pid(const Particle &p)
Unbound function access to PID code.
Definition ParticleUtils.hh:23
Definition MC_CENT_PPB_Projections.hh:10
std::enable_if_t< std::is_arithmetic_v< N1 > &&std::is_arithmetic_v< N2 > &&std::is_arithmetic_v< N3 >, bool > in_range(N1 val, N2 low, N3 high)
Boolean function to determine if value is within the given range.
Definition MathUtils.hh:185
std::enable_if_t< std::is_arithmetic_v< N1 > &&std::is_arithmetic_v< N2 > &&std::is_arithmetic_v< N3 >, bool > in_closed_range(N1 val, N2 low, N3 high)
Boolean function to determine if value is within the given range.
Definition MathUtils.hh:194