11 #include "Pythia8/Pythia.h"
12 using namespace Pythia8;
16 Hist nCharged(
"charged particle multiplicity",100,-0.5,399.5);
22 pythia.readFile(
"main13.cmnd", 0);
25 int nSubrun = pythia.mode(
"Main:numberOfSubruns");
26 int nAbort = pythia.mode(
"Main:timesAllowErrors");
30 for (
int iSubrun = 1; iSubrun <= nSubrun; ++iSubrun) {
33 pythia.readFile(
"main13.cmnd", iSubrun);
39 for (
int iEvent = 0; ; ++iEvent) {
45 if (pythia.info.atEndOfFile())
break;
48 if (++iAbort < nAbort)
continue;
54 for (
int i = 0; i < pythia.event.size(); ++i)
55 if (pythia.event[i].isFinal() && pythia.event[i].isCharged()) ++nChg;