Geant4  10.02.p03
G4ParticleHPData Class Reference

#include <G4ParticleHPData.hh>

Collaboration diagram for G4ParticleHPData:

Public Member Functions

 G4ParticleHPData (G4ParticleDefinition *projectile)
 
 ~G4ParticleHPData ()
 
G4PhysicsVectorMakePhysicsVector (G4Element *thE, G4ParticleHPFissionData *theP)
 
G4PhysicsVectorMakePhysicsVector (G4Element *thE, G4ParticleHPCaptureData *theP)
 
G4PhysicsVectorMakePhysicsVector (G4Element *thE, G4ParticleHPElasticData *theP)
 
G4PhysicsVectorMakePhysicsVector (G4Element *thE, G4ParticleHPInelasticData *theP)
 
G4PhysicsVectorDoPhysicsVector (G4ParticleHPVector *theVector)
 

Static Public Member Functions

static G4ParticleHPDataInstance (G4ParticleDefinition *projectile)
 

Private Member Functions

void addPhysicsVector ()
 

Private Attributes

std::vector< G4ParticleHPElementData *> theData
 
G4int numEle
 
G4ParticleDefinitiontheProjectile
 
G4String theDataDirVariable
 

Detailed Description

Definition at line 46 of file G4ParticleHPData.hh.

Constructor & Destructor Documentation

◆ G4ParticleHPData()

G4ParticleHPData::G4ParticleHPData ( G4ParticleDefinition projectile)

Definition at line 35 of file G4ParticleHPData.cc.

36  : theProjectile(projectile)
37 {
38  //const char* theDataDirVariable;
39  if( projectile == G4Neutron::Neutron() ) {
40  theDataDirVariable = "G4NEUTRONHPDATA";
41  }else if( projectile == G4Proton::Proton() ) {
42  theDataDirVariable = "G4PROTONHPDATA";
43  }else if( projectile == G4Deuteron::Deuteron() ) {
44  theDataDirVariable = "G4DEUTERONHPDATA";
45  }else if( projectile == G4Triton::Triton() ) {
46  theDataDirVariable = "G4TRITONHPDATA";
47  }else if( projectile == G4He3::He3() ) {
48  theDataDirVariable = "G4HE3HPDATA";
49  }else if( projectile == G4Alpha::Alpha() ) {
50  theDataDirVariable = "G4ALPHAHPDATA";
51  }
52 
54  for ( G4int i = 0 ; i < numEle ; i++ ) theData.push_back ( new G4ParticleHPElementData );
55 // G4cout << "G4ParticleHPData::G4ParticleHPData(): numEle="<<numEle<<G4endl;
56  for (G4int i=0; i<numEle; i++)
57  {
58  (*theData[i]).Init((*(G4Element::GetElementTable()))[i], projectile, theDataDirVariable);
59  }
60  }
void Init()
Definition: G4IonTable.cc:86
int G4int
Definition: G4Types.hh:78
static size_t GetNumberOfElements()
Definition: G4Element.cc:402
static G4Triton * Triton()
Definition: G4Triton.cc:95
static G4Proton * Proton()
Definition: G4Proton.cc:93
static G4Neutron * Neutron()
Definition: G4Neutron.cc:104
static G4Deuteron * Deuteron()
Definition: G4Deuteron.cc:94
std::vector< G4ParticleHPElementData *> theData
G4ParticleDefinition * theProjectile
static G4Alpha * Alpha()
Definition: G4Alpha.cc:89
static G4ElementTable * GetElementTable()
Definition: G4Element.cc:395
static G4He3 * He3()
Definition: G4He3.cc:94
G4String theDataDirVariable
Here is the call graph for this function:
Here is the caller graph for this function:

◆ ~G4ParticleHPData()

G4ParticleHPData::~G4ParticleHPData ( )

Definition at line 62 of file G4ParticleHPData.cc.

63  {
64  for ( std::vector<G4ParticleHPElementData*>::iterator it = theData.begin() ; it != theData.end() ; it++ ) delete *it;
65  theData.clear();
66  }
std::vector< G4ParticleHPElementData *> theData

Member Function Documentation

◆ addPhysicsVector()

void G4ParticleHPData::addPhysicsVector ( )
private

Definition at line 95 of file G4ParticleHPData.cc.

96 {
97  for ( G4int i = numEle; i < (G4int)G4Element::GetNumberOfElements() ; i++ )
98  {
99  theData.push_back ( new G4ParticleHPElementData );
101  }
103 }
void Init()
Definition: G4IonTable.cc:86
int G4int
Definition: G4Types.hh:78
static size_t GetNumberOfElements()
Definition: G4Element.cc:402
std::vector< G4ParticleHPElementData *> theData
G4ParticleDefinition * theProjectile
static G4ElementTable * GetElementTable()
Definition: G4Element.cc:395
G4String theDataDirVariable
Here is the call graph for this function:
Here is the caller graph for this function:

◆ DoPhysicsVector()

G4PhysicsVector * G4ParticleHPData::DoPhysicsVector ( G4ParticleHPVector theVector)

Definition at line 76 of file G4ParticleHPData.cc.

