Geant4-11
Public Member Functions | Private Member Functions | Private Attributes
G4NucLevel Class Reference

#include <G4NucLevel.hh>

Public Member Functions

size_t FinalExcitationIndex (size_t idx) const
 
 G4NucLevel (size_t ntrans, G4double tgamma, const std::vector< G4int > &vTrans, const std::vector< G4float > &wLevelGamma, const std::vector< G4float > &wGamma, const std::vector< G4float > &vRatio, const std::vector< const std::vector< G4float > * > &wShell)
 
G4float GammaCumProbability (size_t idx) const
 
G4float GammaProbability (size_t idx) const
 
G4double GetTimeGamma () const
 
G4float MultipolarityRatio (size_t idx) const
 
size_t NumberOfTransitions () const
 
size_t SampleGammaTransition (G4double rndm) const
 
G4int SampleShell (size_t idx, G4double rndm) const
 
const std::vector< G4float > * ShellProbabilty (size_t idx) const
 
void StreamInfo (std::ostream &os) const
 
G4int TransitionType (size_t idx) const
 
 ~G4NucLevel ()
 

Private Member Functions

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

Private Attributes

std::vector< G4floatfGammaCumProbability
 
std::vector< G4floatfGammaProbability
 
std::vector< G4floatfMpRatio
 
std::vector< const std::vector< G4float > * > fShellProbability
 
G4double fTimeGamma
 
std::vector< G4intfTrans
 
size_t length
 

Detailed Description

Definition at line 52 of file G4NucLevel.hh.

Constructor & Destructor Documentation

◆ G4NucLevel() [1/2]

G4NucLevel::G4NucLevel ( size_t  ntrans,
G4double  tgamma,
const std::vector< G4int > &  vTrans,
const std::vector< G4float > &  wLevelGamma,
const std::vector< G4float > &  wGamma,
const std::vector< G4float > &  vRatio,
const std::vector< const std::vector< G4float > * > &  wShell 
)
explicit

Definition at line 46 of file G4NucLevel.cc.

52 : length(ntrans), fTimeGamma(tgamma)
53{
54 if(0 < length) {
55 fTrans.reserve(length);
58 fMpRatio.reserve(length);
60 for(size_t i=0; i<length; ++i) {
61 fTrans.push_back(vTrans[i]);
62 fGammaCumProbability.push_back(wLevelGamma[i]);
63 fGammaProbability.push_back(wGamma[i]);
64 fMpRatio.push_back(vRatio[i]);
65 fShellProbability.push_back(wShell[i]);
66 }
67 }
68}
size_t length
Definition: G4NucLevel.hh:98
std::vector< G4int > fTrans
Definition: G4NucLevel.hh:101
std::vector< G4float > fGammaCumProbability
Definition: G4NucLevel.hh:102
G4double fTimeGamma
Definition: G4NucLevel.hh:99
std::vector< G4float > fGammaProbability
Definition: G4NucLevel.hh:103
std::vector< const std::vector< G4float > * > fShellProbability
Definition: G4NucLevel.hh:105
std::vector< G4float > fMpRatio
Definition: G4NucLevel.hh:104

References fGammaCumProbability, fGammaProbability, fMpRatio, fShellProbability, fTrans, and length.

◆ ~G4NucLevel()

G4NucLevel::~G4NucLevel ( )

Definition at line 70 of file G4NucLevel.cc.

71{
72 for(size_t i=0; i<length; ++i) {
73 delete fShellProbability[i];
74 }
75}

References fShellProbability, and length.

◆ G4NucLevel() [2/2]

G4NucLevel::G4NucLevel ( const G4NucLevel right)
privatedelete

Member Function Documentation

◆ FinalExcitationIndex()

size_t G4NucLevel::FinalExcitationIndex ( size_t  idx) const
inline

Definition at line 113 of file G4NucLevel.hh.

114{
115#ifdef G4VERBOSE
116 if(idx >= length) { PrintError(idx, "FinalExcitationIndex(idx)"); }
117#endif
118 return (size_t)(fTrans[idx]/10000);
119}

References fTrans, and length.

Referenced by G4PhotonEvaporation::GenerateGamma(), and StreamInfo().

◆ GammaCumProbability()

G4float G4NucLevel::GammaCumProbability ( size_t  idx) const
inline

Definition at line 142 of file G4NucLevel.hh.

143{
144#ifdef G4VERBOSE
145 if(idx >= length) { PrintError(idx, "GammaCumProbability(idx)"); }
146#endif
147 return fGammaCumProbability[idx];
148}

References fGammaCumProbability, and length.

◆ GammaProbability()

G4float G4NucLevel::GammaProbability ( size_t  idx) const
inline

Definition at line 134 of file G4NucLevel.hh.

135{
136#ifdef G4VERBOSE
137 if(idx >= length) { PrintError(idx, "GammaProbability(idx)"); }
138#endif
139 return fGammaProbability[idx];
140}

References fGammaProbability, and length.

Referenced by G4PhotonEvaporation::GenerateGamma().

◆ GetTimeGamma()

G4double G4NucLevel::GetTimeGamma ( ) const
inline

Definition at line 129 of file G4NucLevel.hh.

130{
131 return fTimeGamma;
132}

References fTimeGamma.

◆ MultipolarityRatio()

G4float G4NucLevel::MultipolarityRatio ( size_t  idx) const
inline

