Main Page
Related Pages
Modules
Namespaces
Classes
Files
Examples
File List
File Members
g4lbne
src
LBNEParticleCode.cc
Go to the documentation of this file.
1
//----------------------------------------------------------------------
2
// Particle names should match the geant4 particle names since this is
3
// currently used to translate particles from external ntuple to geant
4
// (LBNEPrimaryGeneratorAction.cc)
5
// $Id: LBNEParticleCode.cc,v 1.1 2011/07/13 16:20:52 loiacono Exp $
6
//----------------------------------------------------------------------
7
8
#include "
LBNEParticleCode.hh
"
9
10
G4String
LBNEParticleCode::AsString
(
LBNEParticleCode_t
pCode)
11
{
12
switch
(pCode)
13
{
14
case
kMuonPlus
:
return
"mu+"
;
break
;
15
case
kMuonMinus
:
return
"mu-"
;
break
;
16
case
kPion0
:
return
"pi0"
;
break
;
17
case
kPionPlus
:
return
"pi+"
;
break
;
18
case
kPionMinus
:
return
"pi-"
;
break
;
19
case
kKaon0L
:
return
"kaon0L"
;
break
;
20
case
kKaonPlus
:
return
"kaon+"
;
break
;
21
case
kKaonMinus
:
return
"kaon-"
;
break
;
22
case
kNeutron
:
return
"neutron"
;
break
;
23
case
kProton
:
return
"proton"
;
break
;
24
case
kAntiProton
:
return
"anti_proton"
;
break
;
25
case
kKaon0S
:
return
"kaon0S"
;
break
;
26
case
kEta
:
return
"eta"
;
break
;
27
case
kLambda
:
return
"lambda"
;
break
;
28
case
kSigmaPlus
:
return
"sigma+"
;
break
;
29
case
kSigma0
:
return
"sigma0"
;
break
;
30
case
kSigmaMinus
:
return
"sigma-"
;
break
;
31
case
kXi0
:
return
"x0"
;
break
;
32
case
kXiMinus
:
return
"xi-"
;
break
;
33
case
kOmegaMinus
:
return
"omega-"
;
break
;
34
case
kAntiNeutron
:
return
"anti_neutron"
;
break
;
35
case
kAntiLambda
:
return
"anti_lambda"
;
break
;
36
case
kAntiSigmaMinus
:
return
"anti_sigma-"
;
break
;
37
case
kAntiSigma0
:
return
"anti_sigma0"
;
break
;
38
case
kAntiSigmaPlus
:
return
"anti_sigma+"
;
break
;
39
case
kAntiXi0
:
return
"anti_x0"
;
break
;
40
case
kAntiXiMinus
:
return
"anti_xi-"
;
break
;
41
case
kElectronAntiNeutrino
:
return
"anti_nu_e"
;
break
;
42
case
kElectronNeutrino
:
return
"nu_e"
;
break
;
43
case
kMuonAntiNeutrino
:
return
"anti_nu_mu"
;
break
;
44
case
kMuonNeutrino
:
return
"nu_mu"
;
break
;
45
case
kOther
:
return
"other"
;
break
;
46
default
:
return
"other"
;
break
;
47
}
48
}
49
50
G4int
LBNEParticleCode::AsInt
(
LBNEParticleCode_t
pCode)
51
{
52
switch
(pCode)
53
{
54
case
kMuonPlus
:
return
5;
break
;
55
case
kMuonMinus
:
return
6;
break
;
56
case
kPion0
:
return
7;
break
;
57
case
kPionPlus
:
return
8;
break
;
58
case
kPionMinus
:
return
9;
break
;
59
case
kKaon0L
:
return
10;
break
;
60
case
kKaonPlus
:
return
11;
break
;
61
case
kKaonMinus
:
return
12;
break
;
62
case
kNeutron
:
return
13;
break
;
63
case
kProton
:
return
14;
break
;
64
case
kAntiProton
:
return
15;
break
;
65
case
kKaon0S
:
return
16;
break
;
66
case
kEta
:
return
17;
break
;
67
case
kLambda
:
return
18;
break
;
68
case
kSigmaPlus
:
return
19;
break
;
69
case
kSigma0
:
return
20;
break
;
70
case
kSigmaMinus
:
return
21;
break
;
71
case
kXi0
:
return
22;
break
;
72
case
kXiMinus
:
return
23;
break
;
73
case
kOmegaMinus
:
return
24;
break
;
74
case
kAntiNeutron
:
return
25;
break
;
75
case
kAntiLambda
:
return
26;
break
;
76
case
kAntiSigmaMinus
:
return
27;
break
;
77
case
kAntiSigma0
:
return
28;
break
;
78
case
kAntiSigmaPlus
:
return
29;
break
;
79
case
kAntiXi0
:
return
30;
break
;
80
case
kAntiXiMinus
:
return
31;
break
;
81
case
kElectronAntiNeutrino
:
return
52;
break
;
82
case
kElectronNeutrino
:
return
53;
break
;
83
case
kMuonAntiNeutrino
:
return
55;
break
;
84
case
kMuonNeutrino
:
return
56;
break
;
85
case
kOther
:
return
99;
break
;
86
default
:
return
99;
break
;
87
}
88
}
89
90
LBNEParticleCode::LBNEParticleCode_t
LBNEParticleCode::StringToEnum
(G4String pName)
91
{
92
//returns particle enum
93
94
95
96
if
(pName ==
"nu_tau"
)
return
kOther
;
97
else
if
(pName ==
"anti_nu_tau"
)
return
kOther
;
98
else
if
(pName ==
"eta_prime"
)
return
kOther
;
//?
99
100
else
if
(pName ==
"mu+"
)
return
kMuonPlus
;
101
else
if
(pName ==
"mu-"
)
return
kMuonMinus
;
102
else
if
(pName ==
"pi0"
)
return
kPion0
;
103
else
if
(pName ==
"pi+"
)
return
kPionPlus
;
104
else
if
(pName ==
"pi-"
)
return
kPionMinus
;
105
else
if
(pName ==
"kaon0L"
)
return
kKaon0L
;
106
else
if
(pName ==
"kaon+"
)
return
kKaonPlus
;
107
else
if
(pName ==
"kaon-"
)
return
kKaonMinus
;
108
else
if
(pName ==
"neutron"
)
return
kNeutron
;
109
else
if
(pName ==
"proton"
)
return
kProton
;
110
else
if
(pName ==
"anti_proton"
)
return
kAntiProton
;
111
else
if
(pName ==
"kaon0S"
)
return
kKaon0S
;
112
else
if
(pName ==
"eta"
)
return
kEta
;
113
else
if
(pName ==
"lambda"
)
return
kLambda
;
114
else
if
(pName ==
"sigma+"
)
return
kSigmaPlus
;
115
else
if
(pName ==
"sigma0"
)
return
kSigma0
;
116
else
if
(pName ==
"sigma-"
)
return
kSigmaMinus
;
117
else
if
(pName ==
"x0"
)
return
kXi0
;
118
else
if
(pName ==
"xi-"
)
return
kXiMinus
;
119
else
if
(pName ==
"omega-"
)
return
kOmegaMinus
;
120
else
if
(pName ==
"anti_neutron"
)
return
kAntiNeutron
;
121
else
if
(pName ==
"anti_lambda"
)
return
kAntiLambda
;
122
else
if
(pName ==
"anti_sigma-"
)
return
kAntiSigmaMinus
;
123
else
if
(pName ==
"anti_sigma0"
)
return
kAntiSigma0
;
124
else
if
(pName ==
"anti_sigma+"
)
return
kAntiSigmaPlus
;
125
else
if
(pName ==
"anti_xi0"
)
return
kAntiXi0
;
126
else
if
(pName ==
"anti_xi-"
)
return
kAntiXiMinus
;
//?
127
else
if
(pName ==
"anti_nu_e"
)
return
kElectronAntiNeutrino
;
128
else
if
(pName ==
"nu_e"
)
return
kElectronNeutrino
;
129
else
if
(pName ==
"anti_nu_mu"
)
return
kMuonAntiNeutrino
;
130
else
if
(pName ==
"nu_mu"
)
return
kMuonNeutrino
;
131
else
return
kOther
;
132
}
133
134
135
LBNEParticleCode::LBNEParticleCode_t
LBNEParticleCode::IntToEnum
(G4int particleInt)
136
{
137
//returns particle enum
138
switch
(particleInt)
139
{
140
case
5:
return
kMuonPlus
;
break
;
141
case
6:
return
kMuonMinus
;
break
;
142
case
7:
return
kPion0
;
break
;
143
case
8:
return
kPionPlus
;
break
;
144
case
9:
return
kPionMinus
;
break
;
145
case
10:
return
kKaon0L
;
break
;
146
case
11:
return
kKaonPlus
;
break
;
147
case
12:
return
kKaonMinus
;
break
;
148
case
13:
return
kNeutron
;
break
;
149
case
14:
return
kProton
;
break
;
150
case
15:
return
kAntiProton
;
break
;
151
case
16:
return
kKaon0S
;
break
;
152
case
17:
return
kEta
;
break
;
153
case
18:
return
kLambda
;
break
;
154
case
19:
return
kSigmaPlus
;
break
;
155
case
20:
return
kSigma0
;
break
;
156
case
21:
return
kSigmaMinus
;
break
;
157
case
22:
return
kXi0
;
break
;
158
case
23:
return
kXiMinus
;
break
;
159
case
24:
return
kOmegaMinus
;
break
;
160
case
25:
return
kAntiNeutron
;
break
;
161
case
26:
return
kAntiLambda
;
break
;
162
case
27:
return
kAntiSigmaMinus
;
break
;
163
case
28:
return
kAntiSigma0
;
break
;
164
case
29:
return
kAntiSigmaPlus
;
break
;
165
case
30:
return
kAntiXi0
;
break
;
166
case
31:
return
kAntiXiMinus
;
break
;
//?
167
case
52:
return
kElectronAntiNeutrino
;
break
;
168
case
53:
return
kElectronNeutrino
;
break
;
169
case
55:
return
kMuonAntiNeutrino
;
break
;
170
case
56:
return
kMuonNeutrino
;
break
;
171
default
:
return
kOther
;
break
;
172
}
173
}
LBNEParticleCode::kKaon0S
Definition:
LBNEParticleCode.hh:22
LBNEParticleCode::kOmegaMinus
Definition:
LBNEParticleCode.hh:30
LBNEParticleCode::kKaonPlus
Definition:
LBNEParticleCode.hh:17
LBNEParticleCode::kSigmaPlus
Definition:
LBNEParticleCode.hh:25
LBNEParticleCode::kKaon0L
Definition:
LBNEParticleCode.hh:16
LBNEParticleCode::kAntiLambda
Definition:
LBNEParticleCode.hh:32
LBNEParticleCode::kPion0
Definition:
LBNEParticleCode.hh:13
LBNEParticleCode::kMuonPlus
Definition:
LBNEParticleCode.hh:11
LBNEParticleCode::kMuonNeutrino
Definition:
LBNEParticleCode.hh:41
LBNEParticleCode::kElectronAntiNeutrino
Definition:
LBNEParticleCode.hh:38
LBNEParticleCode::IntToEnum
LBNEParticleCode_t IntToEnum(G4int particleInt)
Definition:
LBNEParticleCode.cc:135
LBNEParticleCode::StringToEnum
LBNEParticleCode_t StringToEnum(G4String particleName)
Definition:
LBNEParticleCode.cc:90
LBNEParticleCode::kKaonMinus
Definition:
LBNEParticleCode.hh:18
LBNEParticleCode::kXiMinus
Definition:
LBNEParticleCode.hh:29
LBNEParticleCode.hh
LBNEParticleCode::kAntiSigma0
Definition:
LBNEParticleCode.hh:34
LBNEParticleCode::kAntiProton
Definition:
LBNEParticleCode.hh:21
LBNEParticleCode::kAntiXiMinus
Definition:
LBNEParticleCode.hh:37
LBNEParticleCode::kPionPlus
Definition:
LBNEParticleCode.hh:14
LBNEParticleCode::kMuonAntiNeutrino
Definition:
LBNEParticleCode.hh:40
LBNEParticleCode::LBNEParticleCode_t
enum LBNEParticleCode::ELBNEParticleCode LBNEParticleCode_t
LBNEParticleCode::kPionMinus
Definition:
LBNEParticleCode.hh:15
LBNEParticleCode::kMuonMinus
Definition:
LBNEParticleCode.hh:12
LBNEParticleCode::AsString
G4String AsString(LBNEParticleCode_t pCode)
Definition:
LBNEParticleCode.cc:10
cvn::kOther
Something else. Tau? Hopefully we don't use this.
Definition:
InteractionType.h:33
LBNEParticleCode::kEta
Definition:
LBNEParticleCode.hh:23
LBNEParticleCode::kAntiNeutron
Definition:
LBNEParticleCode.hh:31
LBNEParticleCode::kAntiSigmaPlus
Definition:
LBNEParticleCode.hh:35
LBNEParticleCode::kAntiXi0
Definition:
LBNEParticleCode.hh:36
kNeutron
Definition:
DAQSimAna_module.cc:47
LBNEParticleCode::kElectronNeutrino
Definition:
LBNEParticleCode.hh:39
LBNEParticleCode::kXi0
Definition:
LBNEParticleCode.hh:28
LBNEParticleCode::kSigma0
Definition:
LBNEParticleCode.hh:26
LBNEParticleCode::kLambda
Definition:
LBNEParticleCode.hh:24
LBNEParticleCode::kSigmaMinus
Definition:
LBNEParticleCode.hh:27
LBNEParticleCode::AsInt
G4int AsInt(LBNEParticleCode_t pCode)
Definition:
LBNEParticleCode.cc:50
LBNEParticleCode::kAntiSigmaMinus
Definition:
LBNEParticleCode.hh:33
protoana::kProton
Definition:
ProtoDUNEBeamlineUtils.h:35
Generated by
1.8.11