ECCE @ EIC Software
Reference for
ECCE @ EIC
simulation and reconstruction software on GitHub
Home page
Related Pages
Modules
Namespaces
Classes
Files
External Links
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Groups
Pages
G4Ions.hh
Go to the documentation of this file.
Or view
the newest version in sPHENIX GitHub for file G4Ions.hh
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
//
28
//
29
// ------------------------------------------------------------
30
// GEANT 4 class header file
31
//
32
// History: first implementation, based on object model of
33
// Hisaya Kurashige, 27 June 1998
34
// ----------------------------------------------------------------
35
// Add excitation energy 17 Aug. 1999 H.Kurashige
36
// Add isomer level 30 Apr. H.Kurashige
37
38
39
#ifndef G4Ions_h
40
#define G4Ions_h 1
41
42
#include "
globals.hh
"
43
#include "
G4ios.hh
"
44
#include "
G4ParticleDefinition.hh
"
45
46
// ######################################################################
47
// ### Ions ###
48
// ######################################################################
49
50
class
G4Ions
:
public
G4ParticleDefinition
51
{
52
// Class Description
53
// This is the base class for all nuclei including pre-defined
54
// light nuclei such as deuteron, alpha, and proton (Hydrogen)
55
// All nuclei/ions created on the fly are objects of this class
56
// Atomic number and atomic mass are vaild only for particles derived
57
// from this class. This class has Excitation Energy in addition to
58
// the normal particle properties.
59
60
protected
:
61
G4Ions
(){};
62
63
64
public
:
//With Description
65
G4Ions
(
66
const
G4String
& aName,
G4double
mass
,
67
G4double
width,
G4double
charge
,
68
G4int
iSpin,
G4int
iParity,
69
G4int
iConjugation,
G4int
iIsospin,
70
G4int
iIsospin3,
G4int
gParity,
71
const
G4String
& pType,
G4int
lepton,
72
G4int
baryon
,
G4int
encoding
,
73
G4bool
stable,
G4double
lifetime,
74
G4DecayTable
*decaytable,
G4bool
shortlived,
75
const
G4String
& subType =
""
,
76
G4int
anti_encoding =0,
77
G4double
excitation = 0.0,
78
G4int
isomer = 0
79
);
80
81
public
:
82
virtual
~G4Ions
();
83
G4Ions
*
IonsDefinition
();
84
G4Ions
*
Ions
();
85
86
public
:
//With Description
87
// Get excitation energy of nucleus
88
G4double
GetExcitationEnergy
()
const
;
89
90
// Get Isomer level (=0 for ground state)
91
G4int
GetIsomerLevel
()
const
;
92
93
// enumerator for floating level base
94
enum class
G4FloatLevelBase
95
{ no_Float=0,
96
plus_X, plus_Y, plus_Z, plus_U, plus_V, plus_W,
97
plus_R, plus_S, plus_T, plus_A, plus_B, plus_C, plus_D, plus_E
98
};
99
static
G4Ions::G4FloatLevelBase
FloatLevelBase
(
char
flbChar);
100
static
G4Ions::G4FloatLevelBase
FloatLevelBase
(
G4int
flbIdx);
101
static
char
FloatLevelBaseChar
(
G4Ions::G4FloatLevelBase
flb);
102
103
// set/get methods for floating level base
104
G4Ions::G4FloatLevelBase
GetFloatLevelBase
()
const
;
105
G4int
GetFloatLevelBaseIndex
()
const
;
106
void
SetFloatLevelBase
(
G4Ions::G4FloatLevelBase
flb);
107
void
SetFloatLevelBase
(
char
flbChar);
108
void
SetFloatLevelBase
(
G4int
flbIdx);
109
110
private
:
111
G4double
theExcitationEnergy
;
112
G4int
theIsomerLevel
;
113
G4FloatLevelBase
floatLevelBase
;
114
115
};
116
117
#define noFloat G4Ions::G4FloatLevelBase::no_Float
118
#define plusU G4Ions::G4FloatLevelBase::plus_U
119
#define plusV G4Ions::G4FloatLevelBase::plus_V
120
#define plusW G4Ions::G4FloatLevelBase::plus_W
121
#define plusX G4Ions::G4FloatLevelBase::plus_X
122
#define plusY G4Ions::G4FloatLevelBase::plus_Y
123
#define plusZ G4Ions::G4FloatLevelBase::plus_Z
124
#define plusR G4Ions::G4FloatLevelBase::plus_R
125
#define plusS G4Ions::G4FloatLevelBase::plus_S
126
#define plusT G4Ions::G4FloatLevelBase::plus_T
127
#define plusA G4Ions::G4FloatLevelBase::plus_A
128
#define plusB G4Ions::G4FloatLevelBase::plus_B
129
#define plusC G4Ions::G4FloatLevelBase::plus_C
130
#define plusD G4Ions::G4FloatLevelBase::plus_D
131
#define plusE G4Ions::G4FloatLevelBase::plus_E
132
133
inline
134
G4Ions
*
G4Ions::IonsDefinition
()
135
{
136
return
this
;
137
}
138
139
inline
140
G4Ions
*
G4Ions::Ions
()
141
{
142
return
this
;
143
}
144
145
inline
146
G4double
G4Ions::GetExcitationEnergy
()
const
147
{
148
return
theExcitationEnergy
;
149
}
150
151
inline
152
G4int
G4Ions::GetIsomerLevel
()
const
153
{
154
return
theIsomerLevel
;
155
}
156
157
inline
158
G4Ions::G4FloatLevelBase
G4Ions::GetFloatLevelBase
()
const
159
{
160
return
floatLevelBase
;
161
}
162
163
inline
164
G4int
G4Ions::GetFloatLevelBaseIndex
()
const
165
{
166
return
static_cast<
G4int
>
(
floatLevelBase
);
167
}
168
169
inline
170
void
G4Ions::SetFloatLevelBase
(
G4Ions::G4FloatLevelBase
flb)
171
{
172
floatLevelBase
= flb;
173
}
174
175
inline
176
void
G4Ions::SetFloatLevelBase
(
char
flbChar)
177
{
178
floatLevelBase
=
FloatLevelBase
(flbChar);
179
}
180
181
inline
182
void
G4Ions::SetFloatLevelBase
(
G4int
flbIdx)
183
{
184
floatLevelBase
=
FloatLevelBase
(flbIdx);
185
}
186
187
inline
188
G4Ions::G4FloatLevelBase
G4Ions::FloatLevelBase
(
char
flbChar)
189
{
190
G4Ions::G4FloatLevelBase
flb =
noFloat
;
191
switch
(flbChar)
192
{
193
case
'x'
:
case
'X'
:
194
flb =
plusX
;
195
break
;
196
case
'y'
:
case
'Y'
:
197
flb =
plusY
;
198
break
;
199
case
'z'
:
case
'Z'
:
200
flb =
plusZ
;
201
break
;
202
case
'u'
:
case
'U'
:
203
flb =
plusU
;
204
break
;
205
case
'v'
:
case
'V'
:
206
flb =
plusV
;
207
break
;
208
case
'w'
:
case
'W'
:
209
flb =
plusW
;
210
break
;
211
case
'r'
:
case
'R'
:
212
flb =
plusR
;
213
break
;
214
case
's'
:
case
'S'
:
215
flb =
plusS
;
216
break
;
217
case
't'
:
case
'T'
:
218
flb =
plusT
;
219
break
;
220
case
'a'
:
case
'A'
:
221
flb =
plusA
;
222
break
;
223
case
'b'
:
case
'B'
:
224
flb =
plusB
;
225
break
;
226
case
'c'
:
case
'C'
:
227
flb =
plusC
;
228
break
;
229
case
'd'
:
case
'D'
:
230
flb =
plusD
;
231
break
;
232
case
'e'
:
case
'E'
:
233
flb =
plusE
;
234
break
;
235
case
'\0'
:
default
:
236
break
;
237
}
238
return
flb;
239
}
240
241
inline
242
G4Ions::G4FloatLevelBase
G4Ions::FloatLevelBase
(
G4int
flbIdx)
243
{
244
static
G4Ions::G4FloatLevelBase
flb[] =
245
{
noFloat
,
246
plusX
,
plusY
,
plusZ
,
plusU
,
plusV
,
plusW
,
247
plusR
,
plusS
,
plusT
,
plusA
,
plusB
,
plusC
,
plusD
,
plusE
};
248
return
flb[flbIdx];
249
}
250
251
inline
252
char
G4Ions::FloatLevelBaseChar
(
G4Ions::G4FloatLevelBase
flb)
253
{
254
static
char
flbChar[] = {
'\0'
,
'X'
,
'Y'
,
'Z'
,
'U'
,
'V'
,
'W'
,
255
'R'
,
'S'
,
'T'
,
'A'
,
'B'
,
'C'
,
'D'
,
'E'
};
256
return
flbChar[
static_cast<
G4int
>
(flb)];
257
}
258
259
#endif
260
261
262
263
264
265
266
267
geant4
tree
geant4-10.6-release
source
particles
management
include
G4Ions.hh
Built by
Jin Huang
. updated:
Wed Jun 29 2022 17:25:24
using
1.8.2 with
ECCE GitHub integration