11 void ReadPythia(
int nevents = 10,
const char* pythiafile =
"jet_pp200_pythia_6422_perugia_0_pt2_3gev_2000evts_185.pythia.root")
14 gSystem->Load(
"StJetSkimEvent");
17 TChain* chain =
new TChain(
"PythiaTree");
18 chain->Add(pythiafile);
22 chain->SetBranchAddress(
"PythiaBranch",&pythiaEvent);
25 for (
int iEvent = 0; iEvent < nevents; ++iEvent) {
27 if (chain->GetEvent(iEvent) <= 0)
break;
30 cout <<
"iEvent = " << iEvent << endl;
31 cout <<
"runId = " << pythiaEvent->runId() << endl;
32 cout <<
"eventId = " << pythiaEvent->eventId() << endl;
33 cout <<
"processId = " << pythiaEvent->processId() << endl;
34 const TVector3& v = pythiaEvent->vertex();
35 cout <<
"vx = " << v.x() <<
", vy = " << v.y() <<
", vz = " << v.z() << endl;
36 cout <<
"s = " << pythiaEvent->s() << endl;
37 cout <<
"t = " << pythiaEvent->t() << endl;
38 cout <<
"u = " << pythiaEvent->u() << endl;
39 cout <<
"pt = " << pythiaEvent->pt() << endl;
40 cout <<
"cosTheta = " << pythiaEvent->cosTheta() << endl;