-
Notifications
You must be signed in to change notification settings - Fork 106
Description
Describe the bug
This issue lists a few bugs of the I3HighestEparticleExtractor
1. Negative visible length
The visible length as computed for tracks can be negative if both intersection points are negative. To my knowledge, this happens when the particle never intersects the hull. (I'm not too sure about that)
graphnet/src/graphnet/data/extractors/icecube/i3highesteparticleextractor.py
Lines 336 to 338 in f3faff1
visible_length = intersections.second - max( | |
intersections.first, 0 | |
) |
2. Track filtering only for top-level primaries
Currently, filtering for tracks that are in the subtrees of the primaries is handled here:
graphnet/src/graphnet/data/extractors/icecube/i3highesteparticleextractor.py
Lines 186 to 192 in f3faff1
MMCTrackList = [ | |
track | |
for track in MMCTrackList | |
if frame[self.mctree].get_primary(track.GetI3Particle()) | |
in primaries | |
] | |
MMCTrackList = simclasses.I3MMCTrackList(MMCTrackList) |
The primaries are coming from the get_primary
function, which can also return particles that are not in the head of the MCTree.
the get_primaries
funciton:
def get_primaries( |
In the scenario that the returned primaries are not in the head of the MCTree, the filtering logic will always filter out the tracks even if they are descendants of particles in the primaries
list. This is because frame[self.mctree].get_primary()
will only give particles at the head level.
same issue occurs here:
graphnet/src/graphnet/data/extractors/icecube/i3highesteparticleextractor.py
Lines 399 to 414 in f3faff1
e_p = np.array( | |
[ | |
np.array([p.energy, p]) | |
for p in particles | |
if ( | |
( | |
(p.energy > min_e) | |
& ( | |
frame[self.mctree].get_primary(p.id) | |
in primaries | |
) | |
) | |
& (not p.is_track) | |
) | |
] | |
).T |
This problem leads to the energy proxies calculated by this extractor to be 0 or inaccurate if the particles in the primaries are not in the top level of the MCTree.
3. Wrong return in get_bundle_HEP
This returns a single particle
return dataclasses.I3Particle() |
However, the function is expected to return a Tuple as seen here:
bundle, length_mask, no_intersect = self.get_bundle_HEP( |
I have fixed these bugs already. Positing this here for completeness. @Aske-Rosted, you might want to take a look again.