12 using namespace Pythia8;
26 Event&
event = pythia.event;
29 pythia.settings.parm(
"Beams:eCM", eCM);
33 pythia.readString(
"SUSY:gg2squarkantisquark = on");
34 pythia.readString(
"SUSY:idA = 1000006");
35 pythia.readString(
"SUSY:idB = 1000006");
39 }
else if (nGluino == 1) {
40 pythia.readString(
"SUSY:qg2squarkgluino = on");
41 pythia.readString(
"SUSY:idA = 1000002");
42 pythia.readString(
"RHadrons:idStop = 1000002");
43 pythia.readString(
"SUSY:idB = 1000021");
46 pythia.readString(
"SUSY:gg2gluinogluino = on");
51 pythia.readString(
"SLHA:file = sps1aNarrowStopGluino.spc");
54 pythia.readString(
"Rhadrons:allow = on");
58 pythia.readString(
"RHadrons:allowDecay = off");
61 pythia.readString(
"RHadrons:probGluinoball = 0.1");
72 pythia.readString(
"1000002:tau0 = 200.");
73 pythia.readString(
"1000006:tau0 = 250.");
74 pythia.readString(
"1000021:tau0 = 300.");
77 pythia.readString(
"Check:nErrList = 2");
82 pythia.readString(
"Init:showChangedSettings = on");
83 pythia.readString(
"Init:showChangedParticleData = off");
84 pythia.readString(
"Next:numberShowInfo = 1");
85 pythia.readString(
"Next:numberShowProcess = 1");
86 pythia.readString(
"Next:numberShowEvent = 0");
87 pythia.readString(
"Next:showScaleAndVertex = on");
93 Hist nChargedH(
"charged multiplicity", 100, -0.5, 799.5);
94 Hist dndyChargedH(
"dn/dy charged", 100, -10., 10.);
95 Hist dndyRH(
"dn/dy R-hadrons", 100, -5., 5.);
96 Hist pTRH(
"pT R-hadrons", 100, 0., 1000.);
97 Hist xRH(
"p_RHadron / p_sparticle", 100, 0.9, 1.1);
98 Hist mDiff(
"m(Rhadron) - m(sparticle)", 100, 0., 5.);
99 Hist decVtx(
"R-hadron decay vertex (mm from origin)", 100, 0., 1000.);
102 map<int, int> flavours;
106 for (
int iEvent = 0; iEvent < nEvent; ++iEvent) {
109 if (!pythia.next()) {
110 if (++iAbort < nAbort)
continue;
111 cout <<
" Event generation aborted prematurely, owing to error!\n";
119 for (
int i = 0; i <
event.size(); ++i) {
120 if (event[i].isFinal()) {
121 pSum +=
event[i].p();
122 if (event[i].isCharged()) {
124 dndyChargedH.fill( event[i].y() );
128 nChargedH.fill( nCharged );
131 for (
int i = 0; i <
event.size(); ++i) {
132 int idAbs =
event[i].idAbs();
133 if (idAbs > 1000100 && idAbs < 2000000 && idAbs != 1009002) {
134 ++flavours[
event[i].id() ];
135 dndyRH.fill( event[i].y() );
136 pTRH.fill( event[i].pT() );
139 while( event[iMother].statusAbs() > 100)
140 iMother =
event[iMother].mother1();
141 double xFrac =
event[i].pAbs() /
event[iMother].pAbs();
143 double mShift =
event[i].m() -
event[iMother].m();
144 mDiff.fill( mShift );
148 double dist =
event[i].vDec().pAbs();
157 double eLossAvg = 1.;
159 do { eLoss = eLossAvg * pythia.rndm.exp(); }
160 while (eLoss > 0.5 * (event[i].e() - event[i].m()));
161 double eNew =
event[i].e() - eLoss;
162 Vec4 pNew =
event[i].p() * sqrt( pow2(eNew) - pow2(event[i].m()) )
181 pythia.forceRHadronDecays();
182 if (iEvent < nList) pythia.event.list(
true);
189 cout <<
"\n Composition of produced R-hadrons \n code "
190 <<
"name times " << endl;
191 for (map<int, int>::iterator flavNow = flavours.begin();
192 flavNow != flavours.end(); ++flavNow) cout << setw(8)
193 << flavNow->first << setw(16) << pythia.particleData.name(flavNow->first)
194 << setw(8) << flavNow->second << endl;
195 cout << nChargedH << dndyChargedH << dndyRH << pTRH << xRH << mDiff