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
G4ParticleHPParticleYield.hh
Go to the documentation of this file.
Or view
the newest version in sPHENIX GitHub for file G4ParticleHPParticleYield.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
// P. Arce, June-2014 Conversion neutron_hp to particle_hp
28
//
29
#ifndef G4ParticleHPParticleYield_h
30
#define G4ParticleHPParticleYield_h 1
31
32
#include <
CLHEP/Units/SystemOfUnits.h
>
33
34
#include "
globals.hh
"
35
#include "
G4ParticleHPVector.hh
"
36
#include "
G4ParticleHPPolynomExpansion.hh
"
37
#include "
G4ParticleHPList.hh
"
38
39
class
G4ParticleHPParticleYield
40
{
41
public
:
42
G4ParticleHPParticleYield
()
43
{
44
simpleMean
=
true
;
45
spontPrompt
=
true
;
46
hasPromptData
=
false
;
47
hasDelayedData
=
false
;
48
49
targetMass
= 0.0;
50
theSpontPrompt
= 0.0;
51
spontDelayed
=
true
;
52
theSpontDelayed
= 0.0;
53
}
54
~G4ParticleHPParticleYield
(){}
55
56
G4double
GetTargetMass
() {
return
targetMass
; }
57
58
void
InitMean
(std::istream & aDataFile)
59
{
60
G4int
iflag;
61
aDataFile >>
targetMass
>>iflag;
62
if
(iflag == 1)
simpleMean
=
false
;
63
if
(
simpleMean
)
64
{
65
theSimpleMean
.
Init
(aDataFile,
CLHEP::eV
);
66
}
67
else
68
{
69
theMean
.
Init
(aDataFile);
70
}
71
}
72
73
void
InitPrompt
(std::istream & aDataFile)
74
{
75
hasPromptData
=
true
;
76
G4int
iflag;
77
aDataFile >>
targetMass
>>iflag;
78
if
(iflag == 2)
spontPrompt
=
false
;
79
if
(
spontPrompt
)
80
{
81
aDataFile >>
theSpontPrompt
;
82
}
83
else
84
{
85
thePrompt
.
Init
(aDataFile,
CLHEP::eV
);
86
}
87
}
88
89
void
InitDelayed
(std::istream & aDataFile)
90
{
91
hasDelayedData
=
true
;
92
G4int
iflag;
93
aDataFile >>
targetMass
>>iflag;
94
thePrecursorDecayConstants
.
Init
(aDataFile, 1./
CLHEP::s
);
// s is the CLHEP unit second
95
if
(iflag == 2)
spontDelayed
=
false
;
96
if
(
spontDelayed
)
97
{
98
aDataFile >>
theSpontDelayed
;
99
}
100
else
101
{
102
theDelayed
.
Init
(aDataFile,
CLHEP::eV
);
103
}
104
}
105
106
G4double
GetMean
(
G4double
anEnergy)
107
{
108
if
(
simpleMean
)
109
{
110
return
theSimpleMean
.
GetY
(anEnergy);
111
}
112
return
theMean
.
GetValue
(anEnergy);
113
}
114
115
G4double
GetPrompt
(
G4double
anEnergy)
116
{
117
if
(!
hasPromptData
)
return
0;
118
if
(
spontPrompt
)
119
{
120
return
theSpontPrompt
;
121
}
122
return
thePrompt
.
GetY
(anEnergy);
123
}
124
125
G4double
GetDelayed
(
G4double
anEnergy)
126
{
127
if
(!
hasDelayedData
)
return
0;
128
if
(
spontDelayed
)
129
{
130
return
theSpontDelayed
;
131
}
132
return
theDelayed
.
GetY
(anEnergy);
133
}
134
135
inline
G4double
GetDecayConstant
(
G4int
i)
136
{
137
return
thePrecursorDecayConstants
.
GetValue
(i);
138
}
139
140
private
:
141
142
G4double
targetMass
;
143
// total mean
144
G4bool
simpleMean
;
145
G4ParticleHPPolynomExpansion
theMean
;
146
G4ParticleHPVector
theSimpleMean
;
147
148
// Prompt neutrons
149
G4bool
hasPromptData
;
150
G4bool
spontPrompt
;
151
G4ParticleHPVector
thePrompt
;
152
G4double
theSpontPrompt
;
153
154
// delayed neutrons
155
G4bool
hasDelayedData
;
156
G4bool
spontDelayed
;
157
G4ParticleHPList
thePrecursorDecayConstants
;
158
G4ParticleHPVector
theDelayed
;
159
G4double
theSpontDelayed
;
160
161
};
162
#endif
geant4
tree
geant4-10.6-release
source
processes
hadronic
models
particle_hp
include
G4ParticleHPParticleYield.hh
Built by
Jin Huang
. updated:
Wed Jun 29 2022 17:25:47
using
1.8.2 with
ECCE GitHub integration