|
7 | 7 |
|
8 | 8 | import law
|
9 | 9 |
|
| 10 | +# from columnflow.tasks.framework.base import ConfigTask |
10 | 11 | from columnflow.tasks.framework.mixins import (
|
11 |
| - CalibratorsMixin, # SelectorStepsMixin, ProducersMixin, MLModelsMixin, |
| 12 | + CalibratorsMixin, SelectorStepsMixin, ProducersMixin, # , MLModelsMixin, |
12 | 13 | )
|
13 | 14 | from columnflow.tasks.plotting import PlotVariables1D
|
14 | 15 | from columnflow.tasks.framework.remote import RemoteWorkflow
|
|
17 | 18 | from columnflow.util import dev_sandbox
|
18 | 19 |
|
19 | 20 |
|
| 21 | +class ControlPlotsSL( |
| 22 | + HBWTask, |
| 23 | + ProducersMixin, |
| 24 | + SelectorStepsMixin, |
| 25 | + CalibratorsMixin, |
| 26 | +): |
| 27 | + |
| 28 | + def requires(self): |
| 29 | + reqs = {} |
| 30 | + |
| 31 | + for l_channel in ("mu", "e"): |
| 32 | + for j_channel in ("resolved", "boosted"): |
| 33 | + reqs[f"control_plots_{l_channel}_{j_channel}"] = PlotVariables1D.req( |
| 34 | + self, |
| 35 | + processes=(f"d{l_channel}ch",), |
| 36 | + # processes=("ggHH_kl_1_kt_1_sl_hbbhww",), |
| 37 | + process_settings=[["scale_signal"]], |
| 38 | + variables=[f"sl_{j_channel}"], |
| 39 | + categories=(f"sl_{l_channel}ch_{j_channel}",), |
| 40 | + yscale="log", |
| 41 | + cms_label="pw", |
| 42 | + ) |
| 43 | + |
| 44 | + return reqs |
| 45 | + |
| 46 | + def output(self): |
| 47 | + # use the input also as output |
| 48 | + # (makes it easier to fetch and delete outputs) |
| 49 | + return self.requires() |
| 50 | + |
| 51 | + def run(self): |
| 52 | + pass |
| 53 | + |
| 54 | + |
20 | 55 | class DefaultPlots(
|
21 | 56 | HBWTask,
|
22 | 57 | # MLModelsMixin,
|
23 | 58 | # ProducersMixin,
|
24 | 59 | # SelectorStepsMixin,
|
25 | 60 | CalibratorsMixin,
|
| 61 | + # we only add workflow mixins to be able to directly pass --workflow instead of --cf.PlotVariables1d-workflow |
26 | 62 | law.LocalWorkflow,
|
27 | 63 | RemoteWorkflow,
|
28 | 64 | ):
|
| 65 | + # TODO: this should be three separate tasks with one additional "wrapper" |
29 | 66 | sandbox = dev_sandbox("bash::$CF_BASE/sandboxes/venv_columnar.sh")
|
30 | 67 |
|
31 | 68 | def create_branch_map(self):
|
|
0 commit comments