Geant4  10.02.p03
G4NucLevel Class Reference

#include <G4NucLevel.hh>

Collaboration diagram for G4NucLevel:

Public Member Functions

 G4NucLevel (const std::vector< G4float > &eTransition, const std::vector< G4float > &wLevelGamma, const std::vector< G4float > &wLevelGammaE, const std::vector< G4float > &wGamma, const std::vector< G4int > &vTrans, const std::vector< const std::vector< G4float > *> &wShell)
 
 ~G4NucLevel ()
 
size_t NumberOfTransitions () const
 
G4bool IsXLevel () const
 
G4float FinalExcitationEnergy (size_t idx) const
 
G4float GammaProbability (size_t idx) const
 
G4int TransitionType (size_t idx) const
 
size_t SampleGammaTransition (G4double rndm) const
 
size_t SampleGammaETransition (G4double rndm) const
 
size_t SampleShell (size_t idx, G4double rndm) const
 

Private Member Functions

 G4NucLevel (const G4NucLevel &right)
 
G4bool operator== (const G4NucLevel &right) const
 
G4bool operator!= (const G4NucLevel &right) const
 
G4bool operator< (const G4NucLevel &right) const
 
const G4NucLeveloperator= (const G4NucLevel &right)
 

Private Attributes

std::vector< G4floatfFinalEnergy
 
std::vector< G4floatfGammaCumProbability
 
std::vector< G4floatfGammaECumProbability
 
std::vector< G4floatfGammaProbability
 
std::vector< G4intfTrans
 
const std::vector< const std::vector< G4float > * > fShellProbability
 
size_t length
 

Detailed Description

Definition at line 53 of file G4NucLevel.hh.

Constructor & Destructor Documentation

◆ G4NucLevel() [1/2]

G4NucLevel::G4NucLevel ( const std::vector< G4float > &  eTransition,
const std::vector< G4float > &  wLevelGamma,
const std::vector< G4float > &  wLevelGammaE,
const std::vector< G4float > &  wGamma,
const std::vector< G4int > &  vTrans,
const std::vector< const std::vector< G4float > *> &  wShell 
)

Definition at line 45 of file G4NucLevel.cc.

51  :fFinalEnergy(eTransition),fGammaCumProbability(wLevelGamma),
52  fGammaECumProbability(wLevelGammaE),fGammaProbability(wGamma),
53  fTrans(vTrans),fShellProbability(wShell)
54 {
55  length = eTransition.size();
56 }
size_t length
Definition: G4NucLevel.hh:96
std::vector< G4int > fTrans
Definition: G4NucLevel.hh:94
std::vector< G4float > fGammaProbability
Definition: G4NucLevel.hh:93
std::vector< G4float > fGammaCumProbability
Definition: G4NucLevel.hh:91
const std::vector< const std::vector< G4float > * > fShellProbability
Definition: G4NucLevel.hh:95
std::vector< G4float > fFinalEnergy
Definition: G4NucLevel.hh:90
std::vector< G4float > fGammaECumProbability
Definition: G4NucLevel.hh:92

◆ ~G4NucLevel()

G4NucLevel::~G4NucLevel ( )

Definition at line 58 of file G4NucLevel.cc.

59 {
60  //G4cout << "G4NucLevel: length= " << length << " "
61  // << fGammaProbability.size() << G4endl;
62  for(size_t i=0; i<length; ++i) {
63  delete fShellProbability[i];
64  }
65 }
size_t length
Definition: G4NucLevel.hh:96
const std::vector< const std::vector< G4float > * > fShellProbability
Definition: G4NucLevel.hh:95

◆ G4NucLevel() [2/2]

G4NucLevel::G4NucLevel ( const G4NucLevel right)
private

Member Function Documentation

◆ FinalExcitationEnergy()

G4float G4NucLevel::FinalExcitationEnergy ( size_t  idx) const
inline

Definition at line 109 of file G4NucLevel.hh.

110 {
111  assert(idx < length);
112  return fFinalEnergy[idx];
113 }
size_t length
Definition: G4NucLevel.hh:96
std::vector< G4float > fFinalEnergy
Definition: G4NucLevel.hh:90
Here is the caller graph for this function:

◆ GammaProbability()

G4float G4NucLevel::GammaProbability ( size_t  idx) const
inline

Definition at line 115 of file G4NucLevel.hh.

116 {
117  assert(idx < length);
118  return fGammaProbability[idx];
119 }
size_t length
Definition: G4NucLevel.hh:96
std::vector< G4float > fGammaProbability
Definition: G4NucLevel.hh:93
Here is the caller graph for this function:

