7 #include "FairPrimaryGenerator.h"
26 cout <<
"-I PndPythia6Generator: Opening input file " << fileName << endl;
30 Fatal(
"PndPythia6Generator",
"Cannot open input file.");
52 cout <<
"-E PndPythia6Generator: Input file not open!" << endl;
57 Int_t ntracks = 0, eventID = 0, ncols = 0;
60 Int_t nLev = 0, pdgID = 0, nM1 = -1, nM2 = -1, nDF = -1, nDL = -1;
61 Float_t fPx = 0., fPy = 0., fPz = 0., fM = 0., fE = 0.;
62 Float_t fVx = 0., fVy = 0., fVz = 0.,
fT = 0.;
69 ncols = fscanf(
fInputFile,
"%d\t%d", &eventID, &ntracks);
71 if (ncols && ntracks>0) {
73 if (
fVerbose>0) cout <<
"Event number: " << eventID <<
"\tNtracks: " << ntracks << endl;
75 for (Int_t ll=0; ll<ntracks; ll++)
77 ncols = fscanf(
fInputFile,
"%d %d %d %d %d %d %f %f %f %f %f %f %f %f %f", &nLev, &pdgID, &nM1, &nM2, &nDF, &nDL, &fPx, &fPy, &fPz, &fE, &fM, &fVx, &fVy, &fVz, &
fT);
78 if (
fVerbose>0) cout << nLev <<
"\t" << pdgID <<
"\t" << nM1 <<
"\t" << nM2 <<
"\t" << nDF <<
"\t" << nDL <<
79 "\t" << fPx <<
"\t" << fPy <<
"\t" << fPz <<
"\t" << fE <<
"\t" << fM <<
"\t" << fVx <<
"\t" << fVy <<
"\t" << fVz <<
"\t" <<
fT << endl;
81 primGen->AddTrack(pdgID, fPx, fPy, fPz, fVx, fVy, fVz);
85 cout <<
"-I PndPythia6Generator: End of input file reached " << endl;
93 cout <<
"-I PndPythia6Generator: End of input file reached " << endl;
115 cout <<
"-I PndPythia6Generator: Closing input file "
virtual ~PndPythia6Generator()
void CloseInput()
Verbose Level.
friend F32vec4 max(const F32vec4 &a, const F32vec4 &b)
FairPrimaryGenerator * primGen
FILE * fInputFile
Input file Name.
virtual Bool_t ReadEvent(FairPrimaryGenerator *primGen)