Skip to content

Bug in I3HighestEparticleExtractor #821

@sevmag

Description

@sevmag

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)

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:

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:

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:

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

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions