Geant4 10.7.0
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 60 of file G4NuclearLevelData.hh.

Constructor & Destructor Documentation

◆ ~G4NuclearLevelData()

G4NuclearLevelData::~G4NuclearLevelData ( )

Definition at line 452 of file G4NuclearLevelData.cc.

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

◆ G4NuclearLevelData()

G4NuclearLevelData::G4NuclearLevelData ( G4NuclearLevelData )
delete

Member Function Documentation

◆ AddPrivateData()

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

Definition at line 487 of file G4NuclearLevelData.cc.

488{
489 G4bool res = false;
490 if(Z > 0 && Z < ZMAX && A >= AMIN[Z] && A <= AMAX[Z]) {
491#ifdef G4MULTITHREADED
492 G4MUTEXLOCK(&nuclearLevelDataMutex);
493#endif
494 const G4LevelManager* newman =
495 fLevelReader->MakeLevelManager(Z, A, filename);
496 if(newman) {
497 res = true;
498 G4cout << "G4NuclearLevelData::AddPrivateData for Z= " << Z
499 << " A= " << A << " from <" << filename
500 << "> is done" << G4endl;
501 const G4int idx = A - AMIN[Z];
502 delete (fLevelManagers[Z])[idx];
503 (fLevelManagers[Z])[idx] = newman;
504 (fLevelManagerFlags[Z])[idx] = true;
505 }
506#ifdef G4MULTITHREADED
507 G4MUTEXUNLOCK(&nuclearLevelDataMutex);
508#endif
509 } else {
511 ed << "private nuclear level data for Z= " << Z << " A= " << A
512 << " outside allowed limits ";
513 G4Exception("G4NuclearLevelData::AddPrivateData","had0433",FatalException,
514 ed,"Stop execution");
515 }
516 return res;
517}
double A(double temperature)
@ FatalException
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *description)
Definition: G4Exception.cc:35
std::ostringstream G4ExceptionDescription
Definition: G4Exception.hh:40
#define G4MUTEXLOCK(mutex)
Definition: G4Threading.hh:251
#define G4MUTEXUNLOCK(mutex)
Definition: G4Threading.hh:254
bool G4bool
Definition: G4Types.hh:86
#define G4endl
Definition: G4ios.hh:57
G4GLOB_DLL std::ostream G4cout
const G4LevelManager * MakeLevelManager(G4int Z, G4int A, const G4String &filename)

Referenced by G4RadioactiveDecayBaseMessenger::SetNewValue(), and G4RadioactiveDecaymessenger::SetNewValue().

◆ FindLevel()

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

Definition at line 592 of file G4NuclearLevelData.cc.

594{
595 G4double T = ekin;
596 G4double E2 = (Mass - partMass)*(Mass - partMass);
597 G4double Eex = std::sqrt(E2 - 2.0*Mass*T) - resMass;
598 if(Eex <= GetMaxLevelEnergy(Z, A)) {
599 if(Eex <= 0.0) {
600 Eex = 0.0;
601 T = (E2 - resMass*resMass)*0.5/Mass;
602 } else {
603 const G4LevelManager* man = GetLevelManager(Z, A);
604 if(man != nullptr) {
605 size_t idx = man->NearestLevelIndex(Eex, man->NumberOfTransitions());
606 for(;;) {
607 Eex = (G4double)man->LevelEnergy(idx);
608 T = (E2 - (resMass+Eex)*(resMass+Eex))*0.5/Mass;
609 if(T >= 0.0 || 0 == idx) { break; }
610 --idx;
611 }
612 }
613 }
614 T = std::max(T, 0.0);
615 }
616 return T;
617}
double G4double
Definition: G4Types.hh:83
size_t NearestLevelIndex(G4double energy, size_t index=0) const
size_t NumberOfTransitions() const
G4double LevelEnergy(size_t i) const
const G4LevelManager * GetLevelManager(G4int Z, G4int A)
G4double GetMaxLevelEnergy(G4int Z, G4int A) const

◆ GetInstance()

G4NuclearLevelData * G4NuclearLevelData::GetInstance ( )
static

Definition at line 421 of file G4NuclearLevelData.cc.

422{
423 if (!theInstance) {
424#ifdef G4MULTITHREADED
425 G4MUTEXLOCK(&nuclearLevelDataMutex);
426 if (!theInstance) {
427#endif
428 static G4NuclearLevelData theData;
429 theInstance = &theData;
430#ifdef G4MULTITHREADED
431 }
432 G4MUTEXUNLOCK(&nuclearLevelDataMutex);
433#endif
434 }
435 return theInstance;
436}

Referenced by G4Radioactivation::CalculateChainsFromParent(), G4RadioactiveDecay::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(), G4RadioactiveDecayBaseMessenger::SetNewValue(), 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 566 of file G4NuclearLevelData.cc.

