HiggsAnalysis-KITHiggsToTauTau
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros
makePlots_datacardsCPInitialState Namespace Reference

Functions

def official2private
 
def private2official
 
def matching_process
 
def is_control_region
 
def remove_procs_and_systs_with_zero_yield
 

Variables

tuple log = logging.getLogger(__name__)
 
tuple parser
 
string help = "Input directory."
 
list default = ["all"]
 
list choices = ["individual", "channel", "category", "combined"]
 
tuple args = parser.parse_args()
 
tuple clear_output_dir = raw_input("Do you really want to clear the output directory? [yes]")
 
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, "output/{OUTPUT_SUFFIX}/".format(OUTPUT_SUFFIX=args.output_suffix))
 
string command = "MorphingSMCP2016 --control_region=1 {DIJET_2D} --postfix -2D --mm_fit=false --ttbar_fit=true {INIT}"
 
string DIJET_2D = "--dijet_2d=true"
 
string INIT = "--only_init="
 
tuple exit_code = logger.subprocessCall(shlex.split(command))
 
tuple init_cb = ch.CombineHarvester()
 
string tmp_input_root_filename_template = "shapes/"
 
string input_root_filename_template = "shapes/"
 
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.cp_datacard_filename_templates
 
string output_root_filename_template = "datacards/common/${ANALYSIS}.inputs-sm-${ERA}-2D.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 = initialstatecpstudiesdatacards.InitialStateCPStudiesDatacards(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(re.sub('125', '', process)) for process in list_of_samples]
 
string systematic = "nominal"
 
dictionary config = {}
 
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 systematics_settings = systematics_factory.get(shape_systematic)
 
list weightAtIndex = config["weights"]
 
string binnings_key = "tt_jdphi"
 
 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 = []
 
 OUTPUT_SUFFIX = args.output_suffix,
 
string SHAPE_UNCS = "--no_shape_systs=true"
 
string SCALE_SIG = "--scale_sig_procs=true"
 
string datacards_path = args.output_dir+"/output/"
 
tuple official_cb = ch.CombineHarvester()
 
dictionary datacards_cbs = {}
 
dictionary datacards_workspaces_alpha = {}
 
tuple tmp_datacard = ch.CombineHarvester()
 
 DATACARD = official_datacard,
 
tuple OUTPUT = os.path.splitext(official_datacard)
 
 N_PROCESSES = args.n_processes
 
string CHANNELS = ","
 
string directory = "output/"
 
string INPUT_FILE = directory+"higgsCombine.alpha.MultiDimFit.mH125.root"
 
string OUTPUT_FILE = directory+"alpha"
 
dictionary datacards_poi_ranges = {}
 
tuple channels = cb.channel_set()
 
tuple datacards_postfit_shapes = datacards.postfit_shapes_fromworkspace(datacards_cbs, datacards_workspaces_alpha, False, args.n_processes, "--sampling" + (" --print" if args.n_processes <= 1 else ""), higgs_mass="125")
 
dictionary backgrounds_to_merge
 
dictionary titles
 
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, no_plot=[""])
 
list plot_category = plot_config["filename"]
 
list plot_channel = plot_config["filename"]
 
dictionary bkg_yield = {}
 
dictionary sig_yield = {}
 
tuple bkg_procs = datacards.cb.cp()
 
tuple sig_procs = datacards.cb.cp()
 
tuple tot_bkg = sum(bkg_yield.values())
 
tuple tot_sig = sum(sig_yield.values())
 

Function Documentation

def makePlots_datacardsCPInitialState.is_control_region (   obj)
def makePlots_datacardsCPInitialState.matching_process (   obj1,
  obj2 
)
def makePlots_datacardsCPInitialState.official2private (   category,
  category_replacements 
)
def makePlots_datacardsCPInitialState.private2official (   category,
  category_replacements 
)
def makePlots_datacardsCPInitialState.remove_procs_and_systs_with_zero_yield (   proc)

Variable Documentation

