Go to the documentation of this file.
1 //____________________________________________________________________________
2 /*!
4 \namespace genie::pdg
6 \brief Utilities for improving the code readability when using PDG codes.
8 \author Costas Andreopoulos <costas.andreopoulos \at stfc.ac.uk>
9  University of Liverpool & STFC Rutherford Appleton Lab
11  Changes required to implement the GENIE Boosted Dark Matter module
12  were installed by Josh Berger (Univ. of Wisconsin)
14 \created May 06, 2004
16 \cpright Copyright (c) 2003-2019, The GENIE Collaboration
17  For the full text of the license visit http://copyright.genie-mc.org
18  or see $GENIE/LICENSE
19 */
20 //____________________________________________________________________________
22 #ifndef _PDG_UTILS_H_
23 #define _PDG_UTILS_H_
25 namespace genie {
27 namespace pdg
28 {
29  bool IsPseudoParticle (int pdgc);
30  bool IsIon (int pdgc);
31  bool IsParticle (int pdgc); ///< not ion or pseudo-particle
33  int IonPdgCodeToZ (int pdgc);
34  int IonPdgCodeToA (int pdgc);
35  int IonPdgCode (int A, int Z);
36  int IonPdgCode (int A, int Z, int L, int I);
38  bool IsLepton (int pdgc);
39  bool IsNeutralLepton (int pdgc);
40  bool IsChargedLepton (int pdgc);
42  bool IsNeutrino (int pdgc);
43  bool IsAntiNeutrino (int pdgc);
44  bool IsNegChargedLepton (int pdgc);
45  bool IsPosChargedLepton (int pdgc);
47  bool IsDarkMatter (int pdgc);
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);
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);
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 IsAntiQuark (int pdgc);
70  bool IsAntiUQuark (int pdgc);
71  bool IsAntiDQuark (int pdgc);
72  bool IsAntiSQuark (int pdgc);
73  bool IsAntiCQuark (int pdgc);
75  bool IsKaon (int pdgc);
76  bool IsPion (int pdgc);
77  bool IsProton (int pdgc);
78  bool IsNeutron (int pdgc);
79  bool IsNucleon (int pdgc);
80  bool IsNeutronOrProton (int pdgc);
81  bool IsHadron (int pdgc);
82  bool IsBaryonResonance (int pdgc);
83  bool Is2NucleonCluster (int pdgc);
85  int SwitchProtonNeutron (int pdgc);
86  int ModifyNucleonCluster (int pdgc, int dQ);
87  int Neutrino2ChargedLepton (int pdgc);
89  int GeantToPdg (int geant_code);
91 } // pdg namespace
92 } // genie namespace
94 #endif // _PDG_UTILS_H_
bool IsPion(int pdgc)
Definition: PDGUtils.cxx:289
bool IsNuTau(int pdgc)
Definition: PDGUtils.cxx:160
bool IsParticle(int pdgc)
not ion or pseudo-particle
Definition: PDGUtils.cxx:45
bool IsNeutrino(int pdgc)
Definition: PDGUtils.cxx:108
Definition: GeneratorBase.h:8
bool IsUQuark(int pdgc)
Definition: PDGUtils.cxx:249
bool IsNucleon(int pdgc)
Definition: PDGUtils.cxx:309
int IonPdgCodeToA(int pdgc)
Definition: PDGUtils.cxx:61
bool IsAntiNuTau(int pdgc)
Definition: PDGUtils.cxx:175
bool IsNuE(int pdgc)
Definition: PDGUtils.cxx:150
int SwitchProtonNeutron(int pdgc)
Definition: PDGUtils.cxx:319
bool IsAntiQuark(int pdgc)
Definition: PDGUtils.cxx:241
bool IsDarkMatter(int pdgc)
Definition: PDGUtils.cxx:125
bool IsChargedLepton(int pdgc)
Definition: PDGUtils.cxx:99
bool IsSQuark(int pdgc)
Definition: PDGUtils.cxx:259
bool IsKaon(int pdgc)
Definition: PDGUtils.cxx:294
bool IsAntiSQuark(int pdgc)
Definition: PDGUtils.cxx:279
bool IsAntiDQuark(int pdgc)
Definition: PDGUtils.cxx:274
int ModifyNucleonCluster(int pdgc, int dQ)
Definition: PDGUtils.cxx:327
Float_t Z
Definition: plot.C:38
bool IsHadron(int pdgc)
Definition: PDGUtils.cxx:355
bool IsNeutron(int pdgc)
Definition: PDGUtils.cxx:304
bool IsPosChargedLepton(int pdgc)
Definition: PDGUtils.cxx:140
bool IsNuMu(int pdgc)
Definition: PDGUtils.cxx:155
int GeantToPdg(int geant_code)
Definition: PDGUtils.cxx:374
bool IsProton(int pdgc)
Definition: PDGUtils.cxx:299
static constexpr double L
bool IsAntiNeutrino(int pdgc)
Definition: PDGUtils.cxx:116
bool IsDiQuark(int pdgc)
Definition: PDGUtils.cxx:223
bool IsAntiMuon(int pdgc)
Definition: PDGUtils.cxx:195
bool IsTau(int pdgc)
Definition: PDGUtils.cxx:200
bool IsPositron(int pdgc)
Definition: PDGUtils.cxx:185
bool IsMuon(int pdgc)
Definition: PDGUtils.cxx:190
bool IsAntiNuMu(int pdgc)
Definition: PDGUtils.cxx:170
bool IsNeutralLepton(int pdgc)
Definition: PDGUtils.cxx:93
bool Is2NucleonCluster(int pdgc)
Definition: PDGUtils.cxx:365
static const double A
Definition: Units.h:82
bool IsIon(int pdgc)
Definition: PDGUtils.cxx:40
bool IsCQuark(int pdgc)
Definition: PDGUtils.cxx:264
bool IsQuark(int pdgc)
Definition: PDGUtils.cxx:233
bool IsAntiCQuark(int pdgc)
Definition: PDGUtils.cxx:284
bool IsPseudoParticle(int pdgc)
Definition: PDGUtils.cxx:25
bool IsNeutronOrProton(int pdgc)
Definition: PDGUtils.cxx:314
bool IsDQuark(int pdgc)
Definition: PDGUtils.cxx:254
int IonPdgCode(int A, int Z)
Definition: PDGUtils.cxx:69
int Neutrino2ChargedLepton(int pdgc)
Definition: PDGUtils.cxx:210
int IonPdgCodeToZ(int pdgc)
Definition: PDGUtils.cxx:53
bool IsBaryonResonance(int pdgc)
Definition: PDGUtils.cxx:360
bool IsAntiNuE(int pdgc)
Definition: PDGUtils.cxx:165
bool IsAntiTau(int pdgc)
Definition: PDGUtils.cxx:205
bool IsLepton(int pdgc)
Definition: PDGUtils.cxx:84
bool IsNegChargedLepton(int pdgc)
Definition: PDGUtils.cxx:131
bool IsElectron(int pdgc)
Definition: PDGUtils.cxx:180
bool IsAntiUQuark(int pdgc)
Definition: PDGUtils.cxx:269