13 #include "Pythia8/Pythia.h"
21 using namespace Pythia8;
27 , fRandomEngine(nullptr)
52 fPythia.setRndmEnginePtr(fRandomEngine);
54 cout <<
"Beam Momentum " <<
fMom << endl;
56 fPythia.settings.mode(
"Beams:idA",
fId);
57 fPythia.settings.mode(
"Beams:idB", 2212);
58 fPythia.settings.mode(
"Beams:frameType", 3);
59 fPythia.settings.parm(
"Beams:pxA", 0.);
60 fPythia.settings.parm(
"Beams:pyA", 0.);
61 fPythia.settings.parm(
"Beams:pzA",
fMom);
62 fPythia.settings.parm(
"Beams:pxB", 0.);
63 fPythia.settings.parm(
"Beams:pyB", 0.);
64 fPythia.settings.parm(
"Beams:pzB", 0.);
80 for (
int i = 0; i < fPythia.event.size(); i++) {
81 if (fPythia.event[i].isFinal()) {
84 Int_t im = fPythia.event[i].mother1();
85 if (fPythia.event[im].id() ==
fHNL) {
87 Double_t z = fPythia.event[i].zProd();
88 Double_t x = abs(fPythia.event[i].xProd());
89 Double_t y = abs(fPythia.event[i].yProd());
91 if (z < 11000. && z > 7000. && x < 250. && y < 250.) {
105 for (Int_t ii = 0; ii < fPythia.event.size(); ii++) {
106 if (fPythia.event[ii].isFinal()) {
107 Bool_t wanttracking =
true;
109 Int_t im = fPythia.event[ii].mother1();
110 if (fPythia.event[im].id() !=
fHNL) {
111 wanttracking =
false;
115 Double_t z = fPythia.event[ii].zProd();
116 Double_t x = fPythia.event[ii].xProd();
117 Double_t y = fPythia.event[ii].yProd();
118 Double_t pz = fPythia.event[ii].pz();
119 Double_t px = fPythia.event[ii].px();
120 Double_t py = fPythia.event[ii].py();
121 cpg->
AddTrack((Int_t)fPythia.event[ii].id(),
128 (Int_t)fPythia.event[ii].mother1(),
137 if (
fHNL != 0 && fPythia.event[ii].id() ==
fHNL) {
138 Int_t im = (Int_t)fPythia.event[ii].mother1();
139 Double_t z = fPythia.event[ii].zProd();
140 Double_t x = fPythia.event[ii].xProd();
141 Double_t y = fPythia.event[ii].yProd();
142 Double_t pz = fPythia.event[ii].pz();
143 Double_t px = fPythia.event[ii].px();
144 Double_t py = fPythia.event[ii].py();
145 cpg->
AddTrack((Int_t)fPythia.event[im].id(), px, py, pz, x, y, z, 0,
false);
146 cpg->
AddTrack((Int_t)fPythia.event[ii].id(), px, py, pz, x, y, z, im,
false);
160 fPythia.readString(par);
161 cout <<
"fPythia.readString(\"" << par <<
"\")" << endl;
169 fPythia.particleData.list(arg);
170 cout <<
"canDecay " << fPythia.particleData.canDecay(arg) <<
" " << fPythia.particleData.mayDecay(arg) << endl;
virtual ~Pythia8Generator()
ClassImp(FairEventBuilder)
Bool_t ReadEvent(FairPrimaryGenerator *)
FairMQExParamsParOne * par
void SetParameters(char *)
virtual void AddTrack(Int_t pdgid, Double_t px, Double_t py, Double_t pz, Double_t vx, Double_t vy, Double_t vz, Int_t parent=-1, Bool_t wanttracking=true, Double_t e=-9e9, Double_t tof=0., Double_t weight=0., TMCProcess proc=kPPrimary)
void GetPythiaInstance(int)