Geant4 9.6.0
Toolkit for the simulation of the passage of particles through matter
Loading...
Searching...
No Matches
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 45 of file G4NeutronHPData.hh.

Constructor & Destructor Documentation

◆ G4NeutronHPData()

G4NeutronHPData::G4NeutronHPData ( )

Definition at line 33 of file G4NeutronHPData.cc.

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 }
int G4int
Definition: G4Types.hh:66
static size_t GetNumberOfElements()
Definition: G4Element.cc:406
static const G4ElementTable * GetElementTable()
Definition: G4Element.cc:399

◆ ~G4NeutronHPData()

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

◆ DoPhysicsVector()

G4PhysicsVector * G4NeutronHPData::DoPhysicsVector ( G4NeutronHPVector theVector)

Definition at line 56 of file G4NeutronHPData.cc.

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 }
double G4double
Definition: G4Types.hh:64
void PutValues(size_t binNumber, G4double binValue, G4double dataValue)
G4int GetVectorLength() const
G4double GetX(G4int i) const
G4double GetY(G4double x)

Referenced by MakePhysicsVector().

◆ Instance()

G4NeutronHPData * G4NeutronHPData::Instance ( )
static

◆ MakePhysicsVector() [1/4]

G4PhysicsVector * G4NeutronHPData::MakePhysicsVector ( G4Element thE,
G4NeutronHPCaptureData theP 
)
inline

Definition at line 58 of file G4NeutronHPData.hh.

59 {
60 if ( numEle <= (G4int)thE->GetIndex() ) addPhysicsVector();
61 return DoPhysicsVector((*theData[thE->GetIndex()]).GetData(theP));
62 }
size_t GetIndex() const
Definition: G4Element.hh:182
G4PhysicsVector * DoPhysicsVector(G4NeutronHPVector *theVector)

◆ MakePhysicsVector() [2/4]

G4PhysicsVector * G4NeutronHPData::MakePhysicsVector ( G4Element thE,
G4NeutronHPElasticData theP 
)
inline

Definition at line 63 of file G4NeutronHPData.hh.

64 {
65 if ( numEle <= (G4int)thE->GetIndex() ) addPhysicsVector();
66 return DoPhysicsVector((*theData[thE->GetIndex()]).GetData(theP));
67 }

◆ MakePhysicsVector() [3/4]

G4PhysicsVector * G4NeutronHPData::MakePhysicsVector ( G4Element thE,
G4NeutronHPFissionData theP 
)
inline

Definition at line 53 of file G4NeutronHPData.hh.

54 {
55 if ( numEle <= (G4int)thE->GetIndex() ) addPhysicsVector();
56 return DoPhysicsVector((*theData[thE->GetIndex()]).GetData(theP));
57 }

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

◆ MakePhysicsVector() [4/4]

G4PhysicsVector * G4NeutronHPData::MakePhysicsVector ( G4Element thE,
G4NeutronHPInelasticData theP 
)
inline

Definition at line 68 of file G4NeutronHPData.hh.

69 {
70// G4cout << "entered G4NeutronHPData::MakePhysicsVector!!!"<<G4endl;
71// G4cout << "thE->GetIndex()="<<thE->GetIndex()<<G4endl;
72 if ( numEle <= (G4int)thE->GetIndex() ) addPhysicsVector();
73 return DoPhysicsVector((*theData[thE->GetIndex()]).GetData(theP));
74 }

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