ECCE @ EIC Software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
G4InuclParticleNames.cc
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file G4InuclParticleNames.cc
1 //
2 // ********************************************************************
3 // * License and Disclaimer *
4 // * *
5 // * The Geant4 software is copyright of the Copyright Holders of *
6 // * the Geant4 Collaboration. It is provided under the terms and *
7 // * conditions of the Geant4 Software License, included in the file *
8 // * LICENSE and available at http://cern.ch/geant4/license . These *
9 // * include a list of copyright holders. *
10 // * *
11 // * Neither the authors of this software system, nor their employing *
12 // * institutes,nor the agencies providing financial support for this *
13 // * work make any representation or warranty, express or implied, *
14 // * regarding this software system or assume any liability for its *
15 // * use. Please see the license in the file LICENSE and URL above *
16 // * for the full disclaimer and the limitation of liability. *
17 // * *
18 // * This code implementation is the result of the scientific and *
19 // * technical work of the GEANT4 collaboration. *
20 // * By using, copying, modifying or distributing the software (or *
21 // * any work based on the software) you agree to acknowledge its *
22 // * use in resulting scientific publications, and indicate your *
23 // * acceptance of all terms of the Geant4 Software license. *
24 // ********************************************************************
25 //
26 //
27 // Defines enums to map G4InuclElementaryParticle type codes to human
28 // readable names. Meant to replace similar local enums scattered through
29 // the code.
30 
31 #include "G4InuclParticleNames.hh"
32 
33 using namespace G4InuclParticleNames;
34 
35 
36 // Convert enum entries to strings
37 
39  switch (ptype) {
40  case nuclei: return "nuclei"; break;
41  case proton: return "proton"; break;
42  case neutron: return "neutron"; break;
43  case pionPlus: return "pionPlus"; break;
44  case pionMinus: return "pionMinus"; break;
45  case pionZero: return "pionZero"; break;
46  case photon: return "photon"; break;
47  case kaonPlus: return "kaonPlus"; break;
48  case kaonMinus: return "kaonMinus"; break;
49  case kaonZero: return "kaonZero"; break;
50  case kaonZeroBar: return "kaonZeroBar"; break;
51  case lambda: return "lambda"; break;
52  case sigmaPlus: return "sigmaPlus"; break;
53  case sigmaZero: return "sigmaZero"; break;
54  case sigmaMinus: return "sigmaMinus"; break;
55  case xiZero: return "xiZero"; break;
56  case xiMinus: return "xiMinus"; break;
57  case omegaMinus: return "omegaMinus"; break;
58  case deuteron: return "deuteron"; break;
59  case triton: return "triton"; break;
60  case He3: return "He3"; break;
61  case alpha: return "alpha"; break;
62  case antiProton: return "antiProton"; break;
63  case antiNeutron: return "antiNeutron"; break;
64  case antiDeuteron: return "antiDeuteron"; break;
65  case antiTriton: return "antiTriton"; break;
66  case antiHe3: return "antiHe3"; break;
67  case antiAlpha: return "antiAlpha"; break;
68  case diproton: return "diproton"; break;
69  case unboundPN: return "unboundPN"; break;
70  case dineutron: return "dineutron"; break;
71  case electronNu: return "electronNu"; break;
72  case muonNu: return "muonNu"; break;
73  case tauNu: return "tauNu"; break;
74  case antiElectronNu: return "antiElectronNu"; break;
75  case antiMuonNu: return "antiMuonNu"; break;
76  case antiTauNu: return "antiTauNu"; break;
77  case WMinus: return "WMinus"; break;
78  case WPlus: return "WPlus"; break;
79  case Zzero: return "Zzero"; break;
80  case electron: return "electron"; break;
81  case muonMinus: return "muonMinus"; break;
82  case tauMinus: return "tauMinus"; break;
83  case positron: return "positron"; break;
84  case muonPlus: return "muonPlus"; break;
85  case tauPlus: return "tauPlus"; break;
86  default: ;
87  }
88  return "UNKNOWN";
89 }
90 
92  switch (ptype) {
93  case nuc: return "nuc"; break;
94  case pro: return "pro"; break;
95  case neu: return "neu"; break;
96  case pip: return "pip"; break;
97  case pim: return "pim"; break;
98  case pi0: return "pi0"; break;
99  case gam: return "gam"; break;
100  case kpl: return "kpl"; break;
101  case kmi: return "kmi"; break;
102  case k0: return "k0"; break;
103  case k0b: return "k0b"; break;
104  case lam: return "lam"; break;
105  case sp: return "sp"; break;
106  case s0: return "s0"; break;
107  case sm: return "sm"; break;
108  case xi0: return "xi0"; break;
109  case xim: return "xim"; break;
110  case om: return "om"; break;
111  case deu: return "deu"; break;
112  case ap: return "ap"; break;
113  case an: return "an"; break;
114  case ade: return "ade"; break;
115  case atr: return "atr"; break;
116  case ahe: return "ahe"; break;
117  case aal: return "aal"; break;
118  case pp: return "pp"; break;
119  case pn: return "pn"; break;
120  case nn: return "nn"; break;
121  case enu: return "enu"; break;
122  case mnu: return "mnu"; break;
123  case tnu: return "tnu"; break;
124  case aenu: return "aenu"; break;
125  case amnu: return "amnu"; break;
126  case atnu: return "atnu"; break;
127  case wm: return "wm"; break;
128  case wp: return "wp"; break;
129  case z0: return "z0"; break;
130  case ele: return "ele"; break;
131  case mum: return "mum"; break;
132  case tm: return "tm"; break;
133  case pos: return "pos"; break;
134  case mup: return "mup"; break;
135  case tp: return "tp"; break;
136  default: ;
137  }
138  return "?";
139 }