Geant4  10.02.p03
G4HadronElasticPhysicsXS Class Reference

#include <G4HadronElasticPhysicsXS.hh>

Inheritance diagram for G4HadronElasticPhysicsXS:
Collaboration diagram for G4HadronElasticPhysicsXS:

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
 

Private Member Functions

 G4HadronElasticPhysicsXS (G4HadronElasticPhysicsXS &)
 
G4HadronElasticPhysicsXSoperator= (const G4HadronElasticPhysicsXS &right)
 

Private Attributes

G4int verbose
 

Static Private Attributes

static G4ThreadLocal G4bool wasActivated = false
 
static G4ThreadLocal G4HadronElasticPhysicsmainElasticBuilder = 0
 

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 49 of file G4HadronElasticPhysicsXS.hh.

Constructor & Destructor Documentation

◆ G4HadronElasticPhysicsXS() [1/2]

G4HadronElasticPhysicsXS::G4HadronElasticPhysicsXS ( G4int  ver = 1)

Definition at line 65 of file G4HadronElasticPhysicsXS.cc.

66  : G4VPhysicsConstructor("hElasticWEL_CHIPS_XS"), verbose(ver)
67 {
68  if(verbose > 1) {
69  G4cout << "### G4HadronElasticPhysicsHP: " << GetPhysicsName()
70  << G4endl;
71  }
73 }
const G4String & GetPhysicsName() const
G4GLOB_DLL std::ostream G4cout
static G4ThreadLocal G4HadronElasticPhysics * mainElasticBuilder
G4VPhysicsConstructor(const G4String &="")
#define G4endl
Definition: G4ios.hh:61
Here is the call graph for this function:

◆ ~G4HadronElasticPhysicsXS()

G4HadronElasticPhysicsXS::~G4HadronElasticPhysicsXS ( )
virtual

Definition at line 75 of file G4HadronElasticPhysicsXS.cc.

76 {
77  delete mainElasticBuilder;
78 }
static G4ThreadLocal G4HadronElasticPhysics * mainElasticBuilder

◆ G4HadronElasticPhysicsXS() [2/2]

G4HadronElasticPhysicsXS::G4HadronElasticPhysicsXS ( G4HadronElasticPhysicsXS )
private

Member Function Documentation

◆ AddXSection()

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

Definition at line 115 of file G4HadronElasticPhysicsXS.cc.

117 {
119  size_t n = pv->size();
120  if(0 < n) {
121  for(size_t i=0; i<n; ++i) {
122  if((*pv)[i]->GetProcessSubType() == fHadronElastic) {
123  G4HadronicProcess* hp = static_cast<G4HadronicProcess*>((*pv)[i]);
124  hp->AddDataSet(cross);
125  return;
126  }
127  }
128  }
129 }
G4ProcessManager * GetProcessManager() const
G4ProcessVector * GetPostStepProcessVector(G4ProcessVectorTypeIndex typ=typeGPIL) const
Char_t n[5]
void AddDataSet(G4VCrossSectionDataSet *aDataSet)
G4int size() const
Here is the call graph for this function:
Here is the caller graph for this function:

◆ ConstructParticle()

void G4HadronElasticPhysicsXS::ConstructParticle ( void  )
virtual

Implements G4VPhysicsConstructor.

Definition at line 80 of file G4HadronElasticPhysicsXS.cc.

81 {
82  // G4cout << "G4HadronElasticPhysics::ConstructParticle" << G4endl;
84 }
static G4ThreadLocal G4HadronElasticPhysics * mainElasticBuilder
Here is the call graph for this function:

◆ ConstructProcess()

void G4HadronElasticPhysicsXS::ConstructProcess ( void  )
virtual

Implements G4VPhysicsConstructor.

Definition at line 86 of file G4HadronElasticPhysicsXS.cc.

87 {
88  if(wasActivated) { return; }
89  wasActivated = true;
90 
91  //Needed because this is a TLS object and this method is called by all threads
94 
96  AddDataSet(G4CrossSectionDataSetRegistry::Instance()->GetCrossSectionDataSet(G4NeutronElasticXS::Default_Name()));
97 
99  AddXSection(part, new G4BGGNucleonElasticXS(part));
100  /*
101  part = G4PionPlus::PionPlus();
102  AddXSection(part, new G4BGGPionElasticXS(part));
103 
104  part = G4PionMinus::PionMinus();
105  AddXSection(part, new G4BGGPionElasticXS(part));
106  */
107 
108  if(verbose > 1) {
109  G4cout << "### G4HadronElasticPhysicsXS is constructed "
110  << G4endl;
111  }
112 }
G4HadronicProcess * GetNeutronProcess()
static G4ThreadLocal G4bool wasActivated
G4GLOB_DLL std::ostream G4cout
void AddXSection(const G4ParticleDefinition *, G4VCrossSectionDataSet *)
TString part[npart]
static G4CrossSectionDataSetRegistry * Instance()
static G4Proton * Proton()
Definition: G4Proton.cc:93
static G4ThreadLocal G4HadronElasticPhysics * mainElasticBuilder
static const char * Default_Name()
#define G4endl
Definition: G4ios.hh:61
Here is the call graph for this function:

◆ operator=()

G4HadronElasticPhysicsXS& G4HadronElasticPhysicsXS::operator= ( const G4HadronElasticPhysicsXS right)
private

Member Data Documentation

◆ mainElasticBuilder

G4ThreadLocal G4HadronElasticPhysics * G4HadronElasticPhysicsXS::mainElasticBuilder = 0
staticprivate

Definition at line 76 of file G4HadronElasticPhysicsXS.hh.

◆ verbose

G4int G4HadronElasticPhysicsXS::verbose
private

Definition at line 74 of file G4HadronElasticPhysicsXS.hh.

◆ wasActivated

G4ThreadLocal G4bool G4HadronElasticPhysicsXS::wasActivated = false
staticprivate

Definition at line 75 of file G4HadronElasticPhysicsXS.hh.


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