G4ChargeExchangePhysics Class Reference

#include <G4ChargeExchangePhysics.hh>

Inheritance diagram for G4ChargeExchangePhysics:

G4VPhysicsConstructor

Public Member Functions

 G4ChargeExchangePhysics (G4int ver=0)
 G4ChargeExchangePhysics (G4int ver, G4bool glauber)
virtual ~G4ChargeExchangePhysics ()
virtual void ConstructParticle ()
virtual void ConstructProcess ()

Detailed Description

Definition at line 47 of file G4ChargeExchangePhysics.hh.


Constructor & Destructor Documentation

G4ChargeExchangePhysics::G4ChargeExchangePhysics ( G4int  ver = 0  ) 

Definition at line 65 of file G4ChargeExchangePhysics.cc.

References G4cout, and G4endl.

00066   : G4VPhysicsConstructor("chargeExchange"), verbose(ver), glFlag(false),
00067     wasActivated(false)
00068 {
00069   if(verbose > 1) G4cout << "### ChargeExchangePhysics" << G4endl;
00070   model = 0;
00071 }

G4ChargeExchangePhysics::G4ChargeExchangePhysics ( G4int  ver,
G4bool  glauber 
)

Definition at line 57 of file G4ChargeExchangePhysics.cc.

References G4cout, and G4endl.

00058   : G4VPhysicsConstructor("chargeExchange"), verbose(ver), glFlag(glauber),
00059     wasActivated(false)
00060 {
00061   if(verbose > 1) G4cout << "### ChargeExchangePhysics" << G4endl;
00062   model = 0;
00063 }

G4ChargeExchangePhysics::~G4ChargeExchangePhysics (  )  [virtual]

Definition at line 73 of file G4ChargeExchangePhysics.cc.

00074 {
00075   delete model;
00076 }


Member Function Documentation

void G4ChargeExchangePhysics::ConstructParticle (  )  [virtual]

Implements G4VPhysicsConstructor.

Definition at line 78 of file G4ChargeExchangePhysics.cc.

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

00079 {
00080 // G4cout << "G4ChargeExchangePhysics::ConstructParticle" << G4endl;
00081   G4MesonConstructor pMesonConstructor;
00082   pMesonConstructor.ConstructParticle();
00083 
00084   G4BaryonConstructor pBaryonConstructor;
00085   pBaryonConstructor.ConstructParticle();
00086 }

void G4ChargeExchangePhysics::ConstructProcess (  )  [virtual]

Implements G4VPhysicsConstructor.

Definition at line 88 of file G4ChargeExchangePhysics.cc.

References G4ProcessManager::AddDiscreteProcess(), G4cout, G4endl, G4HadronicInteraction::GetModelName(), G4ParticleDefinition::GetParticleName(), G4ParticleDefinition::GetProcessManager(), G4HadronicProcess::RegisterMe(), G4ParticleTableIterator< K, V >::reset(), G4VPhysicsConstructor::theParticleIterator, and G4ParticleTableIterator< K, V >::value().

00089 {
00090   if(wasActivated) return;
00091   wasActivated = true;
00092 
00093   model = new G4ChargeExchange();
00094 
00095   if(verbose > 1) {
00096     G4cout << "### ChargeExchangePhysics Construct Processes with the model <" 
00097            << model->GetModelName() << ">" << G4endl;
00098   }
00099 
00100   theParticleIterator->reset();
00101   while( (*theParticleIterator)() )
00102   {
00103     G4ParticleDefinition* particle = theParticleIterator->value();
00104     G4String pname = particle->GetParticleName();
00105     if(pname == "neutron"   || 
00106        pname == "pi-"       || 
00107        pname == "pi+"       || 
00108        pname == "proton"
00109        ) { 
00110       
00111       G4ProcessManager* pmanager = particle->GetProcessManager();
00112       G4ChargeExchangeProcess* p = new G4ChargeExchangeProcess();
00113       p->RegisterMe(model);
00114       pmanager->AddDiscreteProcess(p);
00115 
00116       if(verbose > 1)
00117         G4cout << "### ChargeExchangePhysics added for " 
00118                << particle->GetParticleName() << G4endl;
00119     }
00120   }
00121 }


The documentation for this class was generated from the following files:
Generated on Mon May 27 17:51:37 2013 for Geant4 by  doxygen 1.4.7