10 #define ProofPythia_cxx 31 ProofPythia::ProofPythia()
43 ProofPythia::~ProofPythia()
59 Info(
"Begin",
"starting a simple exercise with process option: %s", option.
Data());
63 void 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);
128 void ProofPythia::SlaveTerminate()
136 void 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.
virtual void Draw(Option_t *option="")=0
Default Draw method for all objects.
THist< 1, float, THistStatContent, THistStatUncertainty > TH1F
Description of the dynamic properties of a particle.
TVirtualPad * cd(Int_t subpadnumber=0)
Set current canvas & pad.
Int_t GetStatusCode() const
static TDatabasePDG * Instance()
static function
void Info(const char *location, const char *msgfmt,...)
TPythia8 is an interface class to C++ version of Pythia 8.1 event generators, written by T...
TParticlePDG * GetParticle(Int_t pdgCode) const
Get a pointer to the particle object according to the MC code number.
An array of clone (identical) objects.
virtual void Divide(Int_t nx=1, Int_t ny=1, Float_t xmargin=0.01, Float_t ymargin=0.01, Int_t color=0)
Automatic pad generation by division.
A TTree object has a header with a name and a title.
virtual void Update()
Update canvas pad buffers.
const char * Data() const