Geant4.10
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | Static Public Member Functions
G4NeutronHPData Class Reference

#include <G4NeutronHPData.hh>

Public Member Functions

 G4NeutronHPData ()
 
 ~G4NeutronHPData ()
 
G4PhysicsVectorMakePhysicsVector (G4Element *thE, G4NeutronHPFissionData *theP)
 
G4PhysicsVectorMakePhysicsVector (G4Element *thE, G4NeutronHPCaptureData *theP)
 
G4PhysicsVectorMakePhysicsVector (G4Element *thE, G4NeutronHPElasticData *theP)
 
G4PhysicsVectorMakePhysicsVector (G4Element *thE, G4NeutronHPInelasticData *theP)
 
G4PhysicsVectorDoPhysicsVector (G4NeutronHPVector *theVector)
 

Static Public Member Functions

static G4NeutronHPDataInstance ()
 

Detailed Description

Definition at line 44 of file G4NeutronHPData.hh.

Constructor & Destructor Documentation

G4NeutronHPData::G4NeutronHPData ( )

Definition at line 33 of file G4NeutronHPData.cc.

References G4Element::GetElementTable(), G4Element::GetNumberOfElements(), and lightions::Init().

Referenced by Instance().

34  {
36  for ( G4int i = 0 ; i < numEle ; i++ ) theData.push_back ( new G4NeutronHPElementData );
37 // G4cout << "G4NeutronHPData::G4NeutronHPData(): numEle="<<numEle<<G4endl;
38  for (G4int i=0; i<numEle; i++)
39  {
40  (*theData[i]).Init((*(G4Element::GetElementTable()))[i]);
41  }
42  }
void Init()
Definition: G4IonTable.cc:89
int G4int
Definition: G4Types.hh:78
static size_t GetNumberOfElements()
Definition: G4Element.cc:402
static G4ElementTable * GetElementTable()
Definition: G4Element.cc:395
G4NeutronHPData::~G4NeutronHPData ( )

Definition at line 44 of file G4NeutronHPData.cc.

45  {
46  for ( std::vector<G4NeutronHPElementData*>::iterator it = theData.begin() ; it != theData.end() ; it++ ) delete *it;
47  theData.clear();
48  }

Member Function Documentation

G4PhysicsVector * G4NeutronHPData::DoPhysicsVector ( G4NeutronHPVector theVector)

Definition at line 56 of file G4NeutronHPData.cc.

References G4NeutronHPVector::GetVectorLength(), G4NeutronHPVector::GetX(), G4NeutronHPVector::GetY(), and G4LPhysicsFreeVector::PutValues().

Referenced by MakePhysicsVector().

57  {
58 // G4cout << "Entered G4NeutronHPData::DoPhysicsVector."<<G4endl;
59  G4int len = theVector->GetVectorLength();
60 // G4cout <<"zahl der energie-punkte "<< len<<G4endl;
61  if(len==0) return new G4LPhysicsFreeVector(0, 0, 0);
62  G4double emin = theVector->GetX(0);
63  G4double emax = theVector->GetX(len-1);
64 // G4cout <<"zahl der energie-punkte "<< len<<" "<<emin<<" "<<emax<<G4endl;
65 
66  // G4int dummy; G4cin >> dummy;
67  G4LPhysicsFreeVector * theResult = new G4LPhysicsFreeVector(len, emin, emax);
68  for (G4int i=0; i<len; i++)
69  {
70  theResult->PutValues(i, theVector->GetX(i), theVector->GetY(i));
71  }
72  return theResult;
73  }
void PutValues(size_t binNumber, G4double binValue, G4double dataValue)
G4double GetY(G4double x)
G4int GetVectorLength() const
G4double GetX(G4int i) const
int G4int
Definition: G4Types.hh:78
const XML_Char int len
double G4double
Definition: G4Types.hh:76
G4NeutronHPData * G4NeutronHPData::Instance ( void  )
static

Definition at line 50 of file G4NeutronHPData.cc.

References G4NeutronHPData(), and G4ThreadLocal.

