Geant4  10.03.p01
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
G4LevelReader.cc
Go to the documentation of this file.
1 //
2 // ********************************************************************
3 // * License and Disclaimer *
4 // * *
5 // * The Geant4 software is copyright of the Copyright Holders of *
6 // * the Geant4 Collaboration. It is provided under the terms and *
7 // * conditions of the Geant4 Software License, included in the file *
8 // * LICENSE and available at http://cern.ch/geant4/license . These *
9 // * include a list of copyright holders. *
10 // * *
11 // * Neither the authors of this software system, nor their employing *
12 // * institutes,nor the agencies providing financial support for this *
13 // * work make any representation or warranty, express or implied, *
14 // * regarding this software system or assume any liability for its *
15 // * use. Please see the license in the file LICENSE and URL above *
16 // * for the full disclaimer and the limitation of liability. *
17 // * *
18 // * This code implementation is the result of the scientific and *
19 // * technical work of the GEANT4 collaboration. *
20 // * By using, copying, modifying or distributing the software (or *
21 // * any work based on the software) you agree to acknowledge its *
22 // * use in resulting scientific publications, and indicate your *
23 // * acceptance of all terms of the Geant4 Software license. *
24 // ********************************************************************
25 //
26 // $Id: G4LevelReader.cc 88407 2015-02-18 09:18:44Z vnivanch $
27 //
28 // -------------------------------------------------------------------
29 //
30 // GEANT4 header file
31 //
32 // File name: G4NucLevel
33 //
34 // Author: V.Ivanchenko (M.Kelsey reading method is used)
35 //
36 // Creation date: 4 January 2012
37 //
38 // Modifications:
39 //
40 // -------------------------------------------------------------------
41 
42 #include "G4LevelReader.hh"
43 #include "G4NucleiProperties.hh"
44 #include "G4NucLevel.hh"
45 #include "G4NuclearLevelData.hh"
46 #include "G4DeexPrecoParameters.hh"
47 #include "G4SystemOfUnits.hh"
48 #include "G4Pow.hh"
49 #include <vector>
50 #include <fstream>
51 #include <sstream>
52 
53 G4String G4LevelReader::fFloatingLevels[] = {
54  "-", "+X", "+Y", "+Z", "+U", "+V", "+W", "+R", "+S", "+T", "+A", "+B", "+C"};
55 
57  : fData(ptr),fAlphaMax(9.0f+9),fVerbose(0),fLevelMax(632),fTransMax(80)
58 {
59  fParam = fData->GetParameters();
60  fTimeFactor = (G4float)(CLHEP::second/G4Pow::GetInstance()->logZ(2));
61  char* directory = getenv("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  fFile = fDirectory + "/z100.a200";
70  fPol = " ";
71  for(G4int i=0; i<10; ++i) { fICC[i] = 0.0f; }
72  for(G4int i=0; i<nbufmax; ++i) { buffer[i] = ' '; }
73  for(G4int i=0; i<nbuf1; ++i) { buff1[i] = ' '; }
74  for(G4int i=0; i<nbuf2; ++i) { buff2[i] = ' '; }
75  bufp[0] = bufp[1] = bufp[2] = ' ';
76 
77  fEnergy = fCurrEnergy = fTrEnergy = 0.0;
78  fTime = fProb = fSpin = fAlpha = fRatio = fNorm1 = 0.0f;
79 
80  vTrans.resize(fTransMax,0);
81  vRatio.resize(fTransMax,0.0f);
82  vGammaCumProbability.resize(fTransMax,0.0f);
83  vGammaProbability.resize(fTransMax,0.0f);
84  vShellProbability.resize(fTransMax,nullptr);
85  vMpRatio.resize(fTransMax,0.0f);
86 
87  vEnergy.resize(fLevelMax,0.0f);
88  vSpin.resize(fLevelMax,0);
89  vLevel.resize(fLevelMax,nullptr);
90 }
91 
92 const G4LevelManager*
94 {
95  std::ostringstream ss;
96  ss << "/z" << Z << ".a" << A;
97  G4String st = G4String(ss.str());
98  fFile = fDirectory + st;
99  return MakeLevelManager(Z, A, fFile);
100 }
101 
102 const G4LevelManager*
104 {
105  vEnergy.resize(1,0.0f);
106  vSpin.resize(1,0);
107  vLevel.resize(1,nullptr);
108 
109  vTrans.clear();
110  vGammaCumProbability.clear();
111  vGammaProbability.clear();
112  vShellProbability.clear();
113  vMpRatio.clear();
114 
115  std::ifstream infile(filename, std::ios::in);
116 
117  // file is not opened
118  if (!infile.is_open()) {
119  if (fVerbose > 0) {
120  G4cout << " G4LevelReader: fail open file for Z= "
121  << Z << " A= " << A
122  << " <" << filename << ">" << G4endl;
123  }
124 
125  } else {
126 
127  G4bool allLevels = fParam->StoreAllLevels();
128  if (fVerbose > 0) {
129  G4cout << "G4LevelReader: open file for Z= "
130  << Z << " A= " << A
131  << " <" << filename << ">" << G4endl;
132  }
133  // read line by line
134  G4bool end = false;
135  G4bool next = true;
136  G4int nline = -1;
137  G4int spin;
138  G4int index(0);
139  fCurrEnergy = DBL_MAX;
140  do {
141  fPol = " ";
142  ++nline;
143  G4bool isOK = (ReadDataItem(infile,fEnergy) &&
144  ReadDataItem(infile,fTrEnergy) &&
145  ReadDataItem(infile,fProb) &&
146  ReadDataItem(infile,fPol) &&
147  ReadDataItem(infile,fTime) &&
148  ReadDataItem(infile,fSpin) &&
149  ReadDataItem(infile,fAlpha));
150  /*
151  G4cout << fEnergy << " " << fTrEnergy << " " << fProb << " "
152  << fPol << " " << fTime << " " << fSpin << " " << fAlpha
153  << " " << isOK << " " << fVerbose << G4endl;
154  */
155  fEnergy *= CLHEP::keV;
156  fTrEnergy *= CLHEP::keV;
157 
158  if(isOK) {
159  for(G4int i=0; i<10; ++i) {
160  isOK = (isOK && (ReadDataItem(infile,fICC[i])));
161  }
162  }
163  if(!isOK) {
164  end = true;
165  next = false;
166  }
167  if(fVerbose > 1) {
168  G4cout << "#Line " << nline << " " << fEnergy << " " << fTrEnergy
169  << " " << fProb << " " << fPol << " " << fTime << " "
170  << fSpin << " " << fAlpha << G4endl;
171  G4cout << " ";
172  for(G4int i=0; i<10; ++i) { G4cout << fICC[i] << " "; }
173  G4cout << G4endl;
174  }
175  // end of nuclear level data
176  if(end || fEnergy > fCurrEnergy) {
177  size_t nn = vTrans.size();
178  if(nn > 0) {
179  --nn;
180  if(fVerbose > 1) {
181  G4cout << "Reader: new level E= " << fEnergy
182  << " Ntransitions= " << nn+1 << " fNorm1= " << fNorm1
183  << G4endl;
184  }
185  if(fNorm1 > 0.0f) {
186  fNorm1 = 1.0f/fNorm1;
187  for(size_t i=0; i<nn; ++i) {
188  vGammaCumProbability[i] *= fNorm1;
189  if(fVerbose > 2) {
190  G4cout << "Probabilities[" << i
191  << "]= " << vGammaCumProbability[i]
192  << " idxTrans= " << index
193  << G4endl;
194  }
195  }
196  vGammaCumProbability[nn] = 1.0f;
197  if(fVerbose > 2) {
198  G4cout << "Probabilities[" << nn << "]= "
199  << vGammaCumProbability[nn]
200  << " IdxTrans= " << index
201  << G4endl;
202  }
203  vLevel.push_back(new G4NucLevel(vTrans.size(), fTime,
204  vTrans,
205  vGammaCumProbability,
206  vGammaProbability,
207  vMpRatio,
208  vShellProbability));
209  //case of X-level
210  } else {
211  spin += 100000;
212  fTime = 0.0f;
213  vLevel.push_back(nullptr);
214  }
215  } else {
216  vLevel.push_back(nullptr);
217  }
218  vSpin.push_back(spin);
219  vTrans.clear();
220  vGammaCumProbability.clear();
221  vGammaProbability.clear();
222  vShellProbability.clear();
223  vMpRatio.clear();
224  if(!end) { next = true; }
225  }
226  G4float ener = (G4float)fEnergy;
227  // begin nuclear level data
228  if(next) {
229  if(fVerbose > 1) {
230  G4cout << "== Reader: begin of new level E= " << fEnergy
231  << " Prob= " << fProb << G4endl;
232  }
233  // protection for bad level energy
234  size_t nn = vEnergy.size();
235  if(0 < nn && vEnergy[nn-1] > ener) {
236  ener = vEnergy[nn-1];
237  }
238  vEnergy.push_back(ener);
239  fCurrEnergy = fEnergy;
240  fTime *= fTimeFactor;
241  if(fSpin > 20.0f) { fSpin = 0.0; }
242  spin = (G4int)(fSpin+fSpin);
243  fNorm1 = 0.0f;
244  next = false;
245  }
246  // continue filling level data
247  if(!end) {
248  if(fProb > 0.0f) {
249  // by default transition to a ground state
250  G4float efinal = (G4float)std::max(fEnergy - fTrEnergy,0.0);
251  G4float elevel = 0.0f;
252  size_t idxLevel = 0;
253  G4int tnum = 0;
254  // do not check initial energy
255  size_t nn = vEnergy.size();
256  static const G4float x_energy = (G4float)(0.1*CLHEP::eV);
257  if(1 < nn) {
258  G4float ediffMin = (G4float)fEnergy;
259  for(size_t i=0; i<nn-1; ++i) {
260  G4float ediff = std::abs(efinal - vEnergy[i]);
261  /*
262  G4cout << "Elevel[" << i << "]= " << vEnergy[i]
263  << " Efinal= " << efinal
264  << " Ediff= " << ediff
265  << " EdiffMin= " << ediffMin << G4endl;
266  */
267  if(ediff < ediffMin) {
268  ediffMin = ediff;
269  elevel = vEnergy[i];
270  idxLevel = i;
271  if(ediff <= x_energy) { break; }
272  }
273  }
274  if(std::abs(vEnergy[nn-1] - elevel) < x_energy) { tnum = 1; }
275  }
276  G4float x = 1.0f + fAlpha;
277  fNorm1 += x*fProb;
278  vGammaCumProbability.push_back(fNorm1);
279  vGammaProbability.push_back(1.0f/x);
280  vMpRatio.push_back(0.0f);
281  vTrans.push_back(tnum + idxLevel*10000);
282  if(allLevels && fAlpha > 0.0f) {
283  vShellProbability.push_back(NormalizedICCProbability(Z));
284  } else {
285  vShellProbability.push_back(nullptr);
286  }
287  }
288  }
289  if(nline > 10000) {
290  G4cout << "G4LevelReader: Line #" << nline << " Z= " << Z << " A= "
291  << " this file is too long - stop loading" << G4endl;
292  end = true;
293  }
294  // Loop checking, 05-Aug-2015, Vladimir Ivanchenko
295  } while (!end);
296  infile.close();
297  }
298 
299  G4LevelManager* man = nullptr;
300  if(vEnergy.size() >= 2) {
301  man = new G4LevelManager(vEnergy.size(),vEnergy,vSpin,vLevel);
302  if(fVerbose > 0) {
303  G4cout << "=== Reader: new manager for Z= " << Z << " A= " << A
304  << " Nlevels= " << vEnergy.size() << " E[0]= "
305  << vEnergy[0]/CLHEP::MeV << " MeV Emax= "
306  << man->MaxLevelEnergy()/CLHEP::MeV << " MeV "
307  << " S: " << vEnergy.size()
308  << " " << vSpin.size() << " " << vLevel.size()
309  << G4endl;
310  }
311  }
312  return man;
313 }
314 
315 G4bool G4LevelReader::ReadData(std::istringstream& stream, G4double& x)
316 {
317  stream >> x;
318  return stream.fail() ? false : true;
319 }
320 
321 G4bool G4LevelReader::ReadDataItem(std::istream& dataFile, G4double& x)
322 {
323  x = 0.0;
324  for(G4int i=0; i<nbufmax; ++i) { buffer[i] = ' '; }
325  G4bool okay = true;
326  dataFile >> buffer;
327  if(dataFile.fail()) { okay = false; }
328  else { x = strtod(buffer, 0); }
329 
330  return okay;
331 }
332 
333 G4bool G4LevelReader::ReadDataItem(std::istream& dataFile, G4float& x)
334 {
335  x = 0.0f;
336  for(G4int i=0; i<nbuf1; ++i) { buff1[i] = ' '; }
337  G4bool okay = true;
338  dataFile >> buff1;
339  if(dataFile.fail()) { okay = false; }
340  else { x = atof(buff1); }
341 
342  return okay;
343 }
344 
345 G4bool G4LevelReader::ReadDataItem(std::istream& dataFile, G4int& ix)
346 {
347  ix = 0;
348  for(G4int i=0; i<nbuf2; ++i) { buff2[i] = ' '; }
349  G4bool okay = true;
350  dataFile >> buff2;
351  if(dataFile.fail()) { okay = false; }
352  else { ix = atoi(buff2); }
353 
354  return okay;
355 }
356 
357 G4bool G4LevelReader::ReadDataItem(std::istream& dataFile, G4String& x)
358 {
359  G4bool okay = true;
360  bufp[0] = bufp[1] = ' ';
361  dataFile >> bufp;
362  if(dataFile.fail()) { okay = false; }
363  else { x = G4String(bufp, 2); }
364 
365  return okay;
366 }
367 
368 const std::vector<G4float>* G4LevelReader::NormalizedICCProbability(G4int Z)
369 {
370  std::vector<G4float>* vec = nullptr;
371  G4int LL = 3;
372  G4int M = 5;
373  G4int N = 1;
374  if(Z <= 27) {
375  M = N = 0;
376  if(Z <= 4) {
377  LL = 1;
378  } else if(Z <= 6) {
379  LL = 2;
380  } else if(Z <= 10) {
381  } else if(Z <= 12) {
382  M = 1;
383  } else if(Z <= 17) {
384  M = 2;
385  } else if(Z == 18) {
386  M = 3;
387  } else if(Z <= 20) {
388  M = 3;
389  N = 1;
390  } else {
391  M = 4;
392  N = 1;
393  }
394  if(LL < 3) { for(G4int i=LL+1; i<=4; ++i) { fICC[i] = 0.0f; } }
395  if(M < 5) { for(G4int i=M+4; i<=8; ++i) { fICC[i] = 0.0f; } }
396  if(N < 1) { fICC[9] = 0.0f; }
397  }
398  G4float norm = 0.0f;
399  for(G4int i=0; i<10; ++i) {
400  norm += fICC[i];
401  fICC[i] = norm;
402  }
403  if(norm == 0.0f && fAlpha > fAlphaMax) {
404  fICC[9] = norm = 1.0f;
405  }
406  if(norm > 0.0f) {
407  norm = 1.0f/norm;
408  vec = new std::vector<G4float>;
409  G4float x;
410  for(G4int i=0; i<10; ++i) {
411  x = fICC[i]*norm;
412  if(x > 0.995f || 9 == i) {
413  vec->push_back(1.0f);
414  break;
415  }
416  vec->push_back(x);
417  }
418  if (fVerbose > 2) {
419  G4int prec = G4cout.precision(3);
420  G4cout << "# InternalConv: ";
421  G4int nn = vec->size();
422  for(G4int i=0; i<nn; ++i) { G4cout << " " << (*vec)[i]; }
423  G4cout << G4endl;
424  G4cout.precision(prec);
425  }
426  }
427  return vec;
428 }
429 
430 const G4LevelManager*
432 {
433  std::ostringstream ss;
434  ss << "/correlated_gamma/z" << Z << ".a" << A;
435  G4String st = G4String(ss.str());
436  fFile = fDirectory + st;
437  std::ifstream infile(fFile, std::ios::in);
438 
439  // file is not opened
440  if (!infile.is_open()) {
441  if(fVerbose > 0) {
443  ed << " for Z= " << Z << " A= " << A
444  << " <" << fFile << "> is not opened!";
445  G4Exception("G4LevelReader::CreateLevelManagerNEW(..)","had014",
446  JustWarning, ed, "");
447  }
448  return nullptr;
449  }
450  if (fVerbose > 0) {
451  G4cout << "G4LevelReader: open file for Z= "
452  << Z << " A= " << A
453  << " <" << fFile << ">" << G4endl;
454  }
455  return LevelManager(Z, A, 0, infile);
456 }
457 
458 const G4LevelManager*
460  const G4String& filename)
461 {
462  std::ifstream infile(filename, std::ios::in);
463 
464  // file is not opened
465  if (!infile.is_open()) {
467  ed << " for Z= " << Z << " A= " << A
468  << " data file <" << filename << "> is not opened!";
469  G4Exception("G4LevelReader::MakeLevelManagerNEW(..)","had014",
470  JustWarning, ed, "Check G4LEVELGAMMADATA");
471  return nullptr;
472  }
473  if (fVerbose > 0) {
474  G4cout << "G4LevelReader: open file for Z= "
475  << Z << " A= " << A
476  << " <" << filename << ">" << G4endl;
477  }
478  return LevelManager(Z, A, 0, infile);
479 }
480 
481 const G4LevelManager*
482 G4LevelReader::LevelManager(G4int Z, G4int A, G4int nlev,
483  std::ifstream& infile)
484 {
485  G4bool allLevels = fParam->StoreAllLevels();
486 
487  static const G4double fkev = CLHEP::keV;
488  G4int nlevels = (0 == nlev) ? fLevelMax : nlev;
489  if(fVerbose > 0) {
490  G4cout << "## New isotope Z= " << Z << " A= " << A;
491  if(nlevels < fLevelMax) { G4cout << " Nlevels= " << nlevels; }
492  G4cout << G4endl;
493  }
494  if(nlevels > fLevelMax) {
495  fLevelMax = nlevels;
496  vEnergy.resize(fLevelMax,0.0f);
497  vSpin.resize(fLevelMax,0);
498  vLevel.resize(fLevelMax,nullptr);
499  }
500  G4int ntrans(0), i1, i, k;
501  G4int i2; // Level number at which transition ends
502  G4int tnum; // Multipolarity index
503  G4String xf(" ");
504  G4float x, ener, tener;
505 
506  for(i=0; i<nlevels; ++i) {
507  infile >> i1 >> xf; // Level number and floating level
508  //G4cout << "New line: i1= " << i1 << " xf= <" << xf << "> " << G4endl;
509  if(infile.eof()) {
510  if(fVerbose > 1) {
511  G4cout << "### End of file Z= " << Z << " A= " << A
512  << " Nlevels= " << i << G4endl;
513  }
514  break;
515  }
516  if(i1 != i) {
518  ed << " G4LevelReader: wrong data file for Z= " << Z << " A= " << A
519  << " level #" << i << " has index " << i1 << G4endl;
520  G4Exception("G4LevelReader::LevelManager(..)","had014",
521  FatalException, ed, "Check G4LEVELGAMMADATA");
522  }
523 
524  if(!(ReadDataItem(infile,ener) &&
525  ReadDataItem(infile,fTime) &&
526  ReadDataItem(infile,fSpin) &&
527  ReadDataItem(infile,ntrans))) {
528  if(fVerbose > 1) {
529  G4cout << "### End of file Z= " << Z << " A= " << A
530  << " Nlevels= " << i << G4endl;
531  }
532  break;
533  }
534  fTime = std::max(fTime, 0.0f);
535  ener *= fkev;
536  for(k=0; k<nfloting; ++k) {
537  if(xf == fFloatingLevels[k]) {
538  break;
539  }
540  }
541  // if a previous level has not transitions it may be ignored
542  if(0 < i) {
543  // protection
544  if(ener < vEnergy[i-1]) {
545  G4cout << "### G4LevelReader: broken level " << i
546  << " E(MeV)= " << ener << " < " << vEnergy[i-1]
547  << " for isotope Z= " << Z << " A= "
548  << A << " level energy increased" << G4endl;
549  ener = vEnergy[i-1];
550  }
551  }
552  vEnergy[i] = ener;
553  fTime *= fTimeFactor;
554  if(fSpin > 20.0f) { fSpin = 0.0f; }
555  vSpin[i] = (G4int)(100 + fSpin + fSpin) + k*100000;
556  if(fVerbose > 1) {
557  G4cout << " Level #" << i1 << " E(MeV)= " << ener/CLHEP::MeV
558  << " LTime(s)= " << fTime << " 2S= " << vSpin[i]
559  << " meta= " << vSpin[i]/100000 << " idx= " << i
560  << " ntr= " << ntrans << G4endl;
561  }
562  vLevel[i] = nullptr;
563  if(ntrans > 0) {
564 
565  // there are transitions
566  if(ntrans > fTransMax) {
567  fTransMax = ntrans;
568  vTrans.resize(fTransMax);
569  vRatio.resize(fTransMax);
570  vGammaCumProbability.resize(fTransMax);
571  vGammaProbability.resize(fTransMax);
572  vShellProbability.resize(fTransMax);
573  vMpRatio.resize(fTransMax);
574  }
575  fNorm1 = 0.0f;
576  for(G4int j=0; j<ntrans; ++j) {
577 
578  if(!(ReadDataItem(infile,i2) &&
579  ReadDataItem(infile,tener) &&
580  ReadDataItem(infile,fProb) &&
581  ReadDataItem(infile,tnum) &&
582  ReadDataItem(infile,vRatio[j]) &&
583  ReadDataItem(infile,fAlpha))) {
584  //infile >>i2 >> tener >> fProb >> vTrans[j] >> fRatio >> fAlpha;
585  //if(infile.fail()) {
586  if(fVerbose > 0) {
587  G4cout << "### Fail to read transition j= " << j
588  << " Z= " << Z << " A= " << A << G4endl;
589  }
590  break;
591  }
592  if(i2 >= i) {
593  G4cout << "### G4LevelReader: broken transition " << j
594  << " from level " << i << " to " << i2
595  << " for isotope Z= " << Z << " A= "
596  << A << " - use ground level" << G4endl;
597  i2 = 0;
598  }
599  vTrans[j] = i2*10000 + tnum;
600  if(fAlpha < fAlphaMax) {
601  x = 1.0f + fAlpha;
602  fNorm1 += x*fProb;
603  vGammaCumProbability[j] = fNorm1;
604  vGammaProbability[j] = 1.0f/x;
605  } else {
606  // only internal conversion case - no gamma conversion at all
607  fNorm1 += fProb;
608  vGammaCumProbability[j] = fNorm1;
609  vGammaProbability[j] = 0.0f;
610  }
611  vShellProbability[j] = nullptr;
612  if(fVerbose > 1) {
613  G4int prec = G4cout.precision(4);
614  G4cout << "### Transition #" << j << " to level " << i2
615  << " i2= " << i2 << " Etrans(MeV)= " << tener*fkev
616  << " fProb= " << fProb << " MultiP= " << tnum
617  << " fMpRatio= " << fRatio << " fAlpha= " << fAlpha
618  << G4endl;
619  G4cout.precision(prec);
620  }
621  if(fAlpha > 0.0f) {
622  for(k=0; k<10; ++k) {
623  //infile >> fICC[k];
624  if(!ReadDataItem(infile,fICC[k])) {
625  //if(infile.fail()) {
626  if(fVerbose > 0) {
627  G4cout << "### Fail to read convertion coeff k= " << k
628  << " for transition j= " << j
629  << " Z= " << Z << " A= " << A << G4endl;
630  }
631  break;
632  }
633  }
634  if(allLevels) {
635  vShellProbability[j] = NormalizedICCProbability(Z);
636  if(!vShellProbability[j]) { vGammaProbability[j] = 1.0f; }
637  }
638  }
639  }
640  if(0.0f < fNorm1) { fNorm1 = 1.0f/fNorm1; }
641  G4int nt = ntrans - 1;
642  for(k=0; k<nt; ++k) {
643  vGammaCumProbability[k] *= fNorm1;
644  if(fVerbose > 2) {
645  G4cout << "Probabilities[" << k
646  << "]= " << vGammaCumProbability[k]
647  << " " << vGammaProbability[k]
648  << " idxTrans= " << vTrans[k]/10000
649  << G4endl;
650  }
651  }
652  vGammaCumProbability[nt] = 1.0f;
653  if(fVerbose > 2) {
654  G4cout << "Probabilities[" << nt << "]= "
655  << vGammaCumProbability[nt]
656  << " " << vGammaProbability[nt]
657  << " IdxTrans= " << vTrans[nt]/10000
658  << G4endl;
659  }
660  if(fVerbose > 1) {
661  G4cout << " New G4NucLevel: Ntrans= " << ntrans
662  << " Time(ns)= " << fTime << G4endl;
663  }
664  vLevel[i] = new G4NucLevel((size_t)ntrans, fTime,
665  vTrans,
666  vGammaCumProbability,
667  vGammaProbability,
668  vMpRatio,
669  vShellProbability);
670  }
671  }
672  G4LevelManager* lman = nullptr;
673  if(1 < i) {
674  lman = new G4LevelManager((size_t)i,vEnergy,vSpin,vLevel);
675  if(fVerbose > 0) {
676  G4cout << "=== Reader: new manager for Z= " << Z << " A= " << A
677  << " Nlevels= " << i << " E[0]= "
678  << vEnergy[0]/CLHEP::MeV << " MeV E1= "
679  << vEnergy[i-1]/CLHEP::MeV << " MeV "
680  << G4endl;
681  }
682  }
683 
684  return lman;
685 }
static G4Pow * GetInstance()
Definition: G4Pow.cc:55
const int N
Definition: mixmax.h:43
std::ostringstream G4ExceptionDescription
Definition: globals.hh:76
static constexpr double keV
float G4float
Definition: G4Types.hh:77
G4LevelReader(G4NuclearLevelData *)
const G4LevelManager * MakeLevelManager(G4int Z, G4int A, const G4String &filename)
const G4LevelManager * CreateLevelManagerNEW(G4int Z, G4int A)
int G4int
Definition: G4Types.hh:78
G4double logZ(G4int Z) const
Definition: G4Pow.hh:166
static const double prec
Definition: RanecuEngine.cc:58
G4GLOB_DLL std::ostream G4cout
double A(double temperature)
bool G4bool
Definition: G4Types.hh:79
static constexpr double MeV
G4DeexPrecoParameters * GetParameters()
static constexpr double eV
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *comments)
Definition: G4Exception.cc:41
T max(const T t1, const T t2)
brief Return the largest of the two arguments
static const G4int LL[nN]
static constexpr double second
#define G4endl
Definition: G4ios.hh:61
const G4LevelManager * MakeLevelManagerNEW(G4int Z, G4int A, const G4String &filename)
const G4LevelManager * CreateLevelManager(G4int Z, G4int A)
double G4double
Definition: G4Types.hh:76
#define DBL_MAX
Definition: templates.hh:83
G4float MaxLevelEnergy() const