Skip to content
Snippets Groups Projects
Commit e1756439 authored by Zineb Aly's avatar Zineb Aly
Browse files

add best track

parent 7fb23f0e
No related branches found
No related tags found
No related merge requests found
from collections import namedtuple from collections import namedtuple
import uproot import uproot
import warnings import warnings
import awkward1 as ak1
import numba as nb import numba as nb
import awkward1 as ak1
from .definitions import mc_header, fitparameters from .definitions import mc_header, fitparameters
from .tools import cached_property, to_num, unfold_indices from .tools import cached_property, to_num, unfold_indices
...@@ -152,8 +152,8 @@ def best_track(tracks, strategy="first", rec_stages=None): ...@@ -152,8 +152,8 @@ def best_track(tracks, strategy="first", rec_stages=None):
""" """
if strategy == "first": if strategy == "first":
return tracks[:, 0] return tracks[:, 0]
# if strategy == "rec_stages" and rec_stages is not None: if strategy == "rec_stages" and rec_stages is not None:
# mask = tracks.rec_stages[] return tracks[mask(tracks.rec_stages, rec_stages)]
EVENTS_MAP = BranchMapper(name="events", EVENTS_MAP = BranchMapper(name="events",
...@@ -182,8 +182,8 @@ SUBBRANCH_MAPS = [ ...@@ -182,8 +182,8 @@ SUBBRANCH_MAPS = [
BranchMapper(name="mc_tracks", BranchMapper(name="mc_tracks",
key="mc_trks", key="mc_trks",
exclude=EXCLUDE_KEYS + [ exclude=EXCLUDE_KEYS + [
'mc_trks.rec_stages', 'mc_trks.rec_stages', 'mc_trks.fitinf',
'mc_trks.fitinf', 'mc_trks.fUniqueID', 'mc_trks.fBits' 'mc_trks.fUniqueID', 'mc_trks.fBits'
], ],
attrparser=_nested_mapper, attrparser=_nested_mapper,
toawkward=['usr', 'usr_names'], toawkward=['usr', 'usr_names'],
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment