Geant4 9.6.0
Toolkit for the simulation of the passage of particles through matter
Loading...
Searching...
No Matches
G4NeutronHPList Class Reference

#include <G4NeutronHPList.hh>

Public Member Functions

 G4NeutronHPList ()
 
 ~G4NeutronHPList ()
 
void SetValue (G4int i, G4double y)
 
G4double GetValue (G4int i)
 
G4int GetListLength ()
 
void Dump ()
 
void Init (std::ifstream &aDataFile, G4int nPar, G4double unit=1.)
 
void Init (std::ifstream &aDataFile, G4double unit=1.)
 
void SetLabel (G4double aLabel)
 
G4double GetLabel ()
 

Detailed Description

Definition at line 34 of file G4NeutronHPList.hh.

Constructor & Destructor Documentation

◆ G4NeutronHPList()

G4NeutronHPList::G4NeutronHPList ( )
inline

Definition at line 38 of file G4NeutronHPList.hh.

39 {
40 theData = new G4double[2];
41 nPoints=2;
42 nEntries=0;
43 }
double G4double
Definition: G4Types.hh:64

◆ ~G4NeutronHPList()

G4NeutronHPList::~G4NeutronHPList ( )
inline

Definition at line 45 of file G4NeutronHPList.hh.

46 {
47 delete [] theData;
48 }

Member Function Documentation

◆ Dump()

void G4NeutronHPList::Dump ( )

◆ GetLabel()

G4double G4NeutronHPList::GetLabel ( )
inline

Definition at line 67 of file G4NeutronHPList.hh.

67{ return theLabel; }

Referenced by G4NeutronHPContAngularPar::Merge(), and G4NeutronHPContAngularPar::Sample().

◆ GetListLength()

G4int G4NeutronHPList::GetListLength ( )
inline

Definition at line 57 of file G4NeutronHPList.hh.

57{return nEntries;}

Referenced by GetValue().

◆ GetValue()

G4double G4NeutronHPList::GetValue ( G4int  i)

Definition at line 74 of file G4NeutronHPList.cc.

75 {
76// G4cout << "TestList "<<i<<" "<<nEntries<<G4endl;
77 if(nEntries<0)
78 {
79// G4cout <<nPoints<<" "<<nEntries<<" "<<theData<<G4endl;
80// for(G4int ii=0; ii<2; ii++) G4cout << theData[ii]<<" ";
81// G4cout << G4endl;
82 }
83 if (i<0) i=0;
84 if(i>=GetListLength()) i=GetListLength()-1;
85 return theData[i];
86 }

Referenced by G4NeutronHPNeutronYield::GetDecayConstant(), G4NeutronHPContAngularPar::Merge(), and G4NeutronHPContAngularPar::Sample().

◆ Init() [1/2]

void G4NeutronHPList::Init ( std::ifstream &  aDataFile,
G4double  unit = 1. 
)

Definition at line 62 of file G4NeutronHPList.cc.

63 {
64 G4int total, i;
65 aDataFile >> total;
66 G4double y;
67 for (i=0;i<total;i++)
68 {
69 aDataFile >>y;
70 SetValue(i,y*unit);
71 }
72 }
int G4int
Definition: G4Types.hh:66
void SetValue(G4int i, G4double y)

◆ Init() [2/2]

void G4NeutronHPList::Init ( std::ifstream &  aDataFile,
G4int  nPar,
G4double  unit = 1. 
)

Definition at line 51 of file G4NeutronHPList.cc.

52 {
53 G4int i;
54 G4double y;
55 for (i=0; i<nPar; i++)
56 {
57 aDataFile >> y;
58 SetValue(i,y*unit);
59 }
60 }

Referenced by G4NeutronHPContAngularPar::Init(), and G4NeutronHPNeutronYield::InitDelayed().

◆ SetLabel()

void G4NeutronHPList::SetLabel ( G4double  aLabel)
inline

Definition at line 65 of file G4NeutronHPList.hh.

65{ theLabel = aLabel; }

Referenced by G4NeutronHPContAngularPar::Init(), and G4NeutronHPContAngularPar::Merge().

◆ SetValue()

void G4NeutronHPList::SetValue ( G4int  i,
G4double  y 
)
inline

Definition at line 50 of file G4NeutronHPList.hh.

51 {
52 Check(i);
53 theData[i]=y;
54 }

Referenced by Init(), and G4NeutronHPContAngularPar::Merge().


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