Geant4 11.1.1
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=1)
 
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
 
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 44 of file G4ChargeExchangePhysics.hh.

Constructor & Destructor Documentation

◆ G4ChargeExchangePhysics()

G4ChargeExchangePhysics::G4ChargeExchangePhysics ( G4int  ver = 1)
explicit

Definition at line 60 of file G4ChargeExchangePhysics.cc.

61 : G4VPhysicsConstructor("chargeExchange")
62{
63 // because it is an addition, the type of this constructor is 0
65 if(ver > 1) G4cout << "### ChargeExchangePhysics" << G4endl;
66}
#define G4endl
Definition: G4ios.hh:57
G4GLOB_DLL std::ostream G4cout
static G4HadronicParameters * Instance()
void SetVerboseLevel(const G4int val)

◆ ~G4ChargeExchangePhysics()

G4ChargeExchangePhysics::~G4ChargeExchangePhysics ( )
virtual

Definition at line 68 of file G4ChargeExchangePhysics.cc.

69{}

Member Function Documentation

◆ ConstructParticle()

void G4ChargeExchangePhysics::ConstructParticle ( )
overridevirtual

Implements G4VPhysicsConstructor.

Definition at line 71 of file G4ChargeExchangePhysics.cc.

72{
73// G4cout << "G4ChargeExchangePhysics::ConstructParticle" << G4endl;
74 G4MesonConstructor pMesonConstructor;
75 pMesonConstructor.ConstructParticle();
76
77 G4BaryonConstructor pBaryonConstructor;
78 pBaryonConstructor.ConstructParticle();
79}
static void ConstructParticle()
static void ConstructParticle()

◆ ConstructProcess()

void G4ChargeExchangePhysics::ConstructProcess ( )
overridevirtual

Implements G4VPhysicsConstructor.

Definition at line 81 of file G4ChargeExchangePhysics.cc.

82{
84
86 G4cout << "### ChargeExchangePhysics Construct Processes with the model <"
87 << model->GetModelName() << ">" << G4endl;
88 }
89
90 auto myParticleIterator=GetParticleIterator();
91 myParticleIterator->reset();
92 while( (*myParticleIterator)() )
93 {
94 G4ParticleDefinition* particle = myParticleIterator->value();
95 if( particle == G4Neutron::Definition() ||
96 particle == G4PionMinus::Definition() ||
97 particle == G4PionPlus::Definition() ||
98 particle == G4Proton::Definition()
99 ) {
100
101 G4ProcessManager* pmanager = particle->GetProcessManager();
103 p->RegisterMe(model);
104
105 if( particle == G4PionMinus::Definition() || particle == G4PionPlus::Definition() ) {
106 p->AddDataSet( new G4BGGPionElasticXS( particle ) );
107 } else if( particle == G4Proton::Definition() ) {
108 p->AddDataSet( new G4BGGNucleonElasticXS( particle ) );
109 } else if( particle == G4Neutron::Definition() ) {
111 }
112
113 pmanager->AddDiscreteProcess(p);
114
116 G4cout << "### ChargeExchangePhysics added for "
117 << particle->GetParticleName() << G4endl;
118 }
119 }
120}
const G4String & GetModelName() const
void AddDataSet(G4VCrossSectionDataSet *aDataSet)
void RegisterMe(G4HadronicInteraction *a)
static G4Neutron * Definition()
Definition: G4Neutron.cc:53
G4ProcessManager * GetProcessManager() const
const G4String & GetParticleName() const
static G4PionMinus * Definition()
Definition: G4PionMinus.cc:51
static G4PionPlus * Definition()
Definition: G4PionPlus.cc:51
G4int AddDiscreteProcess(G4VProcess *aProcess, G4int ord=ordDefault)
static G4Proton * Definition()
Definition: G4Proton.cc:48
G4ParticleTable::G4PTblDicIterator * GetParticleIterator() const

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