Geant4.10
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions
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.

47  :fEnergy(energy),fHalfLifeTime(halfLife)
48 {
49  fTransitionEnergy = eGamma;
50  fCumProbability = wGamma;
51  nTransitions = wGamma.size();
52 }
double precision function energy(A, Z)
Definition: dpm25nuc6.f:4106
G4NucLevel::~G4NucLevel ( )

Definition at line 54 of file G4NucLevel.cc.

55 {}

Member Function Documentation

G4double G4NucLevel::LevelEnergy ( ) const
inline

Definition at line 85 of file G4NucLevel.hh.

Referenced by G4LevelManager::NearestLevel().

86 {
87  return fEnergy;
88 }
G4double G4NucLevel::LevelHalfLife ( ) const
inline

Definition at line 90 of file G4NucLevel.hh.

91 {
92  return fHalfLifeTime;
93 }
G4double G4NucLevel::SampleEnergy ( ) const
inline

Definition at line 95 of file G4NucLevel.hh.

References G4UniformRand, and test::x.

96 {
97  G4double e = 0.0;
99  for(size_t i=0; i<nTransitions; ++i) {
100  if(x < fCumProbability[i]) {
101  e = fTransitionEnergy[i];
102  break;
103  }
104  }
105  return e;
106 }
#define G4UniformRand()
Definition: Randomize.hh:87
double G4double
Definition: G4Types.hh:76

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