9#ifndef RIVET_PARTICLEIDUTILS_HH
10#define RIVET_PARTICLEIDUTILS_HH
15#include "Rivet/Tools/ParticleName.hh"
16#include "Rivet/Math/MathUtils.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, 10, 100, 1000, 10000, 100000, 1000000, 10000000, 100000000, 1000000000, 10000000000, 100000000000, 1000000000000, 10000000000000, 100000000000000, 1000000000000000, 10000000000000000};
58 enum Location { nj=1, nq3, nq2, nq1, nl, nr, n, n8, n9, n10 };
65 inline unsigned short _digit(
Location loc,
int pid) {
66 const int div = _pow10(loc-1);
67 return (abs(
pid)/div) % 10;
71 inline int _extraBits(
int pid) {
72 return abs(
pid)/10000000;
77 inline int _fundamentalID(
int pid) {
78 if (_extraBits(
pid) > 0)
return 0;
79 if (_digit(nq2,
pid) == 0 && _digit(nq1,
pid) == 0) {
80 return abs(
pid) % 10000;
81 }
else if (abs(
pid) <= 100) {
108 if (abs(
pid) == 2212)
return true;
110 if (_digit(n10,
pid) == 1 && _digit(n9,
pid) == 0) {
113 if ((abs(
pid)/10) % 1000 >= (abs(
pid)/10000) % 1000)
return true;
122 if (abs(
pid) == 2212) {
137 if (abs(
pid) == 2212) {
152 if (abs(
pid) == 2212) {
187 return pid == PHOTON;
192 return abs(
pid) == ELECTRON;
197 return abs(
pid) == MUON;
202 return abs(
pid) == TAU;
207 const long apid = abs(
pid);
208 return apid == 11 || apid == 13 || apid == 15 || apid == 17;
218 const long apid = abs(
pid);
219 return apid == 12 || apid == 14 || apid == 16 || apid == 18;
225 return pid == WPLUSBOSON;
230 return pid == WMINUSBOSON;
235 return abs(
pid) == WPLUSBOSON;
240 return pid == Z0BOSON;
245 return pid == HIGGSBOSON ||
pid == 26;
253 return pid == GRAVITON;
265 return abs(
pid) == SQUARK;
270 return abs(
pid) == CQUARK;
275 return abs(
pid) == BQUARK;
280 return abs(
pid) == TQUARK;
291 return pid == 110 ||
pid == 990 ||
pid == 9990;
296 if (_extraBits(
pid) > 0)
return false;
298 const int aid = abs(
pid);
299 if (aid == 130 || aid == 310 || aid == 210)
return true;
300 if (aid <= 100)
return false;
301 if (_digit(nq1,
pid) != 0)
return false;
302 if (_digit(nq2,
pid) == 0)
return false;
303 if (_digit(nq3,
pid) == 0)
return false;
304 if (_digit(nq2,
pid) < _digit(nq3,
pid))
return false;
307 if (aid == 150 || aid == 350 || aid == 510 || aid == 530)
return true;
311 if (_digit(nj,
pid) > 0 && _digit(nq3,
pid) > 0 && _digit(nq2,
pid) > 0 && _digit(nq1,
pid) == 0) {
312 return !(_digit(nq3,
pid) == _digit(nq2,
pid) &&
pid < 0);
319 if (_extraBits(
pid) > 0)
return false;
321 if (abs(
pid) <= 100)
return false;
322 if (_fundamentalID(
pid) <= 100 && _fundamentalID(
pid) > 0)
return false;
323 if (abs(
pid) == 2110 || abs(
pid) == 2210)
return true;
324 if (_digit(nj,
pid) == 0)
return false;
325 if (_digit(nq1,
pid) == 0 || _digit(nq2,
pid) == 0 || _digit(nq3,
pid) == 0)
return false;
336 inline bool isDiquark(
int pid) {
337 if (_extraBits(
pid) > 0)
return false;
339 if (abs(
pid) <= 100)
return false;
340 if (_fundamentalID(
pid) <= 100 && _fundamentalID(
pid) > 0)
return false;
341 if (_digit(nq1,
pid) == 0)
return false;
342 if (_digit(nq2,
pid) == 0)
return false;
343 if (_digit(nq3,
pid) != 0)
return false;
344 if (_digit(nq1,
pid) < _digit(nq2,
pid))
return false;
345 if (_digit(nj,
pid) > 0 && _digit(nq3,
pid) == 0 && _digit(nq2,
pid) > 0 && _digit(nq1,
pid) > 0)
return true;
356 return isDiquark(
pid);
363 if (_extraBits(
pid) > 0)
return false;
365 if (_digit(n,
pid) != 9)
return false;
366 if (_digit(nr,
pid) == 9 || _digit(nr,
pid) == 0)
return false;
367 if (_digit(nj,
pid) == 9 || _digit(nl,
pid) == 0)
return false;
368 if (_digit(nq1,
pid) == 0)
return false;
369 if (_digit(nq2,
pid) == 0)
return false;
370 if (_digit(nq3,
pid) == 0)
return false;
371 if (_digit(nj,
pid) == 0)
return false;
373 if (_digit(nq2,
pid) > _digit(nq1,
pid))
return false;
374 if (_digit(nq1,
pid) > _digit(nl,
pid))
return false;
375 if (_digit(nl,
pid) > _digit(nr,
pid))
return false;
383 if (_extraBits(
pid) > 0)
return false;
401 if (_extraBits(
pid) > 0)
return false;
403 if (_fundamentalID(
pid) >= 11 && _fundamentalID(
pid) <= 18)
return true;
424 if (_extraBits(
pid) > 0)
return false;
425 if (_digit(n,
pid) != 1 && _digit(n,
pid) != 2)
return false;
426 if (_digit(nr,
pid) != 0)
return false;
428 const int fundId = _fundamentalID(
pid);
429 if (fundId == 0)
return false;
430 if (_digit(n,
pid) == 1) {
432 }
else if (_digit(n,
pid) == 2) {
442 if (_extraBits(
pid) > 0)
return false;
443 if (_digit(n,
pid) != 1)
return false;
444 if (_digit(nr,
pid) != 0)
return false;
448 if (_digit(nq2,
pid) == 0)
return false;
449 if (_digit(nq3,
pid) == 0)
return false;
450 if (_digit(nj,
pid) == 0)
return false;
460 if (_extraBits(
pid) > 0)
return false;
461 return _digit(n,
pid) == 3;
466 if (_extraBits(
pid) > 0)
return false;
467 return _digit(n,
pid) == 4 && _digit(nr,
pid) == 0;
472 if (_extraBits(
pid) > 0)
return false;
473 const int ndigit = _digit(n,
pid);
474 return ndigit == 5 || ndigit == 6;
480 return abs(
pid) == 42;
488 const int ndigit = _digit(n,
pid);
489 const int nrdigit = _digit(nr,
pid);
490 if ((ndigit == 0 && nrdigit == 0) || (ndigit == 5 && nrdigit == 9))
501 return (_digit(n,
pid) == 4 && _digit(nr,
pid) == 9);
514 return abs(
pid) == BPRIME || abs(
pid) == TPRIME || abs(
pid) == LPRIME || abs(
pid) == NUPRIME;
519 if (_digit(n,
pid) != 4)
return false;
520 if (_digit(nr,
pid) != 1)
return false;
521 if (_digit(nl,
pid) != 1 && _digit(nl,
pid) != 2)
return false;
526 if (_digit(nj,
pid) != 0)
return false;
537 if (_extraBits(
pid) != 1)
return false;
538 if (_digit(n,
pid) != 0)
return false;
539 if (_digit(nr,
pid) != 0)
return false;
541 if ((abs(
pid)/10) % 10000 == 0)
return false;
543 if (_digit(nj,
pid) != 0)
return false;
559 if (_digit(n,
pid) != 5 && _digit(n,
pid) != 6)
return false;
560 if (_digit(nl,
pid) != 0)
return false;
561 return _fundamentalID(
pid)==40;
566 if (_digit( n,
pid) != 1)
return false;
567 if (_digit(nr,
pid) != 0)
return false;
568 if (_digit(nl,
pid) != 0)
return false;
569 if (_digit(nj,
pid) != 0)
return false;
583 inline bool _isValid(
int pid) {
585 if (_digit(n,
pid) == 9 && _digit(nr,
pid) == 9)
return true;
591 if (_digit(n,
pid) == 9 && _digit(nr,
pid) == 0)
return false;
592 if (isDiquark(
pid))
return true;
599 return (_fundamentalID(
pid) > 0);
601 inline bool isValid(
int pid) {
602 return _isValid(
pid);
611 inline bool _hasQ(
int pid,
int q) {
612 if (abs(
pid) == q)
return true;
613 if (!_isValid(
pid))
return false;
619 for (
int i = 6; i > 1; --i) {
622 }
else if ( i == iz-1 ) {
630 if (_digit(nq3,
pid) == q || _digit(nq2,
pid) == q || _digit(nq1,
pid) == q )
return true;
632 if (_digit(nl,
pid) == q || _digit(nr,
pid) == q)
return true;
809 const int fund = _fundamentalID(
pid);
812 if (fund > 0 && fund < 7)
return 2;
813 if (fund == 9)
return 3;
814 if (fund > 10 && fund < 17)
return 2;
815 if (fund > 20 && fund < 25)
return 3;
817 }
else if (_extraBits(
pid) > 0) {
820 return abs(
pid) % 10;
827 if (_digit(n,
pid) == 9 && _digit(nr,
pid) == 0)
return 0;
829 const int fund = _fundamentalID(
pid);
830 if (fund == 51 || fund == 54)
return 1;
831 if (fund == 52)
return 2;
832 if (fund == 53 || fund == 55)
return 3;
834 const int inl = _digit(nl,
pid);
835 const int js = _digit(nj,
pid);
836 if (inl == 0 && js >= 3)
return 1;
837 else if (inl == 0 && js == 1)
return 0;
838 else if (inl == 1 && js >= 3)
return 0;
839 else if (inl == 2 && js >= 3)
return 1;
840 else if (inl == 1 && js == 1)
return 1;
841 else if (inl == 3 && js >= 3)
return 1;
850 if (_digit(n,
pid) == 9 && _digit(nr,
pid) == 0)
return 0;
852 const int inl = _digit(nl,
pid);
853 const int js = _digit(nj,
pid);
854 if (inl == 0 && js == 3)
return 0;
855 else if (inl == 0 && js == 5)
return 1;
856 else if (inl == 0 && js == 7)
return 2;
857 else if (inl == 0 && js == 9)
return 3;
858 else if (inl == 0 && js == 1)
return 0;
859 else if (inl == 1 && js == 3)
return 1;
860 else if (inl == 1 && js == 5)
return 2;
861 else if (inl == 1 && js == 7)
return 3;
862 else if (inl == 1 && js == 9)
return 4;
863 else if (inl == 2 && js == 3)
return 1;
864 else if (inl == 2 && js == 5)
return 2;
865 else if (inl == 2 && js == 7)
return 3;
866 else if (inl == 2 && js == 9)
return 4;
867 else if (inl == 1 && js == 1)
return 1;
868 else if (inl == 3 && js == 3)
return 2;
869 else if (inl == 3 && js == 5)
return 3;
870 else if (inl == 3 && js == 7)
return 4;
871 else if (inl == 3 && js == 9)
return 5;
884 static int ch100[100] = { -1, 2, -1, 2, -1, 2, -1, 2, 0, 0,
885 -3, 0, -3, 0, -3, 0, -3, 0, 0, 0,
886 0, 0, 0, 3, 0, 0, 0, 0, 0, 0,
887 0, 0, 0, 3, 0, 0, 3, 0, 0, 0,
888 0, -1, 0, 0, 0, 0, 0, 0, 0, 0,
889 0, 6, 3, 6, 0, 0, 0, 0, 0, 0,
890 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
891 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
892 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
893 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
895 const int ida = abs(
pid);
897 if (
pid == 21 ||
pid == 22)
return 0;
898 if (ida == 211)
return std::signbit(
pid) ? -3 : 3;
899 if (
pid == 111)
return 0;
905 const unsigned short q1 = _digit(nq1,
pid);
906 const unsigned short q2 = _digit(nq2,
pid);
907 const unsigned short q3 = _digit(nq3,
pid);
908 const unsigned short ql = _digit(nl,
pid);
909 const int sid = _fundamentalID(
pid);
911 if (ida == 0 || _extraBits(
pid) > 0) {
913 }
else if (sid > 0 && sid <= 100) {
914 if (ida == 1000017 || ida == 1000018 || ida == 1000034) ch3 = 0;
915 else if (ida > 1000050 && ida <= 1000060) ch3 = 0;
916 else if (ida > 50 && ida <= 60) ch3 = 0;
917 else if (ida == 5100061 || ida == 5100062) ch3 = 6;
918 else ch3 = ch100[sid-1];
919 }
else if (_digit(nj,
pid) == 0) {
922 ch3 = ((q2 == 3 || q2 == 5) ? -1 : 1) * (ch100[q2-1] - ch100[q3-1]);
924 ch3 = ch100[q3-1] + ch100[q2-1] + ch100[q1-1];
926 ch3 = 3*( (ida/10) % 10000);
930 ch3 = 3*( (ida/10) % 1000) * (ql == 2 ? -1 : 1);
933 if (q1 == 0 || q1 == 9) {
934 if (q2 == 3 || q2 == 5) {
935 ch3 = ch100[q3-1] - ch100[q2-1];
937 ch3 = ch100[q2-1] - ch100[q3-1];
939 }
else if (ql == 0) {
940 ch3 = ch100[q3-1] + ch100[q2-1] + ch100[q1-1];
941 }
else if (_digit(nr,
pid) == 0) {
942 ch3 = ch100[q3-1] + ch100[q2-1] + ch100[q1-1] + ch100[ql-1];
945 ch3 = ch100[q2-1] + ch100[q1-1];
949 if (
pid < 0) ch3 *= -1;
1048 inline bool isSameSign(PdgId a, PdgId b) {
return a*b >= 0; }
1049 inline bool isOppSign(PdgId a, PdgId b) {
return !isSameSign(a, b); }
1050 inline bool isSameFlav(PdgId a, PdgId b) {
return abs(a) == abs(b); }
1051 inline bool isOppFlav(PdgId a, PdgId b) {
return !isSameFlav(a, b); }
1053 inline bool isOSSF(PdgId a, PdgId b) {
return isOppSign(a, b) && isSameFlav(a, b); }
1054 inline bool isSSSF(PdgId a, PdgId b) {
return isSameSign(a, b) && isSameFlav(a, b); }
1055 inline bool isOSOF(PdgId a, PdgId b) {
return isOppSign(a, b) && isOppFlav(a, b); }
1056 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:824
int jSpin(int pid)
jSpin returns 2J+1, where J is the total spin
Definition ParticleIdUtils.hh:808
int lSpin(int pid)
lSpin returns 2L+1, where L is the orbital angular momentum
Definition ParticleIdUtils.hh:847
bool isCharged(int pid)
Determine if the particle is electrically charged.
Definition ParticleIdUtils.hh:981
bool isNeutral(int pid)
Determine if the particle is electrically neutral.
Definition ParticleIdUtils.hh:986
int threeCharge(int pid)
Definition ParticleIdUtils.hh:955
int abscharge3(int pid)
Return the absolute value of 3 times the EM charge.
Definition ParticleIdUtils.hh:960
double charge(int pid)
Return the EM charge (as floating point)
Definition ParticleIdUtils.hh:965
double abscharge(int pid)
Return the EM charge (as floating point)
Definition ParticleIdUtils.hh:970
int charge3(int pid)
Three times the EM charge (as integer)
Definition ParticleIdUtils.hh:883
bool isBottom(int pid)
Determine if the PID is that of a b/bbar.
Definition ParticleIdUtils.hh:274
bool isParton(int pid)
Determine if the PID is that of a parton (quark or gluon)
Definition ParticleIdUtils.hh:180
bool isW(int pid)
Determine if the PID is that of a W+-.
Definition ParticleIdUtils.hh:234
bool isWminus(int pid)
Determine if the PID is that of a W-.
Definition ParticleIdUtils.hh:229
bool isZ(int pid)
Determine if the PID is that of a Z0.
Definition ParticleIdUtils.hh:239
bool isMuon(int pid)
Determine if the PID is that of an muon or antimuon.
Definition ParticleIdUtils.hh:196
bool isHiggs(int pid)
Determine if the PID is that of an SM/lightest SUSY Higgs.
Definition ParticleIdUtils.hh:244
bool isCharm(int pid)
Determine if the PID is that of a c/cbar.
Definition ParticleIdUtils.hh:269
bool isGraviton(int pid)
Is this a graviton?
Definition ParticleIdUtils.hh:252
bool isChLepton(int pid)
Definition ParticleIdUtils.hh:212
bool isTau(int pid)
Determine if the PID is that of an tau or antitau.
Definition ParticleIdUtils.hh:201
bool isGluon(int pid)
Determine if the PID is that of a gluon.
Definition ParticleIdUtils.hh:175
bool isWplus(int pid)
Determine if the PID is that of a W+.
Definition ParticleIdUtils.hh:224
bool isPhoton(int pid)
Determine if the PID is that of a photon.
Definition ParticleIdUtils.hh:186
bool isNeutrino(int pid)
Determine if the PID is that of a neutrino.
Definition ParticleIdUtils.hh:217
bool isElectron(int pid)
Determine if the PID is that of an electron or positron.
Definition ParticleIdUtils.hh:191
bool isChargedLepton(int pid)
Determine if the PID is that of a charged lepton.
Definition ParticleIdUtils.hh:206
bool isQuark(int pid)
Determine if the PID is that of a quark.
Definition ParticleIdUtils.hh:170
bool isTop(int pid)
Determine if the PID is that of a t/tbar.
Definition ParticleIdUtils.hh:279
bool isStrange(int pid)
Determine if the PID is that of an s/sbar.
Definition ParticleIdUtils.hh:264
bool isRHadron(int pid)
Is this an R-hadron?
Definition ParticleIdUtils.hh:439
bool isQBall(int pid)
Definition ParticleIdUtils.hh:536
bool isSMFundamental(int pid)
Is this an SM fundamental particle?
Definition ParticleIdUtils.hh:413
bool isMagMonopole(int pid)
Is this from a magnetic monopole or dyon?
Definition ParticleIdUtils.hh:518
bool isLepton(int pid)
Definition ParticleIdUtils.hh:400
bool isSUSY(int pid)
Is this a fundamental SUSY particle?
Definition ParticleIdUtils.hh:422
bool isKK(int pid)
Is this a Kaluza-Klein excitation?
Definition ParticleIdUtils.hh:471
bool isRhadron(int pid)
Alias.
Definition ParticleIdUtils.hh:454
bool isExotic(int pid)
Is this an exotic particle?
Definition ParticleIdUtils.hh:505
bool isTechnicolor(int pid)
Is this a technicolor particle?
Definition ParticleIdUtils.hh:459
bool isLeptoQuark(int pid)
Is this a lepto-quark?
Definition ParticleIdUtils.hh:478
bool isAECO(int pid)
Is this an anomalously electrically charged particle (AECO)?
Definition ParticleIdUtils.hh:565
bool isExcitedLepton(int pid)
Is this an excited lepton?
Definition ParticleIdUtils.hh:552
bool isBSM(int pid)
Is this a BSM particle (including graviton)?
Definition ParticleIdUtils.hh:574
bool isFourthGen(int pid)
Is this a 4th generation particle?
Definition ParticleIdUtils.hh:513
bool isBSMBoson(int pid)
Is this a valid BSM boson (SUSY Higgs, W', Z')?
Definition ParticleIdUtils.hh:408
bool isExcited(int pid)
Is this an excited (composite) quark or lepton?
Definition ParticleIdUtils.hh:465
bool isDM(int pid)
Convenience alias.
Definition ParticleIdUtils.hh:495
bool isBlackHole(int pid)
Is this a black hole?
Definition ParticleIdUtils.hh:558
bool isHiddenValley(int pid)
Is this a Hidden Valley particle?
Definition ParticleIdUtils.hh:500
bool isQball(int pid)
Alias.
Definition ParticleIdUtils.hh:547
bool isDyon(int pid)
Just treat a dyon as an alias for magmonopole for now.
Definition ParticleIdUtils.hh:530
bool isDarkMatter(int pid)
Definition ParticleIdUtils.hh:487
bool isEMInteracting(int pid)
Determine if the PID is that of a electromagnetically interacting particle.
Definition ParticleIdUtils.hh:1002
bool isWeakInteracting(int pid)
Definition ParticleIdUtils.hh:1010
bool isStrongInteracting(int pid)
Determine if the PID is that of a strongly interacting particle.
Definition ParticleIdUtils.hh:997
int lambda(int pid)
Definition ParticleIdUtils.hh:159
int nuclA(int pid)
Definition ParticleIdUtils.hh:135
int Z(int pid)
Definition ParticleIdUtils.hh:129
int A(int pid)
Definition ParticleIdUtils.hh:144
int nuclNlambda(int pid)
Definition ParticleIdUtils.hh:150
bool isNucleus(int pid)
Is this a nucleus PID?
Definition ParticleIdUtils.hh:106
int nuclZ(int pid)
Definition ParticleIdUtils.hh:120
bool isResonance(int pid)
Definition ParticleIdUtils.hh:1028
bool isGenSpecific(int pid)
Determine if the PID is in the generator-specific range.
Definition ParticleIdUtils.hh:1021
bool isTransportable(int pid)
Definition ParticleIdUtils.hh:1036
bool isLightHadron(int pid)
Determine if the PID is that of a light flavour (not b or c) hadron.
Definition ParticleIdUtils.hh:722
bool isCharmHadron(int pid)
Definition ParticleIdUtils.hh:767
bool isStrangeBaryon(int pid)
Definition ParticleIdUtils.hh:786
bool isHeavyFlavor(int pid)
Determine if the particle is a heavy flavour hadron or parton.
Definition ParticleIdUtils.hh:669
bool isHeavyHadron(int pid)
Determine if the PID is that of a heavy flavour (b or c) hadron.
Definition ParticleIdUtils.hh:707
bool isCharmMeson(int pid)
Determine if the PID is that of a c-meson.
Definition ParticleIdUtils.hh:747
bool isStrangeHadron(int pid)
Definition ParticleIdUtils.hh:795
bool isCharmBaryon(int pid)
Determine if the PID is that of a c-baryon.
Definition ParticleIdUtils.hh:757
bool isHeavyBaryon(int pid)
Determine if the PID is that of a heavy flavour (b or c) baryon.
Definition ParticleIdUtils.hh:702
bool isHeavyMeson(int pid)
Determine if the PID is that of a heavy flavour (b or c) meson.
Definition ParticleIdUtils.hh:697
bool isLightBaryon(int pid)
Determine if the PID is that of a light flavour (not b or c) baryon.
Definition ParticleIdUtils.hh:717
bool isBottomBaryon(int pid)
Determine if the PID is that of a b-baryon.
Definition ParticleIdUtils.hh:733
bool isLightParton(int pid)
Determine if the PID is that of a light parton (u,d,s)
Definition ParticleIdUtils.hh:691
bool isStrangeMeson(int pid)
Definition ParticleIdUtils.hh:777
bool isHeavyParton(int pid)
Determine if the PID is that of a heavy parton (c,b,t)
Definition ParticleIdUtils.hh:686
bool isBottomHadron(int pid)
Determine if the PID is that of a b-hadron.
Definition ParticleIdUtils.hh:738
bool isHeavyFlavour(int pid)
British-spelling alias for isHeavyFlavor.
Definition ParticleIdUtils.hh:674
bool isBottomMeson(int pid)
Determine if the PID is that of a b-meson.
Definition ParticleIdUtils.hh:728
bool isLightMeson(int pid)
Determine if the PID is that of a light flavour (not b or c) meson.
Definition ParticleIdUtils.hh:712
bool hasUp(int pid)
Does this particle contain an up quark?
Definition ParticleIdUtils.hh:642
bool hasTop(int pid)
Does this particle contain a top quark?
Definition ParticleIdUtils.hh:658
bool hasBottom(int pid)
Does this particle contain a bottom quark?
Definition ParticleIdUtils.hh:654
bool hasStrange(int pid)
Does this particle contain a strange quark?
Definition ParticleIdUtils.hh:646
bool hasDown(int pid)
Does this particle contain a down quark?
Definition ParticleIdUtils.hh:638
bool hasCharm(int pid)
Does this particle contain a charm quark?
Definition ParticleIdUtils.hh:650
bool isBaryon(int pid)
Check to see if this is a valid baryon.
Definition ParticleIdUtils.hh:318
bool isDiQuark(int pid)
Definition ParticleIdUtils.hh:355
bool isPentaquark(int pid)
Check to see if this is a valid pentaquark.
Definition ParticleIdUtils.hh:360
bool isMeson(int pid)
Check to see if this is a valid meson.
Definition ParticleIdUtils.hh:295
bool isHadron(int pid)
Definition ParticleIdUtils.hh:382
bool isReggeon(int pid)
Is this a pomeron, odderon, or generic reggeon?
Definition ParticleIdUtils.hh:290
Location
Definition ParticleIdUtils.hh:58
int abspid(int pid)
Definition ParticleIdUtils.hh:28
int pid(const Particle &p)
Unbound function access to PID code.
Definition ParticleUtils.hh:23
Definition MC_Cent_pPb.hh:10
std::enable_if< std::is_arithmetic< N1 >::value &&std::is_arithmetic< N2 >::value &&std::is_arithmetic< N3 >::value, bool >::type in_range(N1 val, N2 low, N3 high)
Boolean function to determine if value is within the given range.
Definition MathUtils.hh:184
std::enable_if< std::is_arithmetic< N1 >::value &&std::is_arithmetic< N2 >::value &&std::is_arithmetic< N3 >::value, bool >::type in_closed_range(N1 val, N2 low, N3 high)
Boolean function to determine if value is within the given range.
Definition MathUtils.hh:194