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
G4INCLInteractionAvatar.hh
Go to the documentation of this file.
Or view
the newest version in sPHENIX GitHub for file G4INCLInteractionAvatar.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
// INCL++ intra-nuclear cascade model
27
// Alain Boudard, CEA-Saclay, France
28
// Joseph Cugnon, University of Liege, Belgium
29
// Jean-Christophe David, CEA-Saclay, France
30
// Pekka Kaitaniemi, CEA-Saclay, France, and Helsinki Institute of Physics, Finland
31
// Sylvie Leray, CEA-Saclay, France
32
// Davide Mancusi, CEA-Saclay, France
33
//
34
#define INCLXX_IN_GEANT4_MODE 1
35
36
#include "
globals.hh
"
37
38
/* \file G4INCLInteractionAvatar.hh
39
* \brief Virtual class for interaction avatars.
40
*
41
* This class is inherited by decay and collision avatars. The goal is to
42
* provide a uniform treatment of common physics, such as Pauli blocking,
43
* enforcement of energy conservation, etc.
44
*
45
* \date Mar 1st, 2011
46
* \author Davide Mancusi
47
*/
48
49
#ifndef G4INCLINTERACTIONAVATAR_HH_
50
#define G4INCLINTERACTIONAVATAR_HH_
51
52
#include "
G4INCLIAvatar.hh
"
53
#include "
G4INCLNucleus.hh
"
54
#include "
G4INCLFinalState.hh
"
55
#include "
G4INCLRootFinder.hh
"
56
#include "
G4INCLKinematicsUtils.hh
"
57
#include "
G4INCLAllocationPool.hh
"
58
59
namespace
G4INCL {
60
61
class
InteractionAvatar
:
public
G4INCL::IAvatar
{
62
public
:
63
InteractionAvatar
(
G4double
,
G4INCL::Nucleus
*,
G4INCL::Particle
*);
64
InteractionAvatar
(
G4double
,
G4INCL::Nucleus
*,
G4INCL::Particle
*,
G4INCL::Particle
*);
65
virtual
~InteractionAvatar
();
66
68
static
const
G4double
locEAccuracy
;
70
static
const
G4int
maxIterLocE
;
71
73
static
void
deleteBackupParticles
();
74
75
protected
:
76
virtual
G4INCL::IChannel
*
getChannel
() = 0;
77
78
G4bool
bringParticleInside
(
Particle
*
const
p
);
79
84
void
preInteractionLocalEnergy
(
Particle
*
const
p
);
85
92
void
preInteractionBlocking
();
93
94
void
preInteraction
();
95
void
postInteraction
(
FinalState
*);
96
101
void
restoreParticles
()
const
;
102
104
G4bool
shouldUseLocalEnergy
()
const
;
105
106
Nucleus
*
theNucleus
;
107
Particle
*
particle1
, *
particle2
;
108
static
G4ThreadLocal
Particle
*
backupParticle1
, *
backupParticle2
;
109
ThreeVector
boostVector
;
110
G4double
oldTotalEnergy
,
oldXSec
;
111
G4bool
isPiN
;
112
G4double
weight
;
113
114
private
:
116
class
ViolationEMomentumFunctor
:
public
RootFunctor
{
117
public
:
122
ViolationEMomentumFunctor
(
Nucleus
*
const
nucleus,
ParticleList
const
&modAndCre,
const
G4double
totalEnergyBeforeInteraction,
ThreeVector
const
&boost,
const
G4bool
localE);
123
virtual
~ViolationEMomentumFunctor
();
124
130
G4double
operator()
(
const
G4double
x
)
const
;
131
133
void
cleanUp
(
const
G4bool
success)
const
;
134
135
private
:
137
ParticleList
finalParticles
;
139
std::vector<ThreeVector>
particleMomenta
;
141
G4double
initialEnergy
;
143
Nucleus
*
theNucleus
;
145
ThreeVector
const
&
boostVector
;
146
148
const
G4bool
shouldUseLocalEnergy
;
149
158
void
scaleParticleMomenta
(
const
G4double
alpha
)
const
;
159
160
};
161
163
class
ViolationEEnergyFunctor
:
public
RootFunctor
{
164
public
:
169
ViolationEEnergyFunctor
(
Nucleus
*
const
nucleus,
Particle
*
const
aParticle,
const
G4double
totalEnergyBeforeInteraction,
const
G4bool
localE);
170
virtual
~ViolationEEnergyFunctor
() {}
171
177
G4double
operator()
(
const
G4double
x
)
const
;
178
180
void
cleanUp
(
const
G4bool
success)
const
;
181
186
void
setParticleEnergy
(
const
G4double
energy
)
const
;
187
188
private
:
190
G4double
initialEnergy
;
192
Nucleus
*
theNucleus
;
194
Particle
*
theParticle
;
196
G4double
theEnergy
;
198
ThreeVector
theMomentum
;
203
G4double
energyThreshold
;
205
const
G4bool
shouldUseLocalEnergy
;
206
};
207
208
RootFunctor
*
violationEFunctor
;
209
210
protected
:
221
G4bool
enforceEnergyConservation
(
FinalState
*
const
fs
);
222
223
ParticleList
modified
,
created
,
modifiedAndCreated
,
Destroyed
,
ModifiedAndDestroyed
;
224
225
INCL_DECLARE_ALLOCATION_POOL
(
InteractionAvatar
)
226
};
227
228
}
229
230
#endif
/* G4INCLINTERACTIONAVATAR_HH_ */
geant4
tree
geant4-10.6-release
source
processes
hadronic
models
inclxx
incl_physics
include
G4INCLInteractionAvatar.hh
Built by
Jin Huang
. updated:
Wed Jun 29 2022 17:25:44
using
1.8.2 with
ECCE GitHub integration