Geant4 11.1.1
Toolkit for the simulation of the passage of particles through matter
Loading...
Searching...
No Matches
G4StoppingPhysics Class Reference

#include <G4StoppingPhysics.hh>

+ Inheritance diagram for G4StoppingPhysics:

Public Member Functions

 G4StoppingPhysics (G4int ver=1)
 
 G4StoppingPhysics (const G4String &name, G4int ver=1, G4bool UseMuonMinusCapture=true)
 
 ~G4StoppingPhysics () override
 
virtual void ConstructParticle () override
 
virtual void ConstructProcess () override
 
void SetMuonMinusCapture (G4bool val)
 
- Public Member Functions inherited from G4VPhysicsConstructor
 G4VPhysicsConstructor (const G4String &="")
 
 G4VPhysicsConstructor (const G4String &name, G4int physics_type)
 
virtual ~G4VPhysicsConstructor ()
 
virtual void ConstructParticle ()=0
 
virtual void ConstructProcess ()=0
 
void SetPhysicsName (const G4String &="")
 
const G4StringGetPhysicsName () const
 
void SetPhysicsType (G4int)
 
G4int GetPhysicsType () const
 
G4int GetInstanceID () const
 
virtual void TerminateWorker ()
 
void SetVerboseLevel (G4int value)
 
G4int GetVerboseLevel () const
 

Additional Inherited Members

- Static Public Member Functions inherited from G4VPhysicsConstructor
static const G4VPCManagerGetSubInstanceManager ()
 
- Protected Types inherited from G4VPhysicsConstructor
using PhysicsBuilder_V = G4VPCData::PhysicsBuilders_V
 
- Protected Member Functions inherited from G4VPhysicsConstructor
G4bool RegisterProcess (G4VProcess *process, G4ParticleDefinition *particle)
 
G4ParticleTable::G4PTblDicIteratorGetParticleIterator () const
 
PhysicsBuilder_V GetBuilders () const
 
void AddBuilder (G4PhysicsBuilderInterface *bld)
 
- Protected Attributes inherited from G4VPhysicsConstructor
G4int verboseLevel = 0
 
G4String namePhysics = ""
 
G4int typePhysics = 0
 
G4ParticleTabletheParticleTable = nullptr
 
G4int g4vpcInstanceID = 0
 
- Static Protected Attributes inherited from G4VPhysicsConstructor
static G4RUN_DLL G4VPCManager subInstanceManager
 

Detailed Description

Definition at line 58 of file G4StoppingPhysics.hh.

Constructor & Destructor Documentation

◆ G4StoppingPhysics() [1/2]

G4StoppingPhysics::G4StoppingPhysics ( G4int  ver = 1)

Definition at line 67 of file G4StoppingPhysics.cc.

67 :
68 G4StoppingPhysics("stopping", ver)
69{}

◆ G4StoppingPhysics() [2/2]

G4StoppingPhysics::G4StoppingPhysics ( const G4String name,
G4int  ver = 1,
G4bool  UseMuonMinusCapture = true 
)

Definition at line 71 of file G4StoppingPhysics.cc.

72 :
74 verbose( ver ),
75 useMuonMinusCapture( useMuCapture )
76{
78 if ( verbose > 1 ) G4cout << "### G4StoppingPhysics" << G4endl;
79}
@ bStopping
#define G4endl
Definition: G4ios.hh:57
G4GLOB_DLL std::ostream G4cout

◆ ~G4StoppingPhysics()

G4StoppingPhysics::~G4StoppingPhysics ( )
override

Definition at line 81 of file G4StoppingPhysics.cc.

81{}

Member Function Documentation

◆ ConstructParticle()

void G4StoppingPhysics::ConstructParticle ( )
overridevirtual

Implements G4VPhysicsConstructor.

Definition at line 83 of file G4StoppingPhysics.cc.

83 {
84 // G4cout << "G4StoppingPhysics::ConstructParticle" << G4endl;
85 G4LeptonConstructor pLeptonConstructor;
86 pLeptonConstructor.ConstructParticle();
87
88 G4MesonConstructor pMesonConstructor;
89 pMesonConstructor.ConstructParticle();
90
91 G4BaryonConstructor pBaryonConstructor;
92 pBaryonConstructor.ConstructParticle();
93}
static void ConstructParticle()
static void ConstructParticle()
static void ConstructParticle()

Referenced by LBE::ConstructParticle().

◆ ConstructProcess()

void G4StoppingPhysics::ConstructProcess ( )
overridevirtual

Implements G4VPhysicsConstructor.

Definition at line 95 of file G4StoppingPhysics.cc.

95 {
96 if ( verbose > 1 ) G4cout << "### G4StoppingPhysics::ConstructProcess "
97 << G4endl;
98
99 G4MuonMinusCapture* muProcess = nullptr;
100 G4HadronicAbsorptionBertini* hBertiniProcess = nullptr;
101 G4HadronicAbsorptionFritiof* hFritiofProcess = nullptr;
102
103 if ( useMuonMinusCapture ) {
104 muProcess = new G4MuonMinusCapture();
105 }
106
107 hBertiniProcess = new G4HadronicAbsorptionBertini();
108 hFritiofProcess = new G4HadronicAbsorptionFritiof();
109
110 G4double mThreshold = 130.0*MeV;
111
112 // Add Stopping Process
113 G4ParticleDefinition* particle = 0;
114 G4ProcessManager* pmanager = 0;
115
116 auto myParticleIterator=GetParticleIterator();
117 myParticleIterator->reset();
118
119 while ( (*myParticleIterator)() ) {
120
121 particle = myParticleIterator->value();
122 pmanager = particle->GetProcessManager();
123
124 if (useMuonMinusCapture && particle == G4MuonMinus::MuonMinus()) {
125 pmanager->AddRestProcess( muProcess );
126 if ( verbose > 1 ) {
127 G4cout << "### G4StoppingPhysics added G4MuonMinusCapture for "
128 << particle->GetParticleName() << G4endl;
129 }
130 }
131
132 if ( particle->GetPDGCharge() <= 0.0 &&
133 particle->GetPDGMass() > mThreshold &&
134 ! particle->IsShortLived() ) {
135
136 // Use Fritiof/Precompound for: anti-proton, anti-neutron, anti-lambda,
137 // anti-sigma0, anti-sigma+, anti-xi0 and anti-nuclei.
138 if ( particle == G4AntiProton::Definition() ||
139 particle == G4AntiNeutron::Definition() ||
140 particle == G4AntiLambda::Definition() ||
141 particle == G4AntiSigmaZero::Definition() ||
142 particle == G4AntiSigmaPlus::Definition() ||
143 particle == G4AntiXiZero::Definition() ||
144 particle->GetBaryonNumber() < -1 ) { // Anti-nuclei
145 if ( hFritiofProcess->IsApplicable( *particle ) ) {
146 pmanager->AddRestProcess( hFritiofProcess );
147 if ( verbose > 1 ) {
148 G4cout << "### G4HadronicAbsorptionFritiof added for "
149 << particle->GetParticleName() << G4endl;
150 }
151 }
152
153 // Use Bertini/Precompound 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 G4StoppingPhysics::ConstructProcess: \
170 not able to deal with nuclear stopping of "
171 << particle->GetParticleName() << G4endl;
172 }
173 }
174 }
175
176 } // end of while loop
177}
double G4double
Definition: G4Types.hh:83
static G4AntiLambda * Definition()
Definition: G4AntiLambda.cc:52
static G4AntiNeutron * Definition()
static G4AntiProton * Definition()
Definition: G4AntiProton.cc:50
static G4AntiSigmaPlus * Definition()
static G4AntiSigmaZero * Definition()
static G4AntiXiZero * Definition()
Definition: G4AntiXiZero.cc:52
G4bool IsApplicable(const G4ParticleDefinition &)
G4bool IsApplicable(const G4ParticleDefinition &)
static G4KaonMinus * Definition()
Definition: G4KaonMinus.cc:53
static G4MuonMinus * MuonMinus()
Definition: G4MuonMinus.cc:99
static G4OmegaMinus * Definition()
Definition: G4OmegaMinus.cc:52
G4ProcessManager * GetProcessManager() const
G4double GetPDGCharge() const
const G4String & GetParticleName() const
static G4PionMinus * Definition()
Definition: G4PionMinus.cc:51
G4int AddRestProcess(G4VProcess *aProcess, G4int ord=ordDefault)
static G4SigmaMinus * Definition()
Definition: G4SigmaMinus.cc:52
G4ParticleTable::G4PTblDicIterator * GetParticleIterator() const
static G4XiMinus * Definition()
Definition: G4XiMinus.cc:52

Referenced by LBE::ConstructHad().

◆ SetMuonMinusCapture()

void G4StoppingPhysics::SetMuonMinusCapture ( G4bool  val)
inline

Definition at line 79 of file G4StoppingPhysics.hh.

80 { useMuonMinusCapture = val; };

The documentation for this class was generated from the following files: