36 : verboseLevel(0), eventNumber(0.0), averageMultiplicity(0.0),
37 averageProtonNumber(0.0), averageNeutronNumber(0.0),
38 averagePionNumber(0.0), averageNucleonKinEnergy(0.0),
39 averageProtonKinEnergy(0.0), averageNeutronKinEnergy(0.0),
40 averagePionKinEnergy(0.0), averageExitationEnergy(0.0),
41 averageOutgoingNuclei(0.0), fissy_prob(0.0), averagePionPl(0.0),
42 averagePionMin(0.0), averagePion0(0.0), averageA(0.0), averageZ(0.0),
43 inel_csec(0.0), withNuclei(false) {
44 if (verboseLevel > 3) {
51 if (verboseLevel > 3) {
58 if (verboseLevel > 3) {
65 if (verboseLevel > 3) {
69 ana_watchers = watchers;
70 if (verboseLevel > 3) {
77 if (verboseLevel > 3) {
81 for (
G4int iw = 0; iw <
G4int(ana_watchers.size()); iw++) {
85 if (ana_watchers[iw].look_forNuclei()) ana_watchers[iw].watch(a, z);
89 if (!ana_watchers[iw].look_forNuclei()) ana_watchers[iw].watch(a, z);
97 if (verboseLevel > 3) {
105 if (nucleus.size() > 0) {
107 averageOutgoingNuclei += nucleus.size();
109 for (
G4int in = 0; in <
G4int(nucleus.size()); in++) {
110 averageExitationEnergy += nucleus[in].getExitationEnergy();
112 G4int a = nucleus[in].getA();
113 G4int z = nucleus[in].getZ();
124 if (nbig > 1) fissy_prob += 1.0;
126 const std::vector<G4InuclElementaryParticle>& particles =
128 averageMultiplicity += particles.size();
130 for (
G4int i = 0; i <
G4int(particles.size()); i++) {
134 if (particles[i].nucleon()) {
135 averageNucleonKinEnergy += particles[i].getKineticEnergy();
137 if (particles[i].type() == 1) {
140 averageProtonNumber += 1.0;
141 averageProtonKinEnergy += particles[i].getKineticEnergy();
146 averageNeutronNumber += 1.0;
147 averageNeutronKinEnergy += particles[i].getKineticEnergy();
150 }
else if (particles[i].pion()) {
151 averagePionKinEnergy += particles[i].getKineticEnergy();
152 averagePionNumber += 1.0;
155 if (particles[i].type() == 3) {
157 averagePionPl += 1.0;
159 }
else if (particles[i].type() == 5) {
161 averagePionMin += 1.0;
163 }
else if (particles[i].type() == 7) {
174 const std::vector<G4InuclElementaryParticle>& particles =
176 averageMultiplicity += particles.size();
178 for (
G4int i = 0; i <
G4int(particles.size()); i++) {
180 if (particles[i].nucleon()) {
181 averageNucleonKinEnergy += particles[i].getKineticEnergy();
183 if (particles[i].type() == 1) {
184 averageProtonNumber += 1.0;
185 averageProtonKinEnergy += particles[i].getKineticEnergy();
188 averageNeutronNumber += 1.0;
189 averageNeutronKinEnergy += particles[i].getKineticEnergy();
192 }
else if (particles[i].pion()) {
193 averagePionKinEnergy += particles[i].getKineticEnergy();
194 averagePionNumber += 1.0;
202 if (verboseLevel > 3) {
203 G4cout <<
" >>> G4Analyser::printResultsSimple" <<
G4endl;
207 <<
" average multiplicity " << averageMultiplicity / eventNumber <<
G4endl
208 <<
" average proton number " << averageProtonNumber / eventNumber <<
G4endl
209 <<
" average neutron number " << averageNeutronNumber / eventNumber <<
G4endl
210 <<
" average nucleon Ekin " << averageNucleonKinEnergy /
211 (averageProtonNumber + averageNeutronNumber) <<
G4endl
212 <<
" average proton Ekin " << averageProtonKinEnergy / (averageProtonNumber +
214 <<
" average neutron Ekin " << averageNeutronKinEnergy / (averageNeutronNumber +
216 <<
" average pion number " << averagePionNumber / eventNumber <<
G4endl
217 <<
" average pion Ekin " << averagePionKinEnergy / (averagePionNumber +
221 <<
" average Excitation Energy " <<
222 averageExitationEnergy / averageOutgoingNuclei <<
G4endl
223 <<
" average num of fragments " << averageOutgoingNuclei / eventNumber <<
G4endl;
224 G4cout <<
" fission prob. " << fissy_prob / eventNumber <<
" c.sec " <<
225 inel_csec * fissy_prob / eventNumber <<
G4endl;
231 if (verboseLevel > 3) {
236 <<
" average multiplicity " << averageMultiplicity / eventNumber <<
G4endl
237 <<
" average proton number " << averageProtonNumber / eventNumber <<
G4endl
238 <<
" average neutron number " << averageNeutronNumber / eventNumber <<
G4endl
239 <<
" average nucleon Ekin " << averageNucleonKinEnergy /
240 (averageProtonNumber + averageNeutronNumber) <<
G4endl
241 <<
" average proton Ekin " << averageProtonKinEnergy / (averageProtonNumber +
243 <<
" average neutron Ekin " << averageNeutronKinEnergy / (averageNeutronNumber +
245 <<
" average pion number " << averagePionNumber / eventNumber <<
G4endl
246 <<
" average pion Ekin " << averagePionKinEnergy / (averagePionNumber +
248 <<
" average pi+ " << averagePionPl / eventNumber <<
G4endl
249 <<
" average pi- " << averagePionMin / eventNumber <<
G4endl
250 <<
" average pi0 " << averagePion0 / eventNumber <<
G4endl;
254 <<
" average A " << averageA / eventNumber <<
G4endl
255 <<
" average Z " << averageZ / eventNumber <<
G4endl
256 <<
" average Excitation Energy " <<
257 averageExitationEnergy / averageOutgoingNuclei <<
G4endl
258 <<
" average num of fragments " << averageOutgoingNuclei / eventNumber <<
G4endl;
259 G4cout <<
" fission prob. " << fissy_prob / eventNumber <<
" c.sec " <<
260 inel_csec * fissy_prob / eventNumber <<
G4endl;
267 if (verboseLevel > 3) {
268 G4cout <<
" >>> G4Analyser::handleWatcherStatistics" <<
G4endl;
273 if (verboseLevel > 3) {
287 for (
G4int iw = 0; iw <
G4int(ana_watchers.size()); iw++) {
288 ana_watchers[iw].setInuclCs(inel_csec,
G4int(eventNumber));
289 ana_watchers[iw].print();
291 if (ana_watchers[iw].to_check()) {
292 std::pair<G4double, G4double> rat_err = ana_watchers[iw].getAverageRatio();
293 averat += rat_err.first;
294 ave_err += rat_err.second;
295 gl_chsq += ana_watchers[iw].getChsq();
296 std::pair<G4double, G4double> cs_err = ana_watchers[iw].getExpCs();
297 tot_exper += cs_err.first;
298 tot_exper_err += cs_err.second;
299 std::pair<G4double, G4double> inucl_cs_err = ana_watchers[iw].getInuclCs();
300 tot_inucl += inucl_cs_err.first;
301 tot_inucl_err += inucl_cs_err.second;
302 G4double iz_checked = ana_watchers[iw].getNmatched();
304 if (iz_checked > 0.0) {
305 fgr += ana_watchers[iw].getLhood();
306 checked += iz_checked;
312 gl_chsq = std::sqrt(gl_chsq) / checked;
315 fgr = std::pow(10.0, std::sqrt(fgr / checked));
318 if (verboseLevel > 3) {
319 G4cout <<
" total exper c.s. " << tot_exper <<
" err " << tot_exper_err <<
320 " tot inucl c.s. " << tot_inucl <<
" err " << tot_inucl_err <<
G4endl;
321 G4cout <<
" checked total " << checked <<
" lhood " << fgr <<
G4endl
322 <<
" average ratio " << averat <<
" err " << ave_err <<
G4endl
323 <<
" global chsq " << gl_chsq <<
G4endl;
329 if (verboseLevel > 3) {
330 G4cout <<
" >>> G4Analyser::printResultsNtuple" <<
G4endl;
336 std::setw(15) << int(eventNumber + 0.1) <<
337 std::setw(15) << averageMultiplicity / eventNumber <<
338 std::setw(15) << averageProtonNumber / eventNumber <<
339 std::setw(15) << averageNeutronNumber / eventNumber <<
" " <<
340 std::setw(15) << averageNucleonKinEnergy / (averageProtonNumber + averageNeutronNumber) <<
" " <<
341 std::setw(15) << averageProtonKinEnergy / (averageProtonNumber + 1.0e-10) <<
" " <<
342 std::setw(15) << averageNeutronKinEnergy / (averageNeutronNumber + 1.0e-10) <<
" " <<
343 std::setw(15) << averagePionNumber / eventNumber <<
" " <<
344 std::setw(15) << averagePionKinEnergy / (averagePionNumber + 1.0e-10) <<
G4endl;
G4GLOB_DLL std::ostream G4cout
void setInelCsec(G4double csec, G4bool withn)
void printResultsSimple()
void handleWatcherStatistics()
void printResultsNtuple()
void setWatchers(const std::vector< G4NuclWatcher > &watchers)
void analyse(const G4CollisionOutput &output)
void try_watchers(G4int a, G4int z, G4bool if_nucl)
const std::vector< G4InuclNuclei > & getOutgoingNuclei() const
const std::vector< G4InuclElementaryParticle > & getOutgoingParticles() const