Skip to content

Commit

Permalink
update columnflow and discard pdf weights with stddev>0.5
Browse files Browse the repository at this point in the history
  • Loading branch information
mafrahm committed Oct 12, 2023
1 parent c7c2a25 commit 122540a
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
2 changes: 1 addition & 1 deletion hbw/production/normalized_weights.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ def normalized_weight(self: Producer, events: ak.Array, **kwargs) -> ak.Array:
self[prod].produced_columns.difference(events.fields) and
self[prod].used_columns.intersection(events.fields)
):
print(f"Rerun producer {self[prod].cls_name}")
logger.info(f"Rerun producer {self[prod].cls_name}")
events = self[prod](events, **kwargs)

# Create normalized weight columns if possible
Expand Down
7 changes: 6 additions & 1 deletion hbw/production/weights.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,12 @@ def event_weights_to_normalize(self: Producer, events: ak.Array, results: Select

if not self.dataset_inst.has_tag("skip_pdf"):
# compute pdf weights
events = self[pdf_weights](events, **kwargs)
events = self[pdf_weights](
events,
outlier_action="remove",
outlier_log_mode="warning",
**kwargs,
)

return events

Expand Down
2 changes: 1 addition & 1 deletion modules/columnflow
Submodule columnflow updated 50 files
+9 −0 .all-contributorsrc
+1 −0 README.md
+4 −5 analysis_templates/cms_minimal/__cf_module_name__/config/analysis___cf_short_name_lc__.py
+1 −1 analysis_templates/cms_minimal/tests/run_all
+2 −2 bin/cf_create_venv
+4 −4 bin/cf_make_venv_relocatable
+1 −1 bin/cf_remove_wlcg_cache_locks
+5 −5 bin/cf_sandbox
+1 −1 bin/githooks/post-commit
+7 −7 columnflow/__init__.py
+1 −1 columnflow/calibration/__init__.py
+1 −1 columnflow/calibration/cms/jets.py
+4 −2 columnflow/calibration/cms/met.py
+11 −4 columnflow/calibration/util.py
+1 −1 columnflow/categorization/__init__.py
+2 −2 columnflow/columnar_util.py
+2 −2 columnflow/config_util.py
+4 −1 columnflow/inference/__init__.py
+15 −17 columnflow/inference/cms/datacard.py
+1 −1 columnflow/ml/__init__.py
+1 −1 columnflow/plotting/plot_all.py
+1 −1 columnflow/plotting/plot_functions_1d.py
+3 −4 columnflow/plotting/plot_util.py
+1 −1 columnflow/production/__init__.py
+8 −2 columnflow/production/cms/btag.py
+10 −2 columnflow/production/cms/electron.py
+8 −2 columnflow/production/cms/muon.py
+76 −5 columnflow/production/cms/pdf.py
+1 −2 columnflow/production/util.py
+1 −1 columnflow/selection/__init__.py
+1 −2 columnflow/selection/cms/met_filters.py
+1 −2 columnflow/selection/matching.py
+1 −1 columnflow/selection/stats.py
+1 −0 columnflow/tasks/calibration.py
+1 −2 columnflow/tasks/cms/external.py
+2 −2 columnflow/tasks/external.py
+4 −4 columnflow/tasks/framework/base.py
+1 −1 columnflow/tasks/framework/mixins.py
+1 −1 columnflow/tasks/framework/plotting.py
+9 −3 columnflow/tasks/framework/remote.py
+2 −2 columnflow/tasks/framework/remote_bootstrap.sh
+58 −0 columnflow/tasks/ml.py
+24 −0 columnflow/types.py
+3 −3 columnflow/util.py
+1 −1 modules/law
+1 −1 sandboxes/_setup_cmssw.sh
+1 −1 sandboxes/_setup_venv.sh
+2 −2 setup.sh
+4 −4 tests/run_all
+1 −1 tests/run_test

0 comments on commit 122540a

Please sign in to comment.