Geant4  10.03.p01
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
G4ChargeExchangePhysics Class Reference

#include <G4ChargeExchangePhysics.hh>

Inheritance diagram for G4ChargeExchangePhysics:
Collaboration diagram for G4ChargeExchangePhysics:

Public Member Functions

 G4ChargeExchangePhysics (G4int ver=0)
 
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 ()
 
void SetPhysicsName (const G4String &="")
 
const G4StringGetPhysicsName () const
 
void SetPhysicsType (G4int)
 
G4int GetPhysicsType () const
 
void SetVerboseLevel (G4int value)
 
G4int GetVerboseLevel () const
 
G4int GetInstanceID () const
 

Additional Inherited Members

- Static Public Member Functions inherited from G4VPhysicsConstructor
static const G4VPCManagerGetSubInstanceManager ()
 
- Protected Member Functions inherited from G4VPhysicsConstructor
G4bool RegisterProcess (G4VProcess *process, G4ParticleDefinition *particle)
 
G4ParticleTable::G4PTblDicIteratorGetParticleIterator () const
 
- 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 47 of file G4ChargeExchangePhysics.hh.

Constructor & Destructor Documentation

G4ChargeExchangePhysics::G4ChargeExchangePhysics ( G4int  ver = 0)

Definition at line 58 of file G4ChargeExchangePhysics.cc.

59  : G4VPhysicsConstructor("chargeExchange"), verbose(ver)
60 {
61  if(verbose > 1) G4cout << "### ChargeExchangePhysics" << G4endl;
62 }
G4GLOB_DLL std::ostream G4cout
G4VPhysicsConstructor(const G4String &="")
#define G4endl
Definition: G4ios.hh:61
G4ChargeExchangePhysics::~G4ChargeExchangePhysics ( )
virtual

Definition at line 64 of file G4ChargeExchangePhysics.cc.

65 {
66 }

Member Function Documentation

void G4ChargeExchangePhysics::ConstructParticle ( )
virtual

Implements G4VPhysicsConstructor.

Definition at line 68 of file G4ChargeExchangePhysics.cc.

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

Here is the call graph for this function:

void G4ChargeExchangePhysics::ConstructProcess ( )
virtual

Implements G4VPhysicsConstructor.

Definition at line 78 of file G4ChargeExchangePhysics.cc.

79 {
80  if(wasActivated) return;
81  wasActivated = true;
82 
84 
85  if(verbose > 1) {
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  G4String pname = particle->GetParticleName();
96  if(pname == "neutron" ||
97  pname == "pi-" ||
98  pname == "pi+" ||
99  pname == "proton"
100  ) {
101 
102  G4ProcessManager* pmanager = particle->GetProcessManager();
104  p->RegisterMe(model);
105  pmanager->AddDiscreteProcess(p);
106 
107  if(verbose > 1)
108  G4cout << "### ChargeExchangePhysics added for "
109  << particle->GetParticleName() << G4endl;
110  }
111  }
112 }
const char * p
Definition: xmltok.h:285
G4int AddDiscreteProcess(G4VProcess *aProcess, G4int ord=ordDefault)
const G4String & GetModelName() const
const G4String & GetParticleName() const
void RegisterMe(G4HadronicInteraction *a)
G4ParticleTable::G4PTblDicIterator * GetParticleIterator() const
G4GLOB_DLL std::ostream G4cout
G4ProcessManager * GetProcessManager() const
#define G4endl
Definition: G4ios.hh:61
const XML_Char XML_Content * model
Definition: expat.h:151

Here is the call graph for this function:


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