Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bin Optimizer task #226

Open
mafrahm opened this issue Apr 6, 2023 · 0 comments
Open

Bin Optimizer task #226

mafrahm opened this issue Apr 6, 2023 · 0 comments
Assignees
Labels
enhancement New feature or request priority-medium Medium priority stuff

Comments

@mafrahm
Copy link
Contributor

mafrahm commented Apr 6, 2023

We need a task to call some kind of bin optimizer, which takes as requirements events or histograms from multiple datasets and configs (defined by the class itself). One should then be able to give this bin optimizer to a variable, which then requires the corresponding task to be run as part of the requirements of CreateHistograms.

In the final task structure, this could look like this.

flowchart TD
    C(CreateHistograms)
    M(MergeHistograms)
    O(OptimizeBinning)
    P(ProduceColumns)

    P --> C --> M 
    P -- multiple datasets, configs --> O
    M -- multiple datasets, configs --> O
    O --> C

Example:
We declared some variable requiring some bin_optimizer

config.add_variable(
   name="my_variable",
   binning="my_bin_optimizer",  # maybe also as a separate field or an aux
)

And now want to create histograms/plots with this variable, e.g.

law run cf.CreateHistograms --version v1 --variable my_variable --dataset tt_sl_powheg

This should trigger the OptimizeBinning task for all the processes required there.
For example, if my_bin_optimizer implements a flat background binning, it should trigger the requirements (e.g. MergeHistograms) for all background processes.

@mafrahm mafrahm added enhancement New feature or request priority-medium Medium priority stuff labels Apr 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request priority-medium Medium priority stuff
Projects
Status: Todo
Development

No branches or pull requests

2 participants