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

#include <G4QStoppingPhysics.hh>

+ Inheritance diagram for G4QStoppingPhysics:

Public Member Functions

 G4QStoppingPhysics (G4int ver=1)
 
 G4QStoppingPhysics (const G4String &name, G4int ver=1, G4bool UseMuonMinusCapture=true)
 
virtual ~G4QStoppingPhysics ()
 
virtual void ConstructParticle ()
 
virtual void ConstructProcess ()
 
- 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
 
void SetVerboseLevel (G4int value)
 
G4int GetVerboseLevel () const
 

Additional Inherited Members

- Protected Member Functions inherited from G4VPhysicsConstructor
G4bool RegisterProcess (G4VProcess *process, G4ParticleDefinition *particle)
 
- Protected Attributes inherited from G4VPhysicsConstructor
G4int verboseLevel
 
G4String namePhysics
 
G4int typePhysics
 
G4ParticleTabletheParticleTable
 
G4ParticleTable::G4PTblDicIteratortheParticleIterator
 
G4PhysicsListHelperthePLHelper
 

Detailed Description

Definition at line 49 of file G4QStoppingPhysics.hh.

Constructor & Destructor Documentation

◆ G4QStoppingPhysics() [1/2]

G4QStoppingPhysics::G4QStoppingPhysics ( G4int  ver = 1)

Definition at line 56 of file G4QStoppingPhysics.cc.

57 : G4VPhysicsConstructor("stopping")
58 , muProcess(0), hProcess(0)
59, verbose(ver), wasActivated(false) ,
60 useMuonMinusCapture(true)
61{
62 G4HadronicDeprecate("G4QStoppingPhysics");
63 if(verbose > 1) G4cout << "### G4QStoppingPhysics" << G4endl;
64}
#define G4HadronicDeprecate(name)
#define G4endl
Definition: G4ios.hh:52
G4DLLIMPORT std::ostream G4cout

◆ G4QStoppingPhysics() [2/2]

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

Definition at line 66 of file G4QStoppingPhysics.cc.

69 , muProcess(0), hProcess(0)
70 , verbose(ver), wasActivated(false) ,
71 useMuonMinusCapture(UseMuonMinusCapture)
72{
73 G4HadronicDeprecate("G4QStoppingPhysics");
74 if(verbose > 1) G4cout << "### G4QStoppingPhysics" << G4endl;
75}

◆ ~G4QStoppingPhysics()

G4QStoppingPhysics::~G4QStoppingPhysics ( )
virtual

Definition at line 77 of file G4QStoppingPhysics.cc.

78{
79 if(wasActivated) {
80 if ( muProcess ) delete muProcess;
81 delete hProcess;
82 }
83}

Member Function Documentation

◆ ConstructParticle()

void G4QStoppingPhysics::ConstructParticle ( )
virtual

Implements G4VPhysicsConstructor.

Definition at line 85 of file G4QStoppingPhysics.cc.

86{
87// G4cout << "G4QStoppingPhysics::ConstructParticle" << G4endl;
88 G4LeptonConstructor pLeptonConstructor;
89 pLeptonConstructor.ConstructParticle();
90
91 G4MesonConstructor pMesonConstructor;
92 pMesonConstructor.ConstructParticle();
93
94 G4BaryonConstructor pBaryonConstructor;
95 pBaryonConstructor.ConstructParticle();
96
97}
static void ConstructParticle()
static void ConstructParticle()
static void ConstructParticle()

◆ ConstructProcess()

void G4QStoppingPhysics::ConstructProcess ( )
virtual

Implements G4VPhysicsConstructor.

Definition at line 99 of file G4QStoppingPhysics.cc.

100{
101 if(verbose > 1) G4cout << "### G4QStoppingPhysics::ConstructProcess "
102 << wasActivated << G4endl;
103 if(wasActivated) return;
104 wasActivated = true;
105
106 if ( useMuonMinusCapture )
107 {
108 muProcess = new G4MuonMinusCaptureAtRest();
109 } else {
110 muProcess = 0;
111 }
112 hProcess = new G4QCaptureAtRest();
113
114 G4double mThreshold = 130.*MeV;
115
116 // Add Stopping Process
117 G4ParticleDefinition* particle=0;
118 G4ProcessManager* pmanager=0;
119
121 while( (*theParticleIterator)() )
122 {
123 particle = theParticleIterator->value();
124 pmanager = particle->GetProcessManager();
125 if(particle == G4MuonMinus::MuonMinus()) {
126 if ( useMuonMinusCapture )
127 {
128 pmanager->AddRestProcess(muProcess);
129 if(verbose > 1)
130 G4cout << "### QStoppingPhysics added G4MuonMinusCaptureAtRest for "
131 << particle->GetParticleName() << G4endl;
132 } else {
133 pmanager->AddRestProcess(hProcess);
134 if(verbose > 1)
135 G4cout << "### QStoppingPhysics added G4QCaptureAtRest for "
136 << particle->GetParticleName() << G4endl;
137 }
138 }
139 if(particle->GetPDGCharge() < 0.0 &&
140 particle->GetPDGMass() > mThreshold &&
141 !particle->IsShortLived() &&
142 hProcess->IsApplicable(*particle) )
143 {
144 pmanager->AddRestProcess(hProcess);
145 if(verbose > 1)
146 G4cout << "### QStoppingPhysics added for "
147 << particle->GetParticleName() << G4endl;
148 }
149 }
150}
double G4double
Definition: G4Types.hh:64
static G4MuonMinus * MuonMinus()
Definition: G4MuonMinus.cc:100
G4ProcessManager * GetProcessManager() const
G4double GetPDGCharge() const
const G4String & GetParticleName() const
G4int AddRestProcess(G4VProcess *aProcess, G4int ord=ordDefault)
virtual G4bool IsApplicable(const G4ParticleDefinition &particle)
G4ParticleTable::G4PTblDicIterator * theParticleIterator

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