Skip to content

About signal statistical uncertainty #450

Discussion options

You must be logged in to vote

Here is an example for how to implement this:

import cabinetry

spec = cabinetry.workspace.load("workspaces/example_workspace.json")

# decorrelate MC statistical uncertainty of "Signal" samples
for channel in spec["channels"]:
    for sample in channel["samples"]:
        if sample["name"] != "Signal":  # pick the sample you need
            continue

        for modifier in sample["modifiers"]:
            if modifier["type"] == "staterror":
                modifier["type"] = "shapesys"
                modifier["name"] = f"{modifier['name'].replace('staterror', 'shapesys')}_{sample['name']}"

cabinetry.workspace.save(spec, "ws_modified.json")  # optionally save again

model, data = cabi…

Replies: 2 comments 5 replies

Comment options

You must be logged in to vote
5 replies
@Tomoya-Iizawa
Comment options

@alexander-held
Comment options

Answer selected by Tomoya-Iizawa
@Tomoya-Iizawa
Comment options

@alexander-held
Comment options

@Tomoya-Iizawa
Comment options

Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants