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

#include <G4NeutronHPIsoData.hh>

Public Member Functions

 G4NeutronHPIsoData ()
 
 ~G4NeutronHPIsoData ()
 
G4double GetXsec (G4double energy)
 
G4bool Init (G4int A, G4int Z, G4double abun, G4String dirName, G4String aFSType)
 
G4bool Init (G4int A, G4int Z, G4int M, G4double abun, G4String dirName, G4String aFSType)
 
void Init (G4int A, G4int Z, G4double abun)
 
void Init (G4int A, G4int Z, G4int M, G4double abun)
 
G4NeutronHPVectorMakeElasticData ()
 
G4NeutronHPVectorMakeFissionData ()
 
G4NeutronHPVectorMakeCaptureData ()
 
G4NeutronHPVectorMakeInelasticData ()
 
G4NeutronHPVectorMakeChannelData ()
 
G4String GetName (G4int A, G4int Z, G4String base, G4String rest)
 
void FillChannelData (G4NeutronHPVector *aBuffer)
 
void ThinOut (G4double precision)
 

Detailed Description

Definition at line 44 of file G4NeutronHPIsoData.hh.

Constructor & Destructor Documentation

◆ G4NeutronHPIsoData()

G4NeutronHPIsoData::G4NeutronHPIsoData ( )
inline

Definition at line 48 of file G4NeutronHPIsoData.hh.

49 {
50 theChannelData = 0;
51 theFissionData = 0;
52 theCaptureData = 0;
53 theElasticData = 0;
54 theInelasticData = 0;
55 }

◆ ~G4NeutronHPIsoData()

G4NeutronHPIsoData::~G4NeutronHPIsoData ( )
inline

Definition at line 57 of file G4NeutronHPIsoData.hh.

57{if(theChannelData!=0) delete theChannelData;}

Member Function Documentation

◆ FillChannelData()

void G4NeutronHPIsoData::FillChannelData ( G4NeutronHPVector aBuffer)
inline

Definition at line 86 of file G4NeutronHPIsoData.hh.

87 {
88 if(theChannelData!=0) throw G4HadronicException(__FILE__, __LINE__, "IsoData has channel full already!!!");
89 theChannelData = new G4NeutronHPVector;
90 for(G4int i=0; i<aBuffer->GetVectorLength(); i++)
91 {
92 theChannelData->SetPoint(i, aBuffer->GetPoint(i));
93 }
94 }
int G4int
Definition: G4Types.hh:66
G4int GetVectorLength() const
void SetPoint(G4int i, const G4NeutronHPDataPoint &it)
const G4NeutronHPDataPoint & GetPoint(G4int i) const

Referenced by G4NeutronHPChannel::UpdateData().

◆ GetName()

G4String G4NeutronHPIsoData::GetName ( G4int  A,
G4int  Z,
G4String  base,
G4String  rest 
)

Definition at line 127 of file G4NeutronHPIsoData.cc.

128 {
129 G4bool dbool;
130 return (theNames.GetName(A, Z, base, rest, dbool)).GetName();
131 }
bool G4bool
Definition: G4Types.hh:67
G4NeutronHPDataUsed GetName(G4int A, G4int Z, G4String base, G4String rest, G4bool &active)

◆ GetXsec()

G4double G4NeutronHPIsoData::GetXsec ( G4double  energy)
inline

Definition at line 59 of file G4NeutronHPIsoData.hh.

60 {
61 return std::max(0., theChannelData->GetXsec(energy));
62 }
G4double GetXsec(G4int i)

Referenced by G4NeutronHPChannel::ApplyYourself(), and G4NeutronHPChannel::GetWeightedXsec().

◆ Init() [1/4]

void G4NeutronHPIsoData::Init ( G4int  A,
G4int  Z,
G4double  abun 
)
inline

Definition at line 69 of file G4NeutronHPIsoData.hh.

