Geant4 11.1.1
Toolkit for the simulation of the passage of particles through matter
Loading...
Searching...
No Matches
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
 
G4float MaxLevelEnergy (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 ()
 
G4PairingCorrectionGetPairingCorrection ()
 
G4ShellCorrectionGetShellCorrection ()
 
G4double GetLevelDensity (G4int Z, G4int A, G4double U)
 
G4double GetPairingCorrection (G4int Z, G4int A)
 
void UploadNuclearLevelData (G4int Z)
 
void StreamLevels (std::ostream &os, G4int Z, G4int A)
 
 G4NuclearLevelData (G4NuclearLevelData &)=delete
 
G4NuclearLevelDataoperator= (const G4NuclearLevelData &right)=delete
 

Static Public Member Functions

static G4NuclearLevelDataGetInstance ()
 

Detailed Description

Definition at line 59 of file G4NuclearLevelData.hh.

Constructor & Destructor Documentation

◆ ~G4NuclearLevelData()

G4NuclearLevelData::~G4NuclearLevelData ( )

Definition at line 450 of file G4NuclearLevelData.cc.

451{
452 delete fLevelReader;
453 delete fDeexPrecoParameters;
454 delete fShellCorrection;
455 delete fPairingCorrection;
456 for(G4int Z=1; Z<ZMAX; ++Z) {
457 size_t nn = (fLevelManagers[Z]).size();
458 for(size_t j=0; j<nn; ++j) {
459 delete (fLevelManagers[Z])[j];
460 }
461 }
462}
int G4int
Definition: G4Types.hh:85
const G4int Z[17]

◆ G4NuclearLevelData()

G4NuclearLevelData::G4NuclearLevelData ( G4NuclearLevelData )
delete

Member Function Documentation

◆ AddPrivateData()

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

Definition at line 481 of file G4NuclearLevelData.cc.

482{
483 G4bool res = false;
484 if(Z > 0 && Z < ZMAX && A >= AMIN[Z] && A <= AMAX[Z]) {
485 G4AutoLock l(&nuclearLevelDataMutex);
486 const G4LevelManager* newman =
487 fLevelReader->MakeLevelManager(Z, A, filename);
488 if(newman) {
489 res = true;
490 G4cout << "G4NuclearLevelData::AddPrivateData for Z= " << Z
491 << " A= " << A << " from <" << filename
492 << "> is done" << G4endl;
493 const G4int idx = A - AMIN[Z];
494 delete (fLevelManagers[Z])[idx];
495 (fLevelManagers[Z])[idx] = newman;
496 (fLevelManagerFlags[Z])[idx] = true;
497 }
498 l.unlock();
499 } else {
501 ed << "private nuclear level data for Z= " << Z << " A= " << A
502 << " outside allowed limits ";
503 G4Exception("G4NuclearLevelData::AddPrivateData","had0433",FatalException,
504 ed,"Stop execution");
505 }
506 return res;
507}
@ FatalException
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *description)
Definition: G4Exception.cc:59
std::ostringstream G4ExceptionDescription
Definition: G4Exception.hh:40
bool G4bool
Definition: G4Types.hh:86
const G4double A[17]
#define G4endl
Definition: G4ios.hh:57
G4GLOB_DLL std::ostream G4cout
const G4LevelManager * MakeLevelManager(G4int Z, G4int A, const G4String &filename)

Referenced by G4RadioactiveDecayMessenger::SetNewValue().

◆ FindLevel()

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

Definition at line 578 of file G4NuclearLevelData.cc.

580{
581 G4double T = ekin;
582 G4double E2 = (Mass - partMass)*(Mass - partMass);
583 G4double Eex = std::sqrt(E2 - 2.0*Mass*T) - resMass;
584 if(Eex <= GetMaxLevelEnergy(Z, A)) {
585 if(Eex <= 0.0) {
586 Eex = 0.0;
587 T = (E2 - resMass*resMass)*0.5/Mass;
588 } else {
589 const G4LevelManager* man = GetLevelManager(Z, A);
590 if(man != nullptr) {
591 size_t idx = man->NearestLevelIndex(Eex, man->NumberOfTransitions());
592 for(;;) {
593 Eex = (G4double)man->LevelEnergy(idx);
594 T = (E2 - (resMass+Eex)*(resMass+Eex))*0.5/Mass;
595 if(T >= 0.0 || 0 == idx) { break; }
596 --idx;
597 }
598 }
599 }
600 T = std::max(T, 0.0);
601 }
602 return T;
603}
double G4double
Definition: G4Types.hh:83
std::size_t NearestLevelIndex(const G4double energy, const std::size_t index=0) const
G4double LevelEnergy(const std::size_t i) const
std::size_t NumberOfTransitions() const
const G4LevelManager * GetLevelManager(G4int Z, G4int A)
G4double GetMaxLevelEnergy(G4int Z, G4int A) const

