37 : verboseLevel(0), eventNumber(0.0), averageMultiplicity(0.0),
38 averageProtonNumber(0.0), averageNeutronNumber(0.0),
39 averagePionNumber(0.0), averageNucleonKinEnergy(0.0),
40 averageProtonKinEnergy(0.0), averageNeutronKinEnergy(0.0),
41 averagePionKinEnergy(0.0), averageExitationEnergy(0.0),
42 averageOutgoingNuclei(0.0), fissy_prob(0.0), averagePionPl(0.0),
43 averagePionMin(0.0), averagePion0(0.0), averageA(0.0), averageZ(0.0),
44 inel_csec(0.0), withNuclei(false) {
45 if (verboseLevel > 3) {
52 if (verboseLevel > 3) {
59 if (verboseLevel > 3) {
66 if (verboseLevel > 3) {
70 ana_watchers = watchers;
71 if (verboseLevel > 3) {
78 if (verboseLevel > 3) {
82 for (
G4int iw = 0; iw <
G4int(ana_watchers.size()); iw++) {
86 if (ana_watchers[iw].look_forNuclei()) ana_watchers[iw].watch(a, z);
90 if (!ana_watchers[iw].look_forNuclei()) ana_watchers[iw].watch(a, z);
98 if (verboseLevel > 3) {
106 if (nucleus.size() > 0) {
108 averageOutgoingNuclei += nucleus.size();
110 for (
G4int in = 0; in <
G4int(nucleus.size()); in++) {
111 averageExitationEnergy += nucleus[in].getExitationEnergy();
113 G4int a = nucleus[in].getA();
114 G4int z = nucleus[in].getZ();
125 if (nbig > 1) fissy_prob += 1.0;
127 const std::vector<G4InuclElementaryParticle>& particles =
129 averageMultiplicity += particles.size();
131 for (
G4int i = 0; i <
G4int(particles.size()); i++) {
136 averageNucleonKinEnergy += particles[i].getKineticEnergy();
138 if (particles[i].type() == 1) {
141 averageProtonNumber += 1.0;
142 averageProtonKinEnergy += particles[i].getKineticEnergy();
147 averageNeutronNumber += 1.0;
148 averageNeutronKinEnergy += particles[i].getKineticEnergy();
151 }
else if (particles[i].
pion()) {
152 averagePionKinEnergy += particles[i].getKineticEnergy();
153 averagePionNumber += 1.0;
156 if (particles[i].type() == 3) {
158 averagePionPl += 1.0;
160 }
else if (particles[i].type() == 5) {
162 averagePionMin += 1.0;
164 }
else if (particles[i].type() == 7) {
175 const std::vector<G4InuclElementaryParticle>& particles =
177 averageMultiplicity += particles.size();
179 for (
G4int i = 0; i <
G4int(particles.size()); i++) {
182 averageNucleonKinEnergy += particles[i].getKineticEnergy();
184 if (particles[i].type() == 1) {
185 averageProtonNumber += 1.0;
186 averageProtonKinEnergy += particles[i].getKineticEnergy();
189 averageNeutronNumber += 1.0;
190 averageNeutronKinEnergy += particles[i].getKineticEnergy();
193 }
else if (particles[i].
pion()) {
194 averagePionKinEnergy += particles[i].getKineticEnergy();
195 averagePionNumber += 1.0;
203 if (verboseLevel > 3) {
204 G4cout <<
" >>> G4Analyser::printResultsSimple" <<
G4endl;
208 <<
" average multiplicity " << averageMultiplicity / eventNumber <<
G4endl
209 <<
" average proton number " << averageProtonNumber / eventNumber <<
G4endl
210 <<
" average neutron number " << averageNeutronNumber / eventNumber <<
G4endl
211 <<
" average nucleon Ekin " << averageNucleonKinEnergy /
212 (averageProtonNumber + averageNeutronNumber) <<
G4endl
213 <<
" average proton Ekin " << averageProtonKinEnergy / (averageProtonNumber +
215 <<
" average neutron Ekin " << averageNeutronKinEnergy / (averageNeutronNumber +
217 <<
" average pion number " << averagePionNumber / eventNumber <<
G4endl
218 <<
" average pion Ekin " << averagePionKinEnergy / (averagePionNumber +
222 <<
" average Exitation Energy " <<
223 averageExitationEnergy / averageOutgoingNuclei <<
G4endl
224 <<
" average num of fragments " << averageOutgoingNuclei / eventNumber <<
G4endl;
225 G4cout <<
" fission prob. " << fissy_prob / eventNumber <<
" c.sec " <<
226 inel_csec * fissy_prob / eventNumber <<
G4endl;
232 if (verboseLevel > 3) {
237 <<
" average multiplicity " << averageMultiplicity / eventNumber <<
G4endl
238 <<
" average proton number " << averageProtonNumber / eventNumber <<
G4endl
239 <<
" average neutron number " << averageNeutronNumber / eventNumber <<
G4endl
240 <<
" average nucleon Ekin " << averageNucleonKinEnergy /
241 (averageProtonNumber + averageNeutronNumber) <<
G4endl
242 <<
" average proton Ekin " << averageProtonKinEnergy / (averageProtonNumber +
244 <<
" average neutron Ekin " << averageNeutronKinEnergy / (averageNeutronNumber +
246 <<
" average pion number " << averagePionNumber / eventNumber <<
G4endl
247 <<
" average pion Ekin " << averagePionKinEnergy / (averagePionNumber +
249 <<
" average pi+ " << averagePionPl / eventNumber <<
G4endl
250 <<
" average pi- " << averagePionMin / eventNumber <<
G4endl
251 <<
" average pi0 " << averagePion0 / eventNumber <<
G4endl;
255 <<
" average A " << averageA / eventNumber << G4endl
256 <<
" average Z " << averageZ / eventNumber << G4endl
257 <<
" average Exitation Energy " <<
258 averageExitationEnergy / averageOutgoingNuclei << G4endl
259 <<
" average num of fragments " << averageOutgoingNuclei / eventNumber <<
G4endl;
260 G4cout <<
" fission prob. " << fissy_prob / eventNumber <<
" c.sec " <<
261 inel_csec * fissy_prob / eventNumber <<
G4endl;
268 if (verboseLevel > 3) {
269 G4cout <<
" >>> G4Analyser::handleWatcherStatistics" <<
G4endl;
274 if (verboseLevel > 3) {
288 for (
G4int iw = 0; iw <
G4int(ana_watchers.size()); iw++) {
289 ana_watchers[iw].setInuclCs(inel_csec,
G4int(eventNumber));
290 ana_watchers[iw].print();
292 if (ana_watchers[iw].to_check()) {
293 std::pair<G4double, G4double> rat_err = ana_watchers[iw].getAverageRatio();
294 averat += rat_err.first;
295 ave_err += rat_err.second;
296 gl_chsq += ana_watchers[iw].getChsq();
297 std::pair<G4double, G4double> cs_err = ana_watchers[iw].getExpCs();
298 tot_exper += cs_err.first;
299 tot_exper_err += cs_err.second;
300 std::pair<G4double, G4double> inucl_cs_err = ana_watchers[iw].getInuclCs();
301 tot_inucl += inucl_cs_err.first;
302 tot_inucl_err += inucl_cs_err.second;
303 G4double iz_checked = ana_watchers[iw].getNmatched();
305 if (iz_checked > 0.0) {
306 fgr += ana_watchers[iw].getLhood();
307 checked += iz_checked;
313 gl_chsq = std::sqrt(gl_chsq) / checked;
316 fgr = std::pow(10.0, std::sqrt(fgr / checked));
319 if (verboseLevel > 3) {
320 G4cout <<
" total exper c.s. " << tot_exper <<
" err " << tot_exper_err <<
321 " tot inucl c.s. " << tot_inucl <<
" err " << tot_inucl_err <<
G4endl;
322 G4cout <<
" checked total " << checked <<
" lhood " << fgr << G4endl
323 <<
" average ratio " << averat <<
" err " << ave_err << G4endl
324 <<
" global chsq " << gl_chsq <<
G4endl;
330 if (verboseLevel > 3) {
331 G4cout <<
" >>> G4Analyser::printResultsNtuple" <<
G4endl;
337 std::setw(15) <<
int(eventNumber + 0.1) <<
338 std::setw(15) << averageMultiplicity / eventNumber <<
339 std::setw(15) << averageProtonNumber / eventNumber <<
340 std::setw(15) << averageNeutronNumber / eventNumber <<
" " <<
341 std::setw(15) << averageNucleonKinEnergy / (averageProtonNumber + averageNeutronNumber) <<
" " <<
342 std::setw(15) << averageProtonKinEnergy / (averageProtonNumber + 1.0e-10) <<
" " <<
343 std::setw(15) << averageNeutronKinEnergy / (averageNeutronNumber + 1.0e-10) <<
" " <<
344 std::setw(15) << averagePionNumber / eventNumber <<
" " <<
345 std::setw(15) << averagePionKinEnergy / (averagePionNumber + 1.0e-10) <<
G4endl;
void analyse(const G4CollisionOutput &output)
void handleWatcherStatistics()
void printResultsNtuple()
G4GLOB_DLL std::ostream G4cout
void try_watchers(G4int a, G4int z, G4bool if_nucl)
G4bool nucleon(G4int ityp)
void printResultsSimple()
typedef int(XMLCALL *XML_NotStandaloneHandler)(void *userData)
const std::vector< G4InuclNuclei > & getOutgoingNuclei() const
const std::vector< G4InuclElementaryParticle > & getOutgoingParticles() const
void setInelCsec(G4double csec, G4bool withn)
void setWatchers(const std::vector< G4NuclWatcher > &watchers)