Geant4  10.03.p01
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
G4ParticleHPData Class Reference

#include <G4ParticleHPData.hh>

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)
 

Detailed Description

Definition at line 46 of file G4ParticleHPData.hh.

Constructor & Destructor Documentation

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:90
int G4int
Definition: G4Types.hh:78
static size_t GetNumberOfElements()
Definition: G4Element.cc:405
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
static G4Alpha * Alpha()
Definition: G4Alpha.cc:89
static G4ElementTable * GetElementTable()
Definition: G4Element.cc:398
static G4He3 * He3()
Definition: G4He3.cc:94

Here is the call graph for this function:

Here is the caller graph for this function:

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  }

Member Function Documentation

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  }
const XML_Char int len
Definition: expat.h:262
G4int GetVectorLength() const
int G4int
Definition: G4Types.hh:78
G4double GetX(G4int i) const
G4double GetY(G4double x)
static const G4double emax
void PutValues(size_t index, G4double e, G4double dataValue)
double G4double
Definition: G4Types.hh:76

Here is the call graph for this function:

Here is the caller graph for this function:

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:

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  }
int G4int
Definition: G4Types.hh:78
size_t GetIndex() const
Definition: G4Element.hh:182
G4PhysicsVector * DoPhysicsVector(G4ParticleHPVector *theVector)

Here is the call graph for this function:

Here is the caller graph for this function:

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  }
int G4int
Definition: G4Types.hh:78
size_t GetIndex() const
Definition: G4Element.hh:182
G4PhysicsVector * DoPhysicsVector(G4ParticleHPVector *theVector)

Here is the call graph for this function:

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  }
int G4int
Definition: G4Types.hh:78
size_t GetIndex() const
Definition: G4Element.hh:182
G4PhysicsVector * DoPhysicsVector(G4ParticleHPVector *theVector)

Here is the call graph for this function:

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  }
int G4int
Definition: G4Types.hh:78
size_t GetIndex() const
Definition: G4Element.hh:182
G4PhysicsVector * DoPhysicsVector(G4ParticleHPVector *theVector)

Here is the call graph for this function:


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