9#ifndef RIVET_PARTICLEIDUTILS_HH
10#define RIVET_PARTICLEIDUTILS_HH
15#include "Rivet/Math/MathUtils.hh"
16#include "Rivet/Tools/ParticleName.hh"
44 inline size_t _pow10(
unsigned int power) {
46 assert(power < 16 &&
"_pow10 only defined for powers < 16");
47 static const size_t POWS10[] = {1,
74 enum Location { nj = 1, nq3, nq2, nq1, nl, nr, n, n8, n9, n10 };
81 inline unsigned short _digit(
Location loc,
int pid) {
82 const int div = _pow10(loc - 1);
83 return (abs(
pid) / div) % 10;
87 inline int _extraBits(
int pid) {
88 return abs(
pid) / 10000000;
93 inline int _fundamentalID(
int pid) {
94 if (_extraBits(
pid) > 0)
return 0;
95 if (_digit(nq2,
pid) == 0 && _digit(nq1,
pid) == 0) {
96 return abs(
pid) % 10000;
98 else if (abs(
pid) <= 100) {
126 if (abs(
pid) == 2212)
return true;
128 if (_digit(n10,
pid) == 1 && _digit(n9,
pid) == 0) {
131 if ((abs(
pid) / 10) % 1000 >= (abs(
pid) / 10000) % 1000)
return true;
140 if (abs(
pid) == 2212) {
155 if (abs(
pid) == 2212) {
170 if (abs(
pid) == 2212) {
205 return pid == PHOTON;
210 return abs(
pid) == ELECTRON;
215 return abs(
pid) == MUON;
220 return abs(
pid) == TAU;
225 const long apid = abs(
pid);
226 return apid == 11 || apid == 13 || apid == 15 || apid == 17;
236 const long apid = abs(
pid);
237 return apid == 12 || apid == 14 || apid == 16 || apid == 18;
243 return pid == WPLUSBOSON;
248 return pid == WMINUSBOSON;
253 return abs(
pid) == WPLUSBOSON;
258 return pid == Z0BOSON;
263 return pid == HIGGSBOSON
272 return pid == GRAVITON;
284 return abs(
pid) == SQUARK;
289 return abs(
pid) == CQUARK;
294 return abs(
pid) == BQUARK;
299 return abs(
pid) == TQUARK;
310 return pid == 110 ||
pid == 990 ||
pid == 9990;
315 if (_extraBits(
pid) > 0)
return false;
317 const int aid = abs(
pid);
318 if (aid == 130 || aid == 310 || aid == 210)
return true;
319 if (aid <= 100)
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(nq2,
pid) < _digit(nq3,
pid))
return false;
326 if (aid == 150 || aid == 350 || aid == 510 || aid == 530)
return true;
330 if (_digit(nj,
pid) > 0 && _digit(nq3,
pid) > 0 && _digit(nq2,
pid) > 0 && _digit(nq1,
pid) == 0) {
331 return !(_digit(nq3,
pid) == _digit(nq2,
pid) &&
pid < 0);
338 if (_extraBits(
pid) > 0)
return false;
340 if (abs(
pid) <= 100)
return false;
341 if (_fundamentalID(
pid) <= 100 && _fundamentalID(
pid) > 0)
return false;
342 if (abs(
pid) == 2110 || abs(
pid) == 2210)
344 if (_digit(nj,
pid) == 0)
return false;
345 if (_digit(nq1,
pid) == 0 || _digit(nq2,
pid) == 0 || _digit(nq3,
pid) == 0)
return false;
356 inline bool isDiquark(
int pid) {
357 if (_extraBits(
pid) > 0)
return false;
359 if (abs(
pid) <= 100)
return false;
360 if (_fundamentalID(
pid) <= 100 && _fundamentalID(
pid) > 0)
return false;
361 if (_digit(nq1,
pid) == 0)
return false;
362 if (_digit(nq2,
pid) == 0)
return false;
363 if (_digit(nq3,
pid) != 0)
return false;
364 if (_digit(nq1,
pid) < _digit(nq2,
pid))
return false;
365 if (_digit(nj,
pid) > 0 && _digit(nq3,
pid) == 0 && _digit(nq2,
pid) > 0 && _digit(nq1,
pid) > 0)
377 return isDiquark(
pid);
384 if (_extraBits(
pid) > 0)
return false;
386 if (_digit(n,
pid) != 9)
return false;
387 if (_digit(nr,
pid) == 9 || _digit(nr,
pid) == 0)
return false;
388 if (_digit(nj,
pid) == 9 || _digit(nl,
pid) == 0)
return false;
389 if (_digit(nq1,
pid) == 0)
return false;
390 if (_digit(nq2,
pid) == 0)
return false;
391 if (_digit(nq3,
pid) == 0)
return false;
392 if (_digit(nj,
pid) == 0)
return false;
394 if (_digit(nq2,
pid) > _digit(nq1,
pid))
return false;
395 if (_digit(nq1,
pid) > _digit(nl,
pid))
return false;
396 if (_digit(nl,
pid) > _digit(nr,
pid))
return false;
407 if (_digit(nq1,
pid) != 0)
return false;
408 const int fq = _digit(nq2,
pid);
409 return (fq > 3 && _digit(nj,
pid) > 0 && _digit(nq3,
pid) == fq);
416 if (_extraBits(
pid) > 0)
return false;
434 if (_extraBits(
pid) > 0)
return false;
436 if (_fundamentalID(
pid) >= 11 && _fundamentalID(
pid) <= 18)
return true;
456 if (_extraBits(
pid) > 0)
return false;
457 if (_digit(n,
pid) != 1 && _digit(n,
pid) != 2)
return false;
458 if (_digit(nr,
pid) != 0)
return false;
460 const int fundId = _fundamentalID(
pid);
461 if (fundId == 0)
return false;
462 if (_digit(n,
pid) == 1) {
465 else if (_digit(n,
pid) == 2) {
475 if (_extraBits(
pid) > 0)
return false;
476 if (_digit(n,
pid) != 1)
return false;
477 if (_digit(nr,
pid) != 0)
return false;
481 if (_digit(nq2,
pid) == 0)
return false;
482 if (_digit(nq3,
pid) == 0)
return false;
483 if (_digit(nj,
pid) == 0)
return false;
493 if (_extraBits(
pid) > 0)
return false;
494 return _digit(n,
pid) == 3;
499 if (_extraBits(
pid) > 0)
return false;
500 return _digit(n,
pid) == 4 && _digit(nr,
pid) == 0;
505 if (_extraBits(
pid) > 0)
return false;
506 const int ndigit = _digit(n,
pid);
507 return ndigit == 5 || ndigit == 6;
513 return abs(
pid) == 42;
521 const int ndigit = _digit(n,
pid);
522 const int nrdigit = _digit(nr,
pid);
523 if ((ndigit == 0 && nrdigit == 0) || (ndigit == 5 && nrdigit == 9))
534 return (_digit(n,
pid) == 4 && _digit(nr,
pid) == 9);
547 return abs(
pid) == BPRIME || abs(
pid) == TPRIME || abs(
pid) == LPRIME || abs(
pid) == NUPRIME;
552 if (_digit(n,
pid) != 4)
return false;
553 if (_digit(nr,
pid) != 1)
return false;
554 if (_digit(nl,
pid) != 1 && _digit(nl,
pid) != 2)
return false;
559 if (_digit(nj,
pid) != 0)
return false;
570 if (_extraBits(
pid) != 1)
return false;
571 if (_digit(n,
pid) != 0)
return false;
572 if (_digit(nr,
pid) != 0)
return false;
574 if ((abs(
pid) / 10) % 10000 == 0)
return false;
576 if (_digit(nj,
pid) != 0)
return false;
592 if (_digit(n,
pid) != 5 && _digit(n,
pid) != 6)
return false;
593 if (_digit(nl,
pid) != 0)
return false;
594 return _fundamentalID(
pid) == 40;
599 if (_digit(n,
pid) != 1)
return false;
600 if (_digit(nr,
pid) != 0)
return false;
601 if (_digit(nl,
pid) != 0)
return false;
602 if (_digit(nj,
pid) != 0)
return false;
615 inline bool _isValid(
int pid) {
617 if (_digit(n,
pid) == 9 && _digit(nr,
pid) == 9)
return true;
623 if (_digit(n,
pid) == 9 && _digit(nr,
pid) == 0)
625 if (isDiquark(
pid))
return true;
632 return (_fundamentalID(
pid) > 0);
634 inline bool isValid(
int pid) {
635 return _isValid(
pid);
644 inline bool _hasQ(
int pid,
int q) {
645 if (abs(
pid) == q)
return true;
646 if (!_isValid(
pid))
return false;
652 for (
int i = 6; i > 1; --i) {
656 else if (i == iz - 1) {
665 if (_digit(nq3,
pid) == q || _digit(nq2,
pid) == q || _digit(nq1,
pid) == q)
return true;
667 if (_digit(nl,
pid) == q || _digit(nr,
pid) == q)
return true;
837 const int fund = _fundamentalID(
pid);
840 if (fund > 0 && fund < 7)
return 2;
841 if (fund == 9)
return 3;
842 if (fund > 10 && fund < 17)
return 2;
843 if (fund > 20 && fund < 25)
return 3;
846 else if (_extraBits(
pid) > 0) {
849 return abs(
pid) % 10;
856 if (_digit(n,
pid) == 9 && _digit(nr,
pid) == 0)
return 0;
858 const int fund = _fundamentalID(
pid);
859 if (fund == 51 || fund == 54)
return 1;
860 if (fund == 52)
return 2;
861 if (fund == 53 || fund == 55)
return 3;
863 const int inl = _digit(nl,
pid);
864 const int js = _digit(nj,
pid);
865 if (inl == 0 && js >= 3)
867 else if (inl == 0 && js == 1)
869 else if (inl == 1 && js >= 3)
871 else if (inl == 2 && js >= 3)
873 else if (inl == 1 && js == 1)
875 else if (inl == 3 && js >= 3)
885 if (_digit(n,
pid) == 9 && _digit(nr,
pid) == 0)
return 0;
887 const int inl = _digit(nl,
pid);
888 const int js = _digit(nj,
pid);
889 if (inl == 0 && js == 3)
891 else if (inl == 0 && js == 5)
893 else if (inl == 0 && js == 7)
895 else if (inl == 0 && js == 9)
897 else if (inl == 0 && js == 1)
899 else if (inl == 1 && js == 3)
901 else if (inl == 1 && js == 5)
903 else if (inl == 1 && js == 7)
905 else if (inl == 1 && js == 9)
907 else if (inl == 2 && js == 3)
909 else if (inl == 2 && js == 5)
911 else if (inl == 2 && js == 7)
913 else if (inl == 2 && js == 9)
915 else if (inl == 1 && js == 1)
917 else if (inl == 3 && js == 3)
919 else if (inl == 3 && js == 5)
921 else if (inl == 3 && js == 7)
923 else if (inl == 3 && js == 9)
937 static int ch100[100] = {-1, 2, -1, 2, -1, 2, -1, 2, 0, 0, -3, 0, -3, 0, -3, 0, -3, 0, 0, 0,
938 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 3, 0, 0, 0,
939 0, -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 3, 6, 0, 0, 0, 0, 0, 0,
940 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
941 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
942 const int ida = abs(
pid);
944 if (
pid == 21 ||
pid == 22)
return 0;
945 if (ida == 211)
return std::signbit(
pid) ? -3 : 3;
946 if (
pid == 111)
return 0;
952 const unsigned short q1 = _digit(nq1,
pid);
953 const unsigned short q2 = _digit(nq2,
pid);
954 const unsigned short q3 = _digit(nq3,
pid);
955 const unsigned short ql = _digit(nl,
pid);
956 const int sid = _fundamentalID(
pid);
958 if (ida == 0 || _extraBits(
pid) > 0) {
961 else if (sid > 0 && sid <= 100) {
962 if (ida == 1000017 || ida == 1000018 || ida == 1000034)
964 else if (ida > 1000050 && ida <= 1000060)
966 else if (ida > 50 && ida <= 60)
968 else if (ida == 5100061 || ida == 5100062)
971 ch3 = ch100[sid - 1];
973 else if (_digit(nj,
pid) == 0) {
977 ch3 = ((q2 == 3 || q2 == 5) ? -1 : 1) * (ch100[q2 - 1] - ch100[q3 - 1]);
980 ch3 = ch100[q3 - 1] + ch100[q2 - 1] + ch100[q1 - 1];
983 ch3 = 3 * ((ida / 10) % 10000);
989 ch3 = 3 * ((ida / 10) % 1000) * (ql == 2 ? -1 : 1);
993 if (q1 == 0 || q1 == 9) {
994 if (q2 == 3 || q2 == 5) {
995 ch3 = ch100[q3 - 1] - ch100[q2 - 1];
998 ch3 = ch100[q2 - 1] - ch100[q3 - 1];
1002 ch3 = ch100[q3 - 1] + ch100[q2 - 1] + ch100[q1 - 1];
1004 else if (_digit(nr,
pid) == 0) {
1005 ch3 = ch100[q3 - 1] + ch100[q2 - 1] + ch100[q1 - 1] + ch100[ql - 1];
1009 ch3 = ch100[q2 - 1] + ch100[q1 - 1];
1014 if (
pid < 0) ch3 *= -1;
1113 inline bool isSameSign(PdgId a, PdgId b) {
1116 inline bool isOppSign(PdgId a, PdgId b) {
1117 return !isSameSign(a, b);
1119 inline bool isSameFlav(PdgId a, PdgId b) {
1120 return abs(a) == abs(b);
1122 inline bool isOppFlav(PdgId a, PdgId b) {
1123 return !isSameFlav(a, b);
1126 inline bool isOSSF(PdgId a, PdgId b) {
1127 return isOppSign(a, b) && isSameFlav(a, b);
1129 inline bool isSSSF(PdgId a, PdgId b) {
1130 return isSameSign(a, b) && isSameFlav(a, b);
1132 inline bool isOSOF(PdgId a, PdgId b) {
1133 return isOppSign(a, b) && isOppFlav(a, b);
1135 inline bool isSSOF(PdgId a, PdgId b) {
1136 return isSameSign(a, b) && isOppFlav(a, b);
int sSpin(int pid)
sSpin returns 2S+1, where S is the spin
Definition ParticleIdUtils.hh:853
int jSpin(int pid)
jSpin returns 2J+1, where J is the total spin
Definition ParticleIdUtils.hh:836
int lSpin(int pid)
lSpin returns 2L+1, where L is the orbital angular momentum
Definition ParticleIdUtils.hh:882
bool isCharged(int pid)
Determine if the particle is electrically charged.
Definition ParticleIdUtils.hh:1046
bool isNeutral(int pid)
Determine if the particle is electrically neutral.
Definition ParticleIdUtils.hh:1051
int threeCharge(int pid)
Definition ParticleIdUtils.hh:1020
int abscharge3(int pid)
Return the absolute value of 3 times the EM charge.
Definition ParticleIdUtils.hh:1025
double charge(int pid)
Return the EM charge (as floating point).
Definition ParticleIdUtils.hh:1030
double abscharge(int pid)
Return the EM charge (as floating point).
Definition ParticleIdUtils.hh:1035
int charge3(int pid)
Three times the EM charge (as integer).
Definition ParticleIdUtils.hh:936
bool isBottom(int pid)
Determine if the PID is that of a b/bbar.
Definition ParticleIdUtils.hh:293
bool isParton(int pid)
Determine if the PID is that of a parton (quark or gluon).
Definition ParticleIdUtils.hh:198
bool isW(int pid)
Determine if the PID is that of a W+-.
Definition ParticleIdUtils.hh:252
bool isWminus(int pid)
Determine if the PID is that of a W-.
Definition ParticleIdUtils.hh:247
bool isZ(int pid)
Determine if the PID is that of a Z0.
Definition ParticleIdUtils.hh:257
bool isMuon(int pid)
Determine if the PID is that of an muon or antimuon.
Definition ParticleIdUtils.hh:214
bool isHiggs(int pid)
Determine if the PID is that of an SM/lightest SUSY Higgs.
Definition ParticleIdUtils.hh:262
bool isCharm(int pid)
Determine if the PID is that of a c/cbar.
Definition ParticleIdUtils.hh:288
bool isGraviton(int pid)
Is this a graviton?
Definition ParticleIdUtils.hh:271
bool isChLepton(int pid)
Definition ParticleIdUtils.hh:230
bool isTau(int pid)
Determine if the PID is that of an tau or antitau.
Definition ParticleIdUtils.hh:219
bool isGluon(int pid)
Determine if the PID is that of a gluon.
Definition ParticleIdUtils.hh:193
bool isWplus(int pid)
Determine if the PID is that of a W+.
Definition ParticleIdUtils.hh:242
bool isPhoton(int pid)
Determine if the PID is that of a photon.
Definition ParticleIdUtils.hh:204
bool isNeutrino(int pid)
Determine if the PID is that of a neutrino.
Definition ParticleIdUtils.hh:235
bool isElectron(int pid)
Determine if the PID is that of an electron or positron.
Definition ParticleIdUtils.hh:209
bool isChargedLepton(int pid)
Determine if the PID is that of a charged lepton.
Definition ParticleIdUtils.hh:224
bool isQuark(int pid)
Determine if the PID is that of a quark.
Definition ParticleIdUtils.hh:188
bool isTop(int pid)
Determine if the PID is that of a t/tbar.
Definition ParticleIdUtils.hh:298
bool isStrange(int pid)
Determine if the PID is that of an s/sbar.
Definition ParticleIdUtils.hh:283
bool isRHadron(int pid)
Is this an R-hadron?
Definition ParticleIdUtils.hh:472
bool isQBall(int pid)
Definition ParticleIdUtils.hh:569
bool isSMFundamental(int pid)
Is this an SM fundamental particle?
Definition ParticleIdUtils.hh:446
bool isMagMonopole(int pid)
Is this from a magnetic monopole or dyon?
Definition ParticleIdUtils.hh:551
bool isLepton(int pid)
Definition ParticleIdUtils.hh:433
bool isSUSY(int pid)
Is this a fundamental SUSY particle?
Definition ParticleIdUtils.hh:454
bool isKK(int pid)
Is this a Kaluza-Klein excitation?
Definition ParticleIdUtils.hh:504
bool isRhadron(int pid)
Alias.
Definition ParticleIdUtils.hh:487
bool isExotic(int pid)
Is this an exotic particle?
Definition ParticleIdUtils.hh:538
bool isTechnicolor(int pid)
Is this a technicolor particle?
Definition ParticleIdUtils.hh:492
bool isLeptoQuark(int pid)
Is this a lepto-quark?
Definition ParticleIdUtils.hh:511
bool isAECO(int pid)
Is this an anomalously electrically charged particle (AECO)?
Definition ParticleIdUtils.hh:598
bool isExcitedLepton(int pid)
Is this an excited lepton?
Definition ParticleIdUtils.hh:585
bool isBSM(int pid)
Is this a BSM particle (including graviton)?
Definition ParticleIdUtils.hh:607
bool isFourthGen(int pid)
Is this a 4th generation particle?
Definition ParticleIdUtils.hh:546
bool isBSMBoson(int pid)
Is this a valid BSM boson (SUSY Higgs, W', Z')?
Definition ParticleIdUtils.hh:441
bool isExcited(int pid)
Is this an excited (composite) quark or lepton?
Definition ParticleIdUtils.hh:498
bool isDM(int pid)
Convenience alias.
Definition ParticleIdUtils.hh:528
bool isBlackHole(int pid)
Is this a black hole?
Definition ParticleIdUtils.hh:591
bool isHiddenValley(int pid)
Is this a Hidden Valley particle?
Definition ParticleIdUtils.hh:533
bool isQball(int pid)
Alias.
Definition ParticleIdUtils.hh:580
bool isDyon(int pid)
Just treat a dyon as an alias for magmonopole for now.
Definition ParticleIdUtils.hh:563
bool isDarkMatter(int pid)
Definition ParticleIdUtils.hh:520
bool isEMInteracting(int pid)
Determine if the PID is that of a electromagnetically interacting particle.
Definition ParticleIdUtils.hh:1067
bool isWeakInteracting(int pid)
Definition ParticleIdUtils.hh:1075
bool isStrongInteracting(int pid)
Determine if the PID is that of a strongly interacting particle.
Definition ParticleIdUtils.hh:1062
int lambda(int pid)
Definition ParticleIdUtils.hh:177
int nuclA(int pid)
Definition ParticleIdUtils.hh:153
int Z(int pid)
Definition ParticleIdUtils.hh:147
int A(int pid)
Definition ParticleIdUtils.hh:162
int nuclNlambda(int pid)
Definition ParticleIdUtils.hh:168
bool isNucleus(int pid)
Is this a nucleus PID?
Definition ParticleIdUtils.hh:124
int nuclZ(int pid)
Definition ParticleIdUtils.hh:138
bool isResonance(int pid)
Definition ParticleIdUtils.hh:1093
bool isGenSpecific(int pid)
Determine if the PID is in the generator-specific range.
Definition ParticleIdUtils.hh:1086
bool isTransportable(int pid)
Definition ParticleIdUtils.hh:1101
bool isLightHadron(int pid)
Determine if the PID is that of a light flavour (not b or c) hadron.
Definition ParticleIdUtils.hh:757
bool isCharmHadron(int pid)
Definition ParticleIdUtils.hh:800
bool isStrangeBaryon(int pid)
Definition ParticleIdUtils.hh:817
bool isHeavyFlavor(int pid)
Determine if the particle is a heavy flavour hadron or parton.
Definition ParticleIdUtils.hh:704
bool isHeavyHadron(int pid)
Determine if the PID is that of a heavy flavour (b or c) hadron.
Definition ParticleIdUtils.hh:742
bool isCharmMeson(int pid)
Determine if the PID is that of a c-meson.
Definition ParticleIdUtils.hh:782
bool isStrangeHadron(int pid)
Definition ParticleIdUtils.hh:825
bool isCharmBaryon(int pid)
Determine if the PID is that of a c-baryon.
Definition ParticleIdUtils.hh:791
bool isHeavyBaryon(int pid)
Determine if the PID is that of a heavy flavour (b or c) baryon.
Definition ParticleIdUtils.hh:737
bool isHeavyMeson(int pid)
Determine if the PID is that of a heavy flavour (b or c) meson.
Definition ParticleIdUtils.hh:732
bool isLightBaryon(int pid)
Determine if the PID is that of a light flavour (not b or c) baryon.
Definition ParticleIdUtils.hh:752
bool isBottomBaryon(int pid)
Determine if the PID is that of a b-baryon.
Definition ParticleIdUtils.hh:768
bool isLightParton(int pid)
Determine if the PID is that of a light parton (u,d,s).
Definition ParticleIdUtils.hh:726
bool isStrangeMeson(int pid)
Definition ParticleIdUtils.hh:809
bool isHeavyParton(int pid)
Determine if the PID is that of a heavy parton (c,b,t).
Definition ParticleIdUtils.hh:721
bool isBottomHadron(int pid)
Determine if the PID is that of a b-hadron.
Definition ParticleIdUtils.hh:773
bool isHeavyFlavour(int pid)
British-spelling alias for isHeavyFlavor.
Definition ParticleIdUtils.hh:709
bool isBottomMeson(int pid)
Determine if the PID is that of a b-meson.
Definition ParticleIdUtils.hh:763
bool isLightMeson(int pid)
Determine if the PID is that of a light flavour (not b or c) meson.
Definition ParticleIdUtils.hh:747
bool hasUp(int pid)
Does this particle contain an up quark?
Definition ParticleIdUtils.hh:677
bool hasTop(int pid)
Does this particle contain a top quark?
Definition ParticleIdUtils.hh:693
bool hasBottom(int pid)
Does this particle contain a bottom quark?
Definition ParticleIdUtils.hh:689
bool hasStrange(int pid)
Does this particle contain a strange quark?
Definition ParticleIdUtils.hh:681
bool hasDown(int pid)
Does this particle contain a down quark?
Definition ParticleIdUtils.hh:673
bool hasCharm(int pid)
Does this particle contain a charm quark?
Definition ParticleIdUtils.hh:685
bool isBaryon(int pid)
Check to see if this is a valid baryon.
Definition ParticleIdUtils.hh:337
bool isDiQuark(int pid)
Definition ParticleIdUtils.hh:376
bool isPentaquark(int pid)
Check to see if this is a valid pentaquark.
Definition ParticleIdUtils.hh:381
bool isMeson(int pid)
Check to see if this is a valid meson.
Definition ParticleIdUtils.hh:314
bool isHadron(int pid)
Definition ParticleIdUtils.hh:415
bool isReggeon(int pid)
Is this a pomeron, odderon, or generic reggeon?
Definition ParticleIdUtils.hh:309
bool isQuarkonium(int pid)
Definition ParticleIdUtils.hh:405
Location
Definition ParticleIdUtils.hh:74
int abspid(int pid)
Definition ParticleIdUtils.hh:28
int pid(const Particle &p)
Unbound function access to PID code.
Definition ParticleUtils.hh:23
Definition LHCbCommon.hh:9
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:203
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:213