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
ECCE @ EIC Software
Deprecated List
Modules
Namespaces
Classes
Files
File List
acts
analysis
coresoftware
Doxygen_Assist
ecce-detectors
fun4all_eicdetectors
geant4
tree
geant4-10.6-release
config
environments
examples
source
analysis
digits_hits
error_propagation
event
externals
g3tog4
geometry
global
graphics_reps
intercoms
interfaces
materials
parameterisations
particles
persistency
physics_lists
processes
biasing
cuts
decay
electromagnetic
hadronic
cross_sections
management
models
abla
abrasion
binary_cascade
cascade
cascade
include
src
bindingEnergy.cc
bindingEnergyAsymptotic.cc
G4Analyser.cc
G4BigBanger.cc
G4CascadeChannel.cc
G4CascadeChannelTables.cc
G4CascadeCheckBalance.cc
G4CascadeCoalescence.cc
G4CascadeColliderBase.cc
G4CascadeDeexcitation.cc
G4CascadeDeexciteBase.cc
G4CascadeFinalStateAlgorithm.cc
G4CascadeFinalStateGenerator.cc
G4CascadeHistory.cc
G4CascadeInterface.cc
G4CascadeKminusNChannel.cc
G4CascadeKminusPChannel.cc
G4CascadeKplusNChannel.cc
G4CascadeKplusPChannel.cc
G4CascadeKzeroBarNChannel.cc
G4CascadeKzeroBarPChannel.cc
G4CascadeKzeroNChannel.cc
G4CascadeKzeroPChannel.cc
G4CascadeLambdaNChannel.cc
G4CascadeLambdaPChannel.cc
G4CascadeMuMinusPChannel.cc
G4CascadeNNChannel.cc
G4CascadeNPChannel.cc
G4CascadeOmegaMinusNChannel.cc
G4CascadeOmegaMinusPChannel.cc
G4CascadeParameters.cc
G4CascadeParamMessenger.cc
G4CascadePPChannel.cc
G4CascadeRecoilMaker.cc
G4CascadeSigmaMinusNChannel.cc
G4CascadeSigmaMinusPChannel.cc
G4CascadeSigmaPlusNChannel.cc
G4CascadeSigmaPlusPChannel.cc
G4CascadeSigmaZeroNChannel.cc
G4CascadeSigmaZeroPChannel.cc
G4CascadeT11pizNChannel.cc
G4CascadeT1GamNChannel.cc
G4CascadeT31piNChannel.cc
G4CascadeT33piNChannel.cc
G4CascadeXiMinusNChannel.cc
G4CascadeXiMinusPChannel.cc
G4CascadeXiZeroNChannel.cc
G4CascadeXiZeroPChannel.cc
G4CascadParticle.cc
G4CollisionOutput.cc
G4Dineutron.cc
G4Diproton.cc
G4ElementaryParticleCollider.cc
G4EquilibriumEvaporator.cc
G4EvaporationInuclCollider.cc
G4ExitonConfiguration.cc
G4FissionConfiguration.cc
G4Fissioner.cc
G4FissionStore.cc
G4GammaNuclAngDst.cc
G4GamP2NPipAngDst.cc
G4GamP2PPi0AngDst.cc
G4GDecay3.cc
G4HadNElastic1AngDst.cc
G4HadNElastic2AngDst.cc
G4HadNucl3BodyAngDst.cc
G4HadNucl3BodyMomDst.cc
G4HadNucl4BodyMomDst.cc
G4HyperonSampler.cc
G4InteractionCase.cc
G4IntraNucleiCascader.cc
G4InuclCollider.cc
G4InuclElementaryParticle.cc
G4InuclEvaporation.cc
G4InuclNuclei.cc
G4InuclParamAngDst.cc
G4InuclParamMomDst.cc
G4InuclParticle.cc
G4InuclParticleNames.cc
G4InuclSpecialFunctions.cc
G4KaonHypSampler.cc
G4KaonSampler.cc
G4LightTargetCollider.cc
G4LorentzConvertor.cc
G4MultiBodyMomentumDist.cc
G4NonEquilibriumEvaporator.cc
G4NP2NPAngDst.cc
G4NucleiModel.cc
G4NuclNucl3BodyAngDst.cc
G4NuclNucl3BodyMomDst.cc
G4NuclNucl4BodyMomDst.cc
G4NuclNuclAngDst.cc
G4NuclWatcher.cc
G4Pi0P2Pi0PAngDst.cc
G4PimP2Pi0NAngDst.cc
G4PimP2PimPAngDst.cc
G4PiNInelasticAngDst.cc
G4PionNucSampler.cc
G4PipP2PipPAngDst.cc
G4PP2PPAngDst.cc
G4PreCompoundDeexcitation.cc
G4TwoBodyAngularDist.cc
G4UnboundPN.cc
G4VCascadeCollider.cc
G4VCascadeDeexcitation.cc
G4VMultiBodyMomDst.cc
G4VTwoBodyAngDst.cc
G4WatcherGun.cc
nucleiLevelDensity.cc
paraMaker.cc
coherent_elastic
de_excitation
em_dissociation
fission
gamma_nuclear
im_r_matrix
inclxx
lend
lepto_nuclear
management
particle_hp
parton_string
pre_equilibrium
qmd
quasi_elastic
radioactive_decay
rpg
theo_high_energy
util
processes
stopping
util
management
optical
parameterisation
scoring
solidstate
transportation
readout
run
track
tracking
visualization
macros
online_distribution
tutorials
doxygen_mainpage.h
File Members
External Links
•
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Groups
Pages
G4CascadeDeexciteBase.cc
Go to the documentation of this file.
Or view
the newest version in sPHENIX GitHub for file G4CascadeDeexciteBase.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
// Semi-concrete base class for de-excitation modules, analogous to
28
// G4CascadeColliderBase.
29
//
30
// 20130806 M. Kelsey -- Per A. Dotti, move zero vector to file scope to
31
// address thread-collision problem.
32
33
#include "
G4CascadeDeexciteBase.hh
"
34
#include "
G4CascadeCheckBalance.hh
"
35
#include "
G4CascadeParameters.hh
"
36
#include "
G4CollisionOutput.hh
"
37
#include "
G4Fragment.hh
"
38
#include "
G4InuclNuclei.hh
"
39
#include "
G4InuclSpecialFunctions.hh
"
40
#include "
G4SystemOfUnits.hh
"
41
#include <vector>
42
43
using namespace
G4InuclSpecialFunctions;
44
45
46
// Constructor and destructor
47
48
G4CascadeDeexciteBase::G4CascadeDeexciteBase
(
const
char
*
name
)
49
:
G4VCascadeDeexcitation
(name), balance(0),
A
(0),
Z
(0), EEXS(0) {
50
if
(
G4CascadeParameters::checkConservation
())
51
balance
=
new
G4CascadeCheckBalance
(name);
52
}
53
54
G4CascadeDeexciteBase::~G4CascadeDeexciteBase
() {
55
delete
balance
;
56
}
57
58
void
G4CascadeDeexciteBase::setVerboseLevel
(
G4int
verbose) {
59
G4VCascadeDeexcitation::setVerboseLevel
(verbose);
60
if
(
balance
)
balance
->
setVerboseLevel
(verbose);
61
}
62
63
64
// Copy pertinent information from G4Fragment for modules
65
66
void
G4CascadeDeexciteBase::getTargetData
(
const
G4Fragment
&
target
) {
67
A
= target.
GetA_asInt
();
68
Z
= target.
GetZ_asInt
();
69
PEX
= target.
GetMomentum
()/
GeV
;
// Convert from G4 to Bertini units
70
EEXS
= target.
GetExcitationEnergy
();
71
}
72
73
74
// Create (fill) new G4Fragment with proper momentum/energy handling
75
76
namespace
{
77
static
const
G4LorentzVector
zero
(0.,0.,0.,0.);
// File scope avoids churn
78
}
79
80
const
G4Fragment
&
81
G4CascadeDeexciteBase::makeFragment
(
G4int
fragA,
G4int
fragZ,
G4double
EX) {
82
return
makeFragment
(
zero
, fragA, fragZ, EX);
83
}
84
85
const
G4Fragment
&
86
G4CascadeDeexciteBase::makeFragment
(
G4LorentzVector
mom
,
G4int
fragA,
87
G4int
fragZ,
G4double
EX) {
88
if
(
verboseLevel
>2) {
89
G4cout
<<
" >>> "
<<
theName
<<
"::makeFragment "
<< mom <<
" "
<< fragA
90
<<
" "
<< fragZ <<
" "
<< EX <<
G4endl
;
91
}
92
93
// Adjust four-momentum so that mass is nucleus + excitation
94
G4double
mass
=
95
G4InuclNuclei::getNucleiMass
(fragA,fragZ) + EX/
GeV
;
96
mom.
setVectM
(mom.
vect
(),
mass
);
97
98
// Overwrite previous fragment contents, zeroing out excitons
99
aFragment
.
SetZandA_asInt
(fragZ, fragA);
100
aFragment
.
SetMomentum
(mom*
GeV
);
// Bertini uses GeV!
101
aFragment
.
SetNumberOfHoles
(0,0);
102
aFragment
.
SetNumberOfExcitedParticle
(0,0);
103
104
return
aFragment
;
105
}
106
107
// Decide wether nuclear fragment is candidate for G4BigBanger
108
109
G4bool
G4CascadeDeexciteBase::explosion
(
const
G4Fragment
& fragment)
const
{
110
return
explosion
(fragment.
GetA_asInt
(), fragment.
GetZ_asInt
(),
111
fragment.
GetExcitationEnergy
());
// in MeV
112
}
113
114
G4bool
G4CascadeDeexciteBase::explosion
(
G4int
fragA,
G4int
fragZ,
115
G4double
excitation)
const
{
116
if
(
verboseLevel
)
G4cout
<<
" >>> "
<<
theName
<<
"::explosion ?"
<<
G4endl
;
117
118
const
G4int
a_cut = 20;
119
const
G4double
be_cut = 3.0;
120
121
// Neutron balls, or small fragments with high excitations can explode
122
return
((fragA <= a_cut || fragZ==0) &&
123
(excitation >= be_cut *
bindingEnergy
(fragA,fragZ))
124
);
125
}
126
127
128
// Validate output for energy, momentum conservation, etc.
129
130
G4bool
G4CascadeDeexciteBase::validateOutput
(
const
G4Fragment
&
target
,
131
G4CollisionOutput
& output) {
132
if
(!
balance
)
return
true
;
// Skip checks unless requested
133
134
if
(
verboseLevel
> 1)
135
G4cout
<<
" >>> "
<<
theName
<<
"::validateOutput"
<<
G4endl
;
136
137
balance
->
setVerboseLevel
(
verboseLevel
);
138
balance
->
collide
(target, output);
139
return
balance
->
okay
();
// Returns false if violations
140
}
141
142
G4bool
G4CascadeDeexciteBase::validateOutput
(
const
G4Fragment
&
target
,
143
const
std::vector<G4InuclElementaryParticle>& particles) {
144
if
(!
balance
)
return
true
;
// Skip checks unless requested
145
146
if
(
verboseLevel
> 1)
147
G4cout
<<
" >>> "
<<
theName
<<
"::validateOutput"
<<
G4endl
;
148
149
balance
->
setVerboseLevel
(
verboseLevel
);
150
balance
->
collide
(target, particles);
151
return
balance
->
okay
();
// Returns false if violations
152
}
153
154
G4bool
G4CascadeDeexciteBase::validateOutput
(
const
G4Fragment
&
target
,
155
const
std::vector<G4InuclNuclei>& fragments) {
156
if
(!
balance
)
return
true
;
// Skip checks unless requested
157
158
if
(
verboseLevel
> 1)
159
G4cout
<<
" >>> "
<<
theName
<<
"::validateOutput"
<<
G4endl
;
160
161
balance
->
setVerboseLevel
(
verboseLevel
);
162
balance
->
collide
(target, fragments);
163
return
balance
->
okay
();
// Returns false if violations
164
}
geant4
tree
geant4-10.6-release
source
processes
hadronic
models
cascade
cascade
src
G4CascadeDeexciteBase.cc
Built by
Jin Huang
. updated:
Wed Jun 29 2022 17:25:39
using
1.8.2 with
ECCE GitHub integration