When determining truth information during extraction from i3 files, if the frame doesn't contain MCInIcePrimary, the code assumes that the first item in the MC tree is the in-ice primary (this line). For NuGen, this is not always the case - the injected neutrino is injected anywhere in the atmosphere, and may interact before reaching the detector. In this case, the in-ice neutrino that produces the interaction whose detector response is simulated may be a different particle (at a different place in the MC tree).