Functions | |
def | official2private |
def | private2official |
def | is_control_region |
def | matching_process |
def | remove_procs_and_systs_with_zero_yield |
Variables | |
tuple | log = logging.getLogger(__name__) |
tuple | parser |
string | help = "Input directory." |
list | default = ["all"] |
tuple | args = parser.parse_args() |
tuple | sample_settings = samples.Samples() |
tuple | binnings_settings = binnings.BinningsDict() |
tuple | systematics_factory = systematics.SystematicsFactory() |
list | plot_configs = [] |
list | output_files = [] |
list | merged_output_files = [] |
list | hadd_commands = [] |
datacards = None | |
dictionary | category_replacements = {} |
tuple | init_directory = os.path.join(args.output_dir, "init") |
string | command = "MorphingSM2016 --control_region=1 --manual_rebin=false --mm_fit=false --ttbar_fit=true --only_init=" |
tuple | exit_code = logger.subprocessCall(shlex.split(command)) |
tuple | init_cb = ch.CombineHarvester() |
string | tmp_input_root_filename_template = "shapes/RWTH/${ANALYSIS}_${CHANNEL}_${BIN}_${SYSTEMATIC}_${ERA}.root" |
string | input_root_filename_template = "shapes/RWTH/${ANALYSIS}_${CHANNEL}.inputs-sm-${ERA}-2D.root" |
string | bkg_histogram_name_template = "${BIN}/${PROCESS}" |
string | sig_histogram_name_template = "${BIN}/${PROCESS}${MASS}" |
string | bkg_syst_histogram_name_template = "${BIN}/${PROCESS}_${SYSTEMATIC}" |
string | sig_syst_histogram_name_template = "${BIN}/${PROCESS}${MASS}_${SYSTEMATIC}" |
datacard_filename_templates = datacards.configs.htt_datacard_filename_templates | |
string | output_root_filename_template = "datacards/common/${ANALYSIS}.input_${ERA}.root" |
list | jecUncertNames |
dictionary | ss_os_factors |
dictionary | wj_sf_shifts |
dictionary | zmm_cr_factors |
string | zmm_cr_0jet_global = "(1.0)" |
string | zmm_cr_boosted_global = "(1.0)" |
string | zmm_cr_vbf_global = "(1.02)" |
dictionary | zmm_cr_factors_official |
list | top_pt_reweight_nicks |
list | categoriesWithRelaxedIsolationForW |
list | categoriesWithRelaxedIsolationForQCD |
do_not_normalize_by_bin_width = args.do_not_normalize_by_bin_width | |
list | tmp_output_files = [] |
tuple | output_file |
tuple | categories = datacards.cb.cp() |
tuple | categories_save = sorted(categories) |
tuple | category = official2private(official_category, category_replacements) |
tuple | datacards_per_channel_category = smhttdatacards.SMHttDatacards(cb=datacards.cb.cp().channel([channel]).bin([official_category])) |
tuple | exclude_cuts = copy.deepcopy(args.exclude_cuts) |
list | higgs_masses = [mass for mass in datacards_per_channel_category.cb.mass_set() if mass != "*"] |
tuple | nominal = (shape_systematic == "nominal") |
list | list_of_samples = [datacards.configs.process2sample(process) for process in list_of_samples] |
string | systematic = "nominal" |
string | samples = "\", \"" |
channel = channel, | |
tuple | ss_os_factor = ss_os_factors.get(category,0.0) |
tuple | wj_sf_shift = wj_sf_shifts.get(category,0.0) |
tuple | zmm_cr_factor = zmm_cr_factors_official.get(category, "(1.0)") |
tuple | config |
tuple | systematics_settings = systematics_factory.get(shape_systematic) |
list | weightAtIndex = config["weights"] |
string | binnings_key = "binningHtt13TeV_" |
histogram_name_template = bkg_histogram_name_templateifnominalelsebkg_syst_histogram_name_template | |
tuple | PROCESS = datacards.configs.sample2process(sample) |
BIN = official_category, | |
SYSTEMATIC = systematic | |
tuple | tmp_output_file |
DST = output_file, | |
string | SRC = " " |
list | debug_plot_configs = [] |
update_systematics = True | |
tuple | processes = datacards.cb.cp() |
float | add_threshold = 0.05 |
dictionary | datacards_cbs = {} |
dictionary | datacards_poi_ranges = {} |
tuple | channels = cb.channel_set() |
tuple | datacards_workspaces = datacards.text2workspace(datacards_cbs, n_processes=args.n_processes) |
tuple | datacards_postfit_shapes = datacards.postfit_shapes_fromworkspace(datacards_cbs, datacards_workspaces, False, args.n_processes, "--sampling" + (" --print" if args.n_processes <= 1 else "")) |
dictionary | backgrounds_to_merge |
dictionary | x_tick_labels |
dictionary | texts |
dictionary | texts_x |
dictionary | vertical_lines |
tuple | prefit_postfit_plot_configs = datacards.prefit_postfit_plots(datacards_cbs, datacards_postfit_shapes, plotting_args={"ratio" : args.ratio, "args" : args.args, "lumi" : args.lumi, "normalize" : not(do_not_normalize_by_bin_width), "era" : args.era, "x_expressions" : config["x_expressions"][0], "return_configs" : True, "merge_backgrounds" : backgrounds_to_merge, "add_soverb_ratio" : True}, n_processes=args.n_processes) |
list | plot_category = plot_config["filename"] |
list | plot_channel = plot_config["title"] |
def makePlots_datacardsSMHtt.is_control_region | ( | obj | ) |
def makePlots_datacardsSMHtt.matching_process | ( | obj1, | |
obj2 | |||
) |
def makePlots_datacardsSMHtt.official2private | ( | category, | |
category_replacements | |||
) |
def makePlots_datacardsSMHtt.private2official | ( | category, | |
category_replacements | |||
) |
def makePlots_datacardsSMHtt.remove_procs_and_systs_with_zero_yield | ( | proc | ) |
float makePlots_datacardsSMHtt.add_threshold = 0.05 |
tuple makePlots_datacardsSMHtt.args = parser.parse_args() |
dictionary makePlots_datacardsSMHtt.backgrounds_to_merge |
makePlots_datacardsSMHtt.BIN = official_category, |
string makePlots_datacardsSMHtt.binnings_key = "binningHtt13TeV_" |
tuple makePlots_datacardsSMHtt.binnings_settings = binnings.BinningsDict() |
string makePlots_datacardsSMHtt.bkg_histogram_name_template = "${BIN}/${PROCESS}" |
string makePlots_datacardsSMHtt.bkg_syst_histogram_name_template = "${BIN}/${PROCESS}_${SYSTEMATIC}" |
tuple makePlots_datacardsSMHtt.categories = datacards.cb.cp() |
tuple makePlots_datacardsSMHtt.categories_save = sorted(categories) |
list makePlots_datacardsSMHtt.categoriesWithRelaxedIsolationForQCD |
list makePlots_datacardsSMHtt.categoriesWithRelaxedIsolationForW |
makePlots_datacardsSMHtt.category = official2private(official_category, category_replacements) |
dictionary makePlots_datacardsSMHtt.category_replacements = {} |
makePlots_datacardsSMHtt.channel = channel, |
tuple makePlots_datacardsSMHtt.channels = cb.channel_set() |
string makePlots_datacardsSMHtt.command = "MorphingSM2016 --control_region=1 --manual_rebin=false --mm_fit=false --ttbar_fit=true --only_init=" |
tuple makePlots_datacardsSMHtt.config |
makePlots_datacardsSMHtt.datacard_filename_templates = datacards.configs.htt_datacard_filename_templates |
tuple makePlots_datacardsSMHtt.datacards = None |
dictionary makePlots_datacardsSMHtt.datacards_cbs = {} |
tuple makePlots_datacardsSMHtt.datacards_per_channel_category = smhttdatacards.SMHttDatacards(cb=datacards.cb.cp().channel([channel]).bin([official_category])) |
dictionary makePlots_datacardsSMHtt.datacards_poi_ranges = {} |
tuple makePlots_datacardsSMHtt.datacards_postfit_shapes = datacards.postfit_shapes_fromworkspace(datacards_cbs, datacards_workspaces, False, args.n_processes, "--sampling" + (" --print" if args.n_processes <= 1 else "")) |
tuple makePlots_datacardsSMHtt.datacards_workspaces = datacards.text2workspace(datacards_cbs, n_processes=args.n_processes) |
list makePlots_datacardsSMHtt.debug_plot_configs = [] |
string makePlots_datacardsSMHtt.default = ["all"] |
makePlots_datacardsSMHtt.do_not_normalize_by_bin_width = args.do_not_normalize_by_bin_width |
makePlots_datacardsSMHtt.DST = output_file, |
tuple makePlots_datacardsSMHtt.exclude_cuts = copy.deepcopy(args.exclude_cuts) |
tuple makePlots_datacardsSMHtt.exit_code = logger.subprocessCall(shlex.split(command)) |
list makePlots_datacardsSMHtt.hadd_commands = [] |
string makePlots_datacardsSMHtt.help = "Input directory." |
list makePlots_datacardsSMHtt.higgs_masses = [mass for mass in datacards_per_channel_category.cb.mass_set() if mass != "*"] |
makePlots_datacardsSMHtt.histogram_name_template = bkg_histogram_name_templateifnominalelsebkg_syst_histogram_name_template |
tuple makePlots_datacardsSMHtt.init_cb = ch.CombineHarvester() |
tuple makePlots_datacardsSMHtt.init_directory = os.path.join(args.output_dir, "init") |
string makePlots_datacardsSMHtt.input_root_filename_template = "shapes/RWTH/${ANALYSIS}_${CHANNEL}.inputs-sm-${ERA}-2D.root" |
list makePlots_datacardsSMHtt.jecUncertNames |
list makePlots_datacardsSMHtt.list_of_samples = [datacards.configs.process2sample(process) for process in list_of_samples] |
tuple makePlots_datacardsSMHtt.log = logging.getLogger(__name__) |
list makePlots_datacardsSMHtt.merged_output_files = [] |
tuple makePlots_datacardsSMHtt.nominal = (shape_systematic == "nominal") |
tuple makePlots_datacardsSMHtt.output_file |
tuple makePlots_datacardsSMHtt.output_files = [] |
string makePlots_datacardsSMHtt.output_root_filename_template = "datacards/common/${ANALYSIS}.input_${ERA}.root" |
tuple makePlots_datacardsSMHtt.parser |
list makePlots_datacardsSMHtt.plot_category = plot_config["filename"] |
list makePlots_datacardsSMHtt.plot_channel = plot_config["title"] |
list makePlots_datacardsSMHtt.plot_configs = [] |
tuple makePlots_datacardsSMHtt.prefit_postfit_plot_configs = datacards.prefit_postfit_plots(datacards_cbs, datacards_postfit_shapes, plotting_args={"ratio" : args.ratio, "args" : args.args, "lumi" : args.lumi, "normalize" : not(do_not_normalize_by_bin_width), "era" : args.era, "x_expressions" : config["x_expressions"][0], "return_configs" : True, "merge_backgrounds" : backgrounds_to_merge, "add_soverb_ratio" : True}, n_processes=args.n_processes) |
tuple makePlots_datacardsSMHtt.PROCESS = datacards.configs.sample2process(sample) |
tuple makePlots_datacardsSMHtt.processes = datacards.cb.cp() |
tuple makePlots_datacardsSMHtt.sample_settings = samples.Samples() |
string makePlots_datacardsSMHtt.samples = "\", \"" |
string makePlots_datacardsSMHtt.sig_histogram_name_template = "${BIN}/${PROCESS}${MASS}" |
string makePlots_datacardsSMHtt.sig_syst_histogram_name_template = "${BIN}/${PROCESS}${MASS}_${SYSTEMATIC}" |
string makePlots_datacardsSMHtt.SRC = " " |
tuple makePlots_datacardsSMHtt.ss_os_factor = ss_os_factors.get(category,0.0) |
dictionary makePlots_datacardsSMHtt.ss_os_factors |
makePlots_datacardsSMHtt.systematic = "nominal" |
makePlots_datacardsSMHtt.SYSTEMATIC = systematic |
tuple makePlots_datacardsSMHtt.systematics_factory = systematics.SystematicsFactory() |
tuple makePlots_datacardsSMHtt.systematics_settings = systematics_factory.get(shape_systematic) |
dictionary makePlots_datacardsSMHtt.texts |
dictionary makePlots_datacardsSMHtt.texts_x |
string makePlots_datacardsSMHtt.tmp_input_root_filename_template = "shapes/RWTH/${ANALYSIS}_${CHANNEL}_${BIN}_${SYSTEMATIC}_${ERA}.root" |
tuple makePlots_datacardsSMHtt.tmp_output_file |
tuple makePlots_datacardsSMHtt.tmp_output_files = [] |
list makePlots_datacardsSMHtt.top_pt_reweight_nicks |
makePlots_datacardsSMHtt.update_systematics = True |
dictionary makePlots_datacardsSMHtt.vertical_lines |
tuple makePlots_datacardsSMHtt.weightAtIndex = config["weights"] |
float makePlots_datacardsSMHtt.wj_sf_shift = wj_sf_shifts.get(category,0.0) |
dictionary makePlots_datacardsSMHtt.wj_sf_shifts |
dictionary makePlots_datacardsSMHtt.x_tick_labels |
string makePlots_datacardsSMHtt.zmm_cr_0jet_global = "(1.0)" |
string makePlots_datacardsSMHtt.zmm_cr_boosted_global = "(1.0)" |
tuple makePlots_datacardsSMHtt.zmm_cr_factor = zmm_cr_factors_official.get(category, "(1.0)") |
dictionary makePlots_datacardsSMHtt.zmm_cr_factors |
dictionary makePlots_datacardsSMHtt.zmm_cr_factors_official |
string makePlots_datacardsSMHtt.zmm_cr_vbf_global = "(1.02)" |