54 "-",
"+X",
"+Y",
"+Z",
"+U",
"+V",
"+W",
"+R",
"+S",
"+T",
"+A",
"+B",
"+C"};
57 : fData(ptr),fAlphaMax(9.0e9f),fVerbose(0),fLevelMax(632),fTransMax(145)
62 char* directory = getenv(
"G4LEVELGAMMADATA");
67 "Environment variable G4LEVELGAMMADATA is not defined");
72 for(
G4int i=0; i<10; ++i) {
fICC[i] = 0.0f; }
95 return stream.fail() ?
false :
true;
104 if(dataFile.fail()) { okay =
false; }
105 else { x = strtod(buffer, 0); }
116 if(dataFile.fail()) { okay =
false; }
117 else { x = atof(buff1); }
128 if(dataFile.fail()) { okay =
false; }
129 else { ix = atoi(buff2); }
139 if(dataFile.fail()) { okay =
false; }
147 std::vector<G4float>* vec =
nullptr;
171 if(LL < 3) {
for(
G4int i=LL+1; i<=4; ++i) {
fICC[i] = 0.0f; } }
172 if(M < 5) {
for(
G4int i=M+4; i<=8; ++i) {
fICC[i] = 0.0f; } }
173 if(N < 1) {
fICC[9] = 0.0f; }
176 for(
G4int i=0; i<10; ++i) {
181 fICC[9] = norm = 1.0f;
185 vec =
new std::vector<G4float>;
187 for(
G4int i=0; i<10; ++i) {
189 if(x > 0.995
f || 9 == i) {
190 vec->push_back(1.0
f);
197 G4cout <<
"# InternalConv: ";
210 std::ostringstream
ss;
211 ss <<
"/z" << Z <<
".a" <<
A;
224 if (!infile.is_open()) {
226 ed <<
"User file for Z= " << Z <<
" A= " << A
227 <<
" <" <<
fFile <<
"> is not opened!";
228 G4Exception(
"G4LevelReader::MakeLevelManager(..)",
"had014",
237 std::ifstream& infile)
240 if (!infile.is_open()) {
241 if(Z < 6 || fVerbose > 0) {
243 ed <<
" for Z= " << Z <<
" A= " << A
244 <<
" <" <<
fFile <<
"> is not opened!";
245 G4Exception(
"G4LevelReader::LevelManager(..)",
"had014",
251 G4cout <<
"G4LevelReader: open file for Z= "
260 G4cout <<
"## New isotope Z= " << Z <<
" A= " <<
A;
270 G4int ntrans(0), i1, i, k;
276 for(i=0; i<nlevels; ++i) {
281 G4cout <<
"### End of file Z= " << Z <<
" A= " << A
282 <<
" Nlevels= " << i <<
G4endl;
288 ed <<
" G4LevelReader: wrong data file for Z= " << Z <<
" A= " << A
289 <<
" level #" << i <<
" has index " << i1 <<
G4endl;
290 G4Exception(
"G4LevelReader::LevelManager(..)",
"had014",
299 G4cout <<
"### End of file Z= " << Z <<
" A= " << A
300 <<
" Nlevels= " << i <<
G4endl;
314 G4cout <<
"### G4LevelReader: broken level " << i
315 <<
" E(MeV)= " << ener <<
" < " <<
vEnergy[i-1]
316 <<
" for isotope Z= " << Z <<
" A= "
317 << A <<
" level energy increased" <<
G4endl;
327 <<
" LTime(s)= " <<
fTime <<
" 2S= " <<
vSpin[i]
328 <<
" meta= " <<
vSpin[i]/100000 <<
" idx= " << i
329 <<
" ntr= " << ntrans <<
G4endl;
332 if(ntrans == 0 &&
fTime < 0.0) {
339 }
else if(ntrans > 0) {
351 for(
G4int j=0; j<ntrans; ++j) {
362 G4cout <<
"### Fail to read transition j= " << j
363 <<
" Z= " << Z <<
" A= " << A <<
G4endl;
368 G4cout <<
"### G4LevelReader: broken transition " << j
369 <<
" from level " << i <<
" to " << i2
370 <<
" for isotope Z= " << Z <<
" A= "
371 << A <<
" - use ground level" <<
G4endl;
374 vTrans[j] = i2*10000 + tnum;
389 G4cout <<
"### Transition #" << j <<
" to level " << i2
390 <<
" i2= " << i2 <<
" Etrans(MeV)= " << tener*
CLHEP::keV
391 <<
" fProb= " <<
fProb <<
" MultiP= " << tnum
397 for(k=0; k<10; ++k) {
402 G4cout <<
"### Fail to read convertion coeff k= " << k
403 <<
" for transition j= " << j
404 <<
" Z= " << Z <<
" A= " << A <<
G4endl;
416 G4int nt = ntrans - 1;
417 for(k=0; k<nt; ++k) {
420 G4cout <<
"Probabilities[" << k
423 <<
" idxTrans= " <<
vTrans[k]/10000
429 G4cout <<
"Probabilities[" << nt <<
"]= "
432 <<
" IdxTrans= " <<
vTrans[nt]/10000
436 G4cout <<
" New G4NucLevel: Ntrans= " << ntrans
451 G4cout <<
"=== Reader: new manager for Z= " << Z <<
" A= " << A
452 <<
" Nlevels= " << i <<
" E[0]= "
G4double logZ(G4int Z) const
std::ostringstream G4ExceptionDescription
std::vector< G4float > vGammaProbability
const G4LevelManager * MakeLevelManager(G4int Z, G4int A, const G4String &filename)
static const G4int LL[nN]
G4DeexPrecoParameters * fParam
G4DeexPrecoParameters * GetParameters()
const std::vector< G4float > * NormalizedICCProbability(G4int Z)
G4bool ReadDataItem(std::istream &dataFile, G4double &x)
static const G4int nfloting
std::vector< G4int > vTrans
static const G4int nbufmax
std::vector< G4double > vEnergy
static G4Pow * GetInstance()
const G4LevelManager * CreateLevelManager(G4int Z, G4int A)
std::vector< G4float > vRatio
const G4LevelManager * LevelManager(G4int Z, G4int A, G4int nlev, std::ifstream &infile)
static constexpr double MeV
double A(double temperature)
G4LevelReader(G4NuclearLevelData *)
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *description)
G4NuclearLevelData * fData
std::vector< G4int > vSpin
G4bool StoreICLevelData() const
G4GLOB_DLL std::ostream G4cout
std::vector< G4float > vGammaCumProbability
std::vector< const std::vector< G4float > * > vShellProbability
static constexpr double second
static constexpr double keV
static G4String fFloatingLevels[nfloting]
G4bool ReadData(std::istringstream &dataFile, G4double &x)
std::vector< const G4NucLevel * > vLevel