How to get the the name of parent particle that created the current track?

I used another approach that oped the /tracking/storetrajectory 1,after that I can’t run event larger than 10000.
so maybe writing a TrackInfo is the best way?