GENIEGenerator
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
PDGUtils.h
Go to the documentation of this file.
1 //____________________________________________________________________________
2 /*!
3 
4 \namespace genie::pdg
5 
6 \brief Utilities for improving the code readability when using PDG codes.
7 
8 \author Costas Andreopoulos <c.andreopoulos \at cern.ch>
9  University of Liverpool
10 
11  Changes required to implement the GENIE Boosted Dark Matter module
12  were installed by Josh Berger (Univ. of Wisconsin)
13 
14  Changes required to implement the GENIE BeamHNL module
15  were installed by John Plows (Univ. of Oxford)
16 
17 \created May 06, 2004
18 
19 \cpright Copyright (c) 2003-2024, The GENIE Collaboration
20  For the full text of the license visit http://copyright.genie-mc.org
21 */
22 //____________________________________________________________________________
23 
24 #ifndef _PDG_UTILS_H_
25 #define _PDG_UTILS_H_
26 
27 namespace genie {
28 
29 namespace pdg
30 {
31  bool IsPseudoParticle (int pdgc);
32  bool IsIon (int pdgc);
33  bool IsParticle (int pdgc); ///< not ion or pseudo-particle
34 
35  int IonPdgCodeToZ (int pdgc);
36  int IonPdgCodeToA (int pdgc);
37  int IonPdgCode (int A, int Z);
38  int IonPdgCode (int A, int Z, int L, int I);
39 
40  bool IsLepton (int pdgc);
41  bool IsNeutralLepton (int pdgc);
42  bool IsChargedLepton (int pdgc);
43 
44  bool IsNeutrino (int pdgc);
45  bool IsAntiNeutrino (int pdgc);
46  bool IsNegChargedLepton (int pdgc);
47  bool IsPosChargedLepton (int pdgc);
48 
49  bool IsDarkMatter (int pdgc);
50  bool IsAntiDarkMatter (int pdgc);
51 
52  bool IsNuE (int pdgc);
53  bool IsNuMu (int pdgc);
54  bool IsNuTau (int pdgc);
55  bool IsAntiNuE (int pdgc);
56  bool IsAntiNuMu (int pdgc);
57  bool IsAntiNuTau (int pdgc);
58 
59  bool IsElectron (int pdgc);
60  bool IsPositron (int pdgc);
61  bool IsMuon (int pdgc);
62  bool IsAntiMuon (int pdgc);
63  bool IsTau (int pdgc);
64  bool IsAntiTau (int pdgc);
65 
66  bool IsDiQuark (int pdgc);
67  bool IsQuark (int pdgc);
68  bool IsUQuark (int pdgc);
69  bool IsDQuark (int pdgc);
70  bool IsSQuark (int pdgc);
71  bool IsCQuark (int pdgc);
72  bool IsBQuark (int pdgc);
73  bool IsTQuark (int pdgc);
74  bool IsAntiQuark (int pdgc);
75  bool IsAntiUQuark (int pdgc);
76  bool IsAntiDQuark (int pdgc);
77  bool IsAntiSQuark (int pdgc);
78  bool IsAntiCQuark (int pdgc);
79  bool IsAntiBQuark (int pdgc);
80  bool IsAntiTQuark (int pdgc);
81 
82  bool IsKaon (int pdgc);
83  bool IsPion (int pdgc);
84  bool IsProton (int pdgc);
85  bool IsNeutron (int pdgc);
86  bool IsNucleon (int pdgc);
87  bool IsNeutronOrProton (int pdgc);
88  bool IsHadron (int pdgc);
89  bool IsBaryonResonance (int pdgc);
90  bool Is2NucleonCluster (int pdgc);
91 
92  bool IsDarkSectorParticle (int pdgc);
93  bool IsHNL (int pdgc);
94 
95  int SwitchProtonNeutron (int pdgc);
96  int ModifyNucleonCluster (int pdgc, int dQ);
97  int Neutrino2ChargedLepton (int pdgc);
98 
99  int GeantToPdg (int geant_code);
100 
101 } // pdg namespace
102 } // genie namespace
103 
104 #endif // _PDG_UTILS_H_
bool IsBQuark(int pdgc)
Definition: PDGUtils.cxx:286
bool IsPion(int pdgc)
Definition: PDGUtils.cxx:326
bool IsNuTau(int pdgc)
Definition: PDGUtils.cxx:168
bool IsParticle(int pdgc)
not ion or pseudo-particle
Definition: PDGUtils.cxx:47
bool IsNeutrino(int pdgc)
Definition: PDGUtils.cxx:110
bool IsUQuark(int pdgc)
Definition: PDGUtils.cxx:266
bool IsNucleon(int pdgc)
Definition: PDGUtils.cxx:346
int IonPdgCodeToA(int pdgc)
Definition: PDGUtils.cxx:63
bool IsAntiNuTau(int pdgc)
Definition: PDGUtils.cxx:183
bool IsNuE(int pdgc)
Definition: PDGUtils.cxx:158
int SwitchProtonNeutron(int pdgc)
Definition: PDGUtils.cxx:356
bool IsAntiQuark(int pdgc)
Definition: PDGUtils.cxx:258
bool IsDarkMatter(int pdgc)
Definition: PDGUtils.cxx:127
bool IsChargedLepton(int pdgc)
Definition: PDGUtils.cxx:101
bool IsHNL(int pdgc)
Definition: PDGUtils.cxx:419
bool IsTQuark(int pdgc)
Definition: PDGUtils.cxx:291
bool IsSQuark(int pdgc)
Definition: PDGUtils.cxx:276
bool IsKaon(int pdgc)
Definition: PDGUtils.cxx:331
bool IsAntiSQuark(int pdgc)
Definition: PDGUtils.cxx:306
bool IsAntiDQuark(int pdgc)
Definition: PDGUtils.cxx:301
int ModifyNucleonCluster(int pdgc, int dQ)
Definition: PDGUtils.cxx:364
bool IsHadron(int pdgc)
Definition: PDGUtils.cxx:392
bool IsNeutron(int pdgc)
Definition: PDGUtils.cxx:341
bool IsPosChargedLepton(int pdgc)
Definition: PDGUtils.cxx:148
bool IsNuMu(int pdgc)
Definition: PDGUtils.cxx:163
int GeantToPdg(int geant_code)
Definition: PDGUtils.cxx:424
bool IsProton(int pdgc)
Definition: PDGUtils.cxx:336
bool IsAntiDarkMatter(int pdgc)
Definition: PDGUtils.cxx:133
static constexpr double A
Definition: Units.h:74
bool IsAntiNeutrino(int pdgc)
Definition: PDGUtils.cxx:118
bool IsDiQuark(int pdgc)
Definition: PDGUtils.cxx:231
bool IsAntiTQuark(int pdgc)
Definition: PDGUtils.cxx:321
bool IsAntiMuon(int pdgc)
Definition: PDGUtils.cxx:203
bool IsTau(int pdgc)
Definition: PDGUtils.cxx:208
bool IsAntiBQuark(int pdgc)
Definition: PDGUtils.cxx:316
bool IsPositron(int pdgc)
Definition: PDGUtils.cxx:193
bool IsMuon(int pdgc)
Definition: PDGUtils.cxx:198
bool IsAntiNuMu(int pdgc)
Definition: PDGUtils.cxx:178
bool IsNeutralLepton(int pdgc)
Definition: PDGUtils.cxx:95
bool Is2NucleonCluster(int pdgc)
Definition: PDGUtils.cxx:402
bool IsIon(int pdgc)
Definition: PDGUtils.cxx:42
bool IsCQuark(int pdgc)
Definition: PDGUtils.cxx:281
bool IsQuark(int pdgc)
Definition: PDGUtils.cxx:250
bool IsAntiCQuark(int pdgc)
Definition: PDGUtils.cxx:311
bool IsPseudoParticle(int pdgc)
Definition: PDGUtils.cxx:27
bool IsNeutronOrProton(int pdgc)
Definition: PDGUtils.cxx:351
bool IsDQuark(int pdgc)
Definition: PDGUtils.cxx:271
int IonPdgCode(int A, int Z)
Definition: PDGUtils.cxx:71
bool IsDarkSectorParticle(int pdgc)
Definition: PDGUtils.cxx:411
int Neutrino2ChargedLepton(int pdgc)
Definition: PDGUtils.cxx:218
int IonPdgCodeToZ(int pdgc)
Definition: PDGUtils.cxx:55
bool IsBaryonResonance(int pdgc)
Definition: PDGUtils.cxx:397
bool IsAntiNuE(int pdgc)
Definition: PDGUtils.cxx:173
bool IsAntiTau(int pdgc)
Definition: PDGUtils.cxx:213
bool IsLepton(int pdgc)
Definition: PDGUtils.cxx:86
bool IsNegChargedLepton(int pdgc)
Definition: PDGUtils.cxx:139
bool IsElectron(int pdgc)
Definition: PDGUtils.cxx:188
bool IsAntiUQuark(int pdgc)
Definition: PDGUtils.cxx:296