41 const std::vector<G4double>& expa,
42 const std::vector<G4double>& expcs,
43 const std::vector<G4double>& experr,
46 : nuclz(z), izotop_chsq(0.), average_ratio(0.), aver_rat_err(0.),
47 aver_lhood(0.), aver_matched(0.), exper_as(expa), exper_cs(expcs),
48 exper_err(experr), checkable(check), nucleable(nucl) {}
53 if (std::abs(z-nuclz) >= small)
return;
56 G4int simulatedAsSize = simulated_as.size();
57 for (
G4int i = 0; i<simulatedAsSize && !here; i++) {
58 if (std::abs(simulated_as[i] - a) < small) {
59 simulated_cs[i] += 1.0;
65 simulated_as.push_back(a);
66 simulated_cs.push_back(1.0);
71 G4int simulatedAsSize = simulated_as.size();
72 for(
G4int i = 0; i < simulatedAsSize ; i++) {
73 double err = std::sqrt(simulated_cs[i]) / simulated_cs[i];
75 simulated_prob.push_back(simulated_cs[i] / nev);
76 simulated_cs[i] *= csec / nev;
77 simulated_errors.push_back(simulated_cs[i] * err);
85 G4int experAsSize = exper_as.size();
86 for(
G4int iz = 0; iz < experAsSize; iz++) {
91 return std::pair<G4double, G4double>(cs, err);
97 G4int simulatedAsSize = simulated_as.size();
98 for(
G4int iz = 0; iz < simulatedAsSize; iz++) {
99 cs += simulated_cs[iz];
100 err += simulated_errors[iz];
103 return std::pair<G4double, G4double>(cs, err);
109 G4cout <<
"\n ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ "
110 <<
"\n **** izotop Z **** " << nuclz <<
G4endl;
119 std::vector<G4bool> not_used(simulated_cs.size(),
true);
120 G4int nmatched = exper_as.size();
121 G4int nused = simulated_cs.size();
123 G4int experAsSize = exper_as.size();
125 for (
G4int iz = 0; iz < experAsSize; iz++) {
128 exp_cs += exper_cs[iz];
129 exp_cs_err += exper_err[iz];
132 G4int simulatedAsSize = simulated_as.size();
133 for (
G4int i = 0; i<simulatedAsSize && !found; i++) {
134 if (std::fabs(simulated_as[i] - a) < small) {
135 G4double rat = simulated_cs[i] / exper_cs[iz];
137 lhood += std::log10(rat) * std::log10(rat);
140 = std::sqrt(simulated_errors[i]*simulated_errors[i] +
141 exper_err[iz]*exper_err[iz] * rat*rat) / exper_cs[iz];
142 average_ratio += rat;
143 aver_rat_err += rat_err;
145 G4cout <<
" A " << a <<
" exp.cs " << exper_cs[iz] <<
" err "
146 << exper_err[iz] << G4endl <<
" sim. cs " << simulated_cs[i]
147 <<
" err " << simulated_errors[i] << G4endl
148 <<
" ratio " << rat <<
" err " << rat_err << G4endl
149 <<
" simulated production rate " << simulated_prob[i] <<
G4endl;
152 izotop_chsq += (rat - 1.0) * (rat - 1.0) / rat_err / rat_err;
158 if (found) nmatched--;
160 G4cout <<
" not found exper.: A " << a <<
" exp.cs " << exper_cs[iz]
161 <<
" err " << exper_err[iz] <<
G4endl;
164 G4cout <<
" not found in simulations " << nmatched << G4endl
165 <<
" not found in exper: " << nused <<
G4endl;
167 G4int simulatedAsSize = simulated_as.size();
168 for(
G4int i = 0; i < simulatedAsSize; i++) {
169 inucl_cs += simulated_cs[i];
170 inucl_cs_err += simulated_errors[i];
173 G4cout <<
" extra simul.: A " << simulated_as[i] <<
" sim. cs "
174 << simulated_cs[i] <<
" err " << simulated_errors[i] <<
G4endl;
176 G4cout <<
" simulated production rate " << simulated_prob[i] <<
G4endl;
179 G4int matched = exper_as.size() - nmatched;
183 aver_matched = matched;
184 lhood = std::pow(10.0, std::sqrt(lhood/matched));
186 G4cout <<
" matched " << matched <<
" CHSQ " << std::sqrt(izotop_chsq) / matched
188 <<
" raw chsq " << izotop_chsq << G4endl
189 <<
" average ratio " << average_ratio / matched
190 <<
" err " << aver_rat_err / matched << G4endl
191 <<
" lhood " << lhood <<
G4endl;
198 G4cout <<
" exper. cs " << exp_cs <<
" err " << exp_cs_err << G4endl
199 <<
" inucl. cs " << inucl_cs <<
" err " << inucl_cs_err << G4endl
200 <<
" ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ "
G4NuclWatcher(G4int z, const std::vector< G4double > &expa, const std::vector< G4double > &expcs, const std::vector< G4double > &experr, G4bool check, G4bool nucl)
std::pair< G4double, G4double > getInuclCs() const
void setInuclCs(G4double csec, G4int nev)
G4GLOB_DLL std::ostream G4cout
std::pair< G4double, G4double > getExpCs() const
void watch(G4int a, G4int z)