Reads on event from the input file and pushes the tracks onto the stack. Abstract method in base class.
44 {
45
47
48 cout << "-E Pythia6Generator: Input file not open!" << endl;
49 return kFALSE;
50 }
51
52
53 Int_t ntracks = 0, eventID = 0, ncols = 0;
54
55
56 Int_t nLev = 0, pdgID = 0, nM1 = -1, nM2 = -1, nDF = -1, nDL = -1;
57 Float_t fPx = 0., fPy = 0., fPz = 0.,
fM = 0., fE = 0.;
58 Float_t fVx = 0., fVy = 0., fVz = 0., fT = 0.;
59
60
61
62 ncols = fscanf(
fInputFile,
"%d\t%d", &eventID, &ntracks);
63
64 if (ncols && ntracks > 0) {
66 cout << "Event number: " << eventID << "\tNtracks: " << ntracks << endl;
67
68 for (Int_t ll = 0; ll < ntracks; ll++) {
69 (void)fscanf(
fInputFile,
"%d %d %d %d %d %d %f %f %f %f %f %f %f %f %f",
70 &nLev, &pdgID, &nM1, &nM2, &nDF, &nDL, &fPx, &fPy, &fPz, &fE,
71 &fM, &fVx, &fVy, &fVz, &fT);
73 cout << nLev << "\t" << pdgID << "\t" << nM1 << "\t" << nM2 << "\t"
74 << nDF << "\t" << nDL << "\t" << fPx << "\t" << fPy << "\t" << fPz
75 <<
"\t" << fE <<
"\t" <<
fM <<
"\t" << fVx <<
"\t" << fVy <<
"\t"
76 << fVz << "\t" << fT << endl;
77 if (nLev == 1)
primGen->AddTrack(pdgID, fPx, fPy, fPz, fVx, fVy, fVz);
78 }
79 } else {
80 cout << "-I Pythia6Generator: End of input file reached " << endl;
82 return kFALSE;
83 }
84
85
87 cout << "-I Pythia6Generator: End of input file reached " << endl;
89 return kFALSE;
90 }
91
92
93
94
95
96
97
98 return kTRUE;
99}