Skip to content

Commit e94337b

Browse files
Got rid of derived attributes of reco interactions for cleanliness
1 parent 84d958a commit e94337b

File tree

1 file changed

+1
-123
lines changed

1 file changed

+1
-123
lines changed

spine/data/out/interaction.py

Lines changed: 1 addition & 123 deletions
Original file line numberDiff line numberDiff line change
@@ -278,27 +278,7 @@ def from_particles(cls, particles):
278278
@dataclass(eq=False)
279279
@inherit_docstring(RecoBase, InteractionBase)
280280
class RecoInteraction(InteractionBase, RecoBase):
281-
"""Reconstructed interaction information.
282-
283-
Attributes
284-
----------
285-
leading_shower_dedx : float
286-
dE/dx around the start point of the leading shower in MeV/cm
287-
leading_shower_start_straightness : float
288-
Explained variance ration of the beginning of the leading shower
289-
leading_shower_directional_spread : float
290-
Estimate of the angular spread of the leading shower (cosine spread)
291-
leading_shower_axial_spread : float
292-
Pearson correlation coefficient of the axial profile of the leading
293-
shower w.r.t. to the distance from its start point
294-
leading_shower_vertex_distance : float
295-
Distance between the interaction vertex and the leading shower
296-
"""
297-
leading_shower_start_dedx: float = None
298-
leading_shower_start_straightness: float = None
299-
leading_shower_directional_spread: float = None
300-
leading_shower_axial_spread: float = None
301-
leading_shower_vertex_distance: float = None
281+
"""Reconstructed interaction information."""
302282

303283
# Attributes that must never be stored to file
304284
_skip_attrs = (
@@ -343,108 +323,6 @@ def leading_shower(self):
343323

344324
return max(showers, key=lambda x: x.ke)
345325

346-
@leading_shower.setter
347-
def leading_shower(self, leading_shower):
348-
pass
349-
350-
@property
351-
def leading_shower_start_dedx(self):
352-
"""Leading primary shower start dE/dx.
353-
354-
Returns
355-
-------
356-
float
357-
dE/dx of the leading shower
358-
"""
359-
leading_shower = self.leading_shower
360-
if leading_shower is None:
361-
return -1.
362-
363-
return leading_shower.start_dedx
364-
365-
@leading_shower_start_dedx.setter
366-
def leading_shower_start_dedx(self, leading_shower_start_dedx):
367-
pass
368-
369-
@property
370-
def leading_shower_start_straightness(self):
371-
"""Measure of how straight the start of the leading shower is.
372-
373-
Returns
374-
-------
375-
float
376-
Measure of shower start straightness (between 0 and 1)
377-
"""
378-
leading_shower = self.leading_shower
379-
if leading_shower is None:
380-
return -1.
381-
382-
return leading_shower.start_straightness
383-
384-
@leading_shower_start_straightness.setter
385-
def leading_shower_start_straightness(self, leading_shower_start_straightness):
386-
pass
387-
388-
@property
389-
def leading_shower_directional_spread(self):
390-
"""Distance-weighted mean cosine distance from mean direction
391-
of the leading shower.
392-
393-
Returns
394-
-------
395-
float
396-
Measure of shower directional spread
397-
"""
398-
leading_shower = self.leading_shower
399-
if leading_shower is None:
400-
return -1.
401-
402-
return leading_shower.directional_spread
403-
404-
@leading_shower_directional_spread.setter
405-
def leading_shower_directional_spread(self, leading_shower_directional_spread):
406-
pass
407-
408-
@property
409-
def leading_shower_axial_spread(self):
410-
"""Pearson R correlation coefficient between the distance from
411-
the primary leading shower start to a shower point (x) and the
412-
perpendicular distance from the shower point to the shower axis (y).
413-
414-
Returns
415-
-------
416-
float
417-
Measure of shower axial spread
418-
"""
419-
leading_shower = self.leading_shower
420-
if leading_shower is None:
421-
return -np.inf
422-
423-
return leading_shower.axial_spread
424-
425-
@leading_shower_axial_spread.setter
426-
def leading_shower_axial_spread(self, leading_shower_axial_spread):
427-
pass
428-
429-
@property
430-
def leading_shower_vertex_distance(self):
431-
"""Leading primary shower vertex distance.
432-
433-
Returns
434-
-------
435-
float
436-
Vertex distance of the leading shower
437-
"""
438-
leading_shower = self.leading_shower
439-
if leading_shower is None:
440-
return -1.
441-
442-
return leading_shower.vertex_distance
443-
444-
@leading_shower_vertex_distance.setter
445-
def leading_shower_vertex_distance(self, leading_shower_vertex_distance):
446-
pass
447-
448326

449327
@dataclass(eq=False)
450328
@inherit_docstring(TruthBase, InteractionBase)

0 commit comments

Comments
 (0)