Reads on event from the input file and pushes the tracks onto the stack. Abstract method in base class.
47 {
48
49
51
52 cout << "-E Pythia6Generator: Input file not open!" << endl;
53 return kFALSE;
54 }
55
56
57 Int_t ntracks = 0, eventID = 0, ncols = 0;
58
59
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.;
63
64
65
66 Int_t max_nr = 0;
67
68 Text_t buffer[200];
69 ncols = fscanf(
fInputFile,
"%d\t%d", &eventID, &ntracks);
70
71 if (ncols && ntracks>0) {
72
73 if (
fVerbose>0) cout <<
"Event number: " << eventID <<
"\tNtracks: " << ntracks << endl;
74
75 for (Int_t ll=0; ll<ntracks; ll++)
76 {
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;
80 if (nLev==1)
81 primGen->AddTrack(pdgID, fPx, fPy, fPz, fVx, fVy, fVz);
82 }
83 }
84 else {
85 cout << "-I Pythia6Generator: End of input file reached " << endl;
87 return kFALSE;
88 }
89
90
91
93 cout << "-I Pythia6Generator: End of input file reached " << endl;
95 return kFALSE;
96 }
97
98
99
100
101
102
103
104 return kTRUE;
105}