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
G4VCrossSectionDataSet.hh
Go to the documentation of this file.
Or view
the newest version in sPHENIX GitHub for file G4VCrossSectionDataSet.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
// GEANT4 Class header file
29
//
30
//
31
// File name: G4VCrossSectionDataSet
32
//
33
// Author F.W. Jones, TRIUMF, 20-JAN-97
34
//
35
// Modifications:
36
// 23.01.2009 V.Ivanchenko move constructor and destructor to source
37
// 05.07.2010 V.Ivanchenko added name, min and max energy limit and
38
// corresponding access methods
39
// 12.08.2011 G.Folger, V.Ivanchenko, T.Koi, D.Wright redesign the class
40
//
41
//
42
// Class Description
43
// This is a base class for hadronic cross section data sets. Users may
44
// derive specialized cross section classes and register them with the
45
// appropriate process, or use provided data sets.
46
//
47
// Each cross section should have unique name
48
// Minimal and maximal energy for the cross section will be used in run
49
// time before IsApplicable method is called
50
//
51
// Both the name and the energy interval will be used for documentation
52
//
53
// Class Description - End
54
55
#ifndef G4VCrossSectionDataSet_h
56
#define G4VCrossSectionDataSet_h 1
57
58
#include "
globals.hh
"
59
#include "
G4ParticleDefinition.hh
"
60
#include "
G4DynamicParticle.hh
"
61
#include "
G4Element.hh
"
62
#include <iostream>
63
64
class
G4DynamicParticle
;
65
class
G4Isotope
;
66
class
G4Material
;
67
class
G4CrossSectionDataSetRegistry
;
68
69
class
G4VCrossSectionDataSet
70
{
71
public
:
//with description
72
73
G4VCrossSectionDataSet
(
const
G4String
& nam =
""
);
74
75
virtual
~G4VCrossSectionDataSet
();
76
77
//============== Is Applicable methods ===============================
78
// The following three methods have default implementations returning
79
// "false". Derived classes should implement only needed methods.
80
81
// Element-wise cross section
82
virtual
83
G4bool
IsElementApplicable
(
const
G4DynamicParticle
*,
G4int
Z
,
84
const
G4Material
*
mat
=
nullptr
);
85
86
// Derived classes should implement this method if they provide isotope-wise
87
// cross sections. Default arguments G4Element and G4Material are needed to
88
// access low-energy neutron cross sections, but are not required for others.
89
virtual
90
G4bool
IsIsoApplicable
(
const
G4DynamicParticle
*,
G4int
Z,
G4int
A
,
91
const
G4Element
* elm =
nullptr
,
92
const
G4Material
*
mat
=
nullptr
);
93
94
//============== GetCrossSection methods ===============================
95
96
// This is a generic method to access cross section per element
97
// This method should not be overwritten in a derived class
98
inline
G4double
GetCrossSection
(
const
G4DynamicParticle
*,
const
G4Element
*,
99
const
G4Material
*
mat
=
nullptr
);
100
101
// This is a generic method to compute cross section per element
102
// If the DataSet is not applicable the method returns zero
103
// This method should not be overwritten in a derived class
104
G4double
ComputeCrossSection
(
const
G4DynamicParticle
*,
105
const
G4Element
*,
106
const
G4Material
*
mat
=
nullptr
);
107
108
// The following two methods have default implementations which throw
109
// G4Exception. Derived classes should implement only needed
110
// methods, which are assumed to be called at run time.
111
112
// Implement this method for element-wise cross section
113
virtual
114
G4double
GetElementCrossSection
(
const
G4DynamicParticle
*,
G4int
Z,
115
const
G4Material
*
mat
=
nullptr
);
116
117
// Derived classes should implement this method if they provide isotope-wise
118
// cross sections. Default arguments G4Element and G4Material are needed to
119
// access low-energy neutron cross sections, but are not required for others.
120
virtual
121
G4double
GetIsoCrossSection
(
const
G4DynamicParticle
*,
G4int
Z,
G4int
A,
122
const
G4Isotope
* iso =
nullptr
,
123
const
G4Element
* elm =
nullptr
,
124
const
G4Material
*
mat
=
nullptr
);
125
126
//=====================================================================
127
128
// Implement this method if needed
129
// This method is called for element-wise cross section
130
// Default implementation assumes equal cross sections for all isotopes
131
virtual
const
G4Isotope
*
SelectIsotope
(
const
G4Element
*,
G4double
kinEnergy,
132
G4double
logE);
133
134
// Implement this method if needed
135
virtual
136
void
BuildPhysicsTable
(
const
G4ParticleDefinition
&);
137
138
// Implement this method if needed
139
// Default implementation will provide a dump of the cross section
140
// in logarithmic scale in the interval of applicability
141
virtual
142
void
DumpPhysicsTable
(
const
G4ParticleDefinition
&);
143
144
virtual
void
CrossSectionDescription
(std::ostream&)
const
;
145
146
public
:
// Without Description
147
148
virtual
G4int
GetVerboseLevel
()
const
;
149
150
virtual
void
SetVerboseLevel
(
G4int
value
);
151
152
inline
G4double
GetMinKinEnergy
()
const
;
153
154
inline
void
SetMinKinEnergy
(
G4double
value);
155
156
inline
G4double
GetMaxKinEnergy
()
const
;
157
158
inline
void
SetMaxKinEnergy
(
G4double
value);
159
160
inline
bool
ForAllAtomsAndEnergies
()
const
;
161
162
inline
void
SetForAllAtomsAndEnergies
(
G4bool
val);
163
164
inline
const
G4String
&
GetName
()
const
;
165
166
protected
:
167
168
inline
void
SetName
(
const
G4String
&);
169
170
G4int
verboseLevel
;
171
172
private
:
173
174
G4VCrossSectionDataSet
&
operator=
(
const
G4VCrossSectionDataSet
&
right
);
175
G4VCrossSectionDataSet
(
const
G4VCrossSectionDataSet
&);
176
177
G4CrossSectionDataSetRegistry
*
registry
;
178
179
G4double
minKinEnergy
;
180
G4double
maxKinEnergy
;
181
182
G4bool
isForAllAtomsAndEnergies
;
183
184
G4String
name
;
185
};
186
187
inline
G4double
188
G4VCrossSectionDataSet::GetCrossSection
(
const
G4DynamicParticle
* dp,
189
const
G4Element
* elm,
190
const
G4Material
*
mat
)
191
{
192
return
ComputeCrossSection
(dp, elm, mat);
193
}
194
195
196
inline
G4int
G4VCrossSectionDataSet::GetVerboseLevel
()
const
197
{
198
return
verboseLevel
;
199
}
200
201
inline
void
G4VCrossSectionDataSet::SetVerboseLevel
(
G4int
value
)
202
{
203
verboseLevel
=
value
;
204
}
205
206
inline
void
G4VCrossSectionDataSet::SetMinKinEnergy
(
G4double
value
)
207
{
208
minKinEnergy
=
value
;
209
}
210
211
inline
G4double
G4VCrossSectionDataSet::GetMinKinEnergy
()
const
212
{
213
return
minKinEnergy
;
214
}
215
216
inline
void
G4VCrossSectionDataSet::SetMaxKinEnergy
(
G4double
value
)
217
{
218
maxKinEnergy
=
value
;
219
}
220
221
inline
G4double
G4VCrossSectionDataSet::GetMaxKinEnergy
()
const
222
{
223
return
maxKinEnergy
;
224
}
225
226
inline
const
G4String
&
G4VCrossSectionDataSet::GetName
()
const
227
{
228
return
name
;
229
}
230
231
inline
bool
G4VCrossSectionDataSet::ForAllAtomsAndEnergies
()
const
232
{
233
return
isForAllAtomsAndEnergies
;
234
}
235
236
inline
void
G4VCrossSectionDataSet::SetForAllAtomsAndEnergies
(
G4bool
val)
237
{
238
isForAllAtomsAndEnergies
= val;
239
}
240
241
inline
void
G4VCrossSectionDataSet::SetName
(
const
G4String
& nam)
242
{
243
name
= nam;
244
}
245
246
#endif
geant4
tree
geant4-10.6-release
source
processes
hadronic
cross_sections
include
G4VCrossSectionDataSet.hh
Built by
Jin Huang
. updated:
Wed Jun 29 2022 17:25:37
using
1.8.2 with
ECCE GitHub integration