47 const std::vector<G4int>& vTrans,
48 const std::vector<G4float>& wLevelGamma,
49 const std::vector<G4float>& wGamma,
50 const std::vector<G4float>& vRatio,
51 const std::vector<
const std::vector<G4float>*>& wShell)
52 : length(ntrans), fTimeGamma(tgamma)
55 fTrans.reserve(length);
56 fGammaCumProbability.reserve(length);
57 fGammaProbability.reserve(length);
58 fMpRatio.reserve(length);
59 fShellProbability.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]);
72 for(
size_t i=0; i<length; ++i) {
73 delete fShellProbability[i];
78void G4NucLevel::PrintError(
size_t idx,
const G4String& ss)
const
80 G4cout <<
"G4NucLevel::PrintError: length= " << length <<
G4endl;
81 for(
size_t i=0; i<length; ++i) {
82 G4cout << i <<
". " << fTrans[i]
83 << fGammaCumProbability[i] <<
" " << fTimeGamma <<
" "
84 << fGammaProbability[i] <<
" "
87 G4String sss =
"G4NucLevel::"+ss+
"()";
89 ed <<
"Index of a level " << idx <<
" >= "
90 << length <<
" (number of transitions)";
98 G4int prec = out.precision(4);
99 for(
size_t i=0; i<length; ++i) {
102 << std::setw(7) << fMpRatio[i]
103 << std::setw(7) << fGammaCumProbability[i]
104 << std::setw(7) << fGammaProbability[i]
106 const std::vector<G4float>* vec = fShellProbability[i];
108 size_t len = vec->size();
110 for(
size_t j=0; j<len; ++j) { out << std::setw(7) << (*vec)[j]; }
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *description)
std::ostringstream G4ExceptionDescription
G4GLOB_DLL std::ostream G4cout
G4int TransitionType(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)
void StreamInfo(std::ostream &os) const
size_t FinalExcitationIndex(size_t idx) const