-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* init new branch * update submodules * adding files * fix linting * updating inf_model * adding limited dataset option * adding hh producer * deleting old qcd estimation * test: add 2j cat and shape uncertanties * adding nested dict for up/down shifts * fixing uncertainties propagation * under/overflow fix * Linting. * Remove test versions. --------- Co-authored-by: Ana A <[email protected]>
- Loading branch information
Showing
7 changed files
with
112 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,89 @@ | ||
from columnflow.inference import inference_model, ParameterType, ParameterTransformation | ||
|
||
|
||
@inference_model | ||
def test_unc(self): | ||
self.add_category( | ||
"incl", | ||
config_category="incl", | ||
config_variable="hh_mass", | ||
# fake data | ||
data_from_processes=["TT", "dy"], | ||
mc_stats=True, | ||
) | ||
|
||
self.add_category( | ||
"2j", | ||
config_category="2j", | ||
config_variable="jet1_pt", | ||
# fake data | ||
data_from_processes=["TT", "dy"], | ||
mc_stats=True, | ||
) | ||
|
||
# | ||
# processes | ||
# | ||
self.add_process( | ||
"dy", | ||
config_process="dy", | ||
) | ||
|
||
self.add_process( | ||
"TT", | ||
config_process="tt_sl", | ||
) | ||
|
||
self.add_process( | ||
"hh_ggf", | ||
is_signal=True, | ||
config_process="hh_ggf_hbb_htt_kl1_kt1", | ||
) | ||
|
||
# | ||
# parameters | ||
# | ||
|
||
# groups | ||
self.add_parameter_group("experiment") | ||
self.add_parameter_group("theory") | ||
|
||
# lumi | ||
lumi = self.config_inst.x.luminosity | ||
for unc_name in lumi.uncertainties: | ||
self.add_parameter( | ||
unc_name, | ||
type=ParameterType.rate_gauss, | ||
effect=lumi.get(names=unc_name, direction=("down", "up"), factor=True), | ||
) | ||
self.add_parameter_to_group(unc_name, "experiment") | ||
|
||
# electron uncertainty | ||
self.add_parameter( | ||
"CMS_eff_e", # this is the name of the uncertainty as it will show in the datacard. Let's use some variant of the official naming # noqa | ||
process="*", | ||
type=ParameterType.shape, | ||
config_shift_source="e", # this is the name of the shift (alias) in the config | ||
) | ||
self.add_parameter_to_group("CMS_eff_e", "experiment") | ||
|
||
# a custom asymmetric uncertainty | ||
self.add_parameter( | ||
"QCDscale_ttbar", | ||
process="TT", | ||
type=ParameterType.shape, | ||
transformations=[ParameterTransformation.effect_from_rate], | ||
effect=(0.85, 1.1), | ||
) | ||
self.add_parameter_to_group("QCDscale_ttbar", "experiment") | ||
|
||
""" | ||
# tune uncertainty | ||
self.add_parameter( | ||
"tune", | ||
process="TT", | ||
type=ParameterType.shape, | ||
config_shift_source="tune", | ||
) | ||
self.add_parameter_to_group("tune", "experiment") | ||
""" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Submodule cmsdb
updated
9 files