Geant4 9.6.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)
 
 G4ChargeExchangePhysics (G4int ver, G4bool glauber)
 
virtual ~G4ChargeExchangePhysics ()
 
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 47 of file G4ChargeExchangePhysics.hh.

Constructor & Destructor Documentation

◆ G4ChargeExchangePhysics() [1/2]

G4ChargeExchangePhysics::G4ChargeExchangePhysics ( G4int  ver = 0)

Definition at line 65 of file G4ChargeExchangePhysics.cc.

66 : G4VPhysicsConstructor("chargeExchange"), verbose(ver), glFlag(false),
67 wasActivated(false)
68{
69 if(verbose > 1) G4cout << "### ChargeExchangePhysics" << G4endl;
70 model = 0;
71}
#define G4endl
Definition: G4ios.hh:52
G4DLLIMPORT std::ostream G4cout

◆ G4ChargeExchangePhysics() [2/2]

G4ChargeExchangePhysics::G4ChargeExchangePhysics ( G4int  ver,
G4bool  glauber 
)

Definition at line 57 of file G4ChargeExchangePhysics.cc.

58 : G4VPhysicsConstructor("chargeExchange"), verbose(ver), glFlag(glauber),
59 wasActivated(false)
60{
61 if(verbose > 1) G4cout << "### ChargeExchangePhysics" << G4endl;
62 model = 0;
63}

◆ ~G4ChargeExchangePhysics()

G4ChargeExchangePhysics::~G4ChargeExchangePhysics ( )
virtual

Definition at line 73 of file G4ChargeExchangePhysics.cc.

74{
75 delete model;
76}

Member Function Documentation

◆ ConstructParticle()

void G4ChargeExchangePhysics::ConstructParticle ( )
virtual

Implements G4VPhysicsConstructor.

Definition at line 78 of file G4ChargeExchangePhysics.cc.

79{
80// G4cout << "G4ChargeExchangePhysics::ConstructParticle" << G4endl;
81 G4MesonConstructor pMesonConstructor;
82 pMesonConstructor.ConstructParticle();
83
84 G4BaryonConstructor pBaryonConstructor;
85 pBaryonConstructor.ConstructParticle();
86}
static void ConstructParticle()
static void ConstructParticle()

◆ ConstructProcess()

void G4ChargeExchangePhysics::ConstructProcess ( )
virtual

Implements G4VPhysicsConstructor.

Definition at line 88 of file G4ChargeExchangePhysics.cc.

89{
90 if(wasActivated) return;
91 wasActivated = true;
92
93 model = new G4ChargeExchange();
94
95 if(verbose > 1) {
96 G4cout << "### ChargeExchangePhysics Construct Processes with the model <"
97 << model->GetModelName() << ">" << G4endl;
98 }
99
101 while( (*theParticleIterator)() )
102 {
104 G4String pname = particle->GetParticleName();
105 if(pname == "neutron" ||
106 pname == "pi-" ||
107 pname == "pi+" ||
108 pname == "proton"
109 ) {
110
111 G4ProcessManager* pmanager = particle->GetProcessManager();
113 p->RegisterMe(model);
114 pmanager->AddDiscreteProcess(p);
115
116 if(verbose > 1)
117 G4cout << "### ChargeExchangePhysics added for "
118 << particle->GetParticleName() << G4endl;
119 }
120 }
121}
const G4String & GetModelName() const
void RegisterMe(G4HadronicInteraction *a)
G4ProcessManager * GetProcessManager() const
const G4String & GetParticleName() const
G4int AddDiscreteProcess(G4VProcess *aProcess, G4int ord=ordDefault)
G4ParticleTable::G4PTblDicIterator * theParticleIterator

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