Bool_t PndTpcDetector::ProcessHits( FairVolume *v)
........
TParticle* mother=gMC->GetStack()->GetCurrentTrack();
if(mother->IsPrimary()) secID = 0;
else while(!mother->IsPrimary()){
trackID=mother->GetFirstMother();
mother=dynamic_cast<PndStack*>(gMC->GetStack())->GetParticle(trackID);
//std::cout<<"Fetching mother id="<<trackID<<std::endl;
}
// trackID is now ID of primary mother
// if the mother is already primary, secID is 0
// else secID is an (arbitrary) number !=0
.............
//gotta love TClonesArray syntax!
PndTpcPoint* p=AddHit(trackID, secID, volumeID, pos.Vect(), mom.Vect(),
time, length, eLoss);