Geant4 11.2.2
Toolkit for the simulation of the passage of particles through matter
Loading...
Searching...
No Matches
G4LevelManager Class Reference

#include <G4LevelManager.hh>

Public Member Functions

 G4LevelManager (G4int Z, G4int A, std::size_t nlev, const std::vector< G4double > &energies, const std::vector< G4int > &spin, const std::vector< const G4NucLevel * > &levels)
 
 ~G4LevelManager ()
 
std::size_t NearestLevelIndex (const G4double energy, const std::size_t index=0) const
 
std::size_t NumberOfTransitions () const
 
const G4NucLevelGetLevel (const std::size_t i) const
 
G4double LevelEnergy (const std::size_t i) const
 
G4double MaxLevelEnergy () const
 
std::size_t NearestLowEdgeLevelIndex (const G4double energy) const
 
const G4NucLevelNearestLevel (const G4double energy, const std::size_t index=0) const
 
G4double NearestLevelEnergy (const G4double energy, const std::size_t index=0) const
 
G4double NearestLowEdgeLevelEnergy (const G4double energy) const
 
G4double LifeTime (const std::size_t i) const
 
G4int TwoSpinParity (const std::size_t i) const
 
G4int Parity (const std::size_t i) const
 
G4int FloatingLevel (const std::size_t i) const
 
G4double ShellCorrection () const
 
G4double LevelDensity (const G4double U) const
 
const std::vector< G4double > & GetLevelEnergies () const
 
const std::vector< const G4NucLevel * > & GetLevels () const
 
const G4StringFloatingType (const std::size_t i) const
 
void StreamInfo (std::ostream &os) const
 
 G4LevelManager (const G4LevelManager &right)=delete
 
const G4LevelManageroperator= (const G4LevelManager &right)=delete
 
G4bool operator== (const G4LevelManager &right) const =delete
 
G4bool operator!= (const G4LevelManager &right) const =delete
 

Detailed Description

Definition at line 53 of file G4LevelManager.hh.

Constructor & Destructor Documentation

◆ G4LevelManager() [1/2]

G4LevelManager::G4LevelManager ( G4int Z,
G4int A,
std::size_t nlev,
const std::vector< G4double > & energies,
const std::vector< G4int > & spin,
const std::vector< const G4NucLevel * > & levels )
explicit

Definition at line 53 of file G4LevelManager.cc.

57 : nTransitions(0)
58{
59 if(0 < ntrans) {
60 nTransitions = ntrans - 1;
61 fLevelEnergy.reserve(ntrans);
62 fSpin.reserve(ntrans);
63 fLevels.reserve(ntrans);
64 for(std::size_t i=0; i<ntrans; ++i) {
65 fLevelEnergy.push_back(energies[i]);
66 fSpin.push_back(spin[i]);
67 fLevels.push_back(levels[i]);
68 }
69 //G4cout << "New G4LevelManager N= " << nTransitions << " "
70 //<< fLevelEnergy.size() << " <" << this << ">" << G4endl;
71 }
73 fLevelDensity = ndata->GetLevelDensity(Z, A, 0.0);
74
75 // J. Nucl. Sci. Tech. 31(2): 151-162 (1994)
76 fShellCorrection = ndata->GetShellCorrection()->GetShellCorrection(A,Z);
77 if(A > 20) {
78 G4int N = A - Z;
79 G4int In = N - (N/2)*2;
80 G4int Iz = Z - (Z/2)*2;
81 G4double a13 = 1.0/G4Pow::GetInstance()->Z13(A);
82 if(In == 0 && Iz == 0) {
83 fLevelDensity = 0.067946*A*(1.0 + 4.1277*a13);
84 } else if(In == 0 && Iz == 1) {
85 fLevelDensity = 0.053061*A*(1.0 + 7.1862*a13);
86 } else if(In == 1 && Iz == 0) {
87 fLevelDensity = 0.060920*A*(1.0 + 3.8767*a13);
88 } else {
89 fLevelDensity = 0.065291*A*(1.0 + 4.4505*a13);
90 }
91 }
92}
double G4double
Definition G4Types.hh:83
int G4int
Definition G4Types.hh:85
const G4double A[17]
static G4NuclearLevelData * GetInstance()
static G4Pow * GetInstance()
Definition G4Pow.cc:41
G4double Z13(G4int Z) const
Definition G4Pow.hh:123
#define N
Definition crc32.c:57

