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
G4ICRU90StoppingData.hh
Go to the documentation of this file.
Or view
the newest version in sPHENIX GitHub for file G4ICRU90StoppingData.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
#ifndef G4ICRU90StoppingData_h
28
#define G4ICRU90StoppingData_h 1
29
30
//----------------------------------------------------------------------
31
//
32
// File name: G4ICRU90StoppingData
33
//
34
// Description: Data on electroninc stopping power from ICRU 90
35
//
36
// Author: Lucas Norberto Burigo
37
//
38
// Creation date: 03.09.2018
39
//
40
// Modifications: 25.09.2018 V.Ivanchenko adopted for material sub-library
41
//
42
//----------------------------------------------------------------------------
43
//
44
// Class Description:
45
//
46
// Data on electonic stopping powers from ICRU 90 report
47
//
48
//
49
50
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
51
52
#include "
globals.hh
"
53
#include "
G4Material.hh
"
54
#include "
G4LPhysicsFreeVector.hh
"
55
56
class
G4ICRU90StoppingData
57
{
58
public
:
59
60
explicit
G4ICRU90StoppingData
();
61
62
~G4ICRU90StoppingData
();
63
64
void
Initialise
();
65
66
G4double
67
GetElectronicDEDXforProton
(
const
G4Material
*,
G4double
kinEnergy)
const
;
68
69
G4double
70
GetElectronicDEDXforAlpha
(
const
G4Material
*,
G4double
scaledKinEnergy)
const
;
71
72
inline
G4int
GetIndex
(
const
G4Material
*)
const
;
73
74
inline
G4int
GetIndex
(
const
G4String
&)
const
;
75
76
inline
G4double
77
GetElectronicDEDXforProton
(
G4int
idx
,
G4double
kinEnergy)
const
;
78
79
inline
G4double
80
GetElectronicDEDXforAlpha
(
G4int
idx,
G4double
scaledKinEnergy)
const
;
81
82
inline
G4bool
IsApplicable
(
const
G4Material
*)
const
;
83
84
private
:
85
86
inline
G4double
GetDEDX
(
G4LPhysicsFreeVector
*,
G4double
e
)
const
;
87
88
void
FillData
();
89
90
G4LPhysicsFreeVector
*
AddData
(
G4int
n
,
const
G4double
* e,
const
G4float
* dedx);
91
92
// hide assignment operator
93
G4ICRU90StoppingData
&
operator
=
94
(
const
G4ICRU90StoppingData
&
right
) =
delete
;
95
G4ICRU90StoppingData
(
const
G4ICRU90StoppingData
&) =
delete
;
96
97
static
constexpr
G4int
nvectors
= 3;
98
const
G4Material
*
materials
[
nvectors
];
99
G4LPhysicsFreeVector
*
sdata_proton
[
nvectors
];
100
G4LPhysicsFreeVector
*
sdata_alpha
[
nvectors
];
101
G4bool
isInitialized
;
102
};
103
104
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
105
106
inline
G4bool
G4ICRU90StoppingData::IsApplicable
(
const
G4Material
*
mat
)
const
107
{
108
return
(mat ==
materials
[0] || mat ==
materials
[1] || mat ==
materials
[2]);
109
}
110
111
inline
G4int
G4ICRU90StoppingData::GetIndex
(
const
G4Material
*
mat
)
const
112
{
113
G4int
idx
= -1;
114
if
(mat ==
materials
[0]) { idx = 0; }
115
else
if
(mat ==
materials
[1]) { idx = 1; }
116
else
if
(mat ==
materials
[2]) { idx = 2; }
117
return
idx
;
118
}
119
120
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
121
122
inline
G4int
G4ICRU90StoppingData::GetIndex
(
const
G4String
& nam)
const
123
{
124
G4int
idx
= -1;
125
if
(nam ==
materials
[0]->GetName()) { idx = 0; }
126
else
if
(nam ==
materials
[1]->GetName()) { idx = 1; }
127
else
if
(nam ==
materials
[2]->GetName()) { idx = 2; }
128
return
idx
;
129
}
130
131
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
132
133
inline
G4double
134
G4ICRU90StoppingData::GetDEDX
(
G4LPhysicsFreeVector
*
data
,
G4double
e
)
const
135
{
136
G4double
emin
= data->
Energy
(0);
137
return
(e <= emin) ? (*data)[0]*std::sqrt(e/emin) : data->
Value
(e);
138
}
139
140
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
141
142
inline
G4double
G4ICRU90StoppingData::GetElectronicDEDXforProton
(
143
G4int
idx
,
G4double
kinEnergy)
const
144
{
145
return
(idx < 0 || idx >=
nvectors
) ? 0.0
146
:
GetDEDX
(
sdata_proton
[idx], kinEnergy);
147
}
148
149
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
150
151
inline
G4double
G4ICRU90StoppingData::GetElectronicDEDXforAlpha
(
152
G4int
idx
,
G4double
scaledKinEnergy)
const
153
{
154
return
(idx < 0 || idx >=
nvectors
) ? 0.0
155
:
GetDEDX
(
sdata_alpha
[idx], scaledKinEnergy);
156
}
157
158
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
159
160
#endif
geant4
tree
geant4-10.6-release
source
materials
include
G4ICRU90StoppingData.hh
Built by
Jin Huang
. updated:
Wed Jun 29 2022 17:25:22
using
1.8.2 with
ECCE GitHub integration