#include <G4ExtendedPhysicsVector.hh>
Definition at line 44 of file G4ExtendedPhysicsVector.hh.
◆ G4ExtendedPhysicsVector() [1/3]
◆ ~G4ExtendedPhysicsVector()
| G4ExtendedPhysicsVector::~G4ExtendedPhysicsVector |
( |
| ) |
|
|
virtual |
Definition at line 59 of file G4ExtendedPhysicsVector.cc.
60{
61 if (nPartialXS > 0)
62 {
63 for (auto const & p : *dataPartialXS) { delete p; }
64 delete dataPartialXS;
65 }
66 delete totalData;
67}
◆ G4ExtendedPhysicsVector() [2/3]
◆ G4ExtendedPhysicsVector() [3/3]
◆ DumpValues()
| void G4ExtendedPhysicsVector::DumpValues |
( |
G4double | unitE = 1.0, |
|
|
G4double | unitV = 1.0 ) const |
Definition at line 213 of file G4ExtendedPhysicsVector.cc.
214{
215 G4cout <<
"====== Data length " << numberOfNodes <<
" =====" <<
G4endl;
216
217 for (std::size_t i = 0; i < numberOfNodes; ++i)
218 {
219 G4cout << i <<
". " << totalData->Energy(i) / unitE;
220 for (
G4int j = 0; j < nPartialXS; ++j)
221 {
222 G4cout <<
" " << (*((*dataPartialXS)[i]))[j];
223 }
225 }
226}
◆ GetPhysicsVector()
| const G4PhysicsVector * G4ExtendedPhysicsVector::GetPhysicsVector |
( |
| ) |
const |
|
inline |
◆ LogLogValue()
| G4double G4ExtendedPhysicsVector::LogLogValue |
( |
const G4double | energy, |
|
|
std::size_t & | lastidx ) const |
Definition at line 99 of file G4ExtendedPhysicsVector.cc.
100{
101 G4bool interpolation = totalData->CheckIndex(e, idx);
102
104 if (interpolation)
105 {
106 G4double e1 = totalData->Energy(idx);
107 G4double e2 = totalData->Energy(idx + 1);
108 G4double y2 = (*totalData)[idx + 1];
109 if (e1 > 0.0 && e2 > e1 && y1 > 0.0 && y2 > 0.0)
110 {
112 }
113 }
114 return y1;
115}
G4double G4Exp(G4double initial_x)
Exponential Function double precision.
G4double G4Log(G4double x)
◆ operator=() [1/2]
◆ operator=() [2/2]
◆ operator==()
◆ PutPartialXSData()
| void G4ExtendedPhysicsVector::PutPartialXSData |
( |
const std::size_t | idx, |
|
|
const G4double * | y ) |
Definition at line 118 of file G4ExtendedPhysicsVector.cc.
119{
120 if (idx >= numberOfNodes)
121 {
122 if (0 < verboseLevel)
123 {
124 G4cout <<
"### G4ExtendedPhysicsVector::PutPartialXSData(..) idx=" << idx
125 << " is out of range " << numberOfNodes
127 }
128 return;
129 }
130
131
132
134 for (
G4int i = 0; i < nPartialXS; ++i)
135 {
137 (*((*dataPartialXS)[i]))[idx] = sum;
138 }
140 if (sum > 0.f)
141 {
142 sum = 1.f/sum;
143 for (
G4int i = 0; i < nPartialXS; ++i)
144 {
145 (*((*dataPartialXS)[i]))[idx] *= sum;
146 }
147 }
148}
Referenced by G4MatUtils::BuildExtendedVector().
◆ SampleReactionChannel()
| G4int G4ExtendedPhysicsVector::SampleReactionChannel |
( |
const G4double | energy, |
|
|
const G4double | rand, |
|
|
std::size_t & | lastidx ) const |
Definition at line 151 of file G4ExtendedPhysicsVector.cc.
154{
155 if (nPartialXS <= 1) { return 0; }
156 G4bool interpolation = totalData->CheckIndex(e, idx);
157
158 G4double e1 = totalData->Energy(idx);
160 if (interpolation)
161 {
162 e2 = totalData->Energy(idx + 1) - e1;
163 if (e2 <= 0.0) { interpolation = false; }
164 }
165 for (
G4int i=0; i < nPartialXS; ++i)
166 {
168 if (interpolation)
169 {
171 xs += (e - e1) * xs2 / e2;
172 }
173 if (xs >= rand) { return i; }
174 }
175 return nPartialXS;
176}
◆ SampleReactionChannelLogLog()
| G4int G4ExtendedPhysicsVector::SampleReactionChannelLogLog |
( |
const G4double | energy, |
|
|
const G4double | rand, |
|
|
std::size_t & | lastidx ) const |
Definition at line 180 of file G4ExtendedPhysicsVector.cc.
183{
184 if (nPartialXS <= 1) { return 0; }
185 G4bool interpolation = totalData->CheckIndex(e, idx);
186
187 G4double e1 = totalData->Energy(idx);
188 if (e1 <= 0.0) { interpolation = false; }
190 if (interpolation)
191 {
192 e2 = totalData->Energy(idx + 1);
193 if (e2 <= e1) { interpolation = false; }
195 }
196 for (
G4int i = 0; i < nPartialXS; ++i)
197 {
199 if (interpolation && xs > 0.0)
200 {
202 if (xs2 > 0.0)
203 {
205 }
206 }
207 if (xs >= rand) { return i; }
208 }
209 return nPartialXS;
210}
◆ SetDataLength()
| void G4ExtendedPhysicsVector::SetDataLength |
( |
G4int | dlength | ) |
|
Definition at line 70 of file G4ExtendedPhysicsVector.cc.
71{
72
73 totalData->SetDataLength(dlength);
74 numberOfNodes = totalData->GetVectorLength();
75 if (1 < numberOfNodes)
76 {
77 idxmax = numberOfNodes - 2;
78 }
79 else
80 {
81 if (0 < verboseLevel)
82 {
83 G4cout <<
"### G4ExtendedPhysicsVector::SetDataLength numberOfNodes="
84 << numberOfNodes <<
" data structure left empty." <<
G4endl;
85 }
86 return;
87 }
88
89 if (nPartialXS > 0)
90 {
91 for (
G4int i = 0; i < nPartialXS; ++i)
92 {
93 (*dataPartialXS)[i] = new std::vector<G4float>(numberOfNodes, 0.f);
94 }
95 }
96}
Referenced by G4MatUtils::BuildExtendedVector().
◆ Value()
| G4double G4ExtendedPhysicsVector::Value |
( |
const G4double | energy, |
|
|
std::size_t & | lastidx ) const |
|
inline |
The documentation for this class was generated from the following files: