Skip to content

Commit 8f2d5ae

Browse files
authored
Prepare for further jet types (alisw#964)
* Prepare for inclusive and JPsi jets * Fixes for inclusive jets * Update for inclusive jets * Make processor run for incl. jets * Update for inclusive jets * Generalize changes for inclusive jets * Update * Fix pylint
1 parent 9f6dbf9 commit 8f2d5ae

File tree

8 files changed

+2104
-51
lines changed

8 files changed

+2104
-51
lines changed

machine_learning_hep/analysis/analyzer_jets.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -404,6 +404,9 @@ def _fit_mass(self, hist, filename = None):
404404

405405
# pylint: disable=too-many-branches,too-many-statements
406406
def fit(self):
407+
if not self.cfg('hfjet', True):
408+
self.logger.info("Not fitting mass distributions for inclusive jets")
409+
return
407410
self.logger.info("Fitting inclusive mass distributions")
408411
gStyle.SetOptFit(1111)
409412
for level in self.fit_levels:
@@ -738,7 +741,9 @@ def _analyze(self, method = 'sidesub'):
738741
# Signal extraction
739742
self.logger.info("Signal extraction (method %s): obs. %s, %s, ipt %d",
740743
method, var, mcordata, ipt)
741-
if method == 'sidesub':
744+
if not self.cfg('hfjet', True):
745+
h = project_hist(h_in, axes_proj[1:], {})
746+
elif method == 'sidesub':
742747
h = self._subtract_sideband(h_in, var, mcordata, ipt)
743748
elif method == 'sigextr':
744749
h = self._extract_signal(h_in, var, mcordata, ipt)

0 commit comments

Comments
 (0)