Geant4 9.6.0
Toolkit for the simulation of the passage of particles through matter
Loading...
Searching...
No Matches
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::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}

◆ ~G4NucLevel()

G4NucLevel::~G4NucLevel ( )

Definition at line 54 of file G4NucLevel.cc.

55{}

Member Function Documentation

◆ LevelEnergy()

G4double G4NucLevel::LevelEnergy ( ) const
inline

Definition at line 85 of file G4NucLevel.hh.

86{
87 return fEnergy;
88}

Referenced by G4LevelManager::NearestLevel().

◆ LevelHalfLife()

G4double G4NucLevel::LevelHalfLife ( ) const
inline

Definition at line 90 of file G4NucLevel.hh.

91{
92 return fHalfLifeTime;
93}

◆ SampleEnergy()

G4double G4NucLevel::SampleEnergy ( ) const
inline

Definition at line 95 of file G4NucLevel.hh.

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}
double G4double
Definition: G4Types.hh:64
#define G4UniformRand()
Definition: Randomize.hh:53

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