tuple makePlots_datacardsCPInitialState.args = parser.parse_args()
dictionary makePlots_datacardsCPInitialState.backgrounds_to_merge
Initial value:
1 = {
2  "ZLL" : ["ZL", "ZJ"],
3  "TT" : ["TTT", "TTJJ", "TTJ"],
4  "EWK" : ["EWKZ", "VVT", "VVJ", "VV", "W", "hww_gg125", "hww_qq125", "ggH_hww125", "qqH_hww125"],
5  "qqh" : ["qqHsm_htt125", "qqH", "WH_htt125", "ZH_htt125"]
6  }
makePlots_datacardsCPInitialState.BIN = official_category,
string makePlots_datacardsCPInitialState.binnings_key = "tt_jdphi"
tuple makePlots_datacardsCPInitialState.binnings_settings = binnings.BinningsDict()
string makePlots_datacardsCPInitialState.bkg_histogram_name_template = "${BIN}/${PROCESS}"
tuple makePlots_datacardsCPInitialState.bkg_procs = datacards.cb.cp()
string makePlots_datacardsCPInitialState.bkg_syst_histogram_name_template = "${BIN}/${PROCESS}_${SYSTEMATIC}"
dictionary makePlots_datacardsCPInitialState.bkg_yield = {}
tuple makePlots_datacardsCPInitialState.categories = datacards.cb.cp()
tuple makePlots_datacardsCPInitialState.categories_save = sorted(categories)
list makePlots_datacardsCPInitialState.categoriesWithRelaxedIsolationForQCD
Initial value:
1 = [
2  "ZeroJet2D",
3  "Boosted2D",
4  "Vbf2D"
5  ]
list makePlots_datacardsCPInitialState.categoriesWithRelaxedIsolationForW
Initial value:
1 = [
2  "Boosted2D",
3  "Vbf2D"
4  ]
makePlots_datacardsCPInitialState.category = official2private(official_category, category_replacements)
dictionary makePlots_datacardsCPInitialState.category_replacements = {}
makePlots_datacardsCPInitialState.channel = channel,
string makePlots_datacardsCPInitialState.CHANNELS = ","
tuple makePlots_datacardsCPInitialState.channels = cb.channel_set()
list makePlots_datacardsCPInitialState.choices = ["individual", "channel", "category", "combined"]
tuple makePlots_datacardsCPInitialState.clear_output_dir = raw_input("Do you really want to clear the output directory? [yes]")
string makePlots_datacardsCPInitialState.command = "MorphingSMCP2016 --control_region=1 {DIJET_2D} --postfix -2D --mm_fit=false --ttbar_fit=true {INIT}"
tuple makePlots_datacardsCPInitialState.config = {}
makePlots_datacardsCPInitialState.DATACARD = official_datacard,
makePlots_datacardsCPInitialState.datacard_filename_templates = datacards.configs.cp_datacard_filename_templates
tuple makePlots_datacardsCPInitialState.datacards = None
dictionary makePlots_datacardsCPInitialState.datacards_cbs = {}
string makePlots_datacardsCPInitialState.datacards_path = args.output_dir+"/output/"
tuple makePlots_datacardsCPInitialState.datacards_per_channel_category = initialstatecpstudiesdatacards.InitialStateCPStudiesDatacards(cb=datacards.cb.cp().channel([channel]).bin([official_category]))
dictionary makePlots_datacardsCPInitialState.datacards_poi_ranges = {}
tuple makePlots_datacardsCPInitialState.datacards_postfit_shapes = datacards.postfit_shapes_fromworkspace(datacards_cbs, datacards_workspaces_alpha, False, args.n_processes, "--sampling" + (" --print" if args.n_processes <= 1 else ""), higgs_mass="125")
dictionary makePlots_datacardsCPInitialState.datacards_workspaces_alpha = {}
list makePlots_datacardsCPInitialState.debug_plot_configs = []
list makePlots_datacardsCPInitialState.default = ["all"]
string makePlots_datacardsCPInitialState.DIJET_2D = "--dijet_2d=true"
string makePlots_datacardsCPInitialState.directory = "output/"
makePlots_datacardsCPInitialState.do_not_normalize_by_bin_width = args.do_not_normalize_by_bin_width
makePlots_datacardsCPInitialState.DST = output_file,
tuple makePlots_datacardsCPInitialState.exclude_cuts = copy.deepcopy(args.exclude_cuts)
tuple makePlots_datacardsCPInitialState.exit_code = logger.subprocessCall(shlex.split(command))
list makePlots_datacardsCPInitialState.hadd_commands = []
string makePlots_datacardsCPInitialState.help = "Input directory."
list makePlots_datacardsCPInitialState.higgs_masses = [mass for mass in datacards_per_channel_category.cb.mass_set() if mass != "*"]
makePlots_datacardsCPInitialState.histogram_name_template = bkg_histogram_name_templateifnominalelsebkg_syst_histogram_name_template
string makePlots_datacardsCPInitialState.INIT = "--only_init="
tuple makePlots_datacardsCPInitialState.init_cb = ch.CombineHarvester()
tuple makePlots_datacardsCPInitialState.init_directory = os.path.join(args.output_dir, "output/{OUTPUT_SUFFIX}/".format(OUTPUT_SUFFIX=args.output_suffix))
string makePlots_datacardsCPInitialState.INPUT_FILE = directory+"higgsCombine.alpha.MultiDimFit.mH125.root"
string makePlots_datacardsCPInitialState.input_root_filename_template = "shapes/"
list makePlots_datacardsCPInitialState.jecUncertNames
list makePlots_datacardsCPInitialState.list_of_samples = [datacards.configs.process2sample(re.sub('125', '', process)) for process in list_of_samples]
tuple makePlots_datacardsCPInitialState.log = logging.getLogger(__name__)
list makePlots_datacardsCPInitialState.merged_output_files = []
makePlots_datacardsCPInitialState.N_PROCESSES = args.n_processes
tuple makePlots_datacardsCPInitialState.nominal = (shape_systematic == "nominal")
tuple makePlots_datacardsCPInitialState.official_cb = ch.CombineHarvester()
tuple makePlots_datacardsCPInitialState.OUTPUT = os.path.splitext(official_datacard)
tuple makePlots_datacardsCPInitialState.output_file
Initial value:
1 = os.path.join(args.output_dir, input_root_filename_template.replace("$", "").format(
2  ANALYSIS="htt",
3  CHANNEL=channel,
4  ERA="13TeV"
5  ))
string makePlots_datacardsCPInitialState.OUTPUT_FILE = directory+"alpha"
list makePlots_datacardsCPInitialState.output_files = []
string makePlots_datacardsCPInitialState.output_root_filename_template = "datacards/common/${ANALYSIS}.inputs-sm-${ERA}-2D.root"
makePlots_datacardsCPInitialState.OUTPUT_SUFFIX = args.output_suffix,
tuple makePlots_datacardsCPInitialState.parser
Initial value:
1 = argparse.ArgumentParser(description="Create ROOT inputs and datacards for SM HTT analysis.",
2  parents=[logger.loggingParser])
list makePlots_datacardsCPInitialState.plot_category = plot_config["filename"]
list makePlots_datacardsCPInitialState.plot_channel = plot_config["filename"]
list makePlots_datacardsCPInitialState.plot_configs = []
tuple makePlots_datacardsCPInitialState.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, no_plot=[""])
tuple makePlots_datacardsCPInitialState.PROCESS = datacards.configs.sample2process(sample)
tuple makePlots_datacardsCPInitialState.sample_settings = samples.Samples()
string makePlots_datacardsCPInitialState.samples = "\", \""
string makePlots_datacardsCPInitialState.SCALE_SIG = "--scale_sig_procs=true"
string makePlots_datacardsCPInitialState.SHAPE_UNCS = "--no_shape_systs=true"
string makePlots_datacardsCPInitialState.sig_histogram_name_template = "${BIN}/${PROCESS}${MASS}"
tuple makePlots_datacardsCPInitialState.sig_procs = datacards.cb.cp()
string makePlots_datacardsCPInitialState.sig_syst_histogram_name_template = "${BIN}/${PROCESS}${MASS}_${SYSTEMATIC}"
dictionary makePlots_datacardsCPInitialState.sig_yield = {}
string makePlots_datacardsCPInitialState.SRC = " "
tuple makePlots_datacardsCPInitialState.ss_os_factor = ss_os_factors.get(category,0.0)
dictionary makePlots_datacardsCPInitialState.ss_os_factors
Initial value:
1 = {
2  "mt_ZeroJet2D" : 1.07,
3  "mt_Boosted2D" : 1.06,
4  "mt_Vbf2D" : 1.0,
5  "et_ZeroJet2D" : 1.0,
6  "et_Boosted2D" : 1.28,
7  "et_Vbf2D" : 1.0,
8  "em_ZeroJet2D" : 2.27,
9  "em_Boosted2D" : 2.26,
10  "em_Vbf2D" : 2.84
11  }
makePlots_datacardsCPInitialState.systematic = "nominal"
makePlots_datacardsCPInitialState.SYSTEMATIC = systematic
tuple makePlots_datacardsCPInitialState.systematics_factory = systematics.SystematicsFactory()
tuple makePlots_datacardsCPInitialState.systematics_settings = systematics_factory.get(shape_systematic)
dictionary makePlots_datacardsCPInitialState.texts
Initial value:
1 = {
2  "mt_1" : ["h^{#pm}", "h^{#pm}#pi^{0}", "h^{#pm}h^{#pm}h^{#mp}"],
3  "et_1" : ["h^{#pm}", "h^{#pm}#pi^{0}", "h^{#pm}h^{#pm}h^{#mp}"],
4  "em_1" : ["15 < p_{T}(#mu) < 25 GeV", "25 < p_{T}(#mu) < 35 GeV", "p_{T}(#mu) > 35 GeV"],
5  "mt_2" : ["0 < p_{T}^{#tau#tau} < 100 GeV", "100 < p_{T}^{#tau#tau} < 150 GeV", "150 < p_{T}^{#tau#tau} < 200 GeV", "200 < p_{T}^{#tau#tau} < 250 GeV", "250 < p_{T}^{#tau#tau} < 300 GeV", "p_{T}^{#tau#tau} > 300 GeV"],
6  "et_2" : ["0 < p_{T}^{#tau#tau} < 100 GeV", "100 < p_{T}^{#tau#tau} < 150 GeV", "150 < p_{T}^{#tau#tau} < 200 GeV", "200 < p_{T}^{#tau#tau} < 250 GeV", "250 < p_{T}^{#tau#tau} < 300 GeV", "p_{T}^{#tau#tau} > 300 GeV"],
7  "em_2" : ["0 < p_{T}^{#tau#tau} < 100 GeV", "100 < p_{T}^{#tau#tau} < 150 GeV", "150 < p_{T}^{#tau#tau} < 200 GeV", "200 < p_{T}^{#tau#tau} < 250 GeV", "250 < p_{T}^{#tau#tau} < 300 GeV", "p_{T}^{#tau#tau} > 300 GeV"],
8  "tt_2" : ["0 < p_{T}^{#tau#tau} < 100 GeV", "100 < p_{T}^{#tau#tau} < 170 GeV", "170 < p_{T}^{#tau#tau} < 300 GeV", "p_{T}^{#tau#tau} > 300 GeV"],
9  "mt_3" : ["0 < m_{#tau#tau} < 80 GeV", "80 < m_{#tau#tau} < 100 GeV","100 < m_{#tau#tau} < 115 GeV","115 < m_{#tau#tau} < 130 GeV","130 < m_{#tau#tau} < 150 GeV","m_{#tau#tau} > 150 GeV"],
10  "et_3" : ["0 < m_{#tau#tau} < 80 GeV", "80 < m_{#tau#tau} < 100 GeV","100 < m_{#tau#tau} < 115 GeV","115 < m_{#tau#tau} < 130 GeV","130 < m_{#tau#tau} < 150 GeV","m_{#tau#tau} > 150 GeV"],
11  "em_3" : ["0 < m_{#tau#tau} < 80 GeV", "80 < m_{#tau#tau} < 100 GeV","100 < m_{#tau#tau} < 115 GeV","115 < m_{#tau#tau} < 130 GeV","130 < m_{#tau#tau} < 150 GeV","m_{#tau#tau} > 150 GeV"],
12  "tt_3" : ["0 < m_{#tau#tau} < 80 GeV", "80 < m_{#tau#tau} < 100 GeV","100 < m_{#tau#tau} < 115 GeV","115 < m_{#tau#tau} < 130 GeV","130 < m_{#tau#tau} < 150 GeV","m_{#tau#tau} > 150 GeV"],
13  "mt_4" : ["0 < m_{#tau#tau} < 80 GeV", "80 < m_{#tau#tau} < 100 GeV","100 < m_{#tau#tau} < 115 GeV","115 < m_{#tau#tau} < 130 GeV","130 < m_{#tau#tau} < 150 GeV","m_{#tau#tau} > 150 GeV"],
14  "et_4" : ["0 < m_{#tau#tau} < 80 GeV", "80 < m_{#tau#tau} < 100 GeV","100 < m_{#tau#tau} < 115 GeV","115 < m_{#tau#tau} < 130 GeV","130 < m_{#tau#tau} < 150 GeV","m_{#tau#tau} > 150 GeV"],
15  "em_4" : ["0 < m_{#tau#tau} < 80 GeV", "80 < m_{#tau#tau} < 100 GeV","100 < m_{#tau#tau} < 115 GeV","115 < m_{#tau#tau} < 130 GeV","130 < m_{#tau#tau} < 150 GeV","m_{#tau#tau} > 150 GeV"],
16  "tt_4" : ["0 < m_{#tau#tau} < 80 GeV", "80 < m_{#tau#tau} < 100 GeV","100 < m_{#tau#tau} < 115 GeV","115 < m_{#tau#tau} < 130 GeV","130 < m_{#tau#tau} < 150 GeV","m_{#tau#tau} > 150 GeV"]
17  }
dictionary makePlots_datacardsCPInitialState.texts_x
Initial value:
1 = {
2  "mt_1" : [0.14, 0.4, 0.67],
3  "et_1" : [0.14, 0.4, 0.67],
4  "em_1" : [0.2, 0.46, 0.705],
5  "mt_2" : [0.17, 0.2975, 0.43, 0.56, 0.6925, 0.81],
6  "et_2" : [0.17, 0.2975, 0.43, 0.56, 0.6925, 0.81],
7  "em_2" : [0.17, 0.2975, 0.43, 0.56, 0.6925, 0.81],
8  "tt_2" : [0.17, 0.2975, 0.43, 0.56, 0.6925, 0.81],
9  "mt_3" : [0.17, 0.30, 0.44, 0.56, 0.69, 0.82],
10  "et_3" : [0.17, 0.30, 0.44, 0.56, 0.69, 0.82],
11  "em_3" : [0.17, 0.30, 0.44, 0.56, 0.69, 0.82],
12  "tt_3" : [0.17, 0.30, 0.44, 0.56, 0.69, 0.82],
13  "mt_4" : [0.17, 0.30, 0.44, 0.56, 0.69, 0.82],
14  "et_4" : [0.17, 0.30, 0.44, 0.56, 0.69, 0.82],
15  "em_4" : [0.17, 0.30, 0.44, 0.56, 0.69, 0.82],
16  "tt_4" : [0.17, 0.30, 0.44, 0.56, 0.69, 0.82]
17  }
dictionary makePlots_datacardsCPInitialState.titles
Initial value:
1 = {
2  "mt_1" : "#mu#tau_{h} - 0jet",
3  "et_1" : "e#tau_{h} - 0jet",
4  "em_1" : "e#mu - 0jet",
5  "tt_1" : "#tau_{h}#tau_{h} - 0jet",
6  "mt_2" : "#mu#tau_{h} - boosted",
7  "et_2" : "e#tau_{h} - boosted",
8  "em_2" : "e#mu - boosted",
9  "tt_2" : "#tau_{h}#tau_{h} - boosted",
10  "mt_3" : "#mu#tau_{h} - dijet lowboost",
11  "et_3" : "e#tau_{h} - dijet lowboost",
12  "em_3" : "e#mu - dijet lowboost",
13  "tt_3" : "#tau_{h}#tau_{h} - dijet lowboost",
14  "mt_4" : "#mu#tau_{h} - dijet boosted",
15  "et_4" : "e#tau_{h} - dijet boosted",
16  "em_4" : "e#mu - dijet boosted",
17  "tt_4" : "#tau_{h}#tau_{h} - dijet boosted"
18  }
tuple makePlots_datacardsCPInitialState.tmp_datacard = ch.CombineHarvester()
string makePlots_datacardsCPInitialState.tmp_input_root_filename_template = "shapes/"
tuple makePlots_datacardsCPInitialState.tmp_output_file
Initial value:
1 = os.path.join(args.output_dir, tmp_input_root_filename_template.replace("$", "").format(
2  ANALYSIS="htt",
3  CHANNEL=channel,
4  BIN=official_category,
5  SYSTEMATIC=systematic,
6  ERA="13TeV"
7  ))
list makePlots_datacardsCPInitialState.tmp_output_files = []
list makePlots_datacardsCPInitialState.top_pt_reweight_nicks
Initial value:
1 = [
2  "noplot_ttj_ss_lowmt", # mt & et channels: qcd yield subtract
3  "noplot_ttj_shape_ss_qcd_control", # mt & et channels: qcd shape subtract
4  "noplot_ttj_os_highmt", # mt & et channels: w+jets yield subtract
5  "noplot_ttj_ss_highmt" # mt & et channels: qcd high mt yield subtract
6  ]
tuple makePlots_datacardsCPInitialState.tot_bkg = sum(bkg_yield.values())
tuple makePlots_datacardsCPInitialState.tot_sig = sum(sig_yield.values())
dictionary makePlots_datacardsCPInitialState.vertical_lines
Initial value:
1 = {
2  "mt_1" : [12, 24],
3  "et_1" : [12, 24],
4  "em_1" : [12, 24],
5  "mt_2" : [10, 20, 30, 40, 50],
6  "et_2" : [10, 20, 30, 40, 50],
7  "em_2" : [10, 20, 30, 40, 50],
8  "tt_2" : [12, 24, 36, 48, 60],
9  "mt_3" : [12, 24, 36, 48, 60],
10  "et_3" : [12, 24, 36, 48, 60],
11  "em_3" : [12, 24, 36, 48, 60],
12  "tt_3" : [12, 24, 36, 48, 60],
13  "mt_4" : [12, 24, 36, 48, 60],
14  "et_4" : [12, 24, 36, 48, 60],
15  "em_4" : [12, 24, 36, 48, 60],
16  "tt_4" : [12, 24, 36, 48, 60]
17  }
tuple makePlots_datacardsCPInitialState.weightAtIndex = config["weights"]
float makePlots_datacardsCPInitialState.wj_sf_shift = wj_sf_shifts.get(category,0.0)
dictionary makePlots_datacardsCPInitialState.wj_sf_shifts
Initial value:
1 = {
2  "mt_ZeroJet2D" : 0.10,
3  "mt_Boosted2D" : 0.05,
4  "mt_Vbf2D" : 0.10,
5  "et_ZeroJet2D" : 0.10,
6  "et_Boosted2D" : 0.05,
7  "et_Vbf2D" : 0.10
8  }
dictionary makePlots_datacardsCPInitialState.x_tick_labels
Initial value:
1 = {
2  "mt_1" : ["0-60","60-65","65-70","70-75","75-80","80-85","85-90","90-95","95-100","100-105","105-110","110-400"] * 3,
3  "et_1" : ["0-60","60-65","65-70","70-75","75-80","80-85","85-90","90-95","95-100","100-105","105-110","110-400"] * 3,
4  "em_1" : ["0-50","50-55", "55-60","60-65","65-70","70-75","75-80","80-85","85-90","90-95","95-100","100-400"] * 3,
5  "mt_2" : ["0-80","80-90","90-100","100-110","110-120","120-130","130-140","140-150","150-160","160-300"] * 6,
6  "et_2" : ["0-80","80-90","90-100","100-110","110-120","120-130","130-140","140-150","150-160","160-300"] * 6,
7  "em_2" : ["0-80","80-90","90-100","100-110","110-120","120-130","130-140","140-150","150-160","160-300"] * 6,
8  "tt_2" : ["0-40","40-60","60-70","70-80","80-90","90-100","100-110","110-120","120-130","130-150","150-200","200-250"] * 4,
9  "mt_3" : ["-3.2--2.7","-2.7--2.1","-2.1--1.6","-1.6--1.1", "-1.1--0.5","-0.5-0", "0-0.5","0.5-1.1","1.1-1.6","1.6-2.1","2.1-2.7","2.7-3.2"] * 6,
10  "et_3" : ["-3.2--2.7","-2.7--2.1","-2.1--1.6","-1.6--1.1", "-1.1--0.5","-0.5-0", "0-0.5","0.5-1.1","1.1-1.6","1.6-2.1","2.1-2.7","2.7-3.2"] * 6,
11  "em_3" : ["-3.2--2.7","-2.7--2.1","-2.1--1.6","-1.6--1.1", "-1.1--0.5","-0.5-0", "0-0.5","0.5-1.1","1.1-1.6","1.6-2.1","2.1-2.7","2.7-3.2"] * 6,
12  "tt_3" : ["-3.2--2.7","-2.7--2.1","-2.1--1.6","-1.6--1.1", "-1.1--0.5","-0.5-0", "0-0.5","0.5-1.1","1.1-1.6","1.6-2.1","2.1-2.7","2.7-3.2"] * 6,
13  "mt_4" : ["-3.2--2.7","-2.7--2.1","-2.1--1.6","-1.6--1.1", "-1.1--0.5","-0.5-0", "0-0.5","0.5-1.1","1.1-1.6","1.6-2.1","2.1-2.7","2.7-3.2"] * 6,
14  "et_4" : ["-3.2--2.7","-2.7--2.1","-2.1--1.6","-1.6--1.1", "-1.1--0.5","-0.5-0", "0-0.5","0.5-1.1","1.1-1.6","1.6-2.1","2.1-2.7","2.7-3.2"] * 6,
15  "em_4" : ["-3.2--2.7","-2.7--2.1","-2.1--1.6","-1.6--1.1", "-1.1--0.5","-0.5-0", "0-0.5","0.5-1.1","1.1-1.6","1.6-2.1","2.1-2.7","2.7-3.2"] * 6,
16  "tt_4" : ["-3.2--2.7","-2.7--2.1","-2.1--1.6","-1.6--1.1", "-1.1--0.5","-0.5-0", "0-0.5","0.5-1.1","1.1-1.6","1.6-2.1","2.1-2.7","2.7-3.2"] * 6
17  }
string makePlots_datacardsCPInitialState.zmm_cr_0jet_global = "(1.0)"
string makePlots_datacardsCPInitialState.zmm_cr_boosted_global = "(1.0)"
tuple makePlots_datacardsCPInitialState.zmm_cr_factor = zmm_cr_factors_official.get(category, "(1.0)")
dictionary makePlots_datacardsCPInitialState.zmm_cr_factors
Initial value:
1 = {
2  "ZeroJet2D" : "(1.0395)",
3  "Boosted2D" : "(((ptvis<100)*1.0321) + ((ptvis>=100)*(ptvis<150)*1.023) + ((ptvis>=150)*(ptvis<200)*1.007) + ((ptvis>=200)*(ptvis<250)*1.016) + ((ptvis>=250)*(ptvis<300)*1.02) + ((ptvis>=300)*1.03))",
4  "Vbf2D" : "(((mjj<300)*1.0) + ((mjj>=300)*(mjj<700)*1.0605) + ((mjj>=700)*(mjj<1100)*1.017) + ((mjj>=1100)*(mjj<1500)*0.975) + ((mjj>=1500)*0.97))",
5  "Vbf2D_Up" : "(((mjj<300)*1.0) + ((mjj>=300)*(mjj<700)*1.121) + ((mjj>=700)*(mjj<1100)*1.034) + ((mjj>=1100)*(mjj<1500)*0.95) + ((mjj>=1500)*0.94))",
6  "Vbf2D_Down" : "(1.0)"
7  }
dictionary makePlots_datacardsCPInitialState.zmm_cr_factors_official
Initial value:
1 = {
2  "mt_ZeroJet2D" : zmm_cr_0jet_global,
3  "et_ZeroJet2D" : zmm_cr_0jet_global,
4  "em_ZeroJet2D" : "(1.02)",
5  "tt_ZeroJet2D" : zmm_cr_0jet_global,
6  "mt_Boosted2D" : zmm_cr_boosted_global,
7  "et_Boosted2D" : zmm_cr_boosted_global,
8  "em_Boosted2D" : zmm_cr_boosted_global,
9  "tt_Boosted2D" : zmm_cr_boosted_global,
10  "mt_Vbf2D" : zmm_cr_vbf_global+"*(((mjj>=300)*(mjj<700)*1.06) + ((mjj>=700)*(mjj<1100)*0.98) + ((mjj>=1100)*(mjj<1500)*0.95) + ((mjj>=1500)*0.95))",
11  "et_Vbf2D" : zmm_cr_vbf_global+"*(((mjj>=300)*(mjj<700)*1.06) + ((mjj>=700)*(mjj<1100)*0.98) + ((mjj>=1100)*(mjj<1500)*0.95) + ((mjj>=1500)*0.95))",
12  "em_Vbf2D" : zmm_cr_vbf_global+"*(((mjj>=300)*(mjj<700)*1.06) + ((mjj>=700)*(mjj<1100)*0.98) + ((mjj>=1100)*(mjj<1500)*0.95) + ((mjj>=1500)*0.95))",
13  "tt_Vbf2D" : "(((mjj<300)*1.00) + ((mjj>=300)*(mjj<500)*1.02) + ((mjj>=500)*(mjj<800)*1.06) + ((mjj>=800)*1.04))",
14  "mt_Vbf2D_Up" : zmm_cr_vbf_global+"*(((mjj>=300)*(mjj<700)*1.12) + ((mjj>=700)*(mjj<1100)*0.96) + ((mjj>=1100)*(mjj<1500)*0.90) + ((mjj>=1500)*0.90))",
15  "et_Vbf2D_Up" : zmm_cr_vbf_global+"*(((mjj>=300)*(mjj<700)*1.12) + ((mjj>=700)*(mjj<1100)*0.96) + ((mjj>=1100)*(mjj<1500)*0.90) + ((mjj>=1500)*0.90))",
16  "em_Vbf2D_Up" : zmm_cr_vbf_global+"*(((mjj>=300)*(mjj<700)*1.12) + ((mjj>=700)*(mjj<1100)*0.96) + ((mjj>=1100)*(mjj<1500)*0.90) + ((mjj>=1500)*0.90))",
17  "tt_Vbf2D_Up" : "(((mjj<300)*1.00) + ((mjj>=300)*(mjj<500)*1.04) + ((mjj>=500)*(mjj<800)*1.12) + ((mjj>=800)*1.08))",
18  "mt_Vbf2D_Down" : zmm_cr_vbf_global,
19  "et_Vbf2D_Down" : zmm_cr_vbf_global,
20  "em_Vbf2D_Down" : zmm_cr_vbf_global,
21  "tt_Vbf2D_Down" : "(1.0)"
22  }
string makePlots_datacardsCPInitialState.zmm_cr_vbf_global = "(1.02)"