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
G4INCLNucleus.hh
Go to the documentation of this file.
Or view
the newest version in sPHENIX GitHub for file G4INCLNucleus.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
/*
39
* G4INCLNucleus.hh
40
*
41
* \date Jun 5, 2009
42
* \author Pekka Kaitaniemi
43
*/
44
45
#ifndef G4INCLNUCLEUS_HH_
46
#define G4INCLNUCLEUS_HH_
47
48
#include <list>
49
#include <string>
50
51
#include "
G4INCLParticle.hh
"
52
#include "
G4INCLEventInfo.hh
"
53
#include "
G4INCLCluster.hh
"
54
#include "
G4INCLFinalState.hh
"
55
#include "
G4INCLStore.hh
"
56
#include "
G4INCLGlobals.hh
"
57
#include "
G4INCLParticleTable.hh
"
58
#include "
G4INCLConfig.hh
"
59
#include "
G4INCLConfigEnums.hh
"
60
#include "
G4INCLCluster.hh
"
61
#include "
G4INCLProjectileRemnant.hh
"
62
63
namespace
G4INCL {
64
65
class
Nucleus
:
public
Cluster
{
66
public
:
67
Nucleus
(
G4int
mass
,
G4int
charge
,
G4int
strangess,
Config
const
*
const
conf,
const
G4double
universeRadius=-1.);
68
virtual
~Nucleus
();
69
71
Nucleus
(
const
Nucleus
&rhs);
72
74
Nucleus
&
operator=
(
const
Nucleus
&rhs);
75
80
void
initializeParticles
();
81
83
void
insertParticle
(
Particle
*
p
) {
84
theZ
+= p->
getZ
();
85
theA
+= p->
getA
();
86
theS
+= p->
getS
();
87
theStore
->
particleHasEntered
(p);
88
if
(p->
isNucleon
()) {
89
theNpInitial
+=
Math::heaviside
(
ParticleTable::getIsospin
(p->
getType
()));
90
theNnInitial
+=
Math::heaviside
(-
ParticleTable::getIsospin
(p->
getType
()));
91
}
92
if
(p->
isPion
()) {
93
theNpionplusInitial
+=
Math::heaviside
(
ParticleTable::getIsospin
(p->
getType
()));
94
theNpionminusInitial
+=
Math::heaviside
(-
ParticleTable::getIsospin
(p->
getType
()));
95
}
96
if
(p->
isKaon
() || p->
isAntiKaon
()) {
97
theNkaonplusInitial
+=
Math::heaviside
(
ParticleTable::getIsospin
(p->
getType
()));
98
theNkaonminusInitial
+=
Math::heaviside
(-
ParticleTable::getIsospin
(p->
getType
()));
99
}
100
if
(!p->
isTargetSpectator
())
theStore
->
getBook
().
incrementCascading
();
101
};
102
106
void
applyFinalState
(
FinalState
*);
107
108
G4int
getInitialA
()
const
{
return
theInitialA
; };
109
G4int
getInitialZ
()
const
{
return
theInitialZ
; };
110
G4int
getInitialS
()
const
{
return
theInitialS
; };
111
117
void
propagateParticles
(
G4double
step
);
118
119
G4int
getNumberOfEnteringProtons
()
const
{
return
theNpInitial
; };
120
G4int
getNumberOfEnteringNeutrons
()
const
{
return
theNnInitial
; };
121
G4int
getNumberOfEnteringPions
()
const
{
return
theNpionplusInitial
+
theNpionminusInitial
; };
122
G4int
getNumberOfEnteringKaons
()
const
{
return
theNkaonplusInitial
+
theNkaonminusInitial
; };
123
128
G4double
computeSeparationEnergyBalance
()
const
{
129
G4double
S
= 0.0;
130
ParticleList
const
&outgoing =
theStore
->
getOutgoingParticles
();
131
for
(
ParticleIter
i=outgoing.begin(),
e
=outgoing.end(); i!=
e
; ++i) {
132
const
ParticleType
t
= (*i)->getType();
133
switch
(t) {
134
case
Proton
:
135
case
Neutron
:
136
case
DeltaPlusPlus
:
137
case
DeltaPlus
:
138
case
DeltaZero
:
139
case
DeltaMinus
:
140
case
Lambda
:
141
case
PiPlus
:
142
case
PiMinus
:
143
case
KPlus
:
144
case
KMinus
:
145
case
KZero
:
146
case
KZeroBar
:
147
case
KShort
:
148
case
KLong
:
149
case
SigmaPlus
:
150
case
SigmaZero
:
151
case
SigmaMinus
:
152
S +=
thePotential
->
getSeparationEnergy
(*i);
153
break
;
154
case
Composite
:
155
S += (*i)->getZ() *
thePotential
->
getSeparationEnergy
(
Proton
)
156
+ ((*i)->getA() + (*i)->getS() - (*i)->getZ()) *
thePotential
->
getSeparationEnergy
(
Neutron
)
157
- (*i)->getS() *
thePotential
->
getSeparationEnergy
(
Lambda
);
158
break
;
159
default
:
160
break
;
161
}
162
}
163
164
S -=
theNpInitial
*
thePotential
->
getSeparationEnergy
(
Proton
);
165
S -=
theNnInitial
*
thePotential
->
getSeparationEnergy
(
Neutron
);
166
S -=
theNpionplusInitial
*
thePotential
->
getSeparationEnergy
(
PiPlus
);;
167
S -=
theNkaonplusInitial
*
thePotential
->
getSeparationEnergy
(
KPlus
);
168
S -=
theNpionminusInitial
*
thePotential
->
getSeparationEnergy
(
PiMinus
);
169
S -=
theNkaonminusInitial
*
thePotential
->
getSeparationEnergy
(
KMinus
);
170
return
S
;
171
}
172
177
G4bool
decayOutgoingDeltas
();
178
183
G4bool
decayInsideDeltas
();
184
189
G4bool
decayInsideStrangeParticles
();
190
195
G4bool
decayOutgoingPionResonances
(
G4double
timeThreshold);
196
201
G4bool
decayOutgoingSigmaZero
(
G4double
timeThreshold);
202
207
G4bool
decayOutgoingNeutralKaon
();
208
213
G4bool
decayOutgoingClusters
();
214
221
G4bool
decayMe
();
222
224
void
emitInsidePions
();
225
227
void
emitInsideStrangeParticles
();
228
230
G4int
emitInsideLambda
();
231
233
G4bool
emitInsideKaon
();
234
236
void
computeRecoilKinematics
();
237
242
ThreeVector
computeCenterOfMass
()
const
;
243
248
G4double
computeTotalEnergy
()
const
;
249
254
G4double
computeExcitationEnergy
()
const
;
255
257
void
setIncomingAngularMomentum
(
const
ThreeVector
&j) {
258
incomingAngularMomentum
= j;
259
}
260
262
const
ThreeVector
&
getIncomingAngularMomentum
()
const
{
return
incomingAngularMomentum
; }
263
265
void
setIncomingMomentum
(
const
ThreeVector
&
p
) {
266
incomingMomentum
=
p
;
267
}
268
270
const
ThreeVector
&
getIncomingMomentum
()
const
{
271
return
incomingMomentum
;
272
}
273
275
void
setInitialEnergy
(
const
G4double
e
) {
initialEnergy
=
e
; }
276
278
G4double
getInitialEnergy
()
const
{
return
initialEnergy
; }
279
284
G4double
getExcitationEnergy
()
const
{
return
theExcitationEnergy
; }
285
287
inline
G4bool
containsDeltas
() {
288
ParticleList
const
&inside =
theStore
->
getParticles
();
289
for
(
ParticleIter
i=inside.begin(),
e
=inside.end(); i!=
e
; ++i)
290
if
((*i)->isDelta())
return
true
;
291
return
false
;
292
}
293
295
inline
G4bool
containsAntiKaon
() {
296
ParticleList
const
&inside =
theStore
->
getParticles
();
297
for
(
ParticleIter
i=inside.begin(),
e
=inside.end(); i!=
e
; ++i)
298
if
((*i)->isAntiKaon())
return
true
;
299
return
false
;
300
}
301
303
inline
G4bool
containsLambda
() {
304
ParticleList
const
&inside =
theStore
->
getParticles
();
305
for
(
ParticleIter
i=inside.begin(),
e
=inside.end(); i!=
e
; ++i)
306
if
((*i)->isLambda())
return
true
;
307
return
false
;
308
}
309
311
inline
G4bool
containsSigma
() {
312
ParticleList
const
&inside =
theStore
->
getParticles
();
313
for
(
ParticleIter
i=inside.begin(),
e
=inside.end(); i!=
e
; ++i)
314
if
((*i)->isSigma())
return
true
;
315
return
false
;
316
}
317
319
inline
G4bool
containsKaon
() {
320
ParticleList
const
&inside =
theStore
->
getParticles
();
321
for
(
ParticleIter
i=inside.begin(),
e
=inside.end(); i!=
e
; ++i)
322
if
((*i)->isKaon())
return
true
;
323
return
false
;
324
}
325
327
inline
G4bool
containsEtas
() {
328
ParticleList
const
&inside =
theStore
->
getParticles
();
329
for
(
ParticleIter
i=inside.begin(),
e
=inside.end(); i!=
e
; ++i)
330
if
((*i)->isEta())
return
true
;
331
return
false
;
332
}
333
335
inline
G4bool
containsOmegas
() {
336
ParticleList
const
&inside =
theStore
->
getParticles
();
337
for
(
ParticleIter
i=inside.begin(),
e
=inside.end(); i!=
e
; ++i)
338
if
((*i)->isOmega())
return
true
;
339
return
false
;
340
}
341
345
std::string
print
();
346
347
Store
*
getStore
()
const
{
return
theStore
; };
348
void
setStore
(
Store
*
s
) {
349
delete
theStore
;
350
theStore
=
s
;
351
};
352
353
G4double
getInitialInternalEnergy
()
const
{
return
initialInternalEnergy
; };
354
359
G4bool
isEventTransparent
()
const
;
360
365
G4bool
hasRemnant
()
const
{
return
remnant
; }
366
370
void
fillEventInfo
(
EventInfo
*eventInfo);
371
372
G4bool
getTryCompoundNucleus
() {
return
tryCN
; }
373
375
G4double
getTransmissionBarrier
(
Particle
const
*
const
p
) {
376
const
G4double
theTransmissionRadius =
theDensity
->
getTransmissionRadius
(p);
377
const
G4double
theParticleZ = p->
getZ
();
378
return
PhysicalConstants::eSquared
*(
theZ
-theParticleZ)*theParticleZ/theTransmissionRadius;
379
}
380
382
struct
ConservationBalance
{
383
ThreeVector
momentum
;
384
G4double
energy
;
385
G4int
Z
,
A
,
S
;
386
};
387
389
ConservationBalance
getConservationBalance
(
EventInfo
const
&theEventInfo,
const
G4bool
afterRecoil)
const
;
390
392
void
useFusionKinematics
();
393
402
G4double
getSurfaceRadius
(
Particle
const
*
const
particle
)
const
{
403
if
(particle->
isNucleon
() || particle->
isLambda
() || particle->
isResonance
()){
404
const
G4double
pr
= particle->
getReflectionMomentum
()/
thePotential
->
getFermiMomentum
(particle);
405
if
(pr>=1.)
406
return
getUniverseRadius
();
407
else
408
return
theDensity
->
getMaxRFromP
(particle->
getType
(),
pr
);
409
}
410
else
{
411
// Temporarily set RPION = RMAX
412
return
getUniverseRadius
();
413
//return 0.5*(theDensity->getTransmissionRadius(particle)+getUniverseRadius());
414
}
415
}
416
418
G4double
getUniverseRadius
()
const
{
return
theUniverseRadius
; }
419
421
void
setUniverseRadius
(
const
G4double
universeRadius) {
theUniverseRadius
=universeRadius; }
422
424
G4bool
isNucleusNucleusCollision
()
const
{
return
isNucleusNucleus
; }
425
427
void
setNucleusNucleusCollision
() {
isNucleusNucleus
=
true
; }
428
430
void
setParticleNucleusCollision
() {
isNucleusNucleus
=
false
; }
431
433
void
setProjectileRemnant
(
ProjectileRemnant
*
const
c
) {
434
delete
theProjectileRemnant
;
435
theProjectileRemnant
=
c
;
436
}
437
439
ProjectileRemnant
*
getProjectileRemnant
()
const
{
return
theProjectileRemnant
; }
440
442
void
deleteProjectileRemnant
() {
443
delete
theProjectileRemnant
;
444
theProjectileRemnant
= NULL;
445
}
446
455
void
finalizeProjectileRemnant
(
const
G4double
emissionTime
);
456
458
inline
void
updatePotentialEnergy
(
Particle
*
p
)
const
{
459
p->
setPotentialEnergy
(
thePotential
->
computePotentialEnergy
(p));
460
}
461
463
void
setDensity
(
NuclearDensity
const
*
const
d
) {
464
theDensity
=
d
;
465
if
(
theParticleSampler
)
466
theParticleSampler
->
setDensity
(
theDensity
);
467
};
468
470
NuclearDensity
const
*
getDensity
()
const
{
return
theDensity
; };
471
473
NuclearPotential::INuclearPotential
const
*
getPotential
()
const
{
return
thePotential
; };
474
475
private
:
481
void
computeOneNucleonRecoilKinematics
();
482
483
private
:
484
G4int
theInitialZ
,
theInitialA
,
theInitialS
;
486
G4int
theNpInitial
;
488
G4int
theNnInitial
;
490
G4int
theNpionplusInitial
;
491
G4int
theNpionminusInitial
;
493
G4int
theNkaonplusInitial
;
494
G4int
theNkaonminusInitial
;
495
496
G4double
initialInternalEnergy
;
497
ThreeVector
incomingAngularMomentum
,
incomingMomentum
;
498
ThreeVector
initialCenterOfMass
;
499
G4bool
remnant
;
500
501
G4double
initialEnergy
;
502
Store
*
theStore
;
503
G4bool
tryCN
;
504
506
G4int
projectileZ
;
508
G4int
projectileA
;
510
G4int
projectileS
;
511
513
G4double
theUniverseRadius
;
514
519
G4bool
isNucleusNucleus
;
520
525
ProjectileRemnant
*
theProjectileRemnant
;
526
528
NuclearDensity
const
*
theDensity
;
529
531
NuclearPotential::INuclearPotential
const
*
thePotential
;
532
533
INCL_DECLARE_ALLOCATION_POOL
(
Nucleus
)
534
};
535
536
}
537
538
#endif
/* G4INCLNUCLEUS_HH_ */
geant4
tree
geant4-10.6-release
source
processes
hadronic
models
inclxx
incl_physics
include
G4INCLNucleus.hh
Built by
Jin Huang
. updated:
Wed Jun 29 2022 17:25:44
using
1.8.2 with
ECCE GitHub integration