Skip to content

Commit

Permalink
Use correct nevents after nhit filter
Browse files Browse the repository at this point in the history
  • Loading branch information
mjkramer committed Feb 9, 2025
1 parent 87eec18 commit b6610df
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/proto_nd_flow/reco/charge/raw_event_generator.py
Original file line number Diff line number Diff line change
Expand Up @@ -447,8 +447,7 @@ def next(self):
if self.is_mc:
event_mc_assn = eb_rv[2]

nevents = len(events)
if not nevents:
if not events:
return H5FlowGenerator.EMPTY

# apply nhit cut
Expand All @@ -465,6 +464,8 @@ def next(self):
if self.is_mc:
event_mc_assn = list()

nevents = len(events)

# write event to file
raw_event_array = np.zeros((nevents,), dtype=self.raw_event_dtype)
raw_event_slice = self.data_manager.reserve_data(self.raw_event_dset_name, nevents)
Expand Down

0 comments on commit b6610df

Please sign in to comment.