pythia8 basic example
to run, do:
Note that before executing this script,
- the env variable PYTHIA8 must point to the pythia8100 (or newer) directory
- the env variable PYTHIA8DATA must be defined and it must point to $PYTHIA8/xmldoc
{
if (!p8dataenv) {
if (!p8env) {
"Environment variable PYTHIA8 must contain path to pythia directory!");
return;
}
p8d += "/xmldoc";
}
"Environment variable PYTHIA8DATA must contain path to $PYTHIA8/xmldoc directory !");
return;
}
TH1F* etaH =
new TH1F(
"etaH",
"Pseudorapidity", 120, -12., 12.);
TH1F* ptH =
new TH1F(
"ptH",
"pt", 50, 0., 10.);
for (
Int_t iev = 0; iev < nev; iev++) {
for (
Int_t ip = 0; ip < np; ip++) {
if (ist <= 0) continue;
if (charge == 0.) continue;
if (pt > 0.) ptH->
Fill(pt, 1./(2. * pt));
}
}
ptH->
SetYTitle(
"dN/dp_{t}^{2} [GeV/c]^{-2}");
}
- Author
- Andreas Morsch
Definition in file pythia8.C.