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
G4StoppingPhysics.cc
Go to the documentation of this file.
Or view
the newest version in sPHENIX GitHub for file G4StoppingPhysics.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
//---------------------------------------------------------------------------
28
//
29
// ClassName: G4StoppingPhysics
30
//
31
// Author: Alberto Ribon
32
//
33
// Date: 27 July 2012
34
//
35
// Modified:
36
// 20120921 M. Kelsey -- Move MuonMinusCapture.hh here; replace G4MMCAtRest
37
// with new G4MuonMinusCapture.
38
// 16-Oct-2012 A. Ribon: renamed G4BertiniAndFritiofStoppingPhysics as
39
// G4StoppingPhysics.
40
// 17-Oct-2012 A. Ribon: added nuclear capture at rest of anti-nuclei with
41
// Fritof/Precompound.
42
// 22-May-2019 A. Ribon: added annihilation at rest with Fritiof/Precompound
43
// for neutral anti-hadrons: anti-neutron, anti-lambda
44
// anti-sigma0 nd anti-xi0.
45
//
46
//----------------------------------------------------------------------------
47
48
#include "
G4StoppingPhysics.hh
"
49
#include "
G4SystemOfUnits.hh
"
50
#include "
G4HadronicAbsorptionBertini.hh
"
51
#include "
G4HadronicAbsorptionFritiof.hh
"
52
#include "
G4MuonMinusCapture.hh
"
53
#include "
G4ParticleDefinition.hh
"
54
#include "
G4ProcessManager.hh
"
55
#include "
G4LeptonConstructor.hh
"
56
#include "
G4MesonConstructor.hh
"
57
#include "
G4BaryonConstructor.hh
"
58
#include "
G4MuonMinus.hh
"
59
#include "
G4PionMinus.hh
"
60
61
// factory
62
#include "
G4PhysicsConstructorFactory.hh
"
63
//
64
G4_DECLARE_PHYSCONSTR_FACTORY
(
G4StoppingPhysics
);
65
66
G4ThreadLocal
G4bool
G4StoppingPhysics::wasActivated
=
false
;
67
68
G4StoppingPhysics::
69
G4StoppingPhysics
(
G4int
ver ) :
70
G4VPhysicsConstructor
(
"stopping"
),
71
//muProcess( 0 ), hBertiniProcess( 0 ), hFritiofProcess( 0 ),
72
verbose( ver ),
73
useMuonMinusCapture(
true
)
74
{
75
if
(
verbose
> 1 )
G4cout
<<
"### G4StoppingPhysics"
<<
G4endl
;
76
}
77
78
79
G4StoppingPhysics::
80
G4StoppingPhysics
(
const
G4String
&
name
,
G4int
ver,
81
G4bool
UseMuonMinusCapture ) :
82
G4VPhysicsConstructor
( name ),
83
// muProcess( 0 ), hBertiniProcess( 0 ), hFritiofProcess( 0 ),
84
verbose( ver ),
85
useMuonMinusCapture( UseMuonMinusCapture )
86
{
87
if
(
verbose
> 1 )
G4cout
<<
"### G4StoppingPhysics"
<<
G4endl
;
88
}
89
90
91
G4StoppingPhysics::~G4StoppingPhysics
() {}
92
93
94
void
G4StoppingPhysics::ConstructParticle
() {
95
// G4cout << "G4StoppingPhysics::ConstructParticle" << G4endl;
96
G4LeptonConstructor
pLeptonConstructor;
97
pLeptonConstructor.
ConstructParticle
();
98
99
G4MesonConstructor
pMesonConstructor;
100
pMesonConstructor.
ConstructParticle
();
101
102
G4BaryonConstructor
pBaryonConstructor;
103
pBaryonConstructor.
ConstructParticle
();
104
}
105
106
107
void
G4StoppingPhysics::ConstructProcess
() {
108
if
(
verbose
> 1 )
G4cout
<<
"### G4StoppingPhysics::ConstructProcess "
109
<<
wasActivated
<<
G4endl
;
110
if
(
wasActivated
)
return
;
111
wasActivated
=
true
;
112
113
G4MuonMinusCapture
* muProcess;
114
G4HadronicAbsorptionBertini
* hBertiniProcess;
115
G4HadronicAbsorptionFritiof
* hFritiofProcess;
116
117
if
(
useMuonMinusCapture
) {
118
muProcess =
new
G4MuonMinusCapture
();
119
}
else
{
120
muProcess = 0;
121
}
122
123
hBertiniProcess =
new
G4HadronicAbsorptionBertini
();
124
hFritiofProcess =
new
G4HadronicAbsorptionFritiof
();
125
126
G4double
mThreshold = 130.0*
MeV
;
127
128
// Add Stopping Process
129
G4ParticleDefinition
*
particle
= 0;
130
G4ProcessManager
* pmanager = 0;
131
132
auto
myParticleIterator=
GetParticleIterator
();
133
myParticleIterator->reset();
134
135
while
( (*myParticleIterator)() ) {
136
137
particle = myParticleIterator->value();
138
pmanager = particle->
GetProcessManager
();
139
140
if
( particle ==
G4MuonMinus::MuonMinus
() ) {
141
if
(
useMuonMinusCapture
) {
142
pmanager->
AddRestProcess
( muProcess );
143
if
(
verbose
> 1 ) {
144
G4cout
<<
"### G4StoppingPhysics added G4MuonMinusCapture for "
145
<< particle->
GetParticleName
() <<
G4endl
;
146
}
147
}
148
}
149
150
if
( particle->
GetPDGCharge
() <= 0.0 &&
151
particle->
GetPDGMass
() > mThreshold &&
152
! particle->
IsShortLived
() ) {
153
154
// Use Fritiof/Precompound for: anti-proton, anti-neutron, anti-lambda,
155
// anti-sigma0, anti-sigma+, anti-xi0 and anti-nuclei.
156
if
( particle ==
G4AntiProton::Definition
() ||
157
particle ==
G4AntiNeutron::Definition
() ||
158
particle ==
G4AntiLambda::Definition
() ||
159
particle ==
G4AntiSigmaZero::Definition
() ||
160
particle ==
G4AntiSigmaPlus::Definition
() ||
161
particle ==
G4AntiXiZero::Definition
() ||
162
particle->
GetBaryonNumber
() < -1 ) {
// Anti-nuclei
163
if
( hFritiofProcess->
IsApplicable
( *particle ) ) {
164
pmanager->
AddRestProcess
( hFritiofProcess );
165
if
(
verbose
> 1 ) {
166
G4cout
<<
"### G4HadronicAbsorptionFritiof added for "
167
<< particle->
GetParticleName
() <<
G4endl
;
168
}
169
}
170
171
// Use Bertini/Precompound for pi-, K-, Sigma-, Xi-, and Omega-
172
}
else
if
( particle ==
G4PionMinus::Definition
() ||
173
particle ==
G4KaonMinus::Definition
() ||
174
particle ==
G4SigmaMinus::Definition
() ||
175
particle ==
G4XiMinus::Definition
() ||
176
particle ==
G4OmegaMinus::Definition
() ) {
177
if
( hBertiniProcess->
IsApplicable
( *particle ) ) {
178
pmanager->
AddRestProcess
( hBertiniProcess );
179
if
(
verbose
> 1 ) {
180
G4cout
<<
"### G4HadronicAbsorptionBertini added for "
181
<< particle->
GetParticleName
() <<
G4endl
;
182
}
183
}
184
185
}
else
{
186
if
(
verbose
> 1 ) {
187
G4cout
<<
"WARNING in G4StoppingPhysics::ConstructProcess: \
188
not able to deal with nuclear stopping of "
189
<< particle->
GetParticleName
() <<
G4endl
;
190
}
191
}
192
}
193
194
}
// end of while loop
195
}
geant4
tree
geant4-10.6-release
source
physics_lists
constructors
stopping
src
G4StoppingPhysics.cc
Built by
Jin Huang
. updated:
Wed Jun 29 2022 17:25:27
using
1.8.2 with
ECCE GitHub integration