◆ ~G4LevelManager()

G4LevelManager::~G4LevelManager ( )

Definition at line 94 of file G4LevelManager.cc.

95{
96 for(std::size_t i=0; i<=nTransitions; ++i) { delete fLevels[i]; }
97}

◆ G4LevelManager() [2/2]

G4LevelManager::G4LevelManager ( const G4LevelManager & right)
delete

Member Function Documentation

◆ FloatingLevel()

G4int G4LevelManager::FloatingLevel ( const std::size_t i) const
inline

Definition at line 201 of file G4LevelManager.hh.

202{
203 return fSpin[i]/100000;
204}

Referenced by StreamInfo().

◆ FloatingType()

const G4String & G4LevelManager::FloatingType ( const std::size_t i) const

Definition at line 114 of file G4LevelManager.cc.

115{
116 return fFloatingLevels[fSpin[i]/100000];
117}

◆ GetLevel()

const G4NucLevel * G4LevelManager::GetLevel ( const std::size_t i) const
inline

Definition at line 141 of file G4LevelManager.hh.

142{
143 return fLevels[i];
144}

Referenced by NearestLevel().

◆ GetLevelEnergies()

const std::vector< G4double > & G4LevelManager::GetLevelEnergies ( ) const
inline

Definition at line 216 of file G4LevelManager.hh.

217{
218 return fLevelEnergy;
219}

◆ GetLevels()

const std::vector< const G4NucLevel * > & G4LevelManager::GetLevels ( ) const
inline

Definition at line 221 of file G4LevelManager.hh.

222{
223 return fLevels;
224}

◆ LevelDensity()

G4double G4LevelManager::LevelDensity ( const G4double U) const
inline

Definition at line 211 of file G4LevelManager.hh.

212{
213 return fLevelDensity;
214}

Referenced by G4NuclearLevelData::GetLevelDensity().

◆ LevelEnergy()

G4double G4LevelManager::LevelEnergy ( const std::size_t i) const
inline

Definition at line 146 of file G4LevelManager.hh.

147{
148 return fLevelEnergy[i];
149}

Referenced by G4NuclearLevelData::FindLevel(), G4FermiFragmentsPoolVI::Initialise(), NearestLevelEnergy(), and NearestLowEdgeLevelEnergy().

◆ LifeTime()

G4double G4LevelManager::LifeTime ( const std::size_t i) const
inline

Definition at line 186 of file G4LevelManager.hh.

187{
188 return (fLevels[i]) ? fLevels[i]->GetTimeGamma() : 0.0;
189}

Referenced by G4Radioactivation::CalculateChainsFromParent(), and G4FermiFragmentsPoolVI::Initialise().

◆ MaxLevelEnergy()

G4double G4LevelManager::MaxLevelEnergy ( ) const
inline

Definition at line 151 of file G4LevelManager.hh.

152{
153 return fLevelEnergy[nTransitions];
154}

Referenced by G4GEMProbabilityVI::G4GEMProbabilityVI().

◆ NearestLevel()

const G4NucLevel * G4LevelManager::NearestLevel ( const G4double energy,
const std::size_t index = 0 ) const
inline

Definition at line 168 of file G4LevelManager.hh.

169{
170 return GetLevel(NearestLevelIndex(energy, index));
171}
const G4NucLevel * GetLevel(const std::size_t i) const
std::size_t NearestLevelIndex(const G4double energy, const std::size_t index=0) const

◆ NearestLevelEnergy()

G4double G4LevelManager::NearestLevelEnergy ( const G4double energy,
const std::size_t index = 0 ) const
inline

Definition at line 174 of file G4LevelManager.hh.

176{
177 return LevelEnergy(NearestLevelIndex(energy, index));
178}
G4double LevelEnergy(const std::size_t i) const

Referenced by G4Radioactivation::CalculateChainsFromParent(), G4PhotonEvaporation::GetFinalLevelEnergy(), and G4NuclearLevelData::GetLevelEnergy().

