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
G4RadioactiveDecayBase.hh
Go to the documentation of this file.
Or view
the newest version in sPHENIX GitHub for file G4RadioactiveDecayBase.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
//
27
// //
28
// File: G4RadioactiveDecayBase.hh //
29
// Author: D.H. Wright (SLAC) //
30
// Date: 9 August 2017 //
31
// Description: version the G4RadioactiveDecay process by F. Lei and //
32
// P.R. Truscott with biasing and activation calculations //
33
// removed to a derived class. It performs alpha, beta, //
34
// electron capture and isomeric transition decays of //
35
// radioactive nuclei. //
36
// //
38
39
#ifndef G4RadioactiveDecayBase_h
40
#define G4RadioactiveDecayBase_h 1
41
42
43
#include <vector>
44
#include <map>
45
#include <
CLHEP/Units/SystemOfUnits.h
>
46
47
#include "
G4ios.hh
"
48
#include "
globals.hh
"
49
#include "
G4VRestDiscreteProcess.hh
"
50
#include "
G4ParticleChangeForRadDecay.hh
"
51
52
#include "
G4NucleusLimits.hh
"
53
#include "
G4ThreeVector.hh
"
54
#include "
G4Threading.hh
"
55
#include "
G4RadioactiveDecayMode.hh
"
56
57
class
G4Fragment
;
58
class
G4RadioactiveDecayBaseMessenger
;
59
class
G4PhotonEvaporation
;
60
61
typedef
std::map<G4String, G4DecayTable*>
DecayTableMap
;
62
63
64
class
G4RadioactiveDecayBase
:
public
G4VRestDiscreteProcess
65
{
66
// class description
67
68
// Implementation of the radioactive decay process which simulates the
69
// decays of radioactive nuclei. These nuclei are submitted to RDM as
70
// G4Ions. The required half-lives and decay schemes are retrieved from
71
// the Radioactivity database which was derived from ENSDF.
72
// All decay products are submitted back to the particle tracking process
73
// through the G4ParticleChangeForRadDecay object.
74
// class description - end
75
76
public
:
// with description
77
78
G4RadioactiveDecayBase
(
const
G4String
& processName=
"RadioactiveDecayBase"
);
79
~G4RadioactiveDecayBase
();
80
81
virtual
void
ProcessDescription
(std::ostream& outFile)
const
;
82
83
G4bool
IsApplicable
(
const
G4ParticleDefinition
&);
84
// Return true if the specified isotope is
85
// 1) defined as "nucleus" and
86
// 2) it is within theNucleusLimit
87
88
// Return decay table if it exists, if not, load it from file
89
G4DecayTable
*
GetDecayTable
(
const
G4ParticleDefinition
*);
90
91
// Select a logical volume in which RDM applies
92
void
SelectAVolume
(
const
G4String
aVolume);
93
94
// Remove a logical volume from the RDM applied list
95
void
DeselectAVolume
(
const
G4String
aVolume);
96
97
// Select all logical volumes for the application of RDM
98
void
SelectAllVolumes
();
99
100
// Remove all logical volumes from RDM applications
101
void
DeselectAllVolumes
();
102
103
// Enable/disable ICM
104
void
SetICM
(
G4bool
icm) {
applyICM
= icm;}
105
106
// Enable/disable ARM
107
void
SetARM
(
G4bool
arm) {
applyARM
= arm;}
108
109
G4DecayTable
*
LoadDecayTable
(
const
G4ParticleDefinition
& theParentNucleus);
110
// Load the decay data of isotope theParentNucleus
111
112
void
AddUserDecayDataFile
(
G4int
Z
,
G4int
A
,
G4String
filename
);
113
// Allow the user to replace the radio-active decay data provided in Geant4
114
// by its own data file for a given isotope
115
116
inline
void
SetVerboseLevel
(
G4int
value
) {
verboseLevel
=
value
;}
117
// Sets the VerboseLevel which controls duggering display
118
119
inline
G4int
GetVerboseLevel
()
const
{
return
verboseLevel
;}
120
// Returns the VerboseLevel which controls level of debugging output
121
122
inline
void
SetNucleusLimits
(
G4NucleusLimits
theNucleusLimits1)
123
{
theNucleusLimits
= theNucleusLimits1 ;}
124
// Sets theNucleusLimits which specifies the range of isotopes
125
// the G4RadioactiveDecay applies.
126
127
// Returns theNucleusLimits which specifies the range of isotopes used
128
// by G4RadioactiveDecay
129
inline
G4NucleusLimits
GetNucleusLimits
()
const
{
return
theNucleusLimits
;}
130
131
inline
void
SetDecayDirection
(
const
G4ThreeVector
& theDir) {
132
forceDecayDirection
= theDir.
unit
();
133
}
134
135
inline
const
G4ThreeVector
&
GetDecayDirection
()
const
{
136
return
forceDecayDirection
;
137
}
138
139
inline
void
SetDecayHalfAngle
(
G4double
halfAngle=0.*
CLHEP::deg
) {
140
forceDecayHalfAngle
=
std::min
(
std::max
(0.*
CLHEP::deg
,halfAngle),180.*
CLHEP::deg
);
141
}
142
143
inline
G4double
GetDecayHalfAngle
()
const
{
return
forceDecayHalfAngle
;}
144
145
// Force direction (random within half-angle) for "visible" daughters
146
// (applies to electrons, positrons, gammas, neutrons, protons or alphas)
147
inline
void
SetDecayCollimation
(
const
G4ThreeVector
& theDir,
148
G4double
halfAngle = 0.*
CLHEP::deg
) {
149
SetDecayDirection
(theDir);
150
SetDecayHalfAngle
(halfAngle);
151
}
152
153
void
BuildPhysicsTable
(
const
G4ParticleDefinition
&);
154
155
G4VParticleChange
*
DecayIt
(
const
G4Track
& theTrack,
156
const
G4Step
& theStep);
157
158
protected
:
159
160
void
DecayAnalog
(
const
G4Track
& theTrack);
161
162
G4DecayProducts
*
DoDecay
(
const
G4ParticleDefinition
& theParticleDef);
163
164
// Apply directional bias for "visible" daughters (e+-, gamma, n, p, alpha)
165
void
CollimateDecay
(
G4DecayProducts
* products);
166
void
CollimateDecayProduct
(
G4DynamicParticle
* product);
167
G4ThreeVector
ChooseCollimationDirection
()
const
;
168
169
G4double
GetMeanFreePath
(
const
G4Track
& theTrack,
G4double
previousStepSize,
170
G4ForceCondition
*
condition
);
171
172
G4double
GetMeanLifeTime
(
const
G4Track
& theTrack,
173
G4ForceCondition
*
condition
);
174
175
// ParticleChange for decay process
176
G4ParticleChangeForRadDecay
fParticleChangeForRadDecay
;
177
178
G4RadioactiveDecayBaseMessenger
*
theRadioactiveDecayBaseMessenger
;
179
G4PhotonEvaporation
*
photonEvaporation
;
180
181
std::vector<G4String>
ValidVolumes
;
182
bool
isAllVolumesMode
;
183
184
static
const
G4double
levelTolerance
;
185
186
// Library of decay tables
187
DecayTableMap
*
dkmap
;
188
#ifdef G4MULTITHREADED
189
static
DecayTableMap
* master_dkmap;
190
#endif
191
192
private
:
193
194
void
StreamInfo
(std::ostream& os,
const
G4String
& endline);
195
196
G4RadioactiveDecayBase
(
const
G4RadioactiveDecayBase
&
right
);
197
G4RadioactiveDecayBase
&
operator=
(
const
G4RadioactiveDecayBase
&
right
);
198
199
G4NucleusLimits
theNucleusLimits
;
200
201
G4bool
isInitialised
;
202
203
G4bool
applyICM
;
204
G4bool
applyARM
;
205
206
// Parameters for pre-collimated (biased) decay products
207
G4ThreeVector
forceDecayDirection
;
208
G4double
forceDecayHalfAngle
;
209
static
const
G4ThreeVector
origin
;
// (0,0,0) for convenience
210
211
// Radioactive decay database directory path
212
G4String
dirPath
;
213
214
//User define radioactive decay data files replacing some files in the G4RADECAY database
215
std::map<G4int, G4String>
theUserRadioactiveDataFiles
;
216
217
//The last RadDecayMode
218
G4RadioactiveDecayMode
theRadDecayMode
;
219
220
// // Library of decay tables
221
// DecayTableMap* dkmap;
222
// #ifdef G4MULTITHREADED
223
// static DecayTableMap* master_dkmap;
224
// #endif
225
226
// Remainder of life time at rest
227
G4double
fRemainderLifeTime
;
228
G4int
verboseLevel
;
229
230
231
// inline implementations
232
inline
233
G4double
AtRestGetPhysicalInteractionLength
(
const
G4Track
&
track
,
234
G4ForceCondition
*
condition
)
235
{
236
fRemainderLifeTime
=
237
G4VRestDiscreteProcess::AtRestGetPhysicalInteractionLength
(track, condition);
238
return
fRemainderLifeTime
;
239
}
240
241
inline
242
G4VParticleChange
*
AtRestDoIt
(
const
G4Track
& theTrack,
243
const
G4Step
& theStep)
244
{
return
DecayIt
(theTrack, theStep);}
245
246
inline
247
G4VParticleChange
*
PostStepDoIt
(
const
G4Track
& theTrack,
248
const
G4Step
& theStep)
249
{
return
DecayIt
(theTrack, theStep);}
250
251
#ifdef G4MULTITHREADED
252
public
:
253
static
G4Mutex
radioactiveDecayMutex;
254
protected
:
255
G4int
& NumberOfInstances();
256
#endif
257
};
258
259
#endif
260
geant4
tree
geant4-10.6-release
source
processes
hadronic
models
radioactive_decay
include
G4RadioactiveDecayBase.hh
Built by
Jin Huang
. updated:
Wed Jun 29 2022 17:25:50
using
1.8.2 with
ECCE GitHub integration