From 4f421771d3c792f13d7912de7308663d4a1dac65 Mon Sep 17 00:00:00 2001 From: Jochen Klein Date: Sat, 7 Sep 2024 21:14:31 +0200 Subject: [PATCH] Suppress D* --- .../database_ml_parameters_D0Jet_pp.yml | 32 +++++++++++++------ machine_learning_hep/processer_jet.py | 2 +- 2 files changed, 23 insertions(+), 11 deletions(-) diff --git a/machine_learning_hep/data/data_run3/database_ml_parameters_D0Jet_pp.yml b/machine_learning_hep/data/data_run3/database_ml_parameters_D0Jet_pp.yml index f81792f477..b210883aee 100644 --- a/machine_learning_hep/data/data_run3/database_ml_parameters_D0Jet_pp.yml +++ b/machine_learning_hep/data/data_run3/database_ml_parameters_D0Jet_pp.yml @@ -446,8 +446,8 @@ D0Jet_pp: components: sig: fn: 'Gaussian::peak(m[1.,5.], mean[1.85,1.89], sigma_g1[.01,.08])' - bkg: - fn: 'Gaussian::wide(m, mean, sigma_wide[.05,1.])' + wide: + fn: 'Gaussian::wide(m, mean, expr("n*sigma_g1", n[1.,5.], sigma_g1))' model: fn: 'SUM::sig(frac_wide[0.,.3]*wide, peak)' - level: mcrefl @@ -530,49 +530,49 @@ D0Jet_pp: - level: mc ptrange: [1., 3.] range: [1.69, 2.04] - fix_params: ['frac_l', 'mean_l', 'mean_r', 'sigma_l', 'sigma_r', 'frac_wide', 'sigma_g1', 'sigma_wide'] + fix_params: ['frac_l', 'mean_l', 'mean_r', 'sigma_l', 'sigma_r', 'frac_wide', 'sigma_g1', 'n'] components: model: fn: 'SUM::sigrefl(frac_refl[0.,1.]*refl, sig)' - level: mc ptrange: [3., 4.] range: [1.68, 2.06] - fix_params: ['frac_l', 'mean_l', 'mean_r', 'sigma_l', 'sigma_r', 'frac_wide', 'sigma_g1', 'sigma_wide'] + fix_params: ['frac_l', 'mean_l', 'mean_r', 'sigma_l', 'sigma_r', 'frac_wide', 'sigma_g1', 'n'] components: model: fn: 'SUM::sigrefl(frac_refl[0.,1.]*refl, sig)' - level: mc ptrange: [4., 5.] range: [1.64, 2.08] - fix_params: ['frac_l', 'mean_l', 'mean_r', 'sigma_l', 'sigma_r', 'frac_wide', 'sigma_g1', 'sigma_wide'] + fix_params: ['frac_l', 'mean_l', 'mean_r', 'sigma_l', 'sigma_r', 'frac_wide', 'sigma_g1', 'n'] components: model: fn: 'SUM::sigrefl(frac_refl[0.,1.]*refl, sig)' - level: mc ptrange: [5., 6.] range: [1.64, 2.10] - fix_params: ['frac_l', 'mean_l', 'mean_r', 'sigma_l', 'sigma_r', 'frac_wide', 'sigma_g1', 'sigma_wide'] + fix_params: ['frac_l', 'mean_l', 'mean_r', 'sigma_l', 'sigma_r', 'frac_wide', 'sigma_g1', 'n'] components: model: fn: 'SUM::sigrefl(frac_refl[0.,1.]*refl, sig)' - level: mc ptrange: [6., 8.] range: [1.60, 2.14] - fix_params: ['frac_l', 'mean_l', 'mean_r', 'sigma_l', 'sigma_r', 'frac_wide', 'sigma_g1', 'sigma_wide'] + fix_params: ['frac_l', 'mean_l', 'mean_r', 'sigma_l', 'sigma_r', 'frac_wide', 'sigma_g1', 'n'] components: model: fn: 'SUM::sigrefl(frac_refl[0.,1.]*refl, sig)' - level: mc ptrange: [8., 12.] range: [1.52, 2.30] - fix_params: ['frac_l', 'mean_l', 'mean_r', 'sigma_l', 'sigma_r', 'frac_wide', 'sigma_g1', 'sigma_wide'] + fix_params: ['frac_l', 'mean_l', 'mean_r', 'sigma_l', 'sigma_r', 'frac_wide', 'sigma_g1', 'n'] components: model: fn: 'SUM::sigrefl(frac_refl[0.,1.]*refl, sig)' - level: mc ptrange: [12., 48.] range: [1.40, 2.40] - fix_params: ['frac_l', 'mean_l', 'mean_r', 'sigma_l', 'sigma_r', 'frac_wide', 'sigma_g1', 'sigma_wide'] + fix_params: ['frac_l', 'mean_l', 'mean_r', 'sigma_l', 'sigma_r', 'frac_wide', 'sigma_g1', 'n'] components: model: fn: 'SUM::sigrefl(frac_refl[0.,1.]*refl, sig)' @@ -803,7 +803,19 @@ D0Jet_pp: # Additional cuts applied before mass histogram is filled use_cuts: True # systematics - cuts: ["mlBkgScore < 0.02", "mlBkgScore < 0.02", "mlBkgScore < 0.02", "mlBkgScore < 0.05", "mlBkgScore < 0.06", "mlBkgScore < 0.08", "mlBkgScore < 0.08", "mlBkgScore < 0.10", "mlBkgScore < 0.10", "mlBkgScore < 0.20", "mlBkgScore < 0.25", "mlBkgScore < 0.30"] # (sel_an_binmin bins) systematics FIXME: Update for new model. + cuts: + - "mlBkgScore < 0.02" + - "mlBkgScore < 0.02" + - "mlBkgScore < 0.02" + - "mlBkgScore < 0.05" + - "mlBkgScore < 0.06" + - "mlBkgScore < 0.08" + - "mlBkgScore < 0.08" + - "mlBkgScore < 0.10" + - "mlBkgScore < 0.10" + - "mlBkgScore < 0.20" + - "mlBkgScore < 0.25" + - "mlBkgScore < 0.30" systematics: # used in machine_learning_hep/analysis/systematics.py probvariation: diff --git a/machine_learning_hep/processer_jet.py b/machine_learning_hep/processer_jet.py index 1b3e06d226..6d82a0d816 100644 --- a/machine_learning_hep/processer_jet.py +++ b/machine_learning_hep/processer_jet.py @@ -239,7 +239,7 @@ def process_histomass_single(self, index): self._calculate_variables(df) # FIXME: suppress D*, move to DB - df = df[(abs(df.M_D_pi - 2.01) > .01) & (df.fJetNConstituents == 2)] + df = df[(abs(df.M_D_pi - 2.01) > .01) | (df.fJetNConstituents > 2)] for obs, spec in self.cfg('observables', {}).items(): self.logger.debug('preparing histograms for %s', obs)