Skip to content

Commit

Permalink
Take event counter from DB
Browse files Browse the repository at this point in the history
  • Loading branch information
qgp committed Aug 31, 2024
1 parent 809d0ad commit ef2ec57
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -373,6 +373,7 @@ D0jet_pp:

cand_collidx: fIndexHfD0CollBases
# sigmamb: 57.8e-3 #NB: multiplied by 1e12 before giving to HFPtSpectrum!
cnt_events_read: fReadCountsWithTVXAndZVertexAndSel8

observables:
zg:
Expand Down
3 changes: 1 addition & 2 deletions machine_learning_hep/processer_jet.py
Original file line number Diff line number Diff line change
Expand Up @@ -174,8 +174,7 @@ def process_histomass_single(self, index):
histonorm.SetBinContent(1, len(dfquery(dfevtorig, self.s_evtsel)))
dfcollcnt = read_df(self.l_collcnt[index])
collcnt = functools.reduce(
lambda x,y: float(x)+float(y), (ar[0] for ar in dfcollcnt['fReadCountsWithTVXAndZVertexAndSel8'])) # new
# lambda x,y: float(x)+float(y), (ar[0] for ar in dfcollcnt['fReadSelectedCounts'])) # old
lambda x,y: float(x)+float(y), (ar[0] for ar in dfcollcnt[self.cfg('cnt_events_read', 'fReadSelectedCounts')]))
self.logger.info('sampled %g collisions', collcnt)
histonorm.SetBinContent(2, collcnt)
get_axis(histonorm, 0).SetBinLabel(1, 'N_{evt}')
Expand Down

0 comments on commit ef2ec57

Please sign in to comment.