Geant4  10.02.p03
G4ParticleHPIsoData Class Reference

#include <G4ParticleHPIsoData.hh>

Collaboration diagram for G4ParticleHPIsoData:

Public Member Functions

 G4ParticleHPIsoData ()
 
 ~G4ParticleHPIsoData ()
 
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, G4ParticleDefinition *projectile, const char *dataDirVariable)
 
void Init (G4int A, G4int Z, G4int M, G4double abun, G4ParticleDefinition *projectile, const char *dataDirVariable)
 
G4ParticleHPVectorMakeElasticData ()
 
G4ParticleHPVectorMakeFissionData ()
 
G4ParticleHPVectorMakeCaptureData ()
 
G4ParticleHPVectorMakeInelasticData ()
 
G4ParticleHPVectorMakeChannelData ()
 
G4String GetName (G4int A, G4int Z, G4String base, G4String rest)
 
void FillChannelData (G4ParticleHPVector *aBuffer)
 
void ThinOut (G4double precision)
 

Private Attributes

G4ParticleHPVectortheFissionData
 
G4ParticleHPVectortheCaptureData
 
G4ParticleHPVectortheElasticData
 
G4ParticleHPVectortheInelasticData
 
G4ParticleHPVectortheChannelData
 
G4String theFileName
 
G4ParticleHPNames theNames
 

Detailed Description

Definition at line 45 of file G4ParticleHPIsoData.hh.

Constructor & Destructor Documentation

◆ G4ParticleHPIsoData()

G4ParticleHPIsoData::G4ParticleHPIsoData ( )
inline

Definition at line 49 of file G4ParticleHPIsoData.hh.

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

◆ ~G4ParticleHPIsoData()

G4ParticleHPIsoData::~G4ParticleHPIsoData ( )
inline

Definition at line 58 of file G4ParticleHPIsoData.hh.

58 {if(theChannelData!=0) delete theChannelData;}
G4ParticleHPVector * theChannelData

Member Function Documentation

◆ FillChannelData()

void G4ParticleHPIsoData::FillChannelData ( G4ParticleHPVector aBuffer)
inline

Definition at line 87 of file G4ParticleHPIsoData.hh.

88  {
89  if(theChannelData!=0) throw G4HadronicException(__FILE__, __LINE__, "IsoData has channel full already!!!");
91  for(G4int i=0; i<aBuffer->GetVectorLength(); i++)
92  {
93  theChannelData->SetPoint(i, aBuffer->GetPoint(i));
94  }
96  }
G4ParticleHPVector * theChannelData
int G4int
Definition: G4Types.hh:78
void SetPoint(G4int i, const G4ParticleHPDataPoint &it)
G4int GetVectorLength() const
const G4ParticleHPDataPoint & GetPoint(G4int i) const
Here is the call graph for this function:
Here is the caller graph for this function:

◆ GetName()

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

Definition at line 139 of file G4ParticleHPIsoData.cc.

140  {
141  G4bool dbool;
142  return (theNames.GetName(A, Z, base, rest, dbool)).GetName();
143  }
G4ParticleHPNames theNames
double A(double temperature)
Float_t Z
bool G4bool
Definition: G4Types.hh:79
G4String GetName(G4int A, G4int Z, G4String base, G4String rest)
G4ParticleHPDataUsed GetName(G4int A, G4int Z, G4String base, G4String rest, G4bool &active)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ GetXsec()

G4double G4ParticleHPIsoData::GetXsec ( G4double  energy)
inline

Definition at line 60 of file G4ParticleHPIsoData.hh.

61  {
62  return std::max(0., theChannelData->GetXsec(energy));
63  }
G4ParticleHPVector * theChannelData
G4double GetXsec(G4int i)
double energy
Definition: plottest35.C:25
Here is the call graph for this function:
Here is the caller graph for this function:

◆ Init() [1/4]

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

Definition at line 66 of file G4ParticleHPIsoData.hh.

66 { G4int M = 0 ; return Init( A, Z, M, abun, dirName, aFSType); };
int G4int
Definition: G4Types.hh:78
double A(double temperature)
Float_t Z
G4bool Init(G4int A, G4int Z, G4double abun, G4String dirName, G4String aFSType)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ Init() [2/4]

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

Definition at line 39 of file G4ParticleHPIsoData.cc.

