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
G4PreCompoundFragment.cc
Go to the documentation of this file.
Or view
the newest version in sPHENIX GitHub for file G4PreCompoundFragment.cc
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
// J. M. Quesada (August 2008).
28
// Based on previous work by V. Lara
29
//
30
// Modified:
31
// 06.09.2008 JMQ Also external choice has been added for:
32
// - superimposed Coulomb barrier (if useSICB=true)
33
// 20.08.2010 V.Ivanchenko cleanup
34
//
35
36
#include "
G4PreCompoundFragment.hh
"
37
#include "
G4KalbachCrossSection.hh
"
38
#include "
G4ChatterjeeCrossSection.hh
"
39
#include "
G4DeexPrecoParameters.hh
"
40
#include "
Randomize.hh
"
41
42
G4PreCompoundFragment::G4PreCompoundFragment
(
const
G4ParticleDefinition
*
p
,
43
G4VCoulombBarrier
* aCoulBarrier)
44
:
G4VPreCompoundFragment
(p, aCoulBarrier)
45
{
46
muu
=
probmax
= 0.0;
47
if
(0 ==
theZ
) {
index
= 0; }
48
else
if
(1 ==
theZ
) {
index
=
theA
; }
49
else
{
index
=
theA
+ 1; }
50
}
51
52
G4PreCompoundFragment::~G4PreCompoundFragment
()
53
{}
54
55
G4double
G4PreCompoundFragment::
56
CalcEmissionProbability
(
const
G4Fragment
& aFragment)
57
{
58
//G4cout << theCoulombBarrier << " " << GetMaximalKineticEnergy() << G4endl;
59
// If theCoulombBarrier effect is included in the emission probabilities
60
// Coulomb barrier is the lower limit of integration over kinetic energy
61
62
theEmissionProbability
= 0.0;
63
64
if
(
theMaxKinEnergy
<=
theMinKinEnergy
) {
return
0.0; }
65
66
// compute power once
67
if
(0 <
index
) {
68
muu
=
G4KalbachCrossSection::ComputePowerParameter
(
theResA
,
index
);
69
}
70
71
theEmissionProbability
=
72
IntegrateEmissionProbability
(
theMinKinEnergy
,
theMaxKinEnergy
,aFragment);
73
/*
74
G4cout << "## G4PreCompoundFragment::CalcEmisProb "
75
<< "Z= " << aFragment.GetZ_asInt()
76
<< " A= " << aFragment.GetA_asInt()
77
<< " Elow= " << LowerLimit/MeV
78
<< " Eup= " << UpperLimit/MeV
79
<< " prob= " << theEmissionProbability
80
<< G4endl;
81
*/
82
return
theEmissionProbability
;
83
}
84
85
G4double
G4PreCompoundFragment::
86
IntegrateEmissionProbability
(
G4double
low,
G4double
up,
87
const
G4Fragment
& aFragment)
88
{
89
static
const
G4double
den
= 1.0/
CLHEP::MeV
;
90
G4double
del = (up - low);
91
G4int
nbins =
std::max
(4,(
G4int
)(del*den));
92
del /= (
G4double
)nbins;
93
G4double
e
= low + 0.5*del;
94
probmax
=
ProbabilityDistributionFunction
(e, aFragment);
95
//G4cout << " 0. e= " << e << " y= " << probmax << G4endl;
96
97
G4double
sum
=
probmax
;
98
for
(
G4int
i=1; i<nbins; ++i) {
99
e += del;
100
101
G4double
y
=
ProbabilityDistributionFunction
(e, aFragment);
102
probmax
=
std::max
(
probmax
, y);
103
sum +=
y
;
104
if
(y < sum*0.01) {
break
; }
105
//G4cout << " " << i << ". e= " << e << " y= " << y << " sum= " << sum << G4endl;
106
}
107
sum *= del;
108
//G4cout << "Evap prob: " << sum << " probmax= " << probmax << G4endl;
109
return
sum
;
110
}
111
112
G4double
G4PreCompoundFragment::CrossSection
(
G4double
ekin)
const
113
{
114
G4double
res;
115
if
(
OPTxs
== 0 || (
OPTxs
== 4 &&
theMaxKinEnergy
< 10.)) {
116
res =
GetOpt0
(ekin);
117
118
}
else
if
(
OPTxs
<= 2) {
119
res =
G4ChatterjeeCrossSection::ComputeCrossSection
(ekin,
theCoulombBarrier
,
120
theResA13
,
muu
,
121
index
,
theZ
,
theResA
);
122
123
}
else
{
124
res =
G4KalbachCrossSection::ComputeCrossSection
(ekin,
theCoulombBarrier
,
125
theResA13
,
muu
,
126
index
,
theZ
,
theA
,
theResA
);
127
}
128
return
res;
129
}
130
131
// *********************** OPT=0 : Dostrovski's cross section ***************
132
G4double
G4PreCompoundFragment::GetOpt0
(
G4double
ekin)
const
133
{
134
G4double
r0 =
theParameters
->
GetR0
()*
theResA13
;
135
// cross section is now given in mb (r0 is in mm) for the sake of consistency
136
//with the rest of the options
137
return
1.e+25*
CLHEP::pi
*r0*r0*
theResA13
*
GetAlpha
()*(1.0 +
GetBeta
()/ekin);
138
}
139
140
G4double
G4PreCompoundFragment::SampleKineticEnergy
(
const
G4Fragment
& fragment)
141
{
142
G4double
delta
=
theMaxKinEnergy
-
theMinKinEnergy
;
143
static
const
G4double
toler = 1.25;
144
probmax
*= toler;
145
G4double
prob,
T
(0.0);
146
CLHEP::HepRandomEngine
* rndm = G4Random::getTheEngine();
147
G4int
i;
148
for
(i=0; i<100; ++i) {
149
T = theMinKinEnergy + delta*rndm->
flat
();
150
prob =
ProbabilityDistributionFunction
(T, fragment);
151
/*
152
if(prob > probmax) {
153
G4cout << "G4PreCompoundFragment WARNING: prob= " << prob
154
<< " probmax= " << probmax << G4endl;
155
G4cout << "i= " << i << " Z= " << theZ << " A= " << theA
156
<< " resZ= " << theResZ << " resA= " << theResA << "\n"
157
<< " T= " << T << " Tmax= " << theMaxKinEnergy
158
<< " Tmin= " << limit
159
<< G4endl;
160
for(G4int i=0; i<N; ++i) { G4cout << " " << probability[i]; }
161
G4cout << G4endl;
162
}
163
*/
164
// Loop checking, 05-Aug-2015, Vladimir Ivanchenko
165
if
(
probmax
*rndm->
flat
() <= prob) {
break
; }
166
}
167
/*
168
G4cout << "G4PreCompoundFragment: i= " << i << " Z= " << theZ << " A= " << theA
169
<<" T(MeV)= " << T << " Emin(MeV)= " << theMinKinEnergy << " Emax= "
170
<< theMaxKinEnergy << G4endl;
171
*/
172
return
T
;
173
}
174
geant4
tree
geant4-10.6-release
source
processes
hadronic
models
pre_equilibrium
exciton_model
src
G4PreCompoundFragment.cc
Built by
Jin Huang
. updated:
Wed Jun 29 2022 17:25:49
using
1.8.2 with
ECCE GitHub integration