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

#include <G4QCaptureAtRestPhysics.hh>

+ Inheritance diagram for G4QCaptureAtRestPhysics:

Public Member Functions

 G4QCaptureAtRestPhysics (G4int ver=1)
 
 G4QCaptureAtRestPhysics (const G4String &name, G4int ver=1)
 
virtual ~G4QCaptureAtRestPhysics ()
 
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 54 of file G4QCaptureAtRestPhysics.hh.

Constructor & Destructor Documentation

◆ G4QCaptureAtRestPhysics() [1/2]

G4QCaptureAtRestPhysics::G4QCaptureAtRestPhysics ( G4int  ver = 1)

Definition at line 41 of file G4QCaptureAtRestPhysics.cc.

42 : G4VPhysicsConstructor("CHIPS nuclear_capture"), captureProcess(0)
43 , verbose(ver), wasActivated(false)
44{
45 if(verbose > 1) G4cout << "###> G4QCaptureAtRestPhysics is initialized" << G4endl;
46}
#define G4endl
Definition: G4ios.hh:52
G4DLLIMPORT std::ostream G4cout

◆ G4QCaptureAtRestPhysics() [2/2]

G4QCaptureAtRestPhysics::G4QCaptureAtRestPhysics ( const G4String name,
G4int  ver = 1 
)

Definition at line 48 of file G4QCaptureAtRestPhysics.cc.

49 : G4VPhysicsConstructor(name), captureProcess(0), verbose(ver), wasActivated(false)
50{
51 if(verbose > 1) G4cout << "###> G4QCaptureAtRestPhysics is initialized" << G4endl;
52}

◆ ~G4QCaptureAtRestPhysics()

G4QCaptureAtRestPhysics::~G4QCaptureAtRestPhysics ( )
virtual

Definition at line 54 of file G4QCaptureAtRestPhysics.cc.

55{
56 if(wasActivated) delete captureProcess;
57}

Member Function Documentation

◆ ConstructParticle()

void G4QCaptureAtRestPhysics::ConstructParticle ( )
virtual

Implements G4VPhysicsConstructor.

Definition at line 59 of file G4QCaptureAtRestPhysics.cc.

60{
61// G4cout << "G4QCaptureAtRestPhysics::ConstructParticle" << G4endl;
62 G4LeptonConstructor pLeptonConstructor;
63 pLeptonConstructor.ConstructParticle();
64
65 G4MesonConstructor pMesonConstructor;
66 pMesonConstructor.ConstructParticle();
67
68 G4BaryonConstructor pBaryonConstructor;
69 pBaryonConstructor.ConstructParticle();
70
71}
static void ConstructParticle()
static void ConstructParticle()
static void ConstructParticle()

◆ ConstructProcess()

void G4QCaptureAtRestPhysics::ConstructProcess ( )
virtual

Implements G4VPhysicsConstructor.

Definition at line 73 of file G4QCaptureAtRestPhysics.cc.

74{
75 if(verbose>1) G4cout<<"###> G4QCaptureAtRestPhysics::ConstructProcess: "<<wasActivated
76 <<G4endl;
77 if(wasActivated) return;
78 wasActivated = true;
79 captureProcess = new G4QCaptureAtRest();
80
81 // Add Stopping Process
82 G4ParticleDefinition* particle=0;
83 G4ProcessManager* pmanager=0;
84
86 while( (*theParticleIterator)() )
87 {
88 particle = theParticleIterator->value();
89 pmanager = particle->GetProcessManager();
90 if(particle->GetPDGCharge() < 0. && particle != G4Electron::Electron() &&
91 !(particle->IsShortLived()) && captureProcess->IsApplicable(*particle) )
92 {
93 pmanager->AddRestProcess(captureProcess);
94 if(verbose > 1) G4cout << "###> G4QCaptureAtRestPhysics is added for "
95 <<particle->GetParticleName() << G4endl;
96 }
97 }
98}
static G4Electron * Electron()
Definition: G4Electron.cc:94
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: