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

#include <G4ChargeExchangePhysics.hh>

+ Inheritance diagram for G4ChargeExchangePhysics:

Public Member Functions

 G4ChargeExchangePhysics (G4int ver=0)
 
virtual ~G4ChargeExchangePhysics ()
 
void ConstructParticle () override
 
void ConstructProcess () override
 
- 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
 
G4int GetInstanceID () const
 
virtual void TerminateWorker ()
 

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
 
G4String namePhysics
 
G4int typePhysics
 
G4ParticleTabletheParticleTable
 
G4int g4vpcInstanceID
 
- Static Protected Attributes inherited from G4VPhysicsConstructor
static G4RUN_DLL G4VPCManager subInstanceManager
 

Detailed Description

Definition at line 44 of file G4ChargeExchangePhysics.hh.

Constructor & Destructor Documentation

◆ G4ChargeExchangePhysics()

G4ChargeExchangePhysics::G4ChargeExchangePhysics ( G4int  ver = 0)
explicit

Definition at line 55 of file G4ChargeExchangePhysics.cc.

56 : G4VPhysicsConstructor("chargeExchange"), verbose(ver)
57{
58 if(verbose > 1) G4cout << "### ChargeExchangePhysics" << G4endl;
59}
#define G4endl
Definition: G4ios.hh:57
G4GLOB_DLL std::ostream G4cout

◆ ~G4ChargeExchangePhysics()

G4ChargeExchangePhysics::~G4ChargeExchangePhysics ( )
virtual

Definition at line 61 of file G4ChargeExchangePhysics.cc.

62{}

Member Function Documentation

◆ ConstructParticle()

void G4ChargeExchangePhysics::ConstructParticle ( )
overridevirtual

Implements G4VPhysicsConstructor.

Definition at line 64 of file G4ChargeExchangePhysics.cc.

65{
66// G4cout << "G4ChargeExchangePhysics::ConstructParticle" << G4endl;
67 G4MesonConstructor pMesonConstructor;
68 pMesonConstructor.ConstructParticle();
69
70 G4BaryonConstructor pBaryonConstructor;
71 pBaryonConstructor.ConstructParticle();
72}
static void ConstructParticle()
static void ConstructParticle()

◆ ConstructProcess()

void G4ChargeExchangePhysics::ConstructProcess ( )
overridevirtual

Implements G4VPhysicsConstructor.

Definition at line 74 of file G4ChargeExchangePhysics.cc.

75{
77
78 if(verbose > 1) {
79 G4cout << "### ChargeExchangePhysics Construct Processes with the model <"
80 << model->GetModelName() << ">" << G4endl;
81 }
82
83 auto myParticleIterator=GetParticleIterator();
84 myParticleIterator->reset();
85 while( (*myParticleIterator)() )
86 {
87 G4ParticleDefinition* particle = myParticleIterator->value();
88 G4String pname = particle->GetParticleName();
89 if(pname == "neutron" ||
90 pname == "pi-" ||
91 pname == "pi+" ||
92 pname == "proton"
93 ) {
94
95 G4ProcessManager* pmanager = particle->GetProcessManager();
97 p->RegisterMe(model);
98 pmanager->AddDiscreteProcess(p);
99
100 if(verbose > 1)
101 G4cout << "### ChargeExchangePhysics added for "
102 << particle->GetParticleName() << G4endl;
103 }
104 }
105}
const G4String & GetModelName() const
void RegisterMe(G4HadronicInteraction *a)
G4ProcessManager * GetProcessManager() const
const G4String & GetParticleName() const
G4int AddDiscreteProcess(G4VProcess *aProcess, G4int ord=ordDefault)
G4ParticleTable::G4PTblDicIterator * GetParticleIterator() const

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