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
G4GammaGeneralProcess.hh
Go to the documentation of this file.
Or view
the newest version in sPHENIX GitHub for file G4GammaGeneralProcess.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
// GEANT4 Class header file
30
//
31
//
32
// File name: G4GammaGeneralProcess
33
//
34
// Author: Vladimir Ivanchenko
35
//
36
// Creation date: 19.07.2018
37
//
38
// Modifications:
39
//
40
// Class Description:
41
//
42
// It is the gamma super process
43
44
// -------------------------------------------------------------------
45
//
46
47
#ifndef G4GammaGeneralProcess_h
48
#define G4GammaGeneralProcess_h 1
49
50
#include <
CLHEP/Units/SystemOfUnits.h
>
51
52
#include "
G4VEmProcess.hh
"
53
#include "
globals.hh
"
54
#include "
G4EmDataHandler.hh
"
55
56
class
G4Step
;
57
class
G4Track
;
58
class
G4ParticleDefinition
;
59
class
G4VParticleChange
;
60
class
G4GammaConversionToMuons
;
61
class
G4HadronicProcess
;
62
class
G4LossTableManager
;
63
class
G4MaterialCutsCouple
;
64
class
G4EmParameters
;
65
66
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
67
68
class
G4GammaGeneralProcess
:
public
G4VEmProcess
69
{
70
public
:
71
72
explicit
G4GammaGeneralProcess
();
73
74
virtual
~G4GammaGeneralProcess
();
75
76
G4bool
IsApplicable
(
const
G4ParticleDefinition
&)
final
;
77
78
void
AddEmProcess
(
G4VEmProcess
*);
79
80
void
AddMMProcess
(
G4GammaConversionToMuons
*);
81
82
void
AddHadProcess
(
G4HadronicProcess
*);
83
84
void
ProcessDescription
(std::ostream& outFile)
const
final
;
85
86
protected
:
87
88
void
InitialiseProcess
(
const
G4ParticleDefinition
*)
final
;
89
90
public
:
91
92
// Initialise for build of tables
93
void
PreparePhysicsTable
(
const
G4ParticleDefinition
&)
final
;
94
95
// Build physics table during initialisation
96
void
BuildPhysicsTable
(
const
G4ParticleDefinition
&)
final
;
97
98
// Called before tracking of each new G4Track
99
void
StartTracking
(
G4Track
*)
final
;
100
101
// implementation of virtual method, specific for G4GammaGeneralProcess
102
G4double
PostStepGetPhysicalInteractionLength
(
103
const
G4Track
&
track
,
104
G4double
previousStepSize,
105
G4ForceCondition
*
condition
)
final
;
106
107
// implementation of virtual method, specific for G4GammaGeneralProcess
108
G4VParticleChange
*
PostStepDoIt
(
const
G4Track
&,
const
G4Step
&)
final
;
109
110
// Store PhysicsTable in a file.
111
// Return false in case of failure at I/O
112
G4bool
StorePhysicsTable
(
const
G4ParticleDefinition
*,
113
const
G4String
& directory,
114
G4bool
ascii =
false
)
final
;
115
116
// Retrieve Physics from a file.
117
// (return true if the Physics Table can be build by using file)
118
// (return false if the process has no functionality or in case of failure)
119
// File name should is constructed as processName+particleName and the
120
// should be placed under the directory specifed by the argument.
121
G4bool
RetrievePhysicsTable
(
const
G4ParticleDefinition
*,
122
const
G4String
& directory,
123
G4bool
ascii)
final
;
124
125
const
G4String
&
GetProcessName
()
const
;
126
127
G4int
GetProcessSubType
()
const
;
128
129
G4VEmProcess
*
GetEmProcess
(
const
G4String
&
name
)
final
;
130
131
protected
:
132
133
G4double
GetMeanFreePath
(
const
G4Track
& track,
G4double
previousStepSize,
134
G4ForceCondition
* condition)
final
;
135
136
private
:
137
138
// It returns the cross section per volume for energy/ material
139
G4double
TotalCrossSectionPerVolume
();
140
141
inline
G4double
ComputeGeneralLambda
(
size_t
idxe,
size_t
idxt);
142
143
inline
G4double
GetProbability
(
size_t
idxt);
144
145
inline
void
SelectedProcess
(
const
G4Track
& track,
G4VProcess
* ptr);
146
147
inline
G4VParticleChange
*
SampleSecondaries
(
const
G4Track
&,
const
G4Step
&,
148
G4VEmProcess
*);
149
150
G4VParticleChange
*
SampleSecondaries
(
const
G4Track
&,
const
G4Step
&,
151
G4HadronicProcess
*);
152
153
// hide copy constructor and assignment operator
154
G4GammaGeneralProcess
(
G4GammaGeneralProcess
&);
155
G4GammaGeneralProcess
&
operator=
(
const
G4GammaGeneralProcess
&
right
);
156
157
static
G4EmDataHandler
*
theHandler
;
158
static
const
size_t
nTables
= 15;
159
static
G4bool
theT
[
nTables
];
160
static
G4String
nameT
[
nTables
];
161
162
G4VEmProcess
*
thePhotoElectric
;
163
G4VEmProcess
*
theCompton
;
164
G4VEmProcess
*
theConversionEE
;
165
G4VEmProcess
*
theRayleigh
;
166
G4HadronicProcess
*
theGammaNuclear
;
167
G4GammaConversionToMuons
*
theConversionMM
;
168
G4VProcess
*
selectedProc
;
169
170
G4double
minPEEnergy
;
171
G4double
minEEEnergy
;
172
G4double
minMMEnergy
;
173
G4double
peLambda
;
174
G4double
preStepLogE
;
175
G4double
factor
;
176
177
size_t
nLowE
;
178
size_t
nHighE
;
179
size_t
idxEnergy
;
180
G4bool
splineFlag
;
181
};
182
183
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
184
185
inline
G4double
186
G4GammaGeneralProcess::ComputeGeneralLambda
(
size_t
idxe,
size_t
idxt)
187
{
188
idxEnergy
= idxe;
189
return
factor
*
theHandler
->
GetVector
(idxt,
basedCoupleIndex
)
190
->
LogVectorValue
(
preStepKinEnergy
,
preStepLogE
);
191
}
192
193
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
194
195
inline
G4double
G4GammaGeneralProcess::GetProbability
(
size_t
idxt)
196
{
197
return
(
theT
[idxt]) ?
theHandler
->
GetVector
(idxt,
basedCoupleIndex
)
198
->
LogVectorValue
(
preStepKinEnergy
,
preStepLogE
) : 1.0;
199
}
200
201
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
202
203
inline
void
204
G4GammaGeneralProcess::SelectedProcess
(
const
G4Track
&
track
,
G4VProcess
* ptr)
205
{
206
selectedProc
= ptr;
207
const_cast<
G4Track
*
>
(&
track
)->SetCreatorProcess(ptr);
208
}
209
210
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
211
212
inline
G4VParticleChange
*
213
G4GammaGeneralProcess::SampleSecondaries
(
const
G4Track
&
track
,
const
G4Step
&
step
,
214
G4VEmProcess
* proc)
215
{
216
proc->
CurrentSetup
(
currentCouple
,
preStepKinEnergy
);
217
SelectedProcess
(track, proc);
218
return
proc->
PostStepDoIt
(track, step);
219
}
220
221
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
222
223
#endif
geant4
tree
geant4-10.6-release
source
physics_lists
constructors
electromagnetic
include
G4GammaGeneralProcess.hh
Built by
Jin Huang
. updated:
Wed Jun 29 2022 17:25:26
using
1.8.2 with
ECCE GitHub integration