Referenced by G4NeutronHPFissionData::BuildPhysicsTable(), G4NeutronHPInelasticData::BuildPhysicsTable(), G4NeutronHPCaptureData::BuildPhysicsTable(), and G4NeutronHPElasticData::BuildPhysicsTable().

51  {
52  static G4ThreadLocal G4NeutronHPData *theCrossSectionData_G4MT_TLS_ = 0 ; if (!theCrossSectionData_G4MT_TLS_) theCrossSectionData_G4MT_TLS_ = new G4NeutronHPData ; G4NeutronHPData &theCrossSectionData = *theCrossSectionData_G4MT_TLS_;
53  return &theCrossSectionData;
54  }
#define G4ThreadLocal
Definition: tls.hh:52
G4PhysicsVector* G4NeutronHPData::MakePhysicsVector ( G4Element thE,
G4NeutronHPFissionData theP 
)
inline

Definition at line 52 of file G4NeutronHPData.hh.

References DoPhysicsVector(), GetData(), and G4Element::GetIndex().

Referenced by G4NeutronHPFissionData::BuildPhysicsTable(), G4NeutronHPInelasticData::BuildPhysicsTable(), G4NeutronHPCaptureData::BuildPhysicsTable(), and G4NeutronHPElasticData::BuildPhysicsTable().

53  {
54  if ( numEle <= (G4int)thE->GetIndex() ) addPhysicsVector();
55  return DoPhysicsVector((*theData[thE->GetIndex()]).GetData(theP));
56  }
G4PhysicsVector * DoPhysicsVector(G4NeutronHPVector *theVector)
int G4int
Definition: G4Types.hh:78
size_t GetIndex() const
Definition: G4Element.hh:181
void * GetData(G4KDNode *)
Definition: G4KDNode.cc:45
G4PhysicsVector* G4NeutronHPData::MakePhysicsVector ( G4Element thE,
G4NeutronHPCaptureData theP 
)
inline

Definition at line 57 of file G4NeutronHPData.hh.

References DoPhysicsVector(), GetData(), and G4Element::GetIndex().

58  {
59  if ( numEle <= (G4int)thE->GetIndex() ) addPhysicsVector();
60  return DoPhysicsVector((*theData[thE->GetIndex()]).GetData(theP));
61  }
G4PhysicsVector * DoPhysicsVector(G4NeutronHPVector *theVector)
int G4int
Definition: G4Types.hh:78
size_t GetIndex() const
Definition: G4Element.hh:181
void * GetData(G4KDNode *)
Definition: G4KDNode.cc:45
G4PhysicsVector* G4NeutronHPData::MakePhysicsVector ( G4Element thE,
G4NeutronHPElasticData theP 
)
inline

Definition at line 62 of file G4NeutronHPData.hh.

References DoPhysicsVector(), GetData(), and G4Element::GetIndex().

63  {
64  if ( numEle <= (G4int)thE->GetIndex() ) addPhysicsVector();
65  return DoPhysicsVector((*theData[thE->GetIndex()]).GetData(theP));
66  }
G4PhysicsVector * DoPhysicsVector(G4NeutronHPVector *theVector)
int G4int
Definition: G4Types.hh:78
size_t GetIndex() const
Definition: G4Element.hh:181
void * GetData(G4KDNode *)
Definition: G4KDNode.cc:45
G4PhysicsVector* G4NeutronHPData::MakePhysicsVector ( G4Element thE,
G4NeutronHPInelasticData theP 
)
inline

Definition at line 67 of file G4NeutronHPData.hh.

References DoPhysicsVector(), GetData(), and G4Element::GetIndex().

68  {
69 // G4cout << "entered G4NeutronHPData::MakePhysicsVector!!!"<<G4endl;
70 // G4cout << "thE->GetIndex()="<<thE->GetIndex()<<G4endl;
71  if ( numEle <= (G4int)thE->GetIndex() ) addPhysicsVector();
72  return DoPhysicsVector((*theData[thE->GetIndex()]).GetData(theP));
73  }
G4PhysicsVector * DoPhysicsVector(G4NeutronHPVector *theVector)
int G4int
Definition: G4Types.hh:78
size_t GetIndex() const
Definition: G4Element.hh:181
void * GetData(G4KDNode *)
Definition: G4KDNode.cc:45

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