Skip to content

Commit

Permalink
Enable nr_only option (#41)
Browse files Browse the repository at this point in the history
  • Loading branch information
HenningSE authored Jun 28, 2023
1 parent 4d82db4 commit e6195c6
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion fuse/plugins/micro_physics/input.py
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ def setup(self):
kwargs={'entry_start': self.entry_start,
'entry_stop': self.entry_stop},
cut_by_eventid=self.cut_by_eventid,
#cut_nr_only=self.nr_only,
cut_nr_only=self.nr_only,
)
self.file_reader_iterator = self.file_reader.output_chunk()

Expand Down Expand Up @@ -259,6 +259,7 @@ def output_chunk(self):
interactions = interactions[m]

if self.cut_nr_only:
log.debug("'nr_only' set to True, keeping only the NR events")
m = ((interactions['type'] == "neutron")&(interactions['edproc'] == "hadElastic")) | (interactions['edproc'] == "ionIoni")
e_dep_er = ak.sum(interactions[~m]['ed'], axis=1)
e_dep_nr = ak.sum(interactions[m]['ed'], axis=1)
Expand Down

0 comments on commit e6195c6

Please sign in to comment.