Geant4  10.02.p03
G4NuclearLevel Class Reference

#include <G4NuclearLevel.hh>

Collaboration diagram for G4NuclearLevel:

Public Member Functions

 G4NuclearLevel (G4double energy, G4double halfLife, G4double angularMomentum, const std::vector< G4double > &eGamma, const std::vector< G4double > &wGamma, const std::vector< G4double > &polarities, const std::vector< G4double > &kCC, const std::vector< G4double > &l1CC, const std::vector< G4double > &l2CC, const std::vector< G4double > &l3CC, const std::vector< G4double > &m1CC, const std::vector< G4double > &m2CC, const std::vector< G4double > &m3CC, const std::vector< G4double > &m4CC, const std::vector< G4double > &m5CC, const std::vector< G4double > &nPlusCC, const std::vector< G4double > &totalCC)
 
 ~G4NuclearLevel ()
 
const std::vector< G4double > & GammaEnergies () const
 
const std::vector< G4double > & GammaWeights () const
 
const std::vector< G4double > & GammaProbabilities () const
 
const std::vector< G4double > & GammaCumulativeProbabilities () const
 
const std::vector< G4double > & GammaPolarities () const
 
const std::vector< G4double > & KConvertionProbabilities () const
 
const std::vector< G4double > & L1ConvertionProbabilities () const
 
const std::vector< G4double > & L2ConvertionProbabilities () const
 
const std::vector< G4double > & L3ConvertionProbabilities () const
 
const std::vector< G4double > & M1ConvertionProbabilities () const
 
const std::vector< G4double > & M2ConvertionProbabilities () const
 
const std::vector< G4double > & M3ConvertionProbabilities () const
 
const std::vector< G4double > & M4ConvertionProbabilities () const
 
const std::vector< G4double > & M5ConvertionProbabilities () const
 
const std::vector< G4double > & NPlusConvertionProbabilities () const
 
const std::vector< G4double > & TotalConvertionProbabilities () const
 
G4double Energy () const
 
G4double AngularMomentum () const
 
G4double HalfLife () const
 
G4int NumberOfGammas () const
 
void PrintAll () const
 
void PrintLevels () const
 
G4bool operator== (const G4NuclearLevel &right) const
 
G4bool operator!= (const G4NuclearLevel &right) const
 
G4bool operator< (const G4NuclearLevel &right) const
 
G4NuclearLeveloperator= (const G4NuclearLevel &right)
 
 G4NuclearLevel (const G4NuclearLevel &right)
 

Private Member Functions

 G4NuclearLevel ()
 
 G4NuclearLevel (G4double energy, G4double halfLife, G4double angularMomentum)
 
void Finalize ()
 
void MakeProbabilities ()
 
void MakeCumProb ()
 
G4int Increment (G4int aF)
 

Private Attributes

std::vector< G4double_energies
 
std::vector< G4double_weights
 
std::vector< G4double_prob
 
std::vector< G4double_cumProb
 
std::vector< G4double_polarities
 
std::vector< G4double_kCC
 
std::vector< G4double_l1CC
 
std::vector< G4double_l2CC
 
std::vector< G4double_l3CC
 
std::vector< G4double_m1CC
 
std::vector< G4double_m2CC
 
std::vector< G4double_m3CC
 
std::vector< G4double_m4CC
 
std::vector< G4double_m5CC
 
std::vector< G4double_nPlusCC
 
std::vector< G4double_totalCC
 
G4double _energy
 
G4double _halfLife
 
G4double _angularMomentum
 
G4int _nGammas
 

Friends

class G4NuclearLevelManager
 

Detailed Description

Definition at line 65 of file G4NuclearLevel.hh.

Constructor & Destructor Documentation

◆ G4NuclearLevel() [1/4]

