67 static G4int instanceCount = 0;
73 : _energy(0.), _halfLife(0.), _angularMomentum(0.), _nGammas(0) {
79 : _energy(energy), _halfLife(halfLife), _angularMomentum(angularMomentum),
86 const std::vector<G4double>& eGamma,
87 const std::vector<G4double>& wGamma,
88 const std::vector<G4double>& polarities,
89 const std::vector<G4double>& kCC,
const std::vector<G4double>& l1CC,
90 const std::vector<G4double>& l2CC,
const std::vector<G4double>& l3CC,
91 const std::vector<G4double>& m1CC,
const std::vector<G4double>& m2CC,
92 const std::vector<G4double>& m3CC,
const std::vector<G4double>& m4CC,
93 const std::vector<G4double>& m5CC,
const std::vector<G4double>& nPlusCC,
94 const std::vector<G4double>& totalCC)
96 : _energies(eGamma), _weights(wGamma), _polarities(polarities),
97 _kCC(kCC), _l1CC(l1CC), _l2CC(l2CC), _l3CC(l3CC),
98 _m1CC(m1CC), _m2CC(m2CC), _m3CC(m3CC), _m4CC(m4CC), _m5CC(m5CC),
99 _nPlusCC(nPlusCC), _totalCC(totalCC),
100 _energy(energy), _halfLife(halfLife), _angularMomentum(angularMomentum)
124 if (_energy < right.
Energy())
return true;
218 return _angularMomentum;
234 G4cout <<
"---- Level energy = " << _energy <<
", angular momentum = "
235 << _angularMomentum <<
", half life " << _halfLife
236 <<
", " << _nGammas <<
" photons" <<
G4endl;
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] <<
" "; }
254 void G4NuclearLevel::Finalize() {
255 _nGammas = _energies.size();
261 void G4NuclearLevel::MakeProbabilities()
265 for (i=0; i<_nGammas; i++) {
266 sum += _weights[i]*(1.+_totalCC[i]);
269 if (sum <= 0.) _prob.resize(_nGammas, 1./_nGammas);
271 _prob.reserve(_nGammas);
272 for (i=0; i<_nGammas; i++) {
273 _prob.push_back(_weights[i]*(1.+_totalCC[i])/sum);
279 void G4NuclearLevel::MakeCumProb()
281 if (_nGammas <= 0)
return;
283 _cumProb.reserve(_nGammas);
286 _cumProb.push_back(sum);
288 for (
G4int i=1; i<_nGammas; i++) {
290 _cumProb.push_back(sum);
298 _energies = right._energies;
299 _weights =right._weights;
301 _cumProb =right._cumProb;
302 _polarities =right._polarities;
312 _nPlusCC = right._nPlusCC;
313 _totalCC = right._totalCC;
314 _energy = right._energy;
315 _halfLife = right._halfLife;
316 _angularMomentum = right._angularMomentum;
317 _nGammas = right._nGammas;
324 _energies = right._energies;
325 _weights =right._weights;
327 _cumProb =right._cumProb;
328 _polarities =right._polarities;
338 _nPlusCC = right._nPlusCC;
339 _totalCC = right._totalCC;
340 _energy = right._energy;
341 _halfLife = right._halfLife;
342 _angularMomentum = right._angularMomentum;
343 _nGammas = right._nGammas;