46 #ifndef G4LEVELMANAGER_HH
47 #define G4LEVELMANAGER_HH 1
63 const std::vector<G4float>& energies,
64 const std::vector<G4int>& spin,
65 const std::vector<const G4NucLevel*>& levels);
108 void PrintError(
size_t idx,
const G4String&)
const;
116 std::vector<G4float> fLevelEnergy;
117 std::vector<G4int> fSpin;
118 std::vector<const G4NucLevel*> fLevels;
122 static const G4int nfloting = 13;
123 static G4String fFloatingLevels[nfloting];
135 if(i > nTransitions) { PrintError(i,
"GetLevel"); }
143 if(i > nTransitions) { PrintError(i,
"LevelEnergy"); }
145 return fLevelEnergy[i];
150 return fLevelEnergy[nTransitions];
157 size_t idx = nTransitions;
159 if(energy < fLevelEnergy[nTransitions]) {
160 idx = std::lower_bound(fLevelEnergy.begin(), fLevelEnergy.end(),
energy)
161 - fLevelEnergy.begin() - 1;
186 if(i > nTransitions) { PrintError(i,
"LifeTime"); }
188 return (fLevels[i]) ? fLevels[i]->GetTimeGamma() : 0.0f;
194 if(i > nTransitions) { PrintError(i,
"LifeTimeGamma"); }
196 return (fLevels[i]) ? fLevels[i]->GetTimeGamma() : 0.0f;
202 if(i > nTransitions) { PrintError(i,
"SpinTwo"); }
204 return std::abs(fSpin[i]%100000 - 100);
210 if(i > nTransitions) { PrintError(i,
"SpinTwo"); }
212 return fSpin[i]%100000 - 100;
218 if(i > nTransitions) { PrintError(i,
"Parity"); }
220 return (fSpin[i]%100000 - 100)/2;
226 if(i > nTransitions) { PrintError(i,
"Floating"); }
228 return fSpin[i]/100000;
size_t NearestLowEdgeLevelIndex(G4double energy) const
G4int SpinTwo(size_t i) const
G4int SpinParity(size_t i) const
G4float LifeTime(size_t i) const
const G4NucLevel * NearestLevel(G4double energy, size_t index=0) const
const G4NucLevel * GetLevel(size_t i) const
G4float LevelEnergy(size_t i) const
size_t NumberOfTransitions() const
G4float NearestLevelEnergy(G4double energy, size_t index=0) const
size_t NearestLevelIndex(G4double energy, size_t index=0) const
G4double energy(const ThreeVector &p, const G4double m)
G4int FloatingLevel(size_t i) const
G4LevelManager(size_t ntrans, const std::vector< G4float > &energies, const std::vector< G4int > &spin, const std::vector< const G4NucLevel * > &levels)
G4float LifeTimeGamma(size_t i) const
G4float MaxLevelEnergy() const
const G4String & FloatingType(size_t i) const
G4int Parity(size_t i) const
G4float NearestLowEdgeLevelEnergy(G4double energy) const