Geant4  10.03.p01
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
G4NuclearLevelData Class Reference

#include <G4NuclearLevelData.hh>

Public Member Functions

 ~G4NuclearLevelData ()
 
const G4LevelManagerGetLevelManager (G4int Z, G4int A)
 
G4bool AddPrivateData (G4int Z, G4int A, const G4String &filename)
 
G4int GetMinA (G4int Z) const
 
G4int GetMaxA (G4int Z) const
 
G4double GetMaxLevelEnergy (G4int Z, G4int A) const
 
G4double GetLevelEnergy (G4int Z, G4int A, G4double energy)
 
G4double GetLowEdgeLevelEnergy (G4int Z, G4int A, G4double energy)
 
G4double FindLevel (G4int Z, G4int A, G4double resMass, G4double Mass, G4double partMass, G4double T)
 
G4DeexPrecoParametersGetParameters ()
 

Static Public Member Functions

static G4NuclearLevelDataGetInstance ()
 

Detailed Description

Definition at line 57 of file G4NuclearLevelData.hh.

Constructor & Destructor Documentation

G4NuclearLevelData::~G4NuclearLevelData ( )

Definition at line 341 of file G4NuclearLevelData.cc.

342 {
343  delete fLevelReader;
344  delete fDeexPrecoParameters;
345  for(G4int Z=1; Z<ZMAX; ++Z) {
346  size_t nn = (fLevelManagers[Z]).size();
347  for(size_t j=0; j<nn; ++j) {
348  //G4cout << " G4NuclearLevelData delete Z= " << Z
349  // << " A= " << AMIN[Z]+j << G4endl;
350  delete (fLevelManagers[Z])[j];
351  }
352  }
353 }
int G4int
Definition: G4Types.hh:78

Member Function Documentation

G4bool G4NuclearLevelData::AddPrivateData ( G4int  Z,
G4int  A,
const G4String filename 
)

Definition at line 371 of file G4NuclearLevelData.cc.

372 {
373  G4bool res = false;
374  if(A >= AMIN[Z] && A <= AMAX[Z]) {
375  const G4LevelManager* newman = nullptr;
376  if(fDeexPrecoParameters->UseFilesNEW()) {
377  newman = fLevelReader->MakeLevelManagerNEW(Z, A, filename);
378  } else {
379  newman = fLevelReader->MakeLevelManager(Z, A, filename);
380  }
381  if(newman) {
382  delete (fLevelManagers[Z])[A - AMIN[Z]];
383  (fLevelManagers[Z])[A - AMIN[Z]] = newman;
384  (fLevelManagerFlags[Z])[A - AMIN[Z]] = true;
385  res = true;
386  }
387  }
388  return res;
389 }
const G4LevelManager * MakeLevelManager(G4int Z, G4int A, const G4String &filename)
double A(double temperature)
bool G4bool
Definition: G4Types.hh:79
const G4LevelManager * MakeLevelManagerNEW(G4int Z, G4int A, const G4String &filename)

Here is the call graph for this function:

Here is the caller graph for this function:

G4double G4NuclearLevelData::FindLevel ( G4int  Z,
G4int  A,
G4double  resMass,
G4double  Mass,
G4double  partMass,
G4double  T 
)

Definition at line 456 of file G4NuclearLevelData.cc.

458 {
459  G4double T = ekin;
460  G4double E2 = (Mass - partMass)*(Mass - partMass);
461  G4double Eex = std::sqrt(E2 - 2.0*Mass*T) - resMass;
462  if(Eex <= GetMaxLevelEnergy(Z, A)) {
463  if(Eex <= 0.0) {
464  Eex = 0.0;
465  T = (E2 - resMass*resMass)*0.5/Mass;
466  } else {
467  const G4LevelManager* man = GetLevelManager(Z, A);
468  if(man != nullptr) {
469  size_t idx = man->NearestLevelIndex(Eex, man->NumberOfTransitions());
470  for(;;) {
471  Eex = (G4double)man->LevelEnergy(idx);
472  T = (E2 - (resMass+Eex)*(resMass+Eex))*0.5/Mass;
473  if(T >= 0.0 || 0 == idx) { break; }
474  --idx;
475  }
476  }
477  }
478  T = std::max(T, 0.0);
479  }
480  return T;
481 }
const G4LevelManager * GetLevelManager(G4int Z, G4int A)
G4float LevelEnergy(size_t i) const
double A(double temperature)
size_t NumberOfTransitions() const
size_t NearestLevelIndex(G4double energy, size_t index=0) const
T max(const T t1, const T t2)
brief Return the largest of the two arguments
G4double GetMaxLevelEnergy(G4int Z, G4int A) const
double G4double
Definition: G4Types.hh:76