69 { G4int M =0;
70 Init( A, Z, M, abun); };
G4bool Init(G4int A, G4int Z, G4double abun, G4String dirName, G4String aFSType)

◆ Init() [2/4]

G4bool G4NeutronHPIsoData::Init ( G4int  A,
G4int  Z,
G4double  abun,
G4String  dirName,
G4String  aFSType 
)
inline

Definition at line 65 of file G4NeutronHPIsoData.hh.

65{ G4int M = 0 ; return Init( A, Z, M, abun, dirName, aFSType); };

Referenced by Init(), G4NeutronHPChannel::UpdateData(), and G4NeutronHPElementData::UpdateData().

◆ Init() [3/4]

void G4NeutronHPIsoData::Init ( G4int  A,
G4int  Z,
G4int  M,
G4double  abun 
)

Definition at line 77 of file G4NeutronHPIsoData.cc.

78 {
79 G4String dirName;
80 if(!getenv("G4NEUTRONHPDATA"))
81 throw G4HadronicException(__FILE__, __LINE__, "Please setenv G4NEUTRONHPDATA to point to the neutron cross-section files.");
82 G4String baseName = getenv("G4NEUTRONHPDATA");
83 dirName = baseName+"/Fission";
84 //if(Z>89)
85 if(Z>87) //TK Modifed for ENDF VII.0
86 {
87 //Init(A, Z, abun, dirName, "/CrossSection/");
88 Init(A, Z, M, abun, dirName, "/CrossSection");
89 }
90 else
91 {
92 theChannelData = new G4NeutronHPVector;
93 }
94 theFissionData = theChannelData;
95 theChannelData = 0; // fast fix for double delete; revisit later. @@@@@@@
96 dirName = baseName+"/Capture";
97 //Init(A, Z, abun, dirName, "/CrossSection/");
98 Init(A, Z, M, abun, dirName, "/CrossSection");
99 theCaptureData = theChannelData;
100 theChannelData = 0;
101 dirName = baseName+"/Elastic";
102 //Init(A, Z, abun, dirName, "/CrossSection/");
103 Init(A, Z, M, abun, dirName, "/CrossSection");
104 theElasticData = theChannelData;
105 theChannelData = 0;
106 dirName = baseName+"/Inelastic";
107 //Init(A, Z, abun, dirName, "/CrossSection/");
108 Init(A, Z, M, abun, dirName, "/CrossSection");
109 theInelasticData = theChannelData;
110 theChannelData = 0;
111
112// if(theInelasticData!=0) G4cout << "Inelastic Data Statistics: "<<theInelasticData->GetVectorLength()<<G4endl;
113// if(theElasticData!=0) G4cout << "Elastic Data Statistics: "<<theElasticData->GetVectorLength()<<G4endl;
114// if(theCaptureData!=0) G4cout << "Capture Data Statistics: "<<theCaptureData->GetVectorLength()<<G4endl;
115// if(theFissionData!=0) G4cout << "Fission Data Statistics: "<<theFissionData->GetVectorLength()<<G4endl;
116// G4cout << "Inelastic data"<<G4endl;
117// if(theInelasticData!=0) theInelasticData->Dump();
118// G4cout << "Elastic data"<<G4endl;
119// if(theElasticData!=0) theElasticData->Dump();
120// G4cout << "Capture data"<<G4endl;
121// if(theCaptureData!=0) theCaptureData->Dump();
122// G4cout << "Fission data"<<G4endl;
123// if(theFissionData!=0) theFissionData->Dump();
124
125 }

◆ Init() [4/4]

G4bool G4NeutronHPIsoData::Init ( G4int  A,
G4int  Z,
G4int  M,
G4double  abun,
G4String  dirName,
G4String  aFSType 
)

Definition at line 37 of file G4NeutronHPIsoData.cc.

