11 using namespace Pythia8;
24 Hist pTraw(
"pTHat distribution, unweighted", 100, 0., 1000.);
25 Hist pTnorm(
"pTHat distribution, weighted", 100, 0., 1000.);
26 Hist pTpow3(
"pTHat distribution, pT3*weighted", 100, 0., 1000.);
27 Hist pTpow5(
"pTHat distribution, pT5*weighted", 100, 0., 1000.);
28 Hist pTnormPart(
"pTHat distribution, weighted", 100, 0., 1000.);
29 Hist pTpow3Part(
"pTHat distribution, pT3*weighted", 100, 0., 1000.);
30 Hist pTpow5Part(
"pTHat distribution, pT5*weighted", 100, 0., 1000.);
36 Settings& settings = pythia.settings;
37 Info& info = pythia.info;
40 pythia.readString(
"HardQCD:all = on");
41 pythia.readString(
"PartonLevel:all = off");
46 pythia.readFile(
"main08.cmnd");
47 nBin = pythia.mode(
"Main:numberOfSubruns");
51 double pTlimit[6] = {100., 150., 250., 400., 600., 0.};
54 for (
int iBin = 0; iBin < nBin; ++iBin) {
58 settings.parm(
"PhaseSpace:pTHatMin", pTlimit[iBin]);
59 settings.parm(
"PhaseSpace:pTHatMax", pTlimit[iBin + 1]);
63 else pythia.readFile(
"main08.cmnd", iBin);
66 pythia.readString(
"Beams:eCM = 14000.");
70 settings.listChanged();
78 for (
int iEvent = 0; iEvent < nEvent; ++iEvent) {
81 if (!pythia.next())
break;
84 double pTHat = info. pTHat();
86 pTnormPart.fill( pTHat );
87 pTpow3Part.fill( pTHat, pow3(pTHat) );
88 pTpow5Part.fill( pTHat, pow5(pTHat) );
95 double sigmaNorm = info.sigmaGen() / (10. * nEvent);
96 pTnorm += sigmaNorm * pTnormPart;
97 pTpow3 += sigmaNorm * pTpow3Part;
98 pTpow5 += sigmaNorm * pTpow5Part;
104 cout << pTraw << pTnorm << pTpow3 << pTpow5;