I am simulating a 60keV photon pencil beam passing normal through a 10cm water cube and I am scoring the photon fluence entering another cube a few cm behind it. In order to discriminate between primary photons and secondaries I tried to use the GetParentID() and the GetTrackID() methods in the SteppingAction class however they always give me zero and one respectively which indicates that there are no secondary photons and all of them are primaries. I access the methods by means of
The energies and positions of the detected photons tell me that I do have secondaries. However, the two methods cannot discriminate them from primaries. Is this a particular to having photon primaries? If so, how can I get the “generation index” of each photon?