◆ GetInstance()

G4NuclearLevelData * G4NuclearLevelData::GetInstance ( )
static

Definition at line 423 of file G4NuclearLevelData.cc.

424{
425 if (nullptr == theInstance) {
426 G4AutoLock l(&nuclearLevelDataMutex);
427 if (nullptr == theInstance) {
428 static G4NuclearLevelData theData;
429 theInstance = &theData;
430 }
431 l.unlock();
432 }
433 return theInstance;
434}

Referenced by G4Radioactivation::CalculateChainsFromParent(), G4GNASHTransitions::CalculateProbability(), LBE::ConstructGeneral(), G4CompetitiveFission::G4CompetitiveFission(), G4Evaporation::G4Evaporation(), G4EvaporationChannel::G4EvaporationChannel(), G4EvaporationLevelDensityParameter::G4EvaporationLevelDensityParameter(), G4FermiFragmentsPoolVI::G4FermiFragmentsPoolVI(), G4FissionBarrier::G4FissionBarrier(), G4FissionLevelDensityParameter::G4FissionLevelDensityParameter(), G4FissionLevelDensityParameterINCLXX::G4FissionLevelDensityParameterINCLXX(), G4FissionProbability::G4FissionProbability(), G4GEMChannel::G4GEMChannel(), G4GEMChannelVI::G4GEMChannelVI(), G4GEMProbability::G4GEMProbability(), G4GNASHTransitions::G4GNASHTransitions(), G4IonINCLXXPhysics::G4IonINCLXXPhysics(), G4IonPhysicsPHP::G4IonPhysicsPHP(), G4IonQMDPhysics::G4IonQMDPhysics(), G4LevelManager::G4LevelManager(), G4PhotonEvaporation::G4PhotonEvaporation(), G4PreCompoundEmission::G4PreCompoundEmission(), G4PreCompoundModel::G4PreCompoundModel(), G4PreCompoundTransitions::G4PreCompoundTransitions(), G4RadioactiveDecayPhysics::G4RadioactiveDecayPhysics(), G4UnstableFragmentBreakUp::G4UnstableFragmentBreakUp(), G4VEmissionProbability::G4VEmissionProbability(), G4VPreCompoundFragment::G4VPreCompoundFragment(), G4ExcitationHandler::Initialise(), G4NeutronRadCapture::InitialiseModel(), G4PhysListUtil::InitialiseParameters(), and G4RadioactiveDecayMessenger::SetNewValue().

◆ GetLevelDensity()

G4double G4NuclearLevelData::GetLevelDensity ( G4int  Z,
G4int  A,
G4double  U 
)

◆ GetLevelEnergy()

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

Definition at line 552 of file G4NuclearLevelData.cc.

553{
554 G4double e = energy;
555 if(e <= GetMaxLevelEnergy(Z, A)) {
556 const G4LevelManager* man = GetLevelManager(Z, A);
557 if(man != nullptr) {
558 e = (G4double)man->NearestLevelEnergy(e, man->NumberOfTransitions());
559 }
560 }
561 return e;
562}
G4double NearestLevelEnergy(const G4double energy, const std::size_t index=0) const
G4double energy(const ThreeVector &p, const G4double m)

◆ GetLevelManager()

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

Definition at line 465 of file G4NuclearLevelData.cc.

466{
467 if(Z < 1 || Z >= ZMAX || A < AMIN[Z] || A > AMAX[Z]) { return nullptr; }
468 const G4int idx = A - AMIN[Z];
469 if( !(fLevelManagerFlags[Z])[idx] ) {
470 G4AutoLock l(&nuclearLevelDataMutex);
471 if( !(fLevelManagerFlags[Z])[idx] ) {
472 (fLevelManagers[Z])[idx] = fLevelReader->CreateLevelManager(Z, A);
473 (fLevelManagerFlags[Z])[idx] = true;
474 }
475 l.unlock();
476 }
477 return (fLevelManagers[Z])[idx];
478}
const G4LevelManager * CreateLevelManager(G4int Z, G4int A)

Referenced by G4Radioactivation::CalculateChainsFromParent(), FindLevel(), G4GEMChannelVI::G4GEMChannelVI(), GetLevelDensity(), GetLevelEnergy(), GetLowEdgeLevelEnergy(), and StreamLevels().

◆ GetLowEdgeLevelEnergy()

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

