We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent c398dcd commit faecee0Copy full SHA for faecee0
1 file changed
src/graphnet/data/extractors/icecube/i3highesteparticleextractor.py
@@ -490,10 +490,17 @@ def highest_energy_starting(
490
intersections = self.hull.surface.intersection(
491
track.pos, track.dir
492
)
493
- visible_length = max(
494
- visible_length,
495
- intersections.second - max(intersections.first, 0),
+
+ visible_length = intersections.second - max(
+ intersections.first, 0
496
497
498
+ # It can happen that both intersections are negative
499
+ # in this case the particle never reaches the detector
500
+ # and therefore should not be considered for the HEP
501
+ if visible_length < 0:
502
+ continue
503
504
# Check if we have a single topologically "real" track
505
if not real_track:
506
if not dataclasses.I3MCTree.parent(
0 commit comments