90#include "Pythia8/Pythia.h"
106 fNumberOfParticles(0)
109 Fatal(
"TPythia8",
"There's already an instance of TPythia8");
115 fPythia =
new Pythia8::Pythia(
"../share/Pythia8/xmldoc", printBanner);
124 fNumberOfParticles(0)
127 Fatal(
"TPythia8",
"There's already an instance of TPythia8");
132 fPythia =
new Pythia8::Pythia(xmlDir, printBanner);
164 fPythia->settings.mode(
"Beams:idA", idAin);
165 fPythia->settings.mode(
"Beams:idB", idBin);
166 fPythia->settings.mode(
"Beams:frameType", 1);
167 fPythia->settings.parm(
"Beams:eCM", ecms);
182 fPythia->settings.mode(
"Beams:idA", idAin);
183 fPythia->settings.mode(
"Beams:idB", idBin);
184 fPythia->settings.mode(
"Beams:frameType", 2);
185 fPythia->settings.parm(
"Beams:eA", eAin);
186 fPythia->settings.parm(
"Beams:eB", eBin);
208 if (particles == 0)
return 0;
210 clonesParticles.
Clear();
215 if (
fPythia->event[0].id() == 90) {
221 if (
fPythia->event[i].id() == 90)
continue;
222 if (
fPythia->event[i].isFinal()) {
226 fPythia->event[i].mother1() + ioff,
227 fPythia->event[i].mother2() + ioff,
228 fPythia->event[i].daughter1() + ioff,
229 fPythia->event[i].daughter2() + ioff,
241 }
else if (!strcmp(
option,
"All")) {
243 if (
fPythia->event[i].id() == 90)
continue;
247 fPythia->event[i].mother1() + ioff,
248 fPythia->event[i].mother2() + ioff,
249 fPythia->event[i].daughter1() + ioff,
250 fPythia->event[i].daughter2() + ioff,
274 if (
fPythia->event[0].id() == 90) {
281 for (
Int_t i = 1; i <= numpart; i++) {
285 fPythia->event[i].mother1() + ioff,
286 fPythia->event[i].mother2() + ioff,
287 fPythia->event[i].daughter1() + ioff,
288 fPythia->event[i].daughter2() + ioff,
306 return (
fPythia->event.size() - 1);
338 fPythia->settings.listChanged();
346 fPythia->particleData.list(
id);
354 fPythia->particleData.listAll();
362 fPythia->particleData.listChanged();
388 0, 0,
"QCD string", 90);
390 0, 0,
"QCD diffr. state", 9900110);
392 0, 1,
"QCD diffr. state", 9900210);
394 0, 0,
"QCD diffr. state", 9900220);
396 0, 0,
"QCD diffr. state", 9900330);
398 0, 0,
"QCD diffr. state", 9900440);
400 0, 0,
"QCD diffr. state", 9902110);
402 0, 1,
"QCD diffr. state", 9902210);
const char Option_t
Option string (const char)
An array of clone (identical) objects.
void Clear(Option_t *option="") override
Clear the clones array.
Particle database manager class.
static TDatabasePDG * Instance()
static function
virtual TParticlePDG * AddParticle(const char *Name, const char *Title, Double_t Mass, Bool_t Stable, Double_t DecayWidth, Double_t Charge, const char *ParticleClass, Int_t PdgCode, Int_t Anti=-1, Int_t TrackingCode=0)
Particle definition normal constructor.
The interface to various event generators.
void Clear(Option_t *option="") override
Remove all objects from the array.
void Delete(Option_t *option="") override
Remove all objects from the array AND delete all heap based objects.
friend class TClonesArray
virtual void Fatal(const char *method, const char *msgfmt,...) const
Issue fatal error message.
Description of the dynamic properties of a particle.
TPythia8 is an interface class to C++ version of Pythia 8.1 event generators, written by T....
void Plist(Int_t id) const
Event listing.
void PlistChanged() const
Event listing.
Int_t ImportParticles(TClonesArray *particles, Option_t *option="") override
Import particles from Pythia stack.
void ListAll() const
Event listing.
void ReadString(const char *string) const
Configuration.
Bool_t Initialize(Int_t idAin, Int_t idBin, Double_t ecms)
Initialization.
void EventListing() const
Event listing.
void GenerateEvent() override
Generate the next event.
void ListChanged() const
Event listing.
Int_t fNumberOfParticles
! Number of particles
void PrintStatistics() const
Print end of run statistics.
Int_t GetN() const
Initialization.
void PlistAll() const
Event listing.
static TPythia8 * Instance()
Return an instance of TPythia8.
TPythia8(bool printBanner=true)
Constructor.
static TPythia8 * fgInstance
! singleton instance
void ReadConfigFile(const char *string) const
Configuration.
void AddParticlesToPdgDataBase()
Add some pythia specific particle code to the data base.
Pythia8::Pythia * fPythia
! The pythia8 instance
~TPythia8() override
Destructor.