38 {
39 theChannelData = 0;
40 G4double abundance = abun/100.;
41 G4String filename;
42 G4bool result = true;
43 //G4NeutronHPDataUsed aFile = theNames.GetName(A, Z, dirName, aFSType, result);
44 G4NeutronHPDataUsed aFile = theNames.GetName(A, Z, M, dirName, aFSType, result);
45 filename = aFile.GetName();
46// if(filename=="") return false;
47 std::ifstream theChannel(filename);
48
49 if(Z==1 && (aFile.GetZ()!=Z || std::abs(aFile.GetA()-A)>0.0001) )
50 {
51 if(getenv("NeutronHPNamesLogging")) G4cout << "Skipped = "<< filename <<" "<<A<<" "<<Z<<G4endl;
52 //080901 TKDB No more necessary below protection, cross sections set to 0 in G4NeutronHPNames
53 //And below two lines causes trouble with G4PhysicsVector
54 //theChannel.close();
55 //return false;
56 }
57 if(!theChannel) {theChannel.close(); return false;}
58 // accommodating deficiencie of some compilers
59 if(theChannel.eof()) {theChannel.close(); return false;}
60 if(!theChannel) {theChannel.close(); return false;}
61 G4int dummy;
62 theChannel >> dummy >> dummy;
63 theChannelData = new G4NeutronHPVector;
64 G4int nData;
65 theChannel >> nData;
66 theChannelData->Init(theChannel, nData, eV, abundance*barn);
67// G4cout << "Channel Data Statistics: "<<theChannelData->GetVectorLength()<<G4endl;
68// G4cout << "Channel data"<<G4endl;
69// G4int hpw;
70// G4cin >> hpw;
71// theChannelData->Dump();
72 theChannel.close();
73 return result;
74 }
double G4double
Definition: G4Types.hh:64
#define G4endl
Definition: G4ios.hh:52
G4DLLIMPORT std::ostream G4cout
void Init(std::ifstream &aDataFile, G4int total, G4double ux=1., G4double uy=1.)

◆ MakeCaptureData()

G4NeutronHPVector * G4NeutronHPIsoData::MakeCaptureData ( )
inline

Definition at line 77 of file G4NeutronHPIsoData.hh.

78 {return theCaptureData;}

Referenced by G4NeutronHPElementData::UpdateData().

◆ MakeChannelData()

G4NeutronHPVector * G4NeutronHPIsoData::MakeChannelData ( )
inline

Definition at line 81 of file G4NeutronHPIsoData.hh.

82 {return theChannelData;}

Referenced by G4NeutronHPChannel::UpdateData().

◆ MakeElasticData()

G4NeutronHPVector * G4NeutronHPIsoData::MakeElasticData ( )
inline

Definition at line 73 of file G4NeutronHPIsoData.hh.

74 {return theElasticData;}

Referenced by G4NeutronHPElementData::UpdateData().

◆ MakeFissionData()

G4NeutronHPVector * G4NeutronHPIsoData::MakeFissionData ( )
inline

Definition at line 75 of file G4NeutronHPIsoData.hh.

76 {return theFissionData;}

Referenced by G4NeutronHPElementData::UpdateData().

◆ MakeInelasticData()

G4NeutronHPVector * G4NeutronHPIsoData::MakeInelasticData ( )
inline

Definition at line 79 of file G4NeutronHPIsoData.hh.

80 {return theInelasticData;}

Referenced by G4NeutronHPElementData::UpdateData().

◆ ThinOut()

void G4NeutronHPIsoData::ThinOut ( G4double  precision)
inline

Definition at line 96 of file G4NeutronHPIsoData.hh.

97 {
98 if(theFissionData) theFissionData->ThinOut(precision);
99 if(theCaptureData) theCaptureData->ThinOut(precision);
100 if(theElasticData) theElasticData->ThinOut(precision);
101 if(theInelasticData) theInelasticData->ThinOut(precision);
102 }
void ThinOut(G4double precision)

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