12 #include "Pythia8/Pythia.h"
13 using namespace Pythia8;
23 pythia.readString(
"Beams:eCM = 14000.");
24 pythia.readString(
"HardQCD:all = on");
25 pythia.readString(
"PhaseSpace:pTHatMin = 200.");
26 pythia.readString(
"Next:numberShowInfo = 0");
27 pythia.readString(
"Next:numberShowProcess = 0");
28 pythia.readString(
"Next:numberShowEvent = 0");
34 double pTjetMin = 10.;
43 SlowJet slowJet( -1, radius, pTjetMin, etaMax, nSel, 1);
46 CellJet cellJet( etaMax, nEta, nPhi, nSel);
50 Hist nJetsS(
"number of jets, SlowJet", 50, -0.5, 49.5);
51 Hist nJetsC(
"number of jets, CellJet", 50, -0.5, 49.5);
52 Hist nJetsD(
"number of jets, CellJet - SlowJet", 45, -22.5, 22.5);
53 Hist eTjetsS(
"pT for jets, SlowJet", 100, 0., 500.);
54 Hist eTjetsC(
"eT for jets, CellJet", 100, 0., 500.);
55 Hist etaJetsS(
"y for jets, SlowJet", 100, -5., 5.);
56 Hist etaJetsC(
"eta for jets, CellJet", 100, -5., 5.);
57 Hist phiJetsS(
"phi for jets, SlowJwt", 100, -M_PI, M_PI);
58 Hist phiJetsC(
"phi for jets, CellJet", 100, -M_PI, M_PI);
59 Hist distJetsS(
"R distance between jets, SlowJet", 100, 0., 10.);
60 Hist distJetsC(
"R distance between jets, CellJet", 100, 0., 10.);
61 Hist eTdiffS(
"pT difference, SlowJet", 100, -100., 400.);
62 Hist eTdiffC(
"eT difference, CellJet", 100, -100., 400.);
65 for (
int iEvent = 0; iEvent < nEvent; ++iEvent) {
66 if (!pythia.next())
continue;
69 slowJet. analyze( pythia.event );
70 if (iEvent < nListJets) slowJet.list();
73 nJetsS.fill( slowJet.sizeJet() );
74 for (
int i = 0; i < slowJet.sizeJet(); ++i) {
75 eTjetsS.fill( slowJet.pT(i) );
76 etaJetsS.fill( slowJet.y(i) );
77 phiJetsS.fill( slowJet.phi(i) );
81 for (
int i = 0; i < slowJet.sizeJet() - 1; ++i)
82 for (
int j = i +1; j < slowJet.sizeJet(); ++j) {
83 double dEta = slowJet.y(i) - slowJet.y(j);
84 double dPhi = abs( slowJet.phi(i) - slowJet.phi(j) );
85 if (dPhi > M_PI) dPhi = 2. * M_PI - dPhi;
86 double dR = sqrt( pow2(dEta) + pow2(dPhi) );
91 for (
int i = 1; i < slowJet.sizeJet(); ++i)
92 eTdiffS.fill( slowJet.pT(i-1) - slowJet.pT(i) );
95 cellJet. analyze( pythia.event, pTjetMin, radius );
96 if (iEvent < nListJets) cellJet.list();
99 nJetsC.fill( cellJet.size() );
100 for (
int i = 0; i < cellJet.size(); ++i) {
101 eTjetsC.fill( cellJet.eT(i) );
102 etaJetsC.fill( cellJet.etaWeighted(i) );
103 phiJetsC.fill( cellJet.phiWeighted(i) );
107 for (
int i = 0; i < cellJet.size() - 1; ++i)
108 for (
int j = i +1; j < cellJet.size(); ++j) {
109 double dEta = cellJet.etaWeighted(i)
110 - cellJet.etaWeighted(j);
111 double dPhi = abs( cellJet.phiWeighted(i)
112 - cellJet.phiWeighted(j) );
113 if (dPhi > M_PI) dPhi = 2. * M_PI - dPhi;
114 double dR = sqrt( pow2(dEta) + pow2(dPhi) );
115 distJetsC.fill( dR );
119 for (
int i = 1; i < cellJet.size(); ++i)
120 eTdiffC.fill( cellJet.eT(i-1) - cellJet.eT(i) );
123 nJetsD.fill( cellJet.size() - slowJet.sizeJet() );
128 cout << nJetsS << nJetsC << nJetsD << eTjetsS << eTjetsC
129 << etaJetsS << etaJetsC << phiJetsS << phiJetsC
130 << distJetsS << distJetsC << eTdiffS << eTdiffC;