G4NucLevel Class Reference

#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


Detailed Description

Definition at line 53 of file G4NucLevel.hh.


Constructor & Destructor Documentation

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 (  ) 

Definition at line 54 of file G4NucLevel.cc.

00055 {}


Member Function Documentation

G4double G4NucLevel::LevelEnergy (  )  const [inline]

Definition at line 85 of file G4NucLevel.hh.

Referenced by G4LevelManager::NearestLevel().

00086 {
00087   return fEnergy;
00088 }

G4double G4NucLevel::LevelHalfLife (  )  const [inline]

Definition at line 90 of file G4NucLevel.hh.

00091 {
00092   return fHalfLifeTime;
00093 }

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 }


The documentation for this class was generated from the following files:
Generated on Mon May 27 17:52:45 2013 for Geant4 by  doxygen 1.4.7