40  {
41  theChannelData = 0;
42  G4double abundance = abun/100.;
43  G4String filename;
44  G4bool result = true;
45  //G4ParticleHPDataUsed aFile = theNames.GetName(A, Z, dirName, aFSType, result);
46  G4ParticleHPDataUsed aFile = theNames.GetName(A, Z, M, dirName, aFSType, result);
47  filename = aFile.GetName();
48 // if(filename=="") return false;
49  //std::ifstream theChannel(filename);
50  std::istringstream theChannel(filename,std::ios::in);
51  G4ParticleHPManager::GetInstance()->GetDataStream(filename,theChannel);
52 
53 #ifdef G4PHPDEBUG
54  if(getenv("G4ParticleHPDebug")) G4cout << "G4ParticleHPIsoData::Init = "<< filename <<" "<< A << " " << Z <<G4endl;
55 #endif
56 
57  if(Z==1 && (aFile.GetZ()!=Z || std::abs(aFile.GetA()-A)>0.0001) )
58  {
59  if(getenv("G4ParticleHPDebug")) G4cout << "Skipped = "<< filename <<" "<<A<<" "<<Z<<G4endl;
60  //080901 TKDB No more necessary below protection, cross sections set to 0 in G4ParticleHPNames
61  //And below two lines causes trouble with G4PhysicsVector
62  //theChannel.close();
63  //return false;
64  }
65  if(!theChannel) {/*theChannel.close()*/; return false;}
66  // accommodating deficiencie of some compilers
67  if(theChannel.eof()) {/*theChannel.close()*/; return false;}
68  if(!theChannel) {/*theChannel.close()*/; return false;}
69  G4int dummy;
70  theChannel >> dummy >> dummy;
72  G4int nData;
73  theChannel >> nData;
74  theChannelData->Init(theChannel, nData, CLHEP::eV, abundance*CLHEP::barn);
75 // G4cout << "Channel Data Statistics: "<<theChannelData->GetVectorLength()<<G4endl;
76 // G4cout << "Channel data"<<G4endl;
77 // G4int hpw;
78 // G4cin >> hpw;
79 // theChannelData->Dump();
80 // theChannel.close();
81  return result;
82  }
static G4ParticleHPManager * GetInstance()
ifstream in
Definition: comparison.C:7
void GetDataStream(G4String, std::istringstream &iss)
G4ParticleHPVector * theChannelData
int G4int
Definition: G4Types.hh:78
G4ParticleHPNames theNames
void Init(std::istream &aDataFile, G4int total, G4double ux=1., G4double uy=1.)
G4GLOB_DLL std::ostream G4cout
double A(double temperature)
Float_t Z
bool G4bool
Definition: G4Types.hh:79
static const double barn
Definition: SystemOfUnits.h:84
#define G4endl
Definition: G4ios.hh:61
G4ParticleHPDataUsed GetName(G4int A, G4int Z, G4String base, G4String rest, G4bool &active)
double G4double
Definition: G4Types.hh:76
static const double eV
Here is the call graph for this function:

◆ Init() [3/4]

void G4ParticleHPIsoData::Init ( G4int  A,
G4int  Z,
G4double  abun,
G4ParticleDefinition projectile,
const char *  dataDirVariable 
)
inline

Definition at line 70 of file G4ParticleHPIsoData.hh.

70  { G4int M =0;
71  Init( A, Z, M, abun, projectile, dataDirVariable ); };
int G4int
Definition: G4Types.hh:78
double A(double temperature)
Float_t Z
G4bool Init(G4int A, G4int Z, G4double abun, G4String dirName, G4String aFSType)
Here is the call graph for this function:

◆ Init() [4/4]

void G4ParticleHPIsoData::Init ( G4int  A,
G4int  Z,
G4int  M,
G4double  abun,
G4ParticleDefinition projectile,
const char *  dataDirVariable 
)

Definition at line 85 of file G4ParticleHPIsoData.cc.

86  {
87  G4String dirName;
88 
89  G4String baseName = getenv(dataDirVariable);
90  if( projectile == G4Neutron::Neutron() ){
91  dirName = baseName+"/Fission";
92  //if(Z>89)
93  if(Z>87) //TK Modifed for ENDF VII.0
94  {
95  //Init(A, Z, abun, dirName, "/CrossSection/");
96  Init(A, Z, M, abun, dirName, "/CrossSection");
97  }
98  else
99  {
101  }
103  theChannelData = 0; // fast fix for double delete; revisit later. @@@@@@@
104 
105  dirName = baseName+"/Capture";
106  //Init(A, Z, abun, dirName, "/CrossSection/");
107  Init(A, Z, M, abun, dirName, "/CrossSection");
109  theChannelData = 0;
110 
111  dirName = baseName+"/Elastic";
112  //Init(A, Z, abun, dirName, "/CrossSection/");
113  Init(A, Z, M, abun, dirName, "/CrossSection");
115  theChannelData = 0;
116  }
117 
118  dirName = baseName+"/Inelastic";
119  //Init(A, Z, abun, dirName, "/CrossSection/");
120  Init(A, Z, M, abun, dirName, "/CrossSection");
122  theChannelData = 0;
123 
124 // if(theInelasticData!=0) G4cout << "Inelastic Data Statistics: "<<theInelasticData->GetVectorLength()<<G4endl;
125 // if(theElasticData!=0) G4cout << "Elastic Data Statistics: "<<theElasticData->GetVectorLength()<<G4endl;
126 // if(theCaptureData!=0) G4cout << "Capture Data Statistics: "<<theCaptureData->GetVectorLength()<<G4endl;
127 // if(theFissionData!=0) G4cout << "Fission Data Statistics: "<<theFissionData->GetVectorLength()<<G4endl;
128 // G4cout << "Inelastic data"<<G4endl;
129 // if(theInelasticData!=0) theInelasticData->Dump();
130 // G4cout << "Elastic data"<<G4endl;
131 // if(theElasticData!=0) theElasticData->Dump();
132 // G4cout << "Capture data"<<G4endl;
133 // if(theCaptureData!=0) theCaptureData->Dump();
134 // G4cout << "Fission data"<<G4endl;
135 // if(theFissionData!=0) theFissionData->Dump();
136 
137  }
G4ParticleHPVector * theInelasticData
G4ParticleHPVector * theChannelData
double A(double temperature)
Float_t Z
static G4Neutron * Neutron()
Definition: G4Neutron.cc:104
G4ParticleHPVector * theElasticData
G4bool Init(G4int A, G4int Z, G4double abun, G4String dirName, G4String aFSType)
G4ParticleHPVector * theCaptureData
G4ParticleHPVector * theFissionData
Here is the call graph for this function:

