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