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
G4CascadeInterface.hh
Go to the documentation of this file.
Or view
the newest version in sPHENIX GitHub for file G4CascadeInterface.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
// Defines an interface to Bertini (BERT) cascade
27
// based on INUCL intra-nuclear transport.models
28
// with bullet hadron energy ~< 10 GeV
29
//
30
// 20100405 M. Kelsey -- Fix constness of op== and op!=
31
// 20100519 M. Kelsey -- Remove Collider data members
32
// 20100617 M. Kelsey -- Make G4InuclCollider a local data member
33
// 20100723 M. Kelsey -- Move G4CollisionOutput here for reuse
34
// 20100916 M. Kelsey -- Add functions to encapsulate ApplyYourself() actions,
35
// make colliders pointers (don't expose dependencies)
36
// 20100922 M. Kelsey -- Add functions to select de-excitation method
37
// 20110224 M. Kelsey -- Add createTarget() for use with Propagate(); split
38
// conservation law messages to separate function. Move verbose
39
// setting to .cc file, and apply to all member objects.
40
// 20110301 M. Kelsey -- Add copyPreviousCascade() for use with Propagate()
41
// along with new buffers and related particle-conversion
42
// functions. Encapulate buffer deletion in clear()
43
// 20110303 M. Kelsey -- Change "bulletList" name to "inputFragments"
44
// 20110304 M. Kelsey -- Drop conversion of Propagate() arguments; pass
45
// directly to collider for processing. Rename makeReactionProduct
46
// to makeDynamicParticle.
47
// 20110502 M. Kelsey -- Add filename string to capture random seeds.
48
// 20110720 M. Kelsey -- Discard elastic-cut array (no longer needed),
49
// discard local "theFinalState" (avail in base class).
50
// 20110801 M. Kelsey -- Make bullet and target buffers local objects (with
51
// hadron and nucleus versions) to reduce memory churn
52
// 20120522 M. Kelsey -- Implement base class IsApplicable, and add overloaded
53
// version which takes G4ParticleDefintion, a la G4VProcess.
54
// 20120822 M. Kelsey -- Add function to dump user configuration settings.
55
// Remove local verboseLevel; shadows base class data member.
56
// 20130501 M. Kelsey -- Add static initializer to created shared objects.
57
// 20130628 M. Kelsey -- Address Coverity warnings about copy operations.
58
// 20140116 M. Kelsey -- Move statics to const data members to avoid weird
59
// interactions with MT.
60
61
#ifndef G4CASCADEINTERFACE_H
62
#define G4CASCADEINTERFACE_H 1
63
64
#include "
G4VIntraNuclearTransportModel.hh
"
65
#include "
G4FragmentVector.hh
"
66
#include "
G4InuclElementaryParticle.hh
"
67
#include "
G4InuclNuclei.hh
"
68
#include "
G4LorentzRotation.hh
"
69
#include "
G4Nucleon.hh
"
70
#include "
G4Nucleus.hh
"
71
#include "
G4ParticleChange.hh
"
72
#include "
G4ReactionProduct.hh
"
73
#include "
G4ReactionProductVector.hh
"
74
#include <vector>
75
76
class
G4CascadParticle
;
77
class
G4CascadeCheckBalance
;
78
class
G4CollisionOutput
;
79
class
G4DynamicParticle
;
80
class
G4HadFinalState
;
81
class
G4InuclCollider
;
82
class
G4LightTargetCollider
;
83
class
G4InuclParticle
;
84
class
G4ParticleDefinition
;
85
class
G4V3DNucleus
;
86
87
88
class
G4CascadeInterface
:
public
G4VIntraNuclearTransportModel
{
89
90
public
:
91
G4CascadeInterface
(
const
G4String
&
name
=
"BertiniCascade"
);
92
93
virtual
~G4CascadeInterface
();
94
95
G4ReactionProductVector
*
Propagate
(
G4KineticTrackVector
* theSecondaries,
96
G4V3DNucleus
* theNucleus);
97
98
G4HadFinalState
*
ApplyYourself
(
const
G4HadProjectile
& aTrack,
99
G4Nucleus
& theNucleus);
100
101
void
SetVerboseLevel
(
G4int
verbose);
// Overrides base class
102
103
G4bool
IsApplicable
(
const
G4HadProjectile
& aTrack,
104
G4Nucleus
& theNucleus);
105
106
G4bool
IsApplicable
(
const
G4ParticleDefinition
* aPD)
const
;
107
108
// Used with multithreaded applications to preload shared objects
109
static
void
Initialize
();
110
111
// Select betweeen different post-cascade de-excitation models
112
void
useCascadeDeexcitation
();
113
void
usePreCompoundDeexcitation
();
114
115
virtual
void
ModelDescription
(std::ostream& outFile)
const
;
116
virtual
void
DumpConfiguration
(std::ostream& outFile)
const
;
117
118
protected
:
119
void
clear
();
// Delete previously created particles
120
121
// Convert input projectile and target to Bertini internal types
122
G4bool
createBullet
(
const
G4HadProjectile
& aTrack);
123
G4bool
createTarget
(
G4Nucleus
& theNucleus);
124
G4bool
createTarget
(
G4V3DNucleus
* theNucleus);
125
G4bool
createTarget
(
G4int
A
,
G4int
Z
);
126
127
// Evaluate whether any outgoing particles penetrated Coulomb barrier
128
G4bool
coulombBarrierViolation
()
const
;
129
130
// Conditions for rejecting cascade attempt
131
G4bool
retryInelasticProton
()
const
;
132
G4bool
retryInelasticNucleus
()
const
;
133
134
// Transfer Bertini internal final state to hadronics interface
135
void
copyOutputToHadronicResult
();
136
G4ReactionProductVector
*
copyOutputToReactionProducts
();
137
138
// Replicate input particles onto output
139
G4HadFinalState
*
NoInteraction
(
const
G4HadProjectile
& aTrack,
140
G4Nucleus
& theNucleus);
141
142
// Report violations of conservation laws in original frame
143
void
checkFinalResult
();
144
145
// Terminate job because of energy/momentum/etc. violations
146
void
throwNonConservationFailure
();
147
148
// Convert between Bertini and external particle types
149
G4DynamicParticle
*
makeDynamicParticle
(
const
G4InuclElementaryParticle
& iep)
const
;
150
G4DynamicParticle
*
makeDynamicParticle
(
const
G4InuclNuclei
& inuc)
const
;
151
152
153
private
:
154
G4bool
operator==
(
const
G4CascadeInterface
&
right
)
const
{
155
return
(
this
== &right);
156
}
157
158
G4bool
operator!=
(
const
G4CascadeInterface
&
right
)
const
{
159
return
(
this
!= &right);
160
}
161
162
const
G4String
randomFile
;
// Filename to capture random seeds
163
const
G4int
maximumTries
;
// Number of iterations for inelastic
164
165
G4int
numberOfTries
;
166
167
G4InuclCollider
*
collider
;
168
G4CascadeCheckBalance
*
balance
;
169
170
G4LightTargetCollider
*
ltcollider
;
171
172
G4InuclParticle
*
bullet
;
// Pointers to last filled versions
173
G4InuclParticle
*
target
;
174
175
G4CollisionOutput
*
output
;
176
177
G4InuclElementaryParticle
hadronBullet
;
// Buffers for bullet, target
178
G4InuclNuclei
nucleusBullet
;
179
180
G4InuclElementaryParticle
hadronTarget
;
181
G4InuclNuclei
nucleusTarget
;
182
183
184
private
:
185
// Copying of modules is forbidden
186
G4CascadeInterface
(
const
G4CascadeInterface
&);
187
G4CascadeInterface
&
operator=
(
const
G4CascadeInterface
&);
188
};
189
190
#endif // G4CASCADEINTERFACE_H
geant4
tree
geant4-10.6-release
source
processes
hadronic
models
cascade
cascade
include
G4CascadeInterface.hh
Built by
Jin Huang
. updated:
Wed Jun 29 2022 17:25:39
using
1.8.2 with
ECCE GitHub integration