567{
568 G4double e = energy;
569 if(e <= GetMaxLevelEnergy(Z, A)) {
570 const G4LevelManager* man = GetLevelManager(Z, A);
571 if(man != nullptr) {
572 e = (G4double)man->NearestLevelEnergy(e, man->NumberOfTransitions());
573 }
574 }
575 return e;
576}
G4double NearestLevelEnergy(G4double energy, 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 467 of file G4NuclearLevelData.cc.

468{
469 if(Z < 1 || Z >= ZMAX || A < AMIN[Z] || A > AMAX[Z]) { return nullptr; }
470 const G4int idx = A - AMIN[Z];
471 if( !(fLevelManagerFlags[Z])[idx] ) {
472#ifdef G4MULTITHREADED
473 G4MUTEXLOCK(&nuclearLevelDataMutex);
474 if( !(fLevelManagerFlags[Z])[idx] ) {
475#endif
476 (fLevelManagers[Z])[idx] = fLevelReader->CreateLevelManager(Z, A);
477 (fLevelManagerFlags[Z])[idx] = true;
478#ifdef G4MULTITHREADED
479 }
480 G4MUTEXUNLOCK(&nuclearLevelDataMutex);
481#endif
482 }
483 return (fLevelManagers[Z])[idx];
484}
const G4LevelManager * CreateLevelManager(G4int Z, G4int A)

Referenced by G4Evaporation::BreakFragment(), G4UnstableFragmentBreakUp::BreakUpChain(), G4Radioactivation::CalculateChainsFromParent(), G4RadioactiveDecay::CalculateChainsFromParent(), FindLevel(), G4GEMChannelVI::G4GEMChannelVI(), GetLevelDensity(), GetLevelEnergy(), GetLowEdgeLevelEnergy(), and StreamLevels().

◆ GetLowEdgeLevelEnergy()

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

Definition at line 579 of file G4NuclearLevelData.cc.

580{
581 G4double e = GetMaxLevelEnergy(Z, A);
582 if(energy < e) {
583 const G4LevelManager* man = GetLevelManager(Z, A);
584 if(man != nullptr) {
585 e = (G4double)man->NearestLowEdgeLevelEnergy(energy);
586 }
587 }
588 return e;
589}
G4double NearestLowEdgeLevelEnergy(G4double energy) const

◆ GetMaxA()

G4int G4NuclearLevelData::GetMaxA ( G4int  Z) const

Definition at line 524 of file G4NuclearLevelData.cc.

525{
526 return (Z >= 0 && Z < ZMAX) ? AMAX[Z] : 0;
527}

◆ GetMaxLevelEnergy()

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

Definition at line 554 of file G4NuclearLevelData.cc.

555{
556 return (0 < Z && Z < ZMAX && A >= AMIN[Z] && A <= AMAX[Z]) ?
557 (G4double)(LEVELMAX[LEVELIDX[Z] + A - AMIN[Z]]) : 0.0;
558}

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

◆ GetMinA()

G4int G4NuclearLevelData::GetMinA ( G4int  Z) const

Definition at line 519 of file G4NuclearLevelData.cc.

520{
521 return (Z >= 0 && Z < ZMAX) ? AMIN[Z] : 0;
522}

◆ GetPairingCorrection() [1/2]

◆ GetPairingCorrection() [2/2]

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

Definition at line 644 of file G4NuclearLevelData.cc.

645{
646 if(fDeexPrecoParameters->GetLevelDensityFlag()) {
647 return fPairingCorrection->GetPairingCorrection(A, Z);
648 }
649 G4int N = A - Z;
650 const G4double par = 12.*CLHEP::MeV;
651 G4double x = (A <= 36) ? 6.0 : std::sqrt((G4double)A);
652 return (2 - Z + (Z/2)*2 - N + (N/2)*2)*par/x;
653}
G4double GetPairingCorrection(G4int A, G4int Z) const

◆ GetParameters()

◆ GetShellCorrection()

G4ShellCorrection * G4NuclearLevelData::GetShellCorrection ( )

Definition at line 629 of file G4NuclearLevelData.cc.

630{
631 return fShellCorrection;
632}

Referenced by G4FissionBarrier::G4FissionBarrier(), and G4LevelManager::G4LevelManager().

◆ MaxLevelEnergy()

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

Definition at line 560 of file G4NuclearLevelData.cc.

561{
562 return (0 < Z && Z < ZMAX && A >= AMIN[Z] && A <= AMAX[Z]) ?
563 (LEVELMAX[LEVELIDX[Z] + A - AMIN[Z]]) : 0.0f;
564}

◆ operator=()

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

◆ StreamLevels()

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

Definition at line 655 of file G4NuclearLevelData.cc.

657{
658 const G4LevelManager* man = GetLevelManager(Z, A);
659 if(man) {
660 os << "Level data for Z= " << Z << " A= " << A << " "
661 << man->NumberOfTransitions() + 1 << " levels \n";
662 man->StreamInfo(os);
663 }
664}
void StreamInfo(std::ostream &os) const

◆ UploadNuclearLevelData()

void G4NuclearLevelData::UploadNuclearLevelData ( G4int  Z)

Definition at line 529 of file G4NuclearLevelData.cc.

530{
531 if(fInitialized) return;
532#ifdef G4MULTITHREADED
533 G4MUTEXLOCK(&nuclearLevelDataMutex);
534#endif
535 if(!fInitialized) {
536 fInitialized = true;
537 G4int mZ = ZZ;
538 if(mZ > ZMAX) { mZ = ZMAX; }
539 for(G4int Z=1; Z<mZ; ++Z) {
540 for(G4int A=AMIN[Z]; A<=AMAX[Z]; ++A) {
541 G4int idx = A - AMIN[Z];
542 if( !(fLevelManagerFlags[Z])[idx] ) {
543 (fLevelManagers[Z])[idx] = fLevelReader->CreateLevelManager(Z, A);
544 (fLevelManagerFlags[Z])[idx] = true;
545 }
546 }
547 }
548 }
549#ifdef G4MULTITHREADED
550 G4MUTEXUNLOCK(&nuclearLevelDataMutex);
551#endif
552}

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