77  {
78 // G4cout << "Entered G4ParticleHPData::DoPhysicsVector."<<G4endl;
79  G4int len = theVector->GetVectorLength();
80 // G4cout <<"zahl der energie-punkte "<< len<<G4endl;
81  if(len==0) return new G4LPhysicsFreeVector(0, 0, 0);
82  G4double emin = theVector->GetX(0);
83  G4double emax = theVector->GetX(len-1);
84 // G4cout <<"zahl der energie-punkte "<< len<<" "<<emin<<" "<<emax<<G4endl;
85 
86  // G4int dummy; G4cin >> dummy;
87  G4LPhysicsFreeVector * theResult = new G4LPhysicsFreeVector(len, emin, emax);
88  for (G4int i=0; i<len; i++)
89  {
90  theResult->PutValues(i, theVector->GetX(i), theVector->GetY(i));
91  }
92  return theResult;
93  }
void PutValues(size_t binNumber, G4double binValue, G4double dataValue)
int G4int
Definition: G4Types.hh:78
G4double GetY(G4double x)
G4int GetVectorLength() const
static const G4double emax
G4double GetX(G4int i) const
double G4double
Definition: G4Types.hh:76
Here is the call graph for this function:
Here is the caller graph for this function:

◆ Instance()

G4ParticleHPData * G4ParticleHPData::Instance ( G4ParticleDefinition projectile)
static

Definition at line 68 of file G4ParticleHPData.cc.

69  {
70  static G4ThreadLocal G4ParticleHPData *theCrossSectionData_G4MT_TLS_ = 0 ;
71  if ( !theCrossSectionData_G4MT_TLS_ ) theCrossSectionData_G4MT_TLS_ = new G4ParticleHPData(projectile);
72  G4ParticleHPData &theCrossSectionData = *theCrossSectionData_G4MT_TLS_;
73  return &theCrossSectionData;
74  }
G4ParticleHPData(G4ParticleDefinition *projectile)
#define G4ThreadLocal
Definition: tls.hh:89
Here is the call graph for this function:
Here is the caller graph for this function:

◆ MakePhysicsVector() [1/4]

G4PhysicsVector* G4ParticleHPData::MakePhysicsVector ( G4Element thE,
G4ParticleHPFissionData theP 
)
inline

Definition at line 54 of file G4ParticleHPData.hh.

55  {
56  if ( numEle <= (G4int)thE->GetIndex() ) addPhysicsVector();
57  return DoPhysicsVector((*theData[thE->GetIndex()]).GetData(theP));
58  }
size_t GetIndex() const
Definition: G4Element.hh:181
int G4int
Definition: G4Types.hh:78
G4PhysicsVector * DoPhysicsVector(G4ParticleHPVector *theVector)
std::vector< G4ParticleHPElementData *> theData
Here is the call graph for this function:
Here is the caller graph for this function:

◆ MakePhysicsVector() [2/4]

G4PhysicsVector* G4ParticleHPData::MakePhysicsVector ( G4Element thE,
G4ParticleHPCaptureData theP 
)
inline

Definition at line 59 of file G4ParticleHPData.hh.

60  {
61  if ( numEle <= (G4int)thE->GetIndex() ) addPhysicsVector();
62  return DoPhysicsVector((*theData[thE->GetIndex()]).GetData(theP));
63  }
size_t GetIndex() const
Definition: G4Element.hh:181
int G4int
Definition: G4Types.hh:78
G4PhysicsVector * DoPhysicsVector(G4ParticleHPVector *theVector)
std::vector< G4ParticleHPElementData *> theData
Here is the call graph for this function:

◆ MakePhysicsVector() [3/4]

G4PhysicsVector* G4ParticleHPData::MakePhysicsVector ( G4Element thE,
G4ParticleHPElasticData theP 
)
inline

Definition at line 64 of file G4ParticleHPData.hh.

65  {
66  if ( numEle <= (G4int)thE->GetIndex() ) addPhysicsVector();
67  return DoPhysicsVector((*theData[thE->GetIndex()]).GetData(theP));
68  }
size_t GetIndex() const
Definition: G4Element.hh:181
int G4int
Definition: G4Types.hh:78
G4PhysicsVector * DoPhysicsVector(G4ParticleHPVector *theVector)
std::vector< G4ParticleHPElementData *> theData
Here is the call graph for this function:

◆ MakePhysicsVector() [4/4]

G4PhysicsVector* G4ParticleHPData::MakePhysicsVector ( G4Element thE,
G4ParticleHPInelasticData theP 
)
inline

Definition at line 69 of file G4ParticleHPData.hh.

70  {
71 // G4cout << "entered G4ParticleHPData::MakePhysicsVector!!!"<<G4endl;
72 // G4cout << "thE->GetIndex()="<<thE->GetIndex()<<G4endl;
73  if ( numEle <= (G4int)thE->GetIndex() ) addPhysicsVector();
74  return DoPhysicsVector((*theData[thE->GetIndex()]).GetData(theP));
75  }
size_t GetIndex() const
Definition: G4Element.hh:181
int G4int
Definition: G4Types.hh:78
G4PhysicsVector * DoPhysicsVector(G4ParticleHPVector *theVector)
std::vector< G4ParticleHPElementData *> theData
Here is the call graph for this function:

Member Data Documentation

◆ numEle

G4int G4ParticleHPData::numEle
private

Definition at line 84 of file G4ParticleHPData.hh.

◆ theData

std::vector< G4ParticleHPElementData* > G4ParticleHPData::theData
private

Definition at line 83 of file G4ParticleHPData.hh.

◆ theDataDirVariable

G4String G4ParticleHPData::theDataDirVariable
private

Definition at line 88 of file G4ParticleHPData.hh.

◆ theProjectile

G4ParticleDefinition* G4ParticleHPData::theProjectile
private

Definition at line 87 of file G4ParticleHPData.hh.


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