#include <G4LevelManager.hh>
Definition at line 53 of file G4LevelManager.hh.
G4LevelManager::G4LevelManager |
( |
size_t |
ntrans, |
|
|
const std::vector< G4float > & |
energies, |
|
|
const std::vector< G4int > & |
spin, |
|
|
const std::vector< const G4NucLevel * > & |
levels |
|
) |
| |
Definition at line 49 of file G4LevelManager.cc.
56 nTransitions = ntrans - 1;
57 fLevelEnergy.reserve(ntrans);
58 fSpin.reserve(ntrans);
59 fLevels.reserve(ntrans);
60 for(
size_t i=0; i<ntrans; ++i) {
61 fLevelEnergy.push_back(energies[i]);
62 fSpin.push_back(spin[i]);
63 fLevels.push_back(levels[i]);
G4LevelManager::~G4LevelManager |
( |
| ) |
|
Definition at line 70 of file G4LevelManager.cc.
72 for(
size_t i=0; i<=nTransitions; ++i) {
delete fLevels[i]; }
G4int G4LevelManager::FloatingLevel |
( |
size_t |
i | ) |
const |
|
inline |
Definition at line 223 of file G4LevelManager.hh.
226 if(i > nTransitions) { PrintError(i,
"Floating"); }
228 return fSpin[i]/100000;
const G4String & G4LevelManager::FloatingType |
( |
size_t |
i | ) |
const |
Definition at line 104 of file G4LevelManager.cc.
107 if(i > nTransitions) { PrintError(i,
"Meta"); }
109 return fFloatingLevels[fSpin[i]/100000];
const G4NucLevel * G4LevelManager::GetLevel |
( |
size_t |
i | ) |
const |
|
inline |
Definition at line 132 of file G4LevelManager.hh.
135 if(i > nTransitions) { PrintError(i,
"GetLevel"); }
G4float G4LevelManager::LevelEnergy |
( |
size_t |
i | ) |
const |
|
inline |
Definition at line 140 of file G4LevelManager.hh.
143 if(i > nTransitions) { PrintError(i,
"LevelEnergy"); }
145 return fLevelEnergy[i];
G4float G4LevelManager::LifeTime |
( |
size_t |
i | ) |
const |
|
inline |
Definition at line 183 of file G4LevelManager.hh.
186 if(i > nTransitions) { PrintError(i,
"LifeTime"); }
188 return (fLevels[i]) ? fLevels[i]->GetTimeGamma() : 0.0f;
G4float G4LevelManager::LifeTimeGamma |
( |
size_t |
i | ) |
const |
|
inline |
Definition at line 191 of file G4LevelManager.hh.
194 if(i > nTransitions) { PrintError(i,
"LifeTimeGamma"); }
196 return (fLevels[i]) ? fLevels[i]->GetTimeGamma() : 0.0f;
G4float G4LevelManager::MaxLevelEnergy |
( |
| ) |
const |
|
inline |
const G4NucLevel * G4LevelManager::NearestLevel |
( |
G4double |
energy, |
|
|
size_t |
index = 0 |
|
) |
| const |
|
inline |
Definition at line 167 of file G4LevelManager.hh.
const G4NucLevel * GetLevel(size_t i) const
size_t NearestLevelIndex(G4double energy, size_t index=0) const
G4double energy(const ThreeVector &p, const G4double m)
G4float G4LevelManager::NearestLevelEnergy |
( |
G4double |
energy, |
|
|
size_t |
index = 0 |
|
) |
| const |
|
inline |
Definition at line 173 of file G4LevelManager.hh.
G4float LevelEnergy(size_t i) const
size_t NearestLevelIndex(G4double energy, size_t index=0) const
G4double energy(const ThreeVector &p, const G4double m)
size_t G4LevelManager::NearestLevelIndex |
( |
G4double |
energy, |
|
|
size_t |
index = 0 |
|
) |
| const |
Definition at line 76 of file G4LevelManager.cc.
80 size_t idx =
std::min(index, nTransitions);
82 static const G4float tolerance = 1.0f-6;
83 if(0 == nTransitions || std::fabs(energy - fLevelEnergy[idx]) <= tolerance) {
87 if(energy <= fLevelEnergy[1]*0.5f)
90 else if((fLevelEnergy[nTransitions] + fLevelEnergy[nTransitions-1])*0.5f <=
energy)
91 { idx = nTransitions; }
95 idx = std::lower_bound(fLevelEnergy.begin(), fLevelEnergy.end(),
energy)
96 - fLevelEnergy.begin() - 1;
97 if(energy - fLevelEnergy[idx] > fLevelEnergy[idx+1] - energy) { ++idx; }
G4double energy(const ThreeVector &p, const G4double m)
T min(const T t1, const T t2)
brief Return the smallest of the two arguments
Definition at line 178 of file G4LevelManager.hh.
size_t NearestLowEdgeLevelIndex(G4double energy) const
G4float LevelEnergy(size_t i) const
G4double energy(const ThreeVector &p, const G4double m)
size_t G4LevelManager::NearestLowEdgeLevelIndex |
( |
G4double |
energy | ) |
const |
|
inline |
Definition at line 153 of file G4LevelManager.hh.
157 size_t idx = nTransitions;
159 if(energy < fLevelEnergy[nTransitions]) {
160 idx = std::lower_bound(fLevelEnergy.begin(), fLevelEnergy.end(),
energy)
161 - fLevelEnergy.begin() - 1;
G4double energy(const ThreeVector &p, const G4double m)
size_t G4LevelManager::NumberOfTransitions |
( |
| ) |
const |
|
inline |
G4int G4LevelManager::Parity |
( |
size_t |
i | ) |
const |
|
inline |
Definition at line 215 of file G4LevelManager.hh.
218 if(i > nTransitions) { PrintError(i,
"Parity"); }
220 return (fSpin[i]%100000 - 100)/2;
G4int G4LevelManager::SpinParity |
( |
size_t |
i | ) |
const |
|
inline |
Definition at line 207 of file G4LevelManager.hh.
210 if(i > nTransitions) { PrintError(i,
"SpinTwo"); }
212 return fSpin[i]%100000 - 100;
G4int G4LevelManager::SpinTwo |
( |
size_t |
i | ) |
const |
|
inline |
Definition at line 199 of file G4LevelManager.hh.
202 if(i > nTransitions) { PrintError(i,
"SpinTwo"); }
204 return std::abs(fSpin[i]%100000 - 100);
The documentation for this class was generated from the following files:
- geant4.10.03.p01/source/processes/hadronic/models/de_excitation/management/include/G4LevelManager.hh
- geant4.10.03.p01/source/processes/hadronic/models/de_excitation/management/src/G4LevelManager.cc