G4NuclearLevel::G4NuclearLevel ( G4double  energy,
G4double  halfLife,
G4double  angularMomentum,
const std::vector< G4double > &  eGamma,
const std::vector< G4double > &  wGamma,
const std::vector< G4double > &  polarities,
const std::vector< G4double > &  kCC,
const std::vector< G4double > &  l1CC,
const std::vector< G4double > &  l2CC,
const std::vector< G4double > &  l3CC,
const std::vector< G4double > &  m1CC,
const std::vector< G4double > &  m2CC,
const std::vector< G4double > &  m3CC,
const std::vector< G4double > &  m4CC,
const std::vector< G4double > &  m5CC,
const std::vector< G4double > &  nPlusCC,
const std::vector< G4double > &  totalCC 
)

Definition at line 85 of file G4NuclearLevel.cc.

97  : _energies(eGamma), _weights(wGamma), _polarities(polarities),
98  _kCC(kCC), _l1CC(l1CC), _l2CC(l2CC), _l3CC(l3CC),
99  _m1CC(m1CC), _m2CC(m2CC), _m3CC(m3CC), _m4CC(m4CC), _m5CC(m5CC),
100  _nPlusCC(nPlusCC), _totalCC(totalCC),
101  _energy(energy), _halfLife(halfLife), _angularMomentum(angularMomentum)
102 {
103  Finalize();
104  // G4cout << "####### Incrementing "<<Increment(1)<<G4endl;
105 }
std::vector< G4double > _m3CC
std::vector< G4double > _m1CC
G4double _angularMomentum
std::vector< G4double > _l3CC
std::vector< G4double > _weights
std::vector< G4double > _polarities
std::vector< G4double > _m5CC
double energy
Definition: plottest35.C:25
std::vector< G4double > _l1CC
std::vector< G4double > _nPlusCC
std::vector< G4double > _energies
std::vector< G4double > _m2CC
std::vector< G4double > _kCC
std::vector< G4double > _m4CC
std::vector< G4double > _l2CC
std::vector< G4double > _totalCC
Here is the call graph for this function:

◆ ~G4NuclearLevel()

G4NuclearLevel::~G4NuclearLevel ( )

Definition at line 107 of file G4NuclearLevel.cc.

108 {
109  // G4cout << "####### Decrementing "<<Increment(-1)<<G4endl;
110 }

◆ G4NuclearLevel() [2/4]

G4NuclearLevel::G4NuclearLevel ( const G4NuclearLevel right)

Definition at line 325 of file G4NuclearLevel.cc.

326 {
327  _energies = right._energies;
328  _weights =right._weights;
329  _prob =right._prob;
330  _cumProb =right._cumProb;
331  _polarities =right._polarities;
332  _kCC = right._kCC;
333  _l1CC =right._l1CC;
334  _l2CC =right._l2CC;
335  _l3CC =right._l3CC;
336  _m1CC = right._m1CC;
337  _m2CC = right._m2CC;
338  _m3CC = right._m3CC;
339  _m4CC = right._m4CC;
340  _m5CC = right._m5CC;
341  _nPlusCC = right._nPlusCC;
342  _totalCC = right._totalCC;
343  _energy = right._energy;
344  _halfLife = right._halfLife;
346  _nGammas = right._nGammas;
347 }
std::vector< G4double > _m3CC
std::vector< G4double > _m1CC
std::vector< G4double > _cumProb
G4double _angularMomentum
std::vector< G4double > _l3CC
std::vector< G4double > _weights
std::vector< G4double > _polarities
std::vector< G4double > _m5CC
std::vector< G4double > _l1CC
std::vector< G4double > _prob
std::vector< G4double > _nPlusCC
std::vector< G4double > _energies
std::vector< G4double > _m2CC
std::vector< G4double > _kCC
std::vector< G4double > _m4CC
std::vector< G4double > _l2CC
std::vector< G4double > _totalCC

◆ G4NuclearLevel() [3/4]

G4NuclearLevel::G4NuclearLevel ( )
private

Definition at line 73 of file G4NuclearLevel.cc.

74  : _energy(0.), _halfLife(0.), _angularMomentum(0.), _nGammas(0) {
75  // G4cout << "####### Incrementing "<<Increment(1)<<G4endl;
76 }
G4double _angularMomentum

◆ G4NuclearLevel() [4/4]

