@@ -232,7 +232,7 @@ def get_energies(
232
232
):
233
233
hdr = frame ["I3EventHeader" ]
234
234
e .add_note (f"Error in MuonGun track in event { hdr } " )
235
- print (f"Skipping bad event { hdr } : { e } " )
235
+ self . warning (f"Skipping bad event { hdr } : { e } " )
236
236
e0 = np .nan
237
237
e1 = np .nan
238
238
e_dep_cascade = np .nan
@@ -315,35 +315,6 @@ def frame_contains_info(self, frame: "icetray.I3Frame") -> bool:
315
315
"""Check if the frame contains the necessary information."""
316
316
return self .mctree in frame and self .mmctracklist in frame
317
317
318
- def in_hull_filter (
319
- self ,
320
- frame : "icetray.I3Frame" ,
321
- particles : List ["dataclasses.I3Particle" ],
322
- ) -> bool :
323
- """Filter particle list to only particles that are in the hull."""
324
- pos , direc , length = np .asarray (
325
- [
326
- [
327
- np .array (p .pos ),
328
- np .array ([p .dir .x , p .dir .y , p .dir .z ]),
329
- p .length ,
330
- ]
331
- for p in particles
332
- ],
333
- dtype = object ,
334
- ).T
335
-
336
- length = length .astype (float )
337
-
338
- # replace length nan with 0
339
- length [np .isnan (length )] = 0
340
- pos = pos + direc * length
341
- pos = np .stack (pos )
342
-
343
- in_volume = self .hull .point_in_hull (pos )
344
- is_track = np .array ([p .is_track for p in particles ], dtype = bool )
345
- return np .array (particles )[is_track | in_volume ]
346
-
347
318
def is_in_hull (self , particle : "dataclasses.I3Particle" ) -> bool :
348
319
"""Check if a particle is in the hull."""
349
320
pos = np .array (particle .pos )
0 commit comments