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 <constantinos.andreopoulos \at cern.ch>
9  University of Liverpool & STFC Rutherford Appleton Laboratory
10 
11  Changes required to implement the GENIE Boosted Dark Matter module
12  were installed by Josh Berger (Univ. of Wisconsin)
13 
14 \created May 06, 2004
15 
16 \cpright Copyright (c) 2003-2020, The GENIE Collaboration
17  For the full text of the license visit http://copyright.genie-mc.org
18 */
19 //____________________________________________________________________________
20 
21 #ifndef _PDG_UTILS_H_
22 #define _PDG_UTILS_H_
23 
24 namespace genie {
25 
26 namespace pdg
27 {
28  bool IsPseudoParticle (int pdgc);
29  bool IsIon (int pdgc);
30  bool IsParticle (int pdgc); ///< not ion or pseudo-particle
31 
32  int IonPdgCodeToZ (int pdgc);
33  int IonPdgCodeToA (int pdgc);
34  int IonPdgCode (int A, int Z);
35  int IonPdgCode (int A, int Z, int L, int I);
36 
37  bool IsLepton (int pdgc);
38  bool IsNeutralLepton (int pdgc);
39  bool IsChargedLepton (int pdgc);
40 
41  bool IsNeutrino (int pdgc);
42  bool IsAntiNeutrino (int pdgc);
43  bool IsNegChargedLepton (int pdgc);
44  bool IsPosChargedLepton (int pdgc);
45 
46  bool IsDarkMatter (int pdgc);
47  bool IsAntiDarkMatter (int pdgc);
48 
49  bool IsNuE (int pdgc);
50  bool IsNuMu (int pdgc);
51  bool IsNuTau (int pdgc);
52  bool IsAntiNuE (int pdgc);
53  bool IsAntiNuMu (int pdgc);
54  bool IsAntiNuTau (int pdgc);
55 
56  bool IsElectron (int pdgc);
57  bool IsPositron (int pdgc);
58  bool IsMuon (int pdgc);
59  bool IsAntiMuon (int pdgc);
60  bool IsTau (int pdgc);
61  bool IsAntiTau (int pdgc);
62 
63  bool IsDiQuark (int pdgc);
64  bool IsQuark (int pdgc);
65  bool IsUQuark (int pdgc);
66  bool IsDQuark (int pdgc);
67  bool IsSQuark (int pdgc);
68  bool IsCQuark (int pdgc);
69  bool IsBQuark (int pdgc);
70  bool IsTQuark (int pdgc);
71  bool IsAntiQuark (int pdgc);
72  bool IsAntiUQuark (int pdgc);
73  bool IsAntiDQuark (int pdgc);
74  bool IsAntiSQuark (int pdgc);
75  bool IsAntiCQuark (int pdgc);
76  bool IsAntiBQuark (int pdgc);
77  bool IsAntiTQuark (int pdgc);
78 
79  bool IsKaon (int pdgc);
80  bool IsPion (int pdgc);
81  bool IsProton (int pdgc);
82  bool IsNeutron (int pdgc);
83  bool IsNucleon (int pdgc);
84  bool IsNeutronOrProton (int pdgc);
85  bool IsHadron (int pdgc);
86  bool IsBaryonResonance (int pdgc);
87  bool Is2NucleonCluster (int pdgc);
88 
89  bool IsDarkSectorParticle (int pdgc);
90 
91  int SwitchProtonNeutron (int pdgc);
92  int ModifyNucleonCluster (int pdgc, int dQ);
93  int Neutrino2ChargedLepton (int pdgc);
94 
95  int GeantToPdg (int geant_code);
96 
97 } // pdg namespace
98 } // genie namespace
99 
100 #endif // _PDG_UTILS_H_
bool IsBQuark(int pdgc)
Definition: PDGUtils.cxx:283
bool IsPion(int pdgc)
Definition: PDGUtils.cxx:323
bool IsNuTau(int pdgc)
Definition: PDGUtils.cxx:165
bool IsParticle(int pdgc)
not ion or pseudo-particle
Definition: PDGUtils.cxx:44
bool IsNeutrino(int pdgc)
Definition: PDGUtils.cxx:107
THE MAIN GENIE PROJECT NAMESPACE
Definition: AlgCmp.h:25
bool IsUQuark(int pdgc)
Definition: PDGUtils.cxx:263
bool IsNucleon(int pdgc)
Definition: PDGUtils.cxx:343
int IonPdgCodeToA(int pdgc)
Definition: PDGUtils.cxx:60
bool IsAntiNuTau(int pdgc)
Definition: PDGUtils.cxx:180
bool IsNuE(int pdgc)
Definition: PDGUtils.cxx:155
int SwitchProtonNeutron(int pdgc)
Definition: PDGUtils.cxx:353
bool IsAntiQuark(int pdgc)
Definition: PDGUtils.cxx:255
bool IsDarkMatter(int pdgc)
Definition: PDGUtils.cxx:124
bool IsChargedLepton(int pdgc)
Definition: PDGUtils.cxx:98
bool IsTQuark(int pdgc)
Definition: PDGUtils.cxx:288
bool IsSQuark(int pdgc)
Definition: PDGUtils.cxx:273
bool IsKaon(int pdgc)
Definition: PDGUtils.cxx:328
bool IsAntiSQuark(int pdgc)
Definition: PDGUtils.cxx:303
bool IsAntiDQuark(int pdgc)
Definition: PDGUtils.cxx:298
int ModifyNucleonCluster(int pdgc, int dQ)
Definition: PDGUtils.cxx:361
bool IsHadron(int pdgc)
Definition: PDGUtils.cxx:389
bool IsNeutron(int pdgc)
Definition: PDGUtils.cxx:338
bool IsPosChargedLepton(int pdgc)
Definition: PDGUtils.cxx:145
bool IsNuMu(int pdgc)
Definition: PDGUtils.cxx:160
int GeantToPdg(int geant_code)
Definition: PDGUtils.cxx:416
bool IsProton(int pdgc)
Definition: PDGUtils.cxx:333
bool IsAntiDarkMatter(int pdgc)
Definition: PDGUtils.cxx:130
bool IsAntiNeutrino(int pdgc)
Definition: PDGUtils.cxx:115
bool IsDiQuark(int pdgc)
Definition: PDGUtils.cxx:228
bool IsAntiTQuark(int pdgc)
Definition: PDGUtils.cxx:318
bool IsAntiMuon(int pdgc)
Definition: PDGUtils.cxx:200
bool IsTau(int pdgc)
Definition: PDGUtils.cxx:205
bool IsAntiBQuark(int pdgc)
Definition: PDGUtils.cxx:313
bool IsPositron(int pdgc)
Definition: PDGUtils.cxx:190
bool IsMuon(int pdgc)
Definition: PDGUtils.cxx:195
bool IsAntiNuMu(int pdgc)
Definition: PDGUtils.cxx:175
bool IsNeutralLepton(int pdgc)
Definition: PDGUtils.cxx:92
bool Is2NucleonCluster(int pdgc)
Definition: PDGUtils.cxx:399
bool IsIon(int pdgc)
Definition: PDGUtils.cxx:39
bool IsCQuark(int pdgc)
Definition: PDGUtils.cxx:278
bool IsQuark(int pdgc)
Definition: PDGUtils.cxx:247
bool IsAntiCQuark(int pdgc)
Definition: PDGUtils.cxx:308
bool IsPseudoParticle(int pdgc)
Definition: PDGUtils.cxx:24
bool IsNeutronOrProton(int pdgc)
Definition: PDGUtils.cxx:348
bool IsDQuark(int pdgc)
Definition: PDGUtils.cxx:268
int IonPdgCode(int A, int Z)
Definition: PDGUtils.cxx:68
bool IsDarkSectorParticle(int pdgc)
Definition: PDGUtils.cxx:408
int Neutrino2ChargedLepton(int pdgc)
Definition: PDGUtils.cxx:215
int IonPdgCodeToZ(int pdgc)
Definition: PDGUtils.cxx:52
bool IsBaryonResonance(int pdgc)
Definition: PDGUtils.cxx:394
bool IsAntiNuE(int pdgc)
Definition: PDGUtils.cxx:170
bool IsAntiTau(int pdgc)
Definition: PDGUtils.cxx:210
bool IsLepton(int pdgc)
Definition: PDGUtils.cxx:83
bool IsNegChargedLepton(int pdgc)
Definition: PDGUtils.cxx:136
bool IsElectron(int pdgc)
Definition: PDGUtils.cxx:185
bool IsAntiUQuark(int pdgc)
Definition: PDGUtils.cxx:293