Here is the call graph for this function:

G4NuclearLevelData * G4NuclearLevelData::GetInstance ( )
static

Definition at line 316 of file G4NuclearLevelData.cc.

317 {
318  if (!theInstance) {
319  static G4NuclearLevelData theData;
320  theInstance = &theData;
321  }
322  return theInstance;
323 }

Here is the caller graph for this function:

G4double G4NuclearLevelData::GetLevelEnergy ( G4int  Z,
G4int  A,
G4double  energy 
)

Definition at line 430 of file G4NuclearLevelData.cc.

431 {
432  G4double e = energy;
433  if(e <= GetMaxLevelEnergy(Z, A)) {
434  const G4LevelManager* man = GetLevelManager(Z, A);
435  if(man != nullptr) {
436  e = (G4double)man->NearestLevelEnergy(e, man->NumberOfTransitions());
437  }
438  }
439  return e;
440 }
const G4LevelManager * GetLevelManager(G4int Z, G4int A)
double A(double temperature)
size_t NumberOfTransitions() const
G4float NearestLevelEnergy(G4double energy, size_t index=0) const
G4double energy(const ThreeVector &p, const G4double m)
G4double GetMaxLevelEnergy(G4int Z, G4int A) const
double G4double
Definition: G4Types.hh:76

Here is the call graph for this function:

const G4LevelManager * G4NuclearLevelData::GetLevelManager ( G4int  Z,
G4int  A 
)

Definition at line 356 of file G4NuclearLevelData.cc.

357 {
358  const G4LevelManager* man = nullptr;
359  //G4cout << "G4NuclearLevelData: Z= " << Z << " A= " << A << G4endl;
360  if(0 < Z && Z < ZMAX && A >= AMIN[Z] && A <= AMAX[Z]) {
361  if(!(fLevelManagerFlags[Z])[A - AMIN[Z]]) {
362  InitialiseForIsotope(Z, A);
363  }
364  man = (fLevelManagers[Z])[A - AMIN[Z]];
365  }
366  //G4cout << man << G4endl;
367  return man;
368 }
double A(double temperature)

Here is the caller graph for this function:

G4double G4NuclearLevelData::GetLowEdgeLevelEnergy ( G4int  Z,
G4int  A,
G4double  energy 
)

Definition at line 443 of file G4NuclearLevelData.cc.

444 {
446  if(energy < e) {
447  const G4LevelManager* man = GetLevelManager(Z, A);
448  if(man != nullptr) {
450  }
451  }
452  return e;
453 }
const G4LevelManager * GetLevelManager(G4int Z, G4int A)
double A(double temperature)
G4double energy(const ThreeVector &p, const G4double m)
G4double GetMaxLevelEnergy(G4int Z, G4int A) const
double G4double
Definition: G4Types.hh:76
G4float NearestLowEdgeLevelEnergy(G4double energy) const

Here is the call graph for this function:

G4int G4NuclearLevelData::GetMaxA ( G4int  Z) const

Definition at line 396 of file G4NuclearLevelData.cc.

397 {
398  return (Z >= 0 && Z < ZMAX) ? AMAX[Z] : 0;
399 }

Here is the caller graph for this function:

G4double G4NuclearLevelData::GetMaxLevelEnergy ( G4int  Z,
G4int  A 
) const

Definition at line 424 of file G4NuclearLevelData.cc.

425 {
426  return (0 < Z && Z < ZMAX && A >= AMIN[Z] && A <= AMAX[Z]) ?
427  (G4double)(LEVELMAX[LEVELIDX[Z] + A - AMIN[Z]]) : 0.0;
428 }
static const G4float LEVELMAX[2210]
double A(double temperature)
double G4double
Definition: G4Types.hh:76

Here is the caller graph for this function:

G4int G4NuclearLevelData::GetMinA ( G4int  Z) const

Definition at line 391 of file G4NuclearLevelData.cc.

392 {
393  return (Z >= 0 && Z < ZMAX) ? AMIN[Z] : 0;
394 }

Here is the caller graph for this function:

G4DeexPrecoParameters * G4NuclearLevelData::GetParameters ( )

Definition at line 483 of file G4NuclearLevelData.cc.

484 {
485  return fDeexPrecoParameters;
486 }

Here is the caller graph for this function:


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