Geant4.10
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions
G4ChargeExchangePhysics Class Reference

#include <G4ChargeExchangePhysics.hh>

Inheritance diagram for G4ChargeExchangePhysics:
G4VPhysicsConstructor

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)
 
- 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.

References G4cout, and G4endl.

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 ( void  )
virtual

Implements G4VPhysicsConstructor.

Definition at line 68 of file G4ChargeExchangePhysics.cc.

References G4MesonConstructor::ConstructParticle(), and G4BaryonConstructor::ConstructParticle().

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()
void G4ChargeExchangePhysics::ConstructProcess ( void  )
virtual

Implements G4VPhysicsConstructor.

Definition at line 78 of file G4ChargeExchangePhysics.cc.

References G4ProcessManager::AddDiscreteProcess(), aParticleIterator, G4cout, G4endl, G4HadronicInteraction::GetModelName(), G4ParticleDefinition::GetParticleName(), G4ParticleDefinition::GetProcessManager(), eplot::pname, and G4HadronicProcess::RegisterMe().

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  aParticleIterator->reset();
91  while( (*aParticleIterator)() )
92  {
93  G4ParticleDefinition* particle = aParticleIterator->value();
94  G4String pname = particle->GetParticleName();
95  if(pname == "neutron" ||
96  pname == "pi-" ||
97  pname == "pi+" ||
98  pname == "proton"
99  ) {
100 
101  G4ProcessManager* pmanager = particle->GetProcessManager();
103  p->RegisterMe(model);
104  pmanager->AddDiscreteProcess(p);
105 
106  if(verbose > 1)
107  G4cout << "### ChargeExchangePhysics added for "
108  << particle->GetParticleName() << G4endl;
109  }
110  }
111 }
const char * p
Definition: xmltok.h:285
G4int AddDiscreteProcess(G4VProcess *aProcess, G4int ord=ordDefault)
const G4String & GetModelName() const
G4ProcessManager * GetProcessManager() const
const G4String & GetParticleName() const
void RegisterMe(G4HadronicInteraction *a)
G4GLOB_DLL std::ostream G4cout
#define aParticleIterator
const XML_Char XML_Content * model
string pname
Definition: eplot.py:33
#define G4endl
Definition: G4ios.hh:61

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