G4NuclearLevel::G4NuclearLevel ( G4double  energy,
G4double  halfLife,
G4double  angularMomentum 
)
private

Definition at line 78 of file G4NuclearLevel.cc.

80  : _energy(energy), _halfLife(halfLife), _angularMomentum(angularMomentum),
81  _nGammas(0) {
82  // G4cout << "####### Incrementing "<<Increment(1)<<G4endl;
83 }
G4double _angularMomentum
double energy
Definition: plottest35.C:25

Member Function Documentation

◆ AngularMomentum()

G4double G4NuclearLevel::AngularMomentum ( ) const

Definition at line 217 of file G4NuclearLevel.cc.

218 {
219  return _angularMomentum;
220 }
G4double _angularMomentum

◆ Energy()

G4double G4NuclearLevel::Energy ( ) const

Definition at line 212 of file G4NuclearLevel.cc.

213 {
214  return _energy;
215 }
Here is the caller graph for this function:

◆ Finalize()

void G4NuclearLevel::Finalize ( )
private

Definition at line 258 of file G4NuclearLevel.cc.

258  {
259  _nGammas = _energies.size();
261  MakeCumProb();
262 }
std::vector< G4double > _energies
void MakeProbabilities()
Here is the call graph for this function:
Here is the caller graph for this function:

◆ GammaCumulativeProbabilities()

const std::vector< G4double > & G4NuclearLevel::GammaCumulativeProbabilities ( ) const

Definition at line 146 of file G4NuclearLevel.cc.

147 {
148  return _cumProb;
149 }
std::vector< G4double > _cumProb
Here is the caller graph for this function:

◆ GammaEnergies()

const std::vector< G4double > & G4NuclearLevel::GammaEnergies ( ) const

Definition at line 129 of file G4NuclearLevel.cc.

130 {
131  return _energies;
132 }
std::vector< G4double > _energies
Here is the caller graph for this function:

◆ GammaPolarities()

const std::vector< G4double > & G4NuclearLevel::GammaPolarities ( ) const

Definition at line 152 of file G4NuclearLevel.cc.

153 {
154  return _polarities;
155 }
std::vector< G4double > _polarities

◆ GammaProbabilities()

const std::vector< G4double > & G4NuclearLevel::GammaProbabilities ( ) const

Definition at line 140 of file G4NuclearLevel.cc.

141 {
142  return _prob;
143 }
std::vector< G4double > _prob

◆ GammaWeights()

const std::vector< G4double > & G4NuclearLevel::GammaWeights ( ) const

Definition at line 134 of file G4NuclearLevel.cc.

135 {
136  return _weights;
137 }
std::vector< G4double > _weights
Here is the caller graph for this function:

◆ HalfLife()

G4double G4NuclearLevel::HalfLife ( ) const

Definition at line 222 of file G4NuclearLevel.cc.

223 {
224  return _halfLife;
225 }
Here is the caller graph for this function:

◆ Increment()

G4int G4NuclearLevel::Increment ( G4int  aF)
private

Definition at line 66 of file G4NuclearLevel.cc.

67 {
68  static G4ThreadLocal G4int instanceCount = 0;
69  instanceCount+=aF;
70  return instanceCount;
71 }
#define G4ThreadLocal
Definition: tls.hh:89
int G4int
Definition: G4Types.hh:78

◆ KConvertionProbabilities()

const std::vector< G4double > & G4NuclearLevel::KConvertionProbabilities ( ) const

Definition at line 157 of file G4NuclearLevel.cc.

158 {
159  return _kCC;
160 }
std::vector< G4double > _kCC
Here is the caller graph for this function:

◆ L1ConvertionProbabilities()

const std::vector< G4double > & G4NuclearLevel::L1ConvertionProbabilities ( ) const

Definition at line 162 of file G4NuclearLevel.cc.

163 {
164  return _l1CC;
165 }
std::vector< G4double > _l1CC
Here is the caller graph for this function:

◆ L2ConvertionProbabilities()

const std::vector< G4double > & G4NuclearLevel::L2ConvertionProbabilities ( ) const

