- printf("\n Not selected %d %f %f %f %f %f", i,
- iparticle->Theta(),
- iparticle->Phi(),
- iparticle->P(),
- iparticle->Pt(),
- y);
- //PH delete iparticle;
- // continue;
- }
- p[0] = iparticle->Px();
- p[1] = iparticle->Py();
- p[2] = iparticle->Pz();
- Int_t idpart = iparticle->GetPdgCode();
- if(fVertexSmear==kPerTrack)
- {
- Rndm(random,6);
- for (j = 0; j < 3; j++) {
- origin[j]=fOrigin[j]+
- fOsigma[j]*TMath::Cos(2*random[2*j]*TMath::Pi())*
- TMath::Sqrt(-2*TMath::Log(random[2*j+1]));
- }
- }
- Int_t decayed = iparticle->GetFirstDaughter();
- Int_t doTracking = fTrackIt && (decayed < 0) &&
- (TMath::Abs(idpart) > 10) && selected;
- // printf("*** pdg, first daughter, trk = %d, %d, %d\n",
- // idpart,decayed, doTracking);
- //PH PushTrack(doTracking,-1,idpart,p,origin,polar,0,kPPrimary,nt);
- Int_t parent = iparticle->GetFirstMother();
- PushTrack(doTracking,parent,idpart,p,origin,polar,0,kPPrimary,nt);
- KeepTrack(nt);
+ Int_t doTracking = fTrackIt && selected && (jparticle->TestBit(kTransportBit));
+ Int_t parent = jparticle->GetFirstMother();
+
+ PushTrack(doTracking, parent, idpart,
+ p[0], p[1], p[2], p[3], origin[0], origin[1], origin[2], time,
+ polar[0], polar[1], polar[2],
+ kPPrimary, nt, 1., jparticle->GetStatusCode());
+
+ KeepTrack(nt);
+ fNprimaries++;