File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -190,7 +190,9 @@ def get_tracks(
190190 primaries = [self .check_primary_energy (frame , p ) for p in primaries ]
191191
192192 MMCTrackList = frame [self .mmctracklist ]
193- if self .daughters :
193+ if self .daughters & (
194+ not self ._is_corsika
195+ ): # expensive operation unecessary for CORSIKA
194196 temp_MMCTrackList = []
195197 for track in MMCTrackList :
196198 for p in primaries :
@@ -200,6 +202,14 @@ def get_tracks(
200202 temp_MMCTrackList .append (track )
201203 break
202204 MMCTrackList = simclasses .I3MMCTrackList (temp_MMCTrackList )
205+ elif self ._is_corsika & self .daughters :
206+ MMCTrackList = [
207+ track
208+ for track in MMCTrackList
209+ if frame [self .mctree ].get_primary (track .GetI3Particle ())
210+ in primaries
211+ ]
212+ MMCTrackList = simclasses .I3MMCTrackList (MMCTrackList )
203213
204214 MuonGun_tracks = np .array (
205215 MuonGun .Track .harvest (frame [self .mctree ], MMCTrackList )
You can’t perform that action at this time.
0 commit comments