Skip to content

Commit

Permalink
flat calling structure for trackParticle(s) behavior methods
Browse files Browse the repository at this point in the history
  • Loading branch information
nikoladze committed Aug 22, 2023
1 parent afbc8c5 commit bcc7dea
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/coffea/nanoevents/methods/physlite.py
Original file line number Diff line number Diff line change
Expand Up @@ -204,12 +204,12 @@ def trackParticles(self, _dask_array_=None):

@property
def trackParticle(self, _dask_array_=None):
if _dask_array_ is not None:
self = _dask_array_ # TODO: is this what i should be doing?
trackParticles = self.trackParticles
return self.trackParticles[
tuple([slice(None) for i in range(trackParticles.ndim - 1)] + [0])
]
trackParticles = _element_link_method(
self, "trackParticleLinks", "GSFTrackParticles", _dask_array_
)
# Ellipsis (..., 0) slicing not supported yet by dask_awkward
slicer = tuple([slice(None) for i in range(trackParticles.ndim - 1)] + [0])
return trackParticles[slicer]

@property
def caloClusters(self, _dask_array_=None):
Expand Down

0 comments on commit bcc7dea

Please sign in to comment.