pythia8 basic example
to run, do:
Note that before executing this script, for some Pythia8 builds:
- 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
{
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.