◆ MakeCaptureData()

G4ParticleHPVector* G4ParticleHPIsoData::MakeCaptureData ( )
inline

Definition at line 78 of file G4ParticleHPIsoData.hh.

79  {return theCaptureData;}
G4ParticleHPVector * theCaptureData
Here is the caller graph for this function:

◆ MakeChannelData()

G4ParticleHPVector* G4ParticleHPIsoData::MakeChannelData ( )
inline

Definition at line 82 of file G4ParticleHPIsoData.hh.

83  {return theChannelData;}
G4ParticleHPVector * theChannelData
Here is the call graph for this function:
Here is the caller graph for this function:

◆ MakeElasticData()

G4ParticleHPVector* G4ParticleHPIsoData::MakeElasticData ( )
inline

Definition at line 74 of file G4ParticleHPIsoData.hh.

75  {return theElasticData;}
G4ParticleHPVector * theElasticData
Here is the caller graph for this function:

◆ MakeFissionData()

G4ParticleHPVector* G4ParticleHPIsoData::MakeFissionData ( )
inline

Definition at line 76 of file G4ParticleHPIsoData.hh.

77  {return theFissionData;}
G4ParticleHPVector * theFissionData
Here is the caller graph for this function:

◆ MakeInelasticData()

G4ParticleHPVector* G4ParticleHPIsoData::MakeInelasticData ( )
inline

Definition at line 80 of file G4ParticleHPIsoData.hh.

81  {return theInelasticData;}
G4ParticleHPVector * theInelasticData
Here is the caller graph for this function:

◆ ThinOut()

void G4ParticleHPIsoData::ThinOut ( G4double  precision)
inline

Definition at line 98 of file G4ParticleHPIsoData.hh.

99  {
100  if(theFissionData) theFissionData->ThinOut(precision);
101  if(theCaptureData) theCaptureData->ThinOut(precision);
102  if(theElasticData) theElasticData->ThinOut(precision);
103  if(theInelasticData) theInelasticData->ThinOut(precision);
104  }
G4ParticleHPVector * theInelasticData
G4ParticleHPVector * theElasticData
void ThinOut(G4double precision)
G4ParticleHPVector * theCaptureData
G4ParticleHPVector * theFissionData
Here is the call graph for this function:

Member Data Documentation

◆ theCaptureData

G4ParticleHPVector* G4ParticleHPIsoData::theCaptureData
private

Definition at line 109 of file G4ParticleHPIsoData.hh.

◆ theChannelData

G4ParticleHPVector* G4ParticleHPIsoData::theChannelData
private

Definition at line 112 of file G4ParticleHPIsoData.hh.

◆ theElasticData

G4ParticleHPVector* G4ParticleHPIsoData::theElasticData
private

Definition at line 110 of file G4ParticleHPIsoData.hh.

◆ theFileName

G4String G4ParticleHPIsoData::theFileName
private

Definition at line 114 of file G4ParticleHPIsoData.hh.

◆ theFissionData

G4ParticleHPVector* G4ParticleHPIsoData::theFissionData
private

Definition at line 108 of file G4ParticleHPIsoData.hh.

◆ theInelasticData

G4ParticleHPVector* G4ParticleHPIsoData::theInelasticData
private

Definition at line 111 of file G4ParticleHPIsoData.hh.

◆ theNames

G4ParticleHPNames G4ParticleHPIsoData::theNames
private

Definition at line 115 of file G4ParticleHPIsoData.hh.


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