Definition at line 167 of file G4NuclearLevel.cc.

168 {
169  return _l2CC;
170 }
std::vector< G4double > _l2CC
Here is the caller graph for this function:

◆ L3ConvertionProbabilities()

const std::vector< G4double > & G4NuclearLevel::L3ConvertionProbabilities ( ) const

Definition at line 172 of file G4NuclearLevel.cc.

173 {
174  return _l3CC;
175 }
std::vector< G4double > _l3CC
Here is the caller graph for this function:

◆ M1ConvertionProbabilities()

const std::vector< G4double > & G4NuclearLevel::M1ConvertionProbabilities ( ) const

Definition at line 177 of file G4NuclearLevel.cc.

178 {
179  return _m1CC;
180 }
std::vector< G4double > _m1CC
Here is the caller graph for this function:

◆ M2ConvertionProbabilities()

const std::vector< G4double > & G4NuclearLevel::M2ConvertionProbabilities ( ) const

Definition at line 182 of file G4NuclearLevel.cc.

183 {
184  return _m2CC;
185 }
std::vector< G4double > _m2CC
Here is the caller graph for this function:

◆ M3ConvertionProbabilities()

const std::vector< G4double > & G4NuclearLevel::M3ConvertionProbabilities ( ) const

Definition at line 187 of file G4NuclearLevel.cc.

188 {
189  return _m3CC;
190 }
std::vector< G4double > _m3CC
Here is the caller graph for this function:

◆ M4ConvertionProbabilities()

const std::vector< G4double > & G4NuclearLevel::M4ConvertionProbabilities ( ) const

Definition at line 192 of file G4NuclearLevel.cc.

193 {
194  return _m4CC;
195 }
std::vector< G4double > _m4CC
Here is the caller graph for this function:

◆ M5ConvertionProbabilities()

const std::vector< G4double > & G4NuclearLevel::M5ConvertionProbabilities ( ) const

Definition at line 197 of file G4NuclearLevel.cc.

198 {
199  return _m5CC;
200 }
std::vector< G4double > _m5CC
Here is the caller graph for this function:

◆ MakeCumProb()

void G4NuclearLevel::MakeCumProb ( )
private

Definition at line 282 of file G4NuclearLevel.cc.

283 {
284  if (_nGammas <= 0) return;
285 
286  _cumProb.reserve(_nGammas);
287 
288  G4double sum = _prob[0];
289  _cumProb.push_back(sum);
290 
291  for (G4int i=1; i<_nGammas; i++) {
292  sum += _prob[i];
293  _cumProb.push_back(sum);
294  }
295 }
std::vector< G4double > _cumProb
int G4int
Definition: G4Types.hh:78
std::vector< G4double > _prob
double G4double
Definition: G4Types.hh:76
Here is the caller graph for this function:

◆ MakeProbabilities()

void G4NuclearLevel::MakeProbabilities ( )
private

Definition at line 264 of file G4NuclearLevel.cc.

265 {
266  G4double sum = 0.;
267  G4int i = 0;
268  for (i=0; i<_nGammas; i++) {
269  sum += _weights[i]*(1.+_totalCC[i]);
270  }
271 
272  if (sum <= 0.) _prob.resize(_nGammas, 1./_nGammas); // Fast fill
273  else {
274  _prob.reserve(_nGammas);
275  for (i=0; i<_nGammas; i++) {
276  _prob.push_back(_weights[i]*(1.+_totalCC[i])/sum);
277  }
278  }
279 }
std::vector< G4double > _weights
int G4int
Definition: G4Types.hh:78
std::vector< G4double > _prob
double G4double
Definition: G4Types.hh:76
std::vector< G4double > _totalCC
Here is the caller graph for this function:

◆ NPlusConvertionProbabilities()

const std::vector< G4double > & G4NuclearLevel::NPlusConvertionProbabilities ( ) const

Definition at line 202 of file G4NuclearLevel.cc.

203 {
204  return _nPlusCC;
205 }
std::vector< G4double > _nPlusCC

◆ NumberOfGammas()