Definition at line 565 of file G4NuclearLevelData.cc.

566{
568 if(energy < e) {
569 const G4LevelManager* man = GetLevelManager(Z, A);
570 if(man != nullptr) {
571 e = (G4double)man->NearestLowEdgeLevelEnergy(energy);
572 }
573 }
574 return e;
575}
G4double NearestLowEdgeLevelEnergy(const G4double energy) const

◆ GetMaxA()

G4int G4NuclearLevelData::GetMaxA ( G4int  Z) const

Definition at line 514 of file G4NuclearLevelData.cc.

515{
516 return (Z >= 0 && Z < ZMAX) ? AMAX[Z] : 0;
517}

◆ GetMaxLevelEnergy()

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

Definition at line 540 of file G4NuclearLevelData.cc.

541{
542 return (0 < Z && Z < ZMAX && A >= AMIN[Z] && A <= AMAX[Z]) ?
543 (G4double)(LEVELMAX[LEVELIDX[Z] + A - AMIN[Z]]) : 0.0;
544}

Referenced by FindLevel(), GetLevelEnergy(), and GetLowEdgeLevelEnergy().

◆ GetMinA()

G4int G4NuclearLevelData::GetMinA ( G4int  Z) const

Definition at line 509 of file G4NuclearLevelData.cc.

510{
511 return (Z >= 0 && Z < ZMAX) ? AMIN[Z] : 0;
512}

◆ GetPairingCorrection() [1/2]

◆ GetPairingCorrection() [2/2]

G4double G4NuclearLevelData::GetPairingCorrection ( G4int  Z,
G4int  A 
)

Definition at line 630 of file G4NuclearLevelData.cc.

631{
632 if(fDeexPrecoParameters->GetLevelDensityFlag()) {
633 return fPairingCorrection->GetPairingCorrection(A, Z);
634 }
635 G4int N = A - Z;
636 const G4double par = 12.*CLHEP::MeV;
637 G4double x = (A <= 36) ? 6.0 : std::sqrt((G4double)A);
638 return (2 - Z + (Z/2)*2 - N + (N/2)*2)*par/x;
639}
G4double GetPairingCorrection(G4int A, G4int Z) const
#define N
Definition: crc32.c:56

◆ GetParameters()

◆ GetShellCorrection()

G4ShellCorrection * G4NuclearLevelData::GetShellCorrection ( )

Definition at line 615 of file G4NuclearLevelData.cc.

616{
617 return fShellCorrection;
618}

Referenced by G4FissionBarrier::G4FissionBarrier().

◆ MaxLevelEnergy()

G4float G4NuclearLevelData::MaxLevelEnergy ( G4int  Z,
G4int  A 
) const

Definition at line 546 of file G4NuclearLevelData.cc.

547{
548 return (0 < Z && Z < ZMAX && A >= AMIN[Z] && A <= AMAX[Z]) ?
549 (LEVELMAX[LEVELIDX[Z] + A - AMIN[Z]]) : 0.0f;
550}

◆ operator=()

G4NuclearLevelData & G4NuclearLevelData::operator= ( const G4NuclearLevelData right)
delete

◆ StreamLevels()

void G4NuclearLevelData::StreamLevels ( std::ostream &  os,
G4int  Z,
G4int  A 
)

Definition at line 641 of file G4NuclearLevelData.cc.

643{
644 const G4LevelManager* man = GetLevelManager(Z, A);
645 if(man) {
646 os << "Level data for Z= " << Z << " A= " << A << " "
647 << man->NumberOfTransitions() + 1 << " levels \n";
648 man->StreamInfo(os);
649 }
650}
void StreamInfo(std::ostream &os) const

◆ UploadNuclearLevelData()

void G4NuclearLevelData::UploadNuclearLevelData ( G4int  Z)

Definition at line 519 of file G4NuclearLevelData.cc.

520{
521 if(fInitialized) return;
522 G4AutoLock l(&nuclearLevelDataMutex);
523 if(!fInitialized) {
524 fInitialized = true;
525 G4int mZ = ZZ;
526 if(mZ > ZMAX) { mZ = ZMAX; }
527 for(G4int Z=1; Z<mZ; ++Z) {
528 for(G4int A=AMIN[Z]; A<=AMAX[Z]; ++A) {
529 G4int idx = A - AMIN[Z];
530 if( !(fLevelManagerFlags[Z])[idx] ) {
531 (fLevelManagers[Z])[idx] = fLevelReader->CreateLevelManager(Z, A);
532 (fLevelManagerFlags[Z])[idx] = true;
533 }
534 }
535 }
536 }
537 l.unlock();
538}

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