9 #include "Pythia8/Pythia.h"
11 using namespace Pythia8;
19 pythia.readString(
"PDF:lepton = off");
21 pythia.readString(
"WeakSingleBoson:ffbar2gmZ = on");
23 pythia.readString(
"23:onMode = off");
24 pythia.readString(
"23:onIfAny = 1 2 3 4 5");
27 pythia.readString(
"Beams:idA = 11");
28 pythia.readString(
"Beams:idB = -11");
29 double mZ = pythia.particleData.m0(23);
30 pythia.settings.parm(
"Beams:eCM", mZ);
34 Hist nCharge(
"charged multiplicity", 100, -0.5, 99.5);
35 Hist spheri(
"Sphericity", 100, 0., 1.);
36 Hist linea(
"Linearity", 100, 0., 1.);
37 Hist thrust(
"thrust", 100, 0.5, 1.);
38 Hist oblateness(
"oblateness", 100, 0., 1.);
39 Hist sAxis(
"cos(theta_Sphericity)", 100, -1., 1.);
40 Hist lAxis(
"cos(theta_Linearity)", 100, -1., 1.);
41 Hist tAxis(
"cos(theta_Thrust)", 100, -1., 1.);
42 Hist nLund(
"Lund jet multiplicity", 40, -0.5, 39.5);
43 Hist nJade(
"Jade jet multiplicity", 40, -0.5, 39.5);
44 Hist nDurham(
"Durham jet multiplicity", 40, -0.5, 39.5);
45 Hist eDifLund(
"Lund e_i - e_{i+1}", 100, -5.,45.);
46 Hist eDifJade(
"Jade e_i - e_{i+1}", 100, -5.,45.);
47 Hist eDifDurham(
"Durham e_i - e_{i+1}", 100, -5.,45.);
58 for (
int iEvent = 0; iEvent < 10000; ++iEvent) {
59 if (!pythia.next())
continue;
63 for (
int i = 0; i < pythia.event.size(); ++i)
64 if (pythia.event[i].isFinal() && pythia.event[i].isCharged()) ++nCh;
68 if (sph.analyze( pythia.event )) {
69 if (iEvent < 3) sph.list();
70 spheri.fill( sph.sphericity() );
71 sAxis.fill( sph.eventAxis(1).pz() );
72 double e1 = sph.eigenValue(1);
73 double e2 = sph.eigenValue(2);
74 double e3 = sph.eigenValue(3);
75 if (e2 > e1 || e3 > e2) cout <<
"eigenvalues out of order: "
76 << e1 <<
" " << e2 <<
" " << e3 << endl;
80 if (lin.analyze( pythia.event )) {
81 if (iEvent < 3) lin.list();
82 linea.fill( lin.sphericity() );
83 lAxis.fill( lin.eventAxis(1).pz() );
84 double e1 = lin.eigenValue(1);
85 double e2 = lin.eigenValue(2);
86 double e3 = lin.eigenValue(3);
87 if (e2 > e1 || e3 > e2) cout <<
"eigenvalues out of order: "
88 << e1 <<
" " << e2 <<
" " << e3 << endl;
92 if (thr.analyze( pythia.event )) {
93 if (iEvent < 3) thr.list();
94 thrust.fill( thr.thrust() );
95 oblateness.fill( thr.oblateness() );
96 tAxis.fill( thr.eventAxis(1).pz() );
97 if ( abs(thr.eventAxis(1).pAbs() - 1.) > 1e-8
98 || abs(thr.eventAxis(2).pAbs() - 1.) > 1e-8
99 || abs(thr.eventAxis(3).pAbs() - 1.) > 1e-8
100 || abs(thr.eventAxis(1) * thr.eventAxis(2)) > 1e-8
101 || abs(thr.eventAxis(1) * thr.eventAxis(3)) > 1e-8
102 || abs(thr.eventAxis(2) * thr.eventAxis(3)) > 1e-8 ) {
103 cout <<
" suspicious Thrust eigenvectors " << endl;
109 if (lund.analyze( pythia.event, 0.01, 0.)) {
110 if (iEvent < 3) lund.list();
111 nLund.fill( lund.size() );
112 for (
int j = 0; j < lund.size() - 1; ++j)
113 eDifLund.fill( lund.p(j).e() - lund.p(j+1).e() );
115 if (jade.analyze( pythia.event, 0.01, 0.)) {
116 if (iEvent < 3) jade.list();
117 nJade.fill( jade.size() );
118 for (
int j = 0; j < jade.size() - 1; ++j)
119 eDifJade.fill( jade.p(j).e() - jade.p(j+1).e() );
121 if (durham.analyze( pythia.event, 0.01, 0.)) {
122 if (iEvent < 3) durham.list();
123 nDurham.fill( durham.size() );
124 for (
int j = 0; j < durham.size() - 1; ++j)
125 eDifDurham.fill( durham.p(j).e() - durham.p(j+1).e() );
131 cout << nCharge << spheri << linea << thrust << oblateness
132 << sAxis << lAxis << tAxis
133 << nLund << nJade << nDurham
134 << eDifLund << eDifJade << eDifDurham;