@@ -116,7 +116,9 @@ Bool_t PrimaryGenerator::GenerateEvent(FairGenericStack* pStack)
116116
117117void PrimaryGenerator::AddTrack (Int_t pdgid, Double_t px, Double_t py, Double_t pz,
118118 Double_t vx, Double_t vy, Double_t vz,
119- Int_t parent, Bool_t wanttracking,
119+ Int_t mother1, Int_t mother2,
120+ Int_t daughter1, Int_t daughter2,
121+ Bool_t wanttracking,
120122 Double_t e, Double_t tof,
121123 Double_t weight, TMCProcess proc)
122124{
@@ -146,9 +148,19 @@ void PrimaryGenerator::AddTrack(Int_t pdgid, Double_t px, Double_t py, Double_t
146148 Int_t ntr = 0 ; // Track number; to be filled by the stack
147149 Int_t status = 0 ; // Generation status
148150
149- if (parent != -1 ) {
150- parent += fMCIndexOffset ;
151- } // correct for tracks which are in list before generator is called
151+ // correct for tracks which are in list before generator is called
152+ if (mother1 != -1 ) {
153+ mother1 += fMCIndexOffset ;
154+ }
155+ if (mother2 != -1 ) {
156+ mother2 += fMCIndexOffset ;
157+ }
158+ if (daughter1 != -1 ) {
159+ daughter1 += fMCIndexOffset ;
160+ }
161+ if (daughter2 != -1 ) {
162+ daughter2 += fMCIndexOffset ;
163+ }
152164
153165 /* * if it is a K0/antiK0 to be tracked, convert it into K0s/K0L.
154166
@@ -170,9 +182,9 @@ void PrimaryGenerator::AddTrack(Int_t pdgid, Double_t px, Double_t py, Double_t
170182 }
171183
172184 /* * add track to stack **/
173- fStack ->PushTrack (doTracking, parent , pdgid, px, py, pz,
185+ fStack ->PushTrack (doTracking, mother1 , pdgid, px, py, pz,
174186 e, vx, vy, vz, tof, polx, poly, polz, proc, ntr,
175- weight, status, parent );
187+ weight, status, mother2 );
176188
177189 fNTracks ++;
178190}
0 commit comments