◆ IsXLevel()

G4bool G4NucLevel::IsXLevel ( ) const
inline

Definition at line 104 of file G4NucLevel.hh.

105 {
106  return (1 == fTrans[0]);
107 }
std::vector< G4int > fTrans
Definition: G4NucLevel.hh:94
Here is the caller graph for this function:

◆ NumberOfTransitions()

size_t G4NucLevel::NumberOfTransitions ( ) const
inline

Definition at line 99 of file G4NucLevel.hh.

100 {
101  return length;
102 }
size_t length
Definition: G4NucLevel.hh:96
Here is the caller graph for this function:

◆ operator!=()

G4bool G4NucLevel::operator!= ( const G4NucLevel right) const
private

◆ operator<()

G4bool G4NucLevel::operator< ( const G4NucLevel right) const
private

◆ operator=()

const G4NucLevel& G4NucLevel::operator= ( const G4NucLevel right)
private

◆ operator==()

G4bool G4NucLevel::operator== ( const G4NucLevel right) const
private

◆ SampleGammaETransition()

size_t G4NucLevel::SampleGammaETransition ( G4double  rndm) const
inline

Definition at line 137 of file G4NucLevel.hh.

138 {
139  G4float x = (G4float)rndm;
140  size_t idx = 0;
141  for(; idx<length; ++idx) {
142  if(x <= fGammaECumProbability[idx]) { break; }
143  }
144  return idx;
145 }
size_t length
Definition: G4NucLevel.hh:96
float G4float
Definition: G4Types.hh:77
std::vector< G4float > fGammaECumProbability
Definition: G4NucLevel.hh:92
Here is the caller graph for this function:

◆ SampleGammaTransition()

size_t G4NucLevel::SampleGammaTransition ( G4double  rndm) const
inline

Definition at line 127 of file G4NucLevel.hh.

128 {
129  G4float x = (G4float)rndm;
130  size_t idx = 0;
131  for(; idx<length; ++idx) {
132  if(x <= fGammaCumProbability[idx]) { break; }
133  }
134  return idx;
135 }
size_t length
Definition: G4NucLevel.hh:96
float G4float
Definition: G4Types.hh:77
std::vector< G4float > fGammaCumProbability
Definition: G4NucLevel.hh:91
Here is the caller graph for this function:

◆ SampleShell()

size_t G4NucLevel::SampleShell ( size_t  idx,
G4double  rndm 
) const
inline

Definition at line 147 of file G4NucLevel.hh.

148 {
149  assert(idx < length);
150  const std::vector<G4float>* prob = fShellProbability[idx];
151  size_t i = 0;
152  if(prob) {
153  size_t nn = prob->size();
154  G4float x = (G4float)rndm;
155  for(; i<nn; ++i) { if(x <= (*prob)[i]) { break; } }
156  }
157  return i;
158 }
size_t length
Definition: G4NucLevel.hh:96
float G4float
Definition: G4Types.hh:77
const std::vector< const std::vector< G4float > * > fShellProbability
Definition: G4NucLevel.hh:95
Here is the caller graph for this function:

◆ TransitionType()

G4int G4NucLevel::TransitionType ( size_t  idx) const
inline

Definition at line 121 of file G4NucLevel.hh.

122 {
123  assert(idx < length);
124  return fTrans[idx];
125 }
size_t length
Definition: G4NucLevel.hh:96
std::vector< G4int > fTrans
Definition: G4NucLevel.hh:94

Member Data Documentation

◆ fFinalEnergy

std::vector<G4float> G4NucLevel::fFinalEnergy
private

Definition at line 90 of file G4NucLevel.hh.

◆ fGammaCumProbability

std::vector<G4float> G4NucLevel::fGammaCumProbability
private

Definition at line 91 of file G4NucLevel.hh.

◆ fGammaECumProbability

std::vector<G4float> G4NucLevel::fGammaECumProbability
private

Definition at line 92 of file G4NucLevel.hh.

◆ fGammaProbability

std::vector<G4float> G4NucLevel::fGammaProbability
private

Definition at line 93 of file G4NucLevel.hh.

◆ fShellProbability

const std::vector<const std::vector<G4float>*> G4NucLevel::fShellProbability
private

Definition at line 95 of file G4NucLevel.hh.

◆ fTrans

std::vector<G4int> G4NucLevel::fTrans
private

Definition at line 94 of file G4NucLevel.hh.

◆ length

size_t G4NucLevel::length
private

Definition at line 96 of file G4NucLevel.hh.


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