Definition at line 150 of file G4NucLevel.hh.

151{
152#ifdef G4VERBOSE
153 if(idx >= length) { PrintError(idx, "MultipolarityRatio(idx)"); }
154#endif
155 return fMpRatio[idx];
156}

References fMpRatio, and length.

Referenced by G4PhotonEvaporation::GenerateGamma().

◆ NumberOfTransitions()

size_t G4NucLevel::NumberOfTransitions ( ) const
inline

Definition at line 108 of file G4NucLevel.hh.

109{
110 return length;
111}

References length.

Referenced by G4PhotonEvaporation::GenerateGamma().

◆ operator!=()

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

◆ operator<()

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

◆ operator=()

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

◆ operator==()

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

◆ SampleGammaTransition()

size_t G4NucLevel::SampleGammaTransition ( G4double  rndm) const
inline

Definition at line 158 of file G4NucLevel.hh.

159{
160 G4float x = (G4float)rndm;
161 size_t idx = 0;
162 for(; idx<length; ++idx) {
163 if(x <= fGammaCumProbability[idx]) { break; }
164 }
165 return idx;
166}
float G4float
Definition: G4Types.hh:84

References fGammaCumProbability, and length.

Referenced by G4PhotonEvaporation::GenerateGamma().

◆ SampleShell()

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

Definition at line 168 of file G4NucLevel.hh.

169{
170#ifdef G4VERBOSE
171 if(idx >= length) { PrintError(idx, "SampleShell(idx,rndm)"); }
172#endif
173 const std::vector<G4float>* prob = fShellProbability[idx];
174 G4int i(-1);
175 if(prob) {
176 G4int nn = prob->size();
177 G4float x = (G4float)rndm;
178 for(i=0; i<nn; ++i) { if(x <= (*prob)[i]) { break; } }
179 }
180 return i;
181}
int G4int
Definition: G4Types.hh:85

References fShellProbability, length, and G4InuclParticleNames::nn.

Referenced by G4PhotonEvaporation::GenerateGamma().

◆ ShellProbabilty()

const std::vector< G4float > * G4NucLevel::ShellProbabilty ( size_t  idx) const
inline

Definition at line 184 of file G4NucLevel.hh.

185{
186#ifdef G4VERBOSE
187 if(idx >= length) { PrintError(idx, "ShellProbability(idx)"); }
188#endif
189 return fShellProbability[idx];
190}

References fShellProbability, and length.

◆ StreamInfo()

void G4NucLevel::StreamInfo ( std::ostream &  os) const

Definition at line 96 of file G4NucLevel.cc.

97{
98 G4int prec = out.precision(4);
99 for(size_t i=0; i<length; ++i) {
100 out << std::setw(12) << FinalExcitationIndex(i)
101 << std::setw(4) << TransitionType(i)
102 << std::setw(7) << fMpRatio[i]
103 << std::setw(7) << fGammaCumProbability[i]
104 << std::setw(7) << fGammaProbability[i]
105 << "\n";
106 const std::vector<G4float>* vec = fShellProbability[i];
107 if(vec) {
108 size_t len = vec->size();
109 out << " ";
110 for(size_t j=0; j<len; ++j) { out << std::setw(7) << (*vec)[j]; }
111 out << "\n";
112 }
113 }
114 out.precision(prec);
115}
G4int TransitionType(size_t idx) const
Definition: G4NucLevel.hh:121
size_t FinalExcitationIndex(size_t idx) const
Definition: G4NucLevel.hh:113
static const double prec
Definition: RanecuEngine.cc:61

References fGammaCumProbability, fGammaProbability, FinalExcitationIndex(), fMpRatio, fShellProbability, length, CLHEP::prec, and TransitionType().

◆ TransitionType()

G4int G4NucLevel::TransitionType ( size_t  idx) const
inline

Definition at line 121 of file G4NucLevel.hh.

122{
123#ifdef G4VERBOSE
124 if(idx >= length) { PrintError(idx, "TransitionType(idx)"); }
125#endif
126 return fTrans[idx]%10000;
127}

References fTrans, and length.

Referenced by G4PhotonEvaporation::GenerateGamma(), and StreamInfo().

Field Documentation

◆ fGammaCumProbability

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

Definition at line 102 of file G4NucLevel.hh.

Referenced by G4NucLevel(), GammaCumProbability(), SampleGammaTransition(), and StreamInfo().

◆ fGammaProbability

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

Definition at line 103 of file G4NucLevel.hh.

Referenced by G4NucLevel(), GammaProbability(), and StreamInfo().

◆ fMpRatio

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

Definition at line 104 of file G4NucLevel.hh.

Referenced by G4NucLevel(), MultipolarityRatio(), and StreamInfo().

◆ fShellProbability

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

Definition at line 105 of file G4NucLevel.hh.

Referenced by G4NucLevel(), SampleShell(), ShellProbabilty(), StreamInfo(), and ~G4NucLevel().

◆ fTimeGamma

G4double G4NucLevel::fTimeGamma
private

Definition at line 99 of file G4NucLevel.hh.

Referenced by GetTimeGamma().

◆ fTrans

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

Definition at line 101 of file G4NucLevel.hh.

Referenced by FinalExcitationIndex(), G4NucLevel(), and TransitionType().

◆ length

size_t G4NucLevel::length
private

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