#include <G4NucLevel.hh>
Public Member Functions | |
G4NucLevel (G4double energy, G4double halfLife, const std::vector< G4double > &eGamma, const std::vector< G4double > &wGamma) | |
~G4NucLevel () | |
G4double | LevelEnergy () const |
G4double | LevelHalfLife () const |
G4double | SampleEnergy () const |
Definition at line 53 of file G4NucLevel.hh.
G4NucLevel::G4NucLevel | ( | G4double | energy, | |
G4double | halfLife, | |||
const std::vector< G4double > & | eGamma, | |||
const std::vector< G4double > & | wGamma | |||
) |
Definition at line 44 of file G4NucLevel.cc.
00047 :fEnergy(energy),fHalfLifeTime(halfLife) 00048 { 00049 fTransitionEnergy = eGamma; 00050 fCumProbability = wGamma; 00051 nTransitions = wGamma.size(); 00052 }
G4NucLevel::~G4NucLevel | ( | ) |
G4double G4NucLevel::LevelEnergy | ( | ) | const [inline] |
G4double G4NucLevel::LevelHalfLife | ( | ) | const [inline] |
G4double G4NucLevel::SampleEnergy | ( | ) | const [inline] |
Definition at line 95 of file G4NucLevel.hh.
References G4UniformRand.
00096 { 00097 G4double e = 0.0; 00098 G4double x = G4UniformRand(); 00099 for(size_t i=0; i<nTransitions; ++i) { 00100 if(x < fCumProbability[i]) { 00101 e = fTransitionEnergy[i]; 00102 break; 00103 } 00104 } 00105 return e; 00106 }