G4HadronElasticPhysicsXS Class Reference

#include <G4HadronElasticPhysicsXS.hh>

Inheritance diagram for G4HadronElasticPhysicsXS:

G4VPhysicsConstructor

Public Member Functions

 G4HadronElasticPhysicsXS (G4int ver=1)
virtual ~G4HadronElasticPhysicsXS ()
virtual void ConstructParticle ()
virtual void ConstructProcess ()
void AddXSection (const G4ParticleDefinition *, G4VCrossSectionDataSet *)

Detailed Description

Definition at line 49 of file G4HadronElasticPhysicsXS.hh.


Constructor & Destructor Documentation

G4HadronElasticPhysicsXS::G4HadronElasticPhysicsXS ( G4int  ver = 1  ) 

Definition at line 62 of file G4HadronElasticPhysicsXS.cc.

References G4cout, G4endl, and G4VPhysicsConstructor::GetPhysicsName().

00063   : G4VPhysicsConstructor("hElasticWEL_CHIPS_XS"), verbose(ver), 
00064     wasActivated(false)
00065 {
00066   if(verbose > 1) { 
00067     G4cout << "### G4HadronElasticPhysicsHP: " << GetPhysicsName() 
00068            << G4endl; 
00069   }
00070   mainElasticBuilder = new G4HadronElasticPhysics(verbose);
00071 }

G4HadronElasticPhysicsXS::~G4HadronElasticPhysicsXS (  )  [virtual]

Definition at line 73 of file G4HadronElasticPhysicsXS.cc.

00074 {
00075   delete mainElasticBuilder;
00076 }


Member Function Documentation

void G4HadronElasticPhysicsXS::AddXSection ( const G4ParticleDefinition ,
G4VCrossSectionDataSet  
)

Definition at line 111 of file G4HadronElasticPhysicsXS.cc.

References fHadronElastic, G4ProcessManager::GetPostStepProcessVector(), G4ParticleDefinition::GetProcessManager(), CLHEP::detail::n, and G4ProcessVector::size().

Referenced by ConstructProcess().

00113 {
00114   G4ProcessVector* pv = part->GetProcessManager()->GetPostStepProcessVector();
00115   size_t n = pv->size();
00116   if(0 < n) {
00117     for(size_t i=0; i<n; ++i) {
00118       if((*pv)[i]->GetProcessSubType() == fHadronElastic) {
00119         G4HadronicProcess* hp = static_cast<G4HadronicProcess*>((*pv)[i]);
00120         hp->AddDataSet(cross);
00121         return;
00122       }
00123     }
00124   }
00125 }

void G4HadronElasticPhysicsXS::ConstructParticle (  )  [virtual]

Implements G4VPhysicsConstructor.

Definition at line 78 of file G4HadronElasticPhysicsXS.cc.

References G4HadronElasticPhysics::ConstructParticle().

00079 {
00080   // G4cout << "G4HadronElasticPhysics::ConstructParticle" << G4endl;
00081   mainElasticBuilder->ConstructParticle();
00082 }

void G4HadronElasticPhysicsXS::ConstructProcess (  )  [virtual]

Implements G4VPhysicsConstructor.

Definition at line 84 of file G4HadronElasticPhysicsXS.cc.

References AddXSection(), G4HadronElasticPhysics::ConstructProcess(), G4cout, G4endl, G4HadronElasticPhysics::GetNeutronProcess(), and G4Proton::Proton().

00085 {
00086   if(wasActivated) { return; }
00087   wasActivated = true;
00088 
00089   mainElasticBuilder->ConstructProcess();
00090 
00091   mainElasticBuilder->GetNeutronProcess()->
00092     AddDataSet(new G4NeutronElasticXS());
00093 
00094   const G4ParticleDefinition* part = G4Proton::Proton();
00095   AddXSection(part, new G4BGGNucleonElasticXS(part));
00096   /*
00097   part = G4PionPlus::PionPlus();
00098   AddXSection(part, new G4BGGPionElasticXS(part));
00099 
00100   part = G4PionMinus::PionMinus();
00101   AddXSection(part, new G4BGGPionElasticXS(part));
00102   */
00103 
00104   if(verbose > 1) { 
00105     G4cout << "### G4HadronElasticPhysicsXS is constructed " 
00106            << G4endl; 
00107   }
00108 }


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