Geant4 11.2.2
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 Zlim)
 
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 449 of file G4NuclearLevelData.cc.

450{
451 delete fLevelReader;
452 delete fDeexPrecoParameters;
453 delete fShellCorrection;
454 delete fPairingCorrection;
455 for(G4int Z=1; Z<ZMAX; ++Z) {
456 size_t nn = (fLevelManagers[Z]).size();
457 for(size_t j=0; j<nn; ++j) {
458 delete (fLevelManagers[Z])[j];
459 }
460 }
461}
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 480 of file G4NuclearLevelData.cc.

481{
482 G4bool res = false;
483 if(Z > 0 && Z < ZMAX && A >= AMIN[Z] && A <= AMAX[Z]) {
484 G4AutoLock l(&nuclearLevelDataMutex);
485 const G4LevelManager* newman = fLevelReader->MakeLevelManager(Z, A, fname);
486 // if file is corrupted G4LevelReader should make the exception
487 if(newman != nullptr) {
488 res = true;
489 if(0 < fDeexPrecoParameters->GetVerbose()) {
490 G4cout << "G4NuclearLevelData::AddPrivateData for Z= " << Z
491 << " A= " << A << " from <" << fname
492 << "> is done" << G4endl;
493 }
494 const G4int idx = A - AMIN[Z];
495 delete (fLevelManagers[Z])[idx];
496 (fLevelManagers[Z])[idx] = newman;
497 (fLevelManagerFlags[Z])[idx] = true;
498 }
499 l.unlock();
500 } else {
502 ed << "private nuclear level data for Z= " << Z << " A= " << A
503 << " outside allowed limits ";
504 G4Exception("G4NuclearLevelData::AddPrivateData","had0433",FatalException,
505 ed,"Stop execution");
506 }
507 return res;
508}
@ FatalException
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *description)
std::ostringstream G4ExceptionDescription
bool G4bool
Definition G4Types.hh:86
const G4double A[17]
#define G4endl
Definition G4ios.hh:67
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 579 of file G4NuclearLevelData.cc.

581{
582 G4double T = ekin;
583 G4double E2 = (Mass - partMass)*(Mass - partMass);
584 G4double Eex = std::sqrt(E2 - 2.0*Mass*T) - resMass;
585 if(Eex <= GetMaxLevelEnergy(Z, A)) {
586 if(Eex <= 0.0) {
587 Eex = 0.0;
588 T = (E2 - resMass*resMass)*0.5/Mass;
589 } else {
590 const G4LevelManager* man = GetLevelManager(Z, A);
591 if(man != nullptr) {
592 size_t idx = man->NearestLevelIndex(Eex, man->NumberOfTransitions());
593 for(;;) {
594 Eex = (G4double)man->LevelEnergy(idx);
595 T = (E2 - (resMass+Eex)*(resMass+Eex))*0.5/Mass;
596 if(T >= 0.0 || 0 == idx) { break; }
597 --idx;
598 }
599 }
600 }
601 T = std::max(T, 0.0);
602 }
603 return T;
604}
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 G4NeutronRadCaptureHP::BuildPhysicsTable(), G4Radioactivation::CalculateChainsFromParent(), G4GNASHTransitions::CalculateProbability(), LBE::ConstructGeneral(), G4CompetitiveFission::G4CompetitiveFission(), G4Evaporation::G4Evaporation(), G4EvaporationChannel::G4EvaporationChannel(), G4EvaporationLevelDensityParameter::G4EvaporationLevelDensityParameter(), G4FissionBarrier::G4FissionBarrier(), G4FissionLevelDensityParameter::G4FissionLevelDensityParameter(), G4FissionLevelDensityParameterINCLXX::G4FissionLevelDensityParameterINCLXX(), G4FissionProbability::G4FissionProbability(), G4GEMChannel::G4GEMChannel(), G4GEMChannelVI::G4GEMChannelVI(), G4GEMProbability::G4GEMProbability(), G4GNASHTransitions::G4GNASHTransitions(), G4IonINCLXXPhysics::G4IonINCLXXPhysics(), G4IonPhysicsPHP::G4IonPhysicsPHP(), G4IonQMDPhysics::G4IonQMDPhysics(), G4LevelManager::G4LevelManager(), G4LightIonQMDPhysics::G4LightIonQMDPhysics(), G4PhotonEvaporation::G4PhotonEvaporation(), G4PreCompoundEmission::G4PreCompoundEmission(), G4PreCompoundModel::G4PreCompoundModel(), G4PreCompoundTransitions::G4PreCompoundTransitions(), G4RadioactiveDecayPhysics::G4RadioactiveDecayPhysics(), G4UnstableFragmentBreakUp::G4UnstableFragmentBreakUp(), G4VEmissionProbability::G4VEmissionProbability(), G4VPreCompoundFragment::G4VPreCompoundFragment(), G4ExcitationHandler::Initialise(), G4FermiBreakUpVI::Initialise(), G4FermiFragmentsPoolVI::Initialise(), G4NeutronFissionVI::InitialiseModel(), G4NeutronRadCapture::InitialiseModel(), G4PhysListUtil::InitialiseParameters(), G4RadioactiveDecayMessenger::SetNewValue(), and G4RadioactiveDecay::StreamInfo().

◆ GetLevelDensity()

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

◆ GetLevelEnergy()

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

Definition at line 553 of file G4NuclearLevelData.cc.

554{
555 G4double e = energy;
556 if(e <= GetMaxLevelEnergy(Z, A)) {
557 const G4LevelManager* man = GetLevelManager(Z, A);
558 if(man != nullptr) {
559 e = (G4double)man->NearestLevelEnergy(e, man->NumberOfTransitions());
560 }
561 }
562 return e;
563}
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 464 of file G4NuclearLevelData.cc.

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

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

◆ GetLowEdgeLevelEnergy()

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

Definition at line 566 of file G4NuclearLevelData.cc.

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

◆ GetMaxA()

G4int G4NuclearLevelData::GetMaxA ( G4int Z) const

Definition at line 515 of file G4NuclearLevelData.cc.

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

Referenced by G4FermiFragmentsPoolVI::Initialise().

◆ GetMaxLevelEnergy()

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

Definition at line 541 of file G4NuclearLevelData.cc.

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

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

◆ GetMinA()

G4int G4NuclearLevelData::GetMinA ( G4int Z) const

Definition at line 510 of file G4NuclearLevelData.cc.

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

Referenced by G4FermiFragmentsPoolVI::Initialise().

◆ GetPairingCorrection() [1/2]

◆ GetPairingCorrection() [2/2]

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

Definition at line 631 of file G4NuclearLevelData.cc.

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

◆ GetParameters()

◆ GetShellCorrection()

G4ShellCorrection * G4NuclearLevelData::GetShellCorrection ( )

Definition at line 616 of file G4NuclearLevelData.cc.

617{
618 return fShellCorrection;
619}

Referenced by G4FissionBarrier::G4FissionBarrier().

◆ MaxLevelEnergy()

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

Definition at line 547 of file G4NuclearLevelData.cc.

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

◆ operator=()

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

◆ StreamLevels()

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

Definition at line 642 of file G4NuclearLevelData.cc.

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

◆ UploadNuclearLevelData()

void G4NuclearLevelData::UploadNuclearLevelData ( G4int Zlim)

Definition at line 520 of file G4NuclearLevelData.cc.

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

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