◆ NearestLevelIndex()

std::size_t G4LevelManager::NearestLevelIndex ( const G4double energy,
const std::size_t index = 0 ) const

Definition at line 99 of file G4LevelManager.cc.

101{
102 std::size_t idx = std::min(index, nTransitions);
103 static const G4double tolerance = 10*CLHEP::eV;
104 if(0 == nTransitions || std::abs(energy - fLevelEnergy[idx]) <= tolerance) {
105 return idx;
106 }
107 idx = NearestLowEdgeLevelIndex(energy);
108 if(idx < nTransitions &&
109 (fLevelEnergy[idx] + fLevelEnergy[idx+1])*0.5 <= energy) { ++idx; }
110
111 return idx;
112}
std::size_t NearestLowEdgeLevelIndex(const G4double energy) const

Referenced by G4Radioactivation::CalculateChainsFromParent(), G4NuclearLevelData::FindLevel(), NearestLevel(), and NearestLevelEnergy().

◆ NearestLowEdgeLevelEnergy()

G4double G4LevelManager::NearestLowEdgeLevelEnergy ( const G4double energy) const
inline

Definition at line 181 of file G4LevelManager.hh.

182{
184}

Referenced by G4NuclearLevelData::GetLowEdgeLevelEnergy().

◆ NearestLowEdgeLevelIndex()

std::size_t G4LevelManager::NearestLowEdgeLevelIndex ( const G4double energy) const
inline

Definition at line 157 of file G4LevelManager.hh.

158{
159 std::size_t idx = nTransitions;
160 if(energy < fLevelEnergy[nTransitions]) {
161 idx = std::lower_bound(fLevelEnergy.begin(), fLevelEnergy.end(), energy)
162 - fLevelEnergy.begin() - 1;
163 }
164 return idx;
165}

Referenced by NearestLevelIndex(), and NearestLowEdgeLevelEnergy().

◆ NumberOfTransitions()

std::size_t G4LevelManager::NumberOfTransitions ( ) const
inline

◆ operator!=()

G4bool G4LevelManager::operator!= ( const G4LevelManager & right) const
delete

◆ operator=()

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

◆ operator==()

G4bool G4LevelManager::operator== ( const G4LevelManager & right) const
delete

◆ Parity()

G4int G4LevelManager::Parity ( const std::size_t i) const
inline

Definition at line 196 of file G4LevelManager.hh.

197{
198 return (fSpin[i]%100000 - 100 > 0) ? 1 : -1;
199}

Referenced by StreamInfo().

◆ ShellCorrection()

G4double G4LevelManager::ShellCorrection ( ) const
inline

Definition at line 206 of file G4LevelManager.hh.

207{
208 return fShellCorrection;
209}

◆ StreamInfo()

void G4LevelManager::StreamInfo ( std::ostream & os) const

Definition at line 119 of file G4LevelManager.cc.

120{
121 for(std::size_t i=0; i<=nTransitions; ++i) {
122 G4long prec = out.precision(6);
123 out << std::setw(6) << i << ". "
124 << std::setw(8) << fLevelEnergy[i];
125 if(fLevels[i]) {
126 out << std::setw(8) << fLevels[i]->GetTimeGamma()
127 << std::setw(4) << fLevels[i]->NumberOfTransitions()
128 << std::setw(4) << std::abs(TwoSpinParity(i))
129 << std::setw(4) << Parity(i)
130 << std::setw(4) << FloatingLevel(i);
131 }
132 out << "\n";
133 out.precision(prec);
134 if(fLevels[i]) { fLevels[i]->StreamInfo(out); }
135 }
136}
long G4long
Definition G4Types.hh:87
G4int FloatingLevel(const std::size_t i) const
G4int Parity(const std::size_t i) const
G4int TwoSpinParity(const std::size_t i) const

Referenced by G4NuclearLevelData::StreamLevels().

◆ TwoSpinParity()

G4int G4LevelManager::TwoSpinParity ( const std::size_t i) const
inline

Definition at line 191 of file G4LevelManager.hh.

192{
193 return fSpin[i]%100000 - 100;
194}

Referenced by G4FermiFragmentsPoolVI::Initialise(), and StreamInfo().


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