G4int G4NuclearLevel::NumberOfGammas ( ) const

Definition at line 227 of file G4NuclearLevel.cc.

228 {
229  return _nGammas;
230 }
Here is the caller graph for this function:

◆ operator!=()

G4bool G4NuclearLevel::operator!= ( const G4NuclearLevel right) const

Definition at line 118 of file G4NuclearLevel.cc.

119 {
120  return (this != (G4NuclearLevel *) &right);
121 }

◆ operator<()

G4bool G4NuclearLevel::operator< ( const G4NuclearLevel right) const

Definition at line 123 of file G4NuclearLevel.cc.

124 {
125  if (_energy < right.Energy()) return true;
126  else return false;
127 }
G4double Energy() const
Here is the call graph for this function:

◆ operator=()

G4NuclearLevel & G4NuclearLevel::operator= ( const G4NuclearLevel right)

Definition at line 297 of file G4NuclearLevel.cc.

298 {
299  if(this != &right)
300  {
301  _energies = right._energies;
302  _weights =right._weights;
303  _prob =right._prob;
304  _cumProb =right._cumProb;
305  _polarities =right._polarities;
306  _kCC = right._kCC;
307  _l1CC =right._l1CC;
308  _l2CC =right._l2CC;
309  _l3CC =right._l3CC;
310  _m1CC = right._m1CC;
311  _m2CC = right._m2CC;
312  _m3CC = right._m3CC;
313  _m4CC = right._m4CC;
314  _m5CC = right._m5CC;
315  _nPlusCC = right._nPlusCC;
316  _totalCC = right._totalCC;
317  _energy = right._energy;
318  _halfLife = right._halfLife;
320  _nGammas = right._nGammas;
321  }
322  return *this;
323 }
std::vector< G4double > _m3CC
std::vector< G4double > _m1CC
std::vector< G4double > _cumProb
G4double _angularMomentum
std::vector< G4double > _l3CC
std::vector< G4double > _weights
std::vector< G4double > _polarities
std::vector< G4double > _m5CC
std::vector< G4double > _l1CC
std::vector< G4double > _prob
std::vector< G4double > _nPlusCC
std::vector< G4double > _energies
std::vector< G4double > _m2CC
std::vector< G4double > _kCC
std::vector< G4double > _m4CC
std::vector< G4double > _l2CC
std::vector< G4double > _totalCC

◆ operator==()

G4bool G4NuclearLevel::operator== ( const G4NuclearLevel right) const

Definition at line 112 of file G4NuclearLevel.cc.

113 {
114  return (this == (G4NuclearLevel *) &right);
115 }

◆ PrintAll()

void G4NuclearLevel::PrintAll ( void  ) const

Definition at line 232 of file G4NuclearLevel.cc.

233 {
234  G4cout << "---- Level energy = " << _energy << ", angular momentum = "
235  << _angularMomentum << ", half life " << _halfLife
236  << ", " << _nGammas << " photons" << G4endl;
237  G4int i;
238  G4cout << " Gammas: ";
239  for (i=0; i<_nGammas; i++) { G4cout << _energies[i] << " "; }
240  G4cout << G4endl << " Weights: ";
241  for (i=0; i<_nGammas; i++) { G4cout << _weights[i] << " "; }
242  G4cout << G4endl << " Relative transition probabilities ";
243  for (i=0; i<_nGammas; i++) { G4cout << _prob[i] << " "; }
244  G4cout << G4endl << " Cumulative probabilities: ";
245  for (i=0; i<_nGammas; i++) { G4cout << _cumProb[i] << " "; }
246  G4cout << G4endl << " Polarities: ";
247  for (i=0; i<_nGammas; i++) { G4cout << _polarities[i] << " "; }
248  G4cout << G4endl;
249 }
std::vector< G4double > _cumProb
G4double _angularMomentum
std::vector< G4double > _weights
std::vector< G4double > _polarities
int G4int
Definition: G4Types.hh:78
G4GLOB_DLL std::ostream G4cout
std::vector< G4double > _prob
std::vector< G4double > _energies
#define G4endl
Definition: G4ios.hh:61
Here is the caller graph for this function:

◆ PrintLevels()

void G4NuclearLevel::PrintLevels ( ) const

Definition at line 251 of file G4NuclearLevel.cc.

252 {
253  G4cout << " Eexc(MeV)= " << _energy
254  << " Time(ns)= " << _halfLife/ns << " Ntrans= " << _nGammas
255  << G4endl;
256 }
G4GLOB_DLL std::ostream G4cout
#define G4endl
Definition: G4ios.hh:61
#define ns
Definition: xmlparse.cc:614
Here is the caller graph for this function:

◆ TotalConvertionProbabilities()

const std::vector< G4double > & G4NuclearLevel::TotalConvertionProbabilities ( ) const

Definition at line 207 of file G4NuclearLevel.cc.

208 {
209  return _totalCC;
210 }
std::vector< G4double > _totalCC
Here is the caller graph for this function:

Friends And Related Function Documentation

◆ G4NuclearLevelManager

friend class G4NuclearLevelManager
friend

Definition at line 134 of file G4NuclearLevel.hh.

Member Data Documentation

◆ _angularMomentum

G4double G4NuclearLevel::_angularMomentum
private

Definition at line 167 of file G4NuclearLevel.hh.

◆ _cumProb

std::vector<G4double> G4NuclearLevel::_cumProb
private

Definition at line 151 of file G4NuclearLevel.hh.

◆ _energies

std::vector<G4double> G4NuclearLevel::_energies
private

Definition at line 148 of file G4NuclearLevel.hh.

◆ _energy

G4double G4NuclearLevel::_energy
private

Definition at line 165 of file G4NuclearLevel.hh.

◆ _halfLife

G4double G4NuclearLevel::_halfLife
private

Definition at line 166 of file G4NuclearLevel.hh.

◆ _kCC

std::vector<G4double> G4NuclearLevel::_kCC
private

Definition at line 153 of file G4NuclearLevel.hh.

◆ _l1CC

std::vector<G4double> G4NuclearLevel::_l1CC
private

Definition at line 154 of file G4NuclearLevel.hh.

◆ _l2CC

std::vector<G4double> G4NuclearLevel::_l2CC
private

Definition at line 155 of file G4NuclearLevel.hh.

◆ _l3CC

std::vector<G4double> G4NuclearLevel::_l3CC
private

Definition at line 156 of file G4NuclearLevel.hh.

◆ _m1CC

std::vector<G4double> G4NuclearLevel::_m1CC
private

Definition at line 157 of file G4NuclearLevel.hh.

◆ _m2CC

std::vector<G4double> G4NuclearLevel::_m2CC
private

Definition at line 158 of file G4NuclearLevel.hh.

◆ _m3CC

std::vector<G4double> G4NuclearLevel::_m3CC
private

Definition at line 159 of file G4NuclearLevel.hh.

◆ _m4CC

std::vector<G4double> G4NuclearLevel::_m4CC
private

Definition at line 160 of file G4NuclearLevel.hh.

◆ _m5CC

std::vector<G4double> G4NuclearLevel::_m5CC
private

Definition at line 161 of file G4NuclearLevel.hh.

◆ _nGammas

G4int G4NuclearLevel::_nGammas
private

Definition at line 168 of file G4NuclearLevel.hh.

◆ _nPlusCC

std::vector<G4double> G4NuclearLevel::_nPlusCC
private

Definition at line 162 of file G4NuclearLevel.hh.

◆ _polarities

std::vector<G4double> G4NuclearLevel::_polarities
private

Definition at line 152 of file G4NuclearLevel.hh.

◆ _prob

std::vector<G4double> G4NuclearLevel::_prob
private

Definition at line 150 of file G4NuclearLevel.hh.

◆ _totalCC

std::vector<G4double> G4NuclearLevel::_totalCC
private

Definition at line 163 of file G4NuclearLevel.hh.

◆ _weights

std::vector<G4double> G4NuclearLevel::_weights
private

Definition at line 149 of file G4NuclearLevel.hh.


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