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

#include <G4LevelReader.hh>

Public Member Functions

 G4LevelReader (G4NuclearLevelData *)
 
const G4LevelManagerCreateLevelManager (G4int Z, G4int A)
 
const G4LevelManagerMakeLevelManager (G4int Z, G4int A, const G4String &filename)
 
void SetVerbose (G4int val)
 

Detailed Description

Definition at line 54 of file G4LevelReader.hh.

Constructor & Destructor Documentation

◆ G4LevelReader()

G4LevelReader::G4LevelReader ( G4NuclearLevelData ptr)
explicit

Definition at line 55 of file G4LevelReader.cc.

56 : fData(ptr),fVerbose(1),fLevelMax(632),fTransMax(145)
57{
58 fAlphaMax = (G4float)1.e15;
59 fParam = fData->GetParameters();
60 fTimeFactor = CLHEP::second/G4Pow::GetInstance()->logZ(2);
61 const char* directory = G4FindDataDir("G4LEVELGAMMADATA");
62 if(directory) {
63 fDirectory = directory;
64 } else {
65 G4Exception("G4LevelReader()","had0707",FatalException,
66 "Environment variable G4LEVELGAMMADATA is not defined");
67 fDirectory = "";
68 }
69 fPol = " ";
70 for(G4int i=0; i<10; ++i) { fICC[i] = 0.0f; }
71 for(G4int i=0; i<nbufmax; ++i) { buffer[i] = ' '; }
72 for(G4int i=0; i<nbuf1; ++i) { buff1[i] = ' '; }
73 for(G4int i=0; i<nbuf2; ++i) { buff2[i] = ' '; }
74 bufp[0] = bufp[1] = bufp[2] = ' ';
75
76 fEnergy = fCurrEnergy = fTrEnergy = fTime = 0.0;
77 fProb = fSpin = fAlpha = fRatio = fNorm1 = 0.0f;
78
79 ntrans = i1 = i2 = k = kk = tnum = 0;
80 ener = tener = 0.0;
81
82 vTrans.resize(fTransMax,0);
83 vRatio.resize(fTransMax,0.0f);
84 vGammaCumProbability.resize(fTransMax,0.0f);
85 vGammaProbability.resize(fTransMax,0.0f);
86 vShellProbability.resize(fTransMax,nullptr);
87
88 vEnergy.resize(fLevelMax,0.0);
89 vSpin.resize(fLevelMax,0);
90 vLevel.resize(fLevelMax,nullptr);
91}
const char * G4FindDataDir(const char *)
@ FatalException
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *description)
Definition: G4Exception.cc:59
float G4float
Definition: G4Types.hh:84
int G4int
Definition: G4Types.hh:85
G4DeexPrecoParameters * GetParameters()
static G4Pow * GetInstance()
Definition: G4Pow.cc:41
G4double logZ(G4int Z) const
Definition: G4Pow.hh:137

Member Function Documentation

◆ CreateLevelManager()

const G4LevelManager * G4LevelReader::CreateLevelManager ( G4int  Z,
G4int  A 
)

Definition at line 209 of file G4LevelReader.cc.

210{
211 std::ostringstream ss;
212 ss << fDirectory << "/z" << Z << ".a" << A;
213 std::ifstream infile(ss.str(), std::ios::in);
214
215 return LevelManager(Z, A, 0, infile);
216}
const G4int Z[17]
const G4double A[17]

Referenced by G4NuclearLevelData::GetLevelManager(), and G4NuclearLevelData::UploadNuclearLevelData().

◆ MakeLevelManager()

const G4LevelManager * G4LevelReader::MakeLevelManager ( G4int  Z,
G4int  A,
const G4String filename 
)

Definition at line 219 of file G4LevelReader.cc.

220{
221 std::ifstream infile(filename, std::ios::in);
222 if (!infile.is_open()) {
224 ed << "User file for Z= " << Z << " A= " << A
225 << " is not opened!";
226 G4Exception("G4LevelReader::MakeLevelManager(..)","had014",
227 FatalException, ed, "");
228 return nullptr;
229 }
230 return LevelManager(Z, A, 0, infile);
231}
std::ostringstream G4ExceptionDescription
Definition: G4Exception.hh:40

Referenced by G4NuclearLevelData::AddPrivateData().

◆ SetVerbose()

void G4LevelReader::SetVerbose ( G4int  val)
inline

Definition at line 143 of file G4LevelReader.hh.

144{
145 fVerbose = val;
146}

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