54 "-",
"+X",
"+Y",
"+Z",
"+U",
"+V",
"+W",
"+R",
"+S",
"+T",
"+A",
"+B",
"+C"};
57 : fData(ptr),fMinProbability(1.e-8),fVerbose(0),fLevelMax(632),fTransMax(30)
61 char* directory = getenv(
"G4LEVELGAMMADATA");
66 "Environment variable G4LEVELGAMMADATA is not defined");
71 for(
G4int i=0; i<10; ++i) {
fICC[i] = 0.0; }
101 std::ostringstream ss;
102 ss <<
"/z" << Z <<
".a" <<
A;
118 std::ifstream infile(filename, std::ios::in);
121 if (!infile.is_open()) {
123 G4cout <<
" G4LevelReader: fail open file for Z= "
125 <<
" <" << filename <<
">" <<
G4endl;
131 G4cout <<
"G4LevelReader: open file for Z= "
133 <<
" <" << filename <<
">" <<
G4endl;
156 for(
G4int i=0; i<10; ++i) {
179 <<
" Ntransitions= " << nn+1 <<
" fNorm1= " <<
fNorm1
186 for(
size_t i=0; i<
nn; ++i) {
190 G4cout <<
"Probabilities[" << i
193 <<
" idxTrans= " <<
vIndex[i]
224 vGammaCumProbability.clear();
225 vGammaECumProbability.clear();
226 vGammaProbability.clear();
230 if(!end) { next =
true; }
264 for(
size_t i=0; i<nn-1; ++i) {
272 if(ediff < ediffMin) {
276 if(ediff <= x_energy) {
break; }
279 if(std::abs(
vEnergy[nn-1] - elevel) < x_energy) { tnum = 1; }
284 vIndex.push_back(idxLevel);
298 G4cout <<
"G4LevelReader: Line #" << nline <<
" Z= " << Z <<
" A= "
299 <<
" this file is too long - stop loading" <<
G4endl;
311 G4cout <<
"=== Reader: new manager for Z= " << Z <<
" A= " << A
312 <<
" Nlevels= " <<
vEnergy.size() <<
" E[0]= "
315 <<
" S: " <<
vEnergy.size() <<
" " << vTime.size()
316 <<
" " << vTimeg.size() <<
" " << vSpin.size() <<
" " <<
vLevel.size()
326 return stream.fail() ?
false :
true;
335 if(dataFile.fail()) { okay =
false; }
336 else { x = strtod(buffer, 0); }
347 if(dataFile.fail()) { okay =
false; }
348 else { ix = atoi(buff2); }
357 if(dataFile.fail()) { okay =
false; }
364 std::vector<G4float>* vec =
nullptr;
388 if(LL < 3) {
for(
G4int i=LL+1; i<=4; ++i) {
fICC[i] = 0.0; } }
389 if(M < 5) {
for(
G4int i=M+4; i<=8; ++i) {
fICC[i] = 0.0; } }
390 if(N < 1) {
fICC[9] = 0.0; }
393 for(
G4int i=0; i<10; ++i) {
399 vec =
new std::vector<G4float>;
401 for(
G4int i=0; i<10; ++i) {
404 vec->push_back(1.0f);
411 G4cout <<
"# InternalConv: ";
424 std::ostringstream ss;
425 ss <<
"/correlated_gamma/z" << Z <<
".a" <<
A;
428 std::ifstream infile(fFile, std::ios::in);
431 if (!infile.is_open()) {
433 G4cout <<
" G4LevelReader: fail open file for Z= "
435 <<
" <" << fFile <<
">" <<
G4endl;
440 G4cout <<
"G4LevelReader: open file for Z= "
442 <<
" <" << fFile <<
">" <<
G4endl;
451 std::ifstream infile(filename, std::ios::in);
454 if (!infile.is_open()) {
456 G4cout <<
" G4LevelReader: fail open file for Z= "
458 <<
" <" << filename <<
">" <<
G4endl;
463 G4cout <<
"G4LevelReader: open file for Z= "
465 <<
" <" << filename <<
">" <<
G4endl;
472 std::ifstream& infile)
480 G4cout <<
"## New isotope Z= " << Z <<
" A= " <<
A;
494 G4int ntrans(0), i(0), i1, i2, i3, j, k;
498 for(
G4int ii=0; ii<nlevels; ++ii) {
503 G4cout <<
"### End of file Z= " << Z <<
" A= " << A
504 <<
" Nlevels= " << ii <<
G4endl;
513 G4cout <<
"### End of file Z= " << Z <<
" A= " << A
514 <<
" Nlevels= " << ii <<
G4endl;
529 if(!allLevels && 0 == k && 0 == ntrans) {
continue; }
533 G4cout <<
"### G4LevelReader: broken level " << ii
535 <<
" for isotope Z= " << Z <<
" A= "
536 << A <<
" level energy increased" <<
G4endl;
551 <<
" LTime(s)= " <<
fTime <<
" 2S= " <<
vSpin[i]
552 <<
" meta= " <<
vMeta[i] <<
" idx= " << i <<
" ii= " << ii
553 <<
" ntr= " << ntrans <<
G4endl;
572 for(
G4int jj=0; jj<ntrans; ++jj) {
583 G4cout <<
"### Fail to read transition j= " << j
584 <<
" Z= " << Z <<
" A= " << A <<
G4endl;
589 G4cout <<
"### G4LevelReader: broken transition " << j
590 <<
" from level " << ii <<
" to " << i2
591 <<
" for isotope Z= " << Z <<
" A= "
592 << A <<
" - use ground level" <<
G4endl;
611 G4cout <<
"### Transition #" << j <<
" to level " <<
vIndex[j]
612 <<
" i2= " << i2 <<
" Etrans(MeV)= " <<
fTrEnergy
614 <<
" fMpRatio= " <<
fRatio <<
" fAlpha= " << fAlpha
620 for(k=0; k<10; ++k) {
625 G4cout <<
"### Fail to read convertion coeff k= " << k
626 <<
" for transition j= " << j
627 <<
" Z= " << Z <<
" A= " << A <<
G4endl;
646 for(k=0; k<nt; ++k) {
650 G4cout <<
"Probabilities[" << k
653 <<
" idxTrans= " <<
vIndex[k]
660 G4cout <<
"Probabilities[" << nt <<
"]= "
663 <<
" IdxTrans= " <<
vIndex[nt]
683 G4cout <<
"=== Reader: new manager for Z= " << Z <<
" A= " << A
684 <<
" Nlevels= " << i <<
" E[0]= "
690 for(
G4int ii=0; ii<nlevels; ++ii) {
static G4Pow * GetInstance()
std::vector< G4int > vSpin
std::vector< G4float > vRatio
std::vector< const G4NucLevel * > vLevel
G4LevelReader(G4NuclearLevelData *)
const std::vector< G4float > * NormalizedICCProbability(G4int Z)
const G4LevelManager * MakeLevelManager(G4int Z, G4int A, const G4String &filename)
G4DeexPrecoParameters * fParam
const G4LevelManager * LevelManager(G4int Z, G4int A, G4int nlev, std::ifstream &infile)
static const G4int nfloting
static constexpr double second
const G4LevelManager * CreateLevelManagerNEW(G4int Z, G4int A)
G4bool ReadData(std::istringstream &dataFile, G4double &x)
G4double logZ(G4int Z) const
std::vector< G4float > vTime
G4GLOB_DLL std::ostream G4cout
double A(double temperature)
G4bool ReadDataItem(std::istream &dataFile, G4double &x)
std::vector< G4float > vTimeg
G4DeexPrecoParameters * GetParameters()
std::vector< size_t > vIndex
static constexpr double eV
G4bool StoreAllLevels() const
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *comments)
static const G4double emax
std::vector< const std::vector< G4float > * > vShellProbability
T max(const T t1, const T t2)
brief Return the largest of the two arguments
std::vector< G4int > vTrans
static G4String fFloatingLevels[nfloting]
static const G4int LL[nN]
std::vector< G4int > vMeta
G4double GetMaxLevelEnergy(G4int Z, G4int A) const
std::vector< G4float > vGammaCumProbability
static constexpr double MeV
const G4LevelManager * MakeLevelManagerNEW(G4int Z, G4int A, const G4String &filename)
const G4LevelManager * CreateLevelManager(G4int Z, G4int A)
std::vector< G4float > vGammaECumProbability
G4NuclearLevelData * fData
static constexpr double keV
std::vector< G4int > vIndexDB
G4float MaxLevelEnergy() const
std::vector< G4float > vEnergy
std::vector< G4float > vGammaProbability
std::vector< G4float > vMpRatio
static const G4int nbufmax