10#define ProofPythia_cxx
31ProofPythia::ProofPythia()
43ProofPythia::~ProofPythia()
59 Info(
"Begin",
"starting a simple exercise with process option: %s", option.
Data());
63void ProofPythia::SlaveBegin(
TTree * )
72 fTot =
new TH1F(
"histo1",
"total multiplicity", 25, 0.5, 2500.5);
73 fHist =
new TH1F(
"histo2",
"charged multiplicity", 20, 0.5, 500.5);
74 fPt =
new TH1F(
"histo3",
"particles pT", 100, 0., 10);
75 fEta =
new TH1F(
"histo4",
"particles Eta", 100, -10., 10);
76 fTot->SetFillColor(
kBlue);
77 fHist->SetFillColor(
kRed);
85 fPythia->SetName(
"pythia8");
86 fPythia->ReadConfigFile(
"pythia8/main03.cmnd");
89 fPythia->Initialize( 2212, 2212, 14000.);
99 fPythia->GenerateEvent();
101 fPythia->EventListing();
102 fPythia->ImportParticles(fP,
"All");
103 Int_t nTot = fPythia->GetN();
104 fPythia->ImportParticles(fP,
"All");
105 Int_t np = fP->GetEntriesFast();
108 for (
Int_t ip = 0; ip < np; ip++) {
112 if (ist != 1)
continue;
114 if (charge == 0.)
continue;
118 if (
pt > 0.) fPt->Fill(
pt);
119 if ((eta > -10) && (eta < 10)) fEta->Fill(eta);
121 fHist->Fill(nCharged);
128void ProofPythia::SlaveTerminate()
136void ProofPythia::Terminate()
148 if ((fTot =
dynamic_cast<TH1F *
>(fOutput->FindObject(
"histo1")))) {
153 if ((fHist =
dynamic_cast<TH1F *
>(fOutput->FindObject(
"histo2")))) {
158 if ((fPt =
dynamic_cast<TH1F *
>(fOutput->FindObject(
"histo3")))) {
163 if ((fEta =
dynamic_cast<TH1F *
>(fOutput->FindObject(
"histo4")))) {
Selector to generate Monte Carlo events with Pythia8.
void Info(const char *location, const char *msgfmt,...)
An array of clone (identical) objects.
static TDatabasePDG * Instance()
static function
TParticlePDG * GetParticle(Int_t pdgCode) const
Get a pointer to the particle object according to the MC code number.
1-D histogram with a float per channel (see TH1 documentation)}
Description of the dynamic properties of a particle.
Int_t GetStatusCode() const
TPythia8 is an interface class to C++ version of Pythia 8.1 event generators, written by T....
const char * Data() const
A TTree represents a columnar dataset.