Geant4.10
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions
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 *)
 
- 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 49 of file G4HadronElasticPhysicsXS.hh.

Constructor & Destructor Documentation

G4HadronElasticPhysicsXS::G4HadronElasticPhysicsXS ( G4int  ver = 1)

Definition at line 64 of file G4HadronElasticPhysicsXS.cc.

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

65  : G4VPhysicsConstructor("hElasticWEL_CHIPS_XS"), verbose(ver)
66 {
67  if(verbose > 1) {
68  G4cout << "### G4HadronElasticPhysicsHP: " << GetPhysicsName()
69  << G4endl;
70  }
71  mainElasticBuilder = new G4HadronElasticPhysics(verbose);
72 }
G4GLOB_DLL std::ostream G4cout
const G4String & GetPhysicsName() const
G4VPhysicsConstructor(const G4String &="")
#define G4endl
Definition: G4ios.hh:61
G4HadronElasticPhysicsXS::~G4HadronElasticPhysicsXS ( )
virtual

Definition at line 74 of file G4HadronElasticPhysicsXS.cc.

75 {
76  delete mainElasticBuilder;
77 }

Member Function Documentation

void G4HadronElasticPhysicsXS::AddXSection ( const G4ParticleDefinition part,
G4VCrossSectionDataSet cross 
)

Definition at line 114 of file G4HadronElasticPhysicsXS.cc.

References G4HadronicProcess::AddDataSet(), fHadronElastic, G4ProcessManager::GetPostStepProcessVector(), G4ParticleDefinition::GetProcessManager(), n, and G4ProcessVector::size().

Referenced by ConstructProcess().

116 {
118  size_t n = pv->size();
119  if(0 < n) {
120  for(size_t i=0; i<n; ++i) {
121  if((*pv)[i]->GetProcessSubType() == fHadronElastic) {
122  G4HadronicProcess* hp = static_cast<G4HadronicProcess*>((*pv)[i]);
123  hp->AddDataSet(cross);
124  return;
125  }
126  }
127  }
128 }
G4ProcessManager * GetProcessManager() const
void AddDataSet(G4VCrossSectionDataSet *aDataSet)
const G4int n
G4int size() const
G4ProcessVector * GetPostStepProcessVector(G4ProcessVectorTypeIndex typ=typeGPIL) const
void G4HadronElasticPhysicsXS::ConstructParticle ( void  )
virtual

Implements G4VPhysicsConstructor.

Definition at line 79 of file G4HadronElasticPhysicsXS.cc.

References G4HadronElasticPhysics::ConstructParticle().

80 {
81  // G4cout << "G4HadronElasticPhysics::ConstructParticle" << G4endl;
82  mainElasticBuilder->ConstructParticle();
83 }
void G4HadronElasticPhysicsXS::ConstructProcess ( void  )
virtual

Implements G4VPhysicsConstructor.

Definition at line 85 of file G4HadronElasticPhysicsXS.cc.

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

86 {
87  if(wasActivated) { return; }
88  wasActivated = true;
89 
90  //Needed because this is a TLS object and this method is called by all threads
91  if ( ! mainElasticBuilder ) mainElasticBuilder = new G4HadronElasticPhysics(verbose);
92  mainElasticBuilder->ConstructProcess();
93 
94  mainElasticBuilder->GetNeutronProcess()->
95  AddDataSet(new G4NeutronElasticXS());
96 
97  const G4ParticleDefinition* part = G4Proton::Proton();
98  AddXSection(part, new G4BGGNucleonElasticXS(part));
99  /*
100  part = G4PionPlus::PionPlus();
101  AddXSection(part, new G4BGGPionElasticXS(part));
102 
103  part = G4PionMinus::PionMinus();
104  AddXSection(part, new G4BGGPionElasticXS(part));
105  */
106 
107  if(verbose > 1) {
108  G4cout << "### G4HadronElasticPhysicsXS is constructed "
109  << G4endl;
110  }
111 }
G4HadronicProcess * GetNeutronProcess()
G4GLOB_DLL std::ostream G4cout
void AddXSection(const G4ParticleDefinition *, G4VCrossSectionDataSet *)
static G4Proton * Proton()
Definition: G4Proton.cc:93
#define G4endl
Definition: G4ios.hh:61

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