18 #include <TCollection.h>
19 #include <TMCParticle.h>
20 #include <TObjArray.h>
21 #include <TProcessID.h>
37 std::unique_ptr<EventPythiaPP> event(
BuildEvent());
39 while (!
mFilter->Accept(*event)) {
43 return event.release();
48 int objectNumber = TProcessID::GetObjectCount();
51 TPythia6* pythia = TPythia6::Instance();
52 pythia->GenerateEvent();
53 double Q2 = pythia->GetPARI(22);
54 double x1 = pythia->GetPARI(33);
55 double x2 = pythia->GetPARI(34);
56 std::unique_ptr<EventPythiaPP> event(
new EventPythiaPP(Q2, x1, x2));
59 TObjArray* particles = pythia->ImportParticles(
"All");
60 TIter iter(particles);
61 TMCParticle* mc(NULL);
63 while ((mc = static_cast<TMCParticle*>(iter.Next()))) {
66 p->SetParentIndex(mc->GetParent());
76 TProcessID::SetObjectCount(objectNumber);
77 return event.release();
81 return EventPythiaPP::Class()->GetName();
87 tree.Branch(name.c_str(),
EventName().c_str(), &event, 32000, 99);
88 tree.ResetBranchAddress(branch);
94 branch.ResetAddress();
99 branch.SetAddress(&
mEvent);