Geant4 11.2.2
Toolkit for the simulation of the passage of particles through matter
Loading...
Searching...
No Matches
G4StoppingPhysicsWithINCLXX.cc
Go to the documentation of this file.
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: G4StoppingPhysicsWithINCLXX
30//
31// Author: Alberto Ribon
32//
33// Date: May 2023
34//
35// Modified:
36//
37//----------------------------------------------------------------------------
38
40#include "G4SystemOfUnits.hh"
44#include "G4MuonMinusCapture.hh"
46#include "G4ProcessManager.hh"
48#include "G4MesonConstructor.hh"
50#include "G4MuonMinus.hh"
51#include "G4PionMinus.hh"
52#include "G4BuilderType.hh"
53
54// factory
56//
58
59
62
63
65 G4bool useMuCapture ) :
67 verbose( ver ),
68 useMuonMinusCapture( useMuCapture )
69{
71 if ( verbose > 1 ) G4cout << "### G4StoppingPhysicsWithINCLXX" << G4endl;
72}
73
74
76
77
79 // G4cout << "G4StoppingPhysicsWithINCLXX::ConstructParticle" << G4endl;
80 G4LeptonConstructor pLeptonConstructor;
81 pLeptonConstructor.ConstructParticle();
82
83 G4MesonConstructor pMesonConstructor;
84 pMesonConstructor.ConstructParticle();
85
86 G4BaryonConstructor pBaryonConstructor;
87 pBaryonConstructor.ConstructParticle();
88}
89
90
92 if ( verbose > 1 ) G4cout << "### G4StoppingPhysicsWithINCLXX::ConstructProcess " << G4endl;
93
94 G4MuonMinusCapture* muProcess = nullptr;
95 if ( useMuonMinusCapture ) muProcess = new G4MuonMinusCapture;
96
100
101 const G4double mThreshold = 130.0*MeV;
102
103 // Add Stopping Process
104 G4ParticleDefinition* particle = nullptr;
105 G4ProcessManager* pmanager = nullptr;
106
107 auto myParticleIterator = GetParticleIterator();
108 myParticleIterator->reset();
109
110 while ( (*myParticleIterator)() ) {
111
112 particle = myParticleIterator->value();
113 pmanager = particle->GetProcessManager();
114
115 if ( useMuonMinusCapture && particle == G4MuonMinus::MuonMinus() ) {
116 pmanager->AddRestProcess( muProcess );
117 if ( verbose > 1 ) {
118 G4cout << "### G4StoppingPhysicsWithINCLXX added G4MuonMinusCapture for "
119 << particle->GetParticleName() << G4endl;
120 }
121 }
122
123 if ( particle->GetPDGCharge() <= 0.0 &&
124 particle->GetPDGMass() > mThreshold &&
125 ! particle->IsShortLived() ) {
126
127 // Use Fritiof/Precompound for: anti-neutron, anti-lambda,
128 // anti-sigma0, anti-sigma+, anti-xi0 and anti-nuclei.
129 if ( particle == G4AntiNeutron::Definition() ||
130 particle == G4AntiLambda::Definition() ||
131 particle == G4AntiSigmaZero::Definition() ||
132 particle == G4AntiSigmaPlus::Definition() ||
133 particle == G4AntiXiZero::Definition() ||
134 particle->GetBaryonNumber() < -1 ) { // Anti-nuclei
135 if ( hFritiofProcess->IsApplicable( *particle ) ) {
136 pmanager->AddRestProcess( hFritiofProcess );
137 if ( verbose > 1 ) {
138 G4cout << "### G4HadronicAbsorptionFritiof added for "
139 << particle->GetParticleName() << G4endl;
140 }
141 }
142
143 // Use INCLXX/Precompound for antiproton
144 } else if ( particle == G4AntiProton::Definition() ) {
145 if ( hINCLXXProcess->IsApplicable( *particle ) ) {
146 pmanager->AddRestProcess( hINCLXXProcess );
147 if ( verbose > 1 ) {
148 G4cout << "### G4HadronicAbsorptionINCLXX added for "
149 << particle->GetParticleName() << G4endl;
150 }
151 }
152
153 // Use Bertini for pi-, K-, Sigma-, Xi-, and Omega-
154 } else if ( particle == G4PionMinus::Definition() ||
155 particle == G4KaonMinus::Definition() ||
156 particle == G4SigmaMinus::Definition() ||
157 particle == G4XiMinus::Definition() ||
158 particle == G4OmegaMinus::Definition() ) {
159 if ( hBertiniProcess->IsApplicable( *particle ) ) {
160 pmanager->AddRestProcess( hBertiniProcess );
161 if ( verbose > 1 ) {
162 G4cout << "### G4HadronicAbsorptionBertini added for "
163 << particle->GetParticleName() << G4endl;
164 }
165 }
166
167 } else {
168 if ( verbose > 1 ) {
169 G4cout << "WARNING in G4StoppingPhysicsWithINCLXX::ConstructProcess: \
170 not able to deal with nuclear stopping of "
171 << particle->GetParticleName() << G4endl;
172 }
173 }
174 }
175
176 } // end of while loop
177}
@ bStopping
#define G4_DECLARE_PHYSCONSTR_FACTORY(physics_constructor)
double G4double
Definition G4Types.hh:83
bool G4bool
Definition G4Types.hh:86
int G4int
Definition G4Types.hh:85
#define G4endl
Definition G4ios.hh:67
G4GLOB_DLL std::ostream G4cout
static G4AntiLambda * Definition()
static G4AntiNeutron * Definition()
static G4AntiProton * Definition()
static G4AntiSigmaPlus * Definition()
static G4AntiSigmaZero * Definition()
static G4AntiXiZero * Definition()
static void ConstructParticle()
G4bool IsApplicable(const G4ParticleDefinition &)
G4bool IsApplicable(const G4ParticleDefinition &)
G4bool IsApplicable(const G4ParticleDefinition &)
static G4KaonMinus * Definition()
static void ConstructParticle()
static void ConstructParticle()
static G4MuonMinus * MuonMinus()
static G4OmegaMinus * Definition()
G4ProcessManager * GetProcessManager() const
const G4String & GetParticleName() const
static G4PionMinus * Definition()
G4int AddRestProcess(G4VProcess *aProcess, G4int ord=ordDefault)
static G4SigmaMinus * Definition()
G4ParticleTable::G4PTblDicIterator * GetParticleIterator() const
static G4XiMinus * Definition()
Definition G4XiMinus.cc:48