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

Functions

def addArguments
 
def matching_process
 
def remove_procs_and_systs_with_zero_yield2
 
def remove_procs_and_systs_with_zero_yield
 

Variables

tuple log = logging.getLogger(__name__)
 
tuple pp = pprint.PrettyPrinter(indent=4)
 
dictionary decayMode_dict
 
tuple parser
 
tuple args = parser.parse_args()
 
list es_shifts = [args.shift_ranges[0] + x * args.shift_binning for x in range(int((args.shift_ranges[1] - args.shift_ranges[0]) / args.shift_binning) + 1)]
 
list es_shifts_str = [str(x) for x in es_shifts]
 
tuple decay_modes = copy.deepcopy(args.decay_modes)
 
list pt_ranges = ["0.0"]
 
list pt_weights = ["(pt_2>20)"]
 
list pt_strings = ["p_{T}(#tau_{h}) > 20 GeV"]
 
list pt_bins = [str(x) for x in range(0, len(pt_ranges))]
 
list eta_ranges = ["0.0", "1.479", "2.3"]
 
list eta_weights = ["(abs(eta_2)<2.3)", "(abs(eta_2)<1.479)", "(abs(eta_2)>1.479)*(abs(eta_2)<2.3)"]
 
list eta_strings = ["|#eta(#tau_{h})| < 2.3", "|#eta(#tau_{h})| < 1.479", "1.479 < |#eta(#tau_{h})| < 2.3"]
 
list eta_bins = ["0", "1", "2"]
 
tuple weight_type = ("eta" if args.eta_binning else "pt")
 
tuple weight_ranges = (eta_ranges if args.eta_binning else pt_ranges)
 
tuple extra_weights = (eta_weights if args.eta_binning else pt_weights)
 
tuple weight_strings = (eta_strings if args.eta_binning else pt_strings)
 
tuple weight_bins = (eta_bins if args.eta_binning else pt_bins)
 
tuple sample_settings = samples.Samples()
 
tuple systematics_factory = systematics.SystematicsFactory()
 
 quantity = args.quantity
 
string tmp_input_root_filename_template = "input/${ANALYSIS}_${CHANNEL}_${BIN}_${SYSTEMATIC}_${ERA}.root"
 
string input_root_filename_template = "input/${ANALYSIS}_${CHANNEL}_${BIN}_${ERA}.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}"
 
list datacard_filename_templates = ["datacards/${BIN}/${ANALYSIS}_${CHANNEL}_${BIN}_${ERA}.txt"]
 
string output_root_filename_template = "datacards/common/${ANALYSIS}.input_${ERA}.root"
 
list categories = []
 
dictionary mapping_category2binid = {}
 
string category = channel+"_"
 
dictionary ss_os_factors
 
tuple datacards = taupogdatacards.TauEsDatacards(es_shifts_str, decay_modes, quantity, weight_bins, weight_type, args.era, mapping_category2binid)
 
tuple channel = category.split("_")
 
tuple decayMode = category.split("_")
 
tuple weight_index = int(category.split("_")[-1].split(weight_type + "bin")[-1])
 
int useRelaxedIsolation = weight_index>0
 
tuple output_file
 
list input_plot_configs = []
 
list hadd_commands = []
 
tuple datacards_per_channel_category = taupogdatacards.TauEsDatacards(cb=datacards.cb.cp().channel([channel]).bin([category]), mapping_category2binid=mapping_category2binid)
 
list tmp_output_files = []
 
tuple nominal = (shape_systematic == "nominal")
 
tuple list_of_samples = (["data"] if nominal else [])
 
string systematic = "nominal"
 
string samples = "\", \""
 
float wj_sf_shift = 0.0
 
dictionary merged_config = {}
 
string catForConfig = "cat"
 
tuple config_rest
 
 histogram_name_template = bkg_histogram_name_templateifnominalelsebkg_syst_histogram_name_template
 
tuple PROCESS = datacards.configs.sample2process(sample)
 
 BIN = category,
 
 SYSTEMATIC = systematic
 
tuple systematics_settings = systematics_factory.get(shape_systematic)
 
tuple config_ztt
 
tuple MASS = str(shift)
 
tuple tmp_output_file
 
 DST = output_file,
 
string SRC = " "
 
tuple output_files = list(set([os.path.join(config["output_dir"], config["filename"]+".root") for config in input_plot_configs[:args.n_plots[0]]]))
 
 update_systematics = True
 
tuple processes = datacards.cb.cp()
 
float add_threshold = 0.1
 
dictionary datacards_cbs = {}
 
tuple datacards_workspaces = datacards.text2workspace(datacards_cbs, n_processes=args.n_processes)
 
 VERBOSITY = args.combine_verbosity,
 
 STABLE = datacards.stable_options
 
tuple BINNING = int((args.shift_ranges[1]-args.shift_ranges[0])/args.shift_binning)
 
tuple RANGE = str(args.shift_ranges[0])
 
tuple datacards_postfit_shapes = datacards.postfit_shapes_fromworkspace(datacards_cbs, datacards_workspaces, True, args.n_processes, "--sampling" + (" --print" if args.n_processes <= 1 else ""))
 
list www_output_dirs_postfit = []
 
list www_output_dirs_weightbin = []
 
list www_output_dirs_parabola = []
 
list postfit_plot_configs = []
 
list bkg_plotting_order = ["ZTT", "ZL", "ZJ", "TTT","TTJJ", "VVT", "VVJ", "W", "QCD"]
 
tuple postfit_shapes = datacards_postfit_shapes.get("fit_s", {})
 
tuple weightBin = int(category.split("_")[-1].split(weight_type+"bin")[-1])
 
list bkg_process = datacards_cbs[datacard]
 
list sig_process = datacards_cbs[datacard]
 
dictionary config = {}
 
tuple processes_to_plot = list(processes)
 
list parabola_plot_configs = []
 
list weightbin_plot_configs = []
 
tuple filename_mlfit = os.path.join(os.path.dirname(datacard), args.combine_cmssw==8 * "fitDiagnostics.root" + args.combine_cmssw==7 * "mlfit.root")
 
tuple file_mlfit = ROOT.TFile(filename_mlfit)
 
tuple tree_mlfit = file_mlfit.Get("tree_fit_sb")
 
tuple filename_multidimfit = os.path.join(os.path.dirname(datacard), "higgsCombineTest.MultiDimFit.mH0.root")
 
tuple file_multidimfit = ROOT.TFile(filename_multidimfit)
 
tuple tree_multidimfit = file_multidimfit.Get("limit")
 
list mes_list = []
 
list deltaNLL_list = []
 
list deltaNLLshifted_list = []
 
list min_nll = deltaNLL_list[0]
 
list min_shift = mes_list[0]
 
list mes_list_nll_belowX = []
 
list nll_belowX = []
 
int nllMax = 10
 
 found2sigmaLow = True
 
tuple err2sigmaLow = abs((mes_list[index-1]+mes_list[index])/2.0 - min_shift)
 
 found1sigmaLow = True
 
tuple err1sigmaLow = abs((mes_list[index-1]+mes_list[index])/2.0 - min_shift)
 
 found1sigmaHi = True
 
tuple err1sigmaHi = abs((mes_list[index]+mes_list[index+1])/2.0 - min_shift)
 
 found2sigmaHi = True
 
tuple err2sigmaHi = abs((mes_list[index]+mes_list[index+1])/2.0 - min_shift)
 
list xvaluesF = []
 
string xvalues = ""
 
string yvalues = ""
 
list xvaluesF_belowX = []
 
tuple RooFitGraph_Parabola
 
tuple fitf = ROOT.TF1("f1","pol2",min(xvaluesF_belowX),max(xvaluesF_belowX))
 
tuple minimumScanFit = fitf.GetMinimumX(min(xvaluesF_belowX),max(xvaluesF_belowX))
 
tuple minimumScanFitY = fitf.GetMinimum(min(xvaluesF_belowX),max(xvaluesF_belowX))
 
tuple sigmaScanFit = abs(fitf.GetX(minimumScanFitY+1)-minimumScanFit)
 
tuple graphfilename = os.path.join(os.path.dirname(datacard), "parabola_" + category + ("_tightenedMassWindow" if args.tighten_mass_window else "")+".root")
 
tuple graphfile = ROOT.TFile(graphfilename, "RECREATE")
 
list weight_bins_loop = weight_binsifargs.no_inclusiveelseweight_bins[1:]
 
list weight_ranges_loop = weight_rangesifargs.no_inclusiveelseweight_ranges[1:]
 
string xval = "0.7395 2.2185"
 
string xerrsval = "0.7395 0.7395"
 
list xbinsF = [0.7395, 2.2185]
 
list xerrsF = [0.7395, 0.7395]
 
tuple RooFitGraph_Linear
 
tuple fit_polZero = ROOT.TF1("f2","pol0",min(xbinsF),max(xbinsF))
 
tuple fit_polOne = ROOT.TF1("f3","pol1",min(xbinsF),max(xbinsF))
 
tuple polZero_filename = os.path.join(args.output_dir, "datacards/result_fit_" + ("eta" if args.eta_binning else "pt") + "_pol0_" + decayMode + "_" + quantity + ".root")
 
tuple polZero_file = ROOT.TFile(polZero_filename, "RECREATE")
 
tuple polOne_filename = os.path.join(args.output_dir, "datacards/result_fit_" + ("eta" if args.eta_binning else "pt") + "_pol1_" + decayMode + "_" + quantity + ".root")
 
tuple polOne_file = ROOT.TFile(polOne_filename, "RECREATE")
 
string row_format = "{:^22}"
 
string polZero_string1 = "%1.2f"
 
string polZero_string2 = "%1.2f"
 
string polOne_string1 = "%1.2f"
 
string polOne_string2 = "%1.2f"
 
tuple subpath = os.path.normpath(output_dir)
 
list output_filenames = []
 
tuple www = args.wwwif(subpath == "tauEsStudies_datacards")
 
 output_dir = output_dir,
 
 export_json = False,
 

Function Documentation

def makePlots_datacardsTauEsStudies.addArguments (   parser)
def makePlots_datacardsTauEsStudies.matching_process (   obj1,
  obj2 
)
def makePlots_datacardsTauEsStudies.remove_procs_and_systs_with_zero_yield (   proc)
def makePlots_datacardsTauEsStudies.remove_procs_and_systs_with_zero_yield2 (   proc)

Variable Documentation

float makePlots_datacardsTauEsStudies.add_threshold = 0.1
tuple makePlots_datacardsTauEsStudies.args = parser.parse_args()
makePlots_datacardsTauEsStudies.BIN = category,
tuple makePlots_datacardsTauEsStudies.BINNING = int((args.shift_ranges[1]-args.shift_ranges[0])/args.shift_binning)
string makePlots_datacardsTauEsStudies.bkg_histogram_name_template = "${BIN}/${PROCESS}"
list makePlots_datacardsTauEsStudies.bkg_plotting_order = ["ZTT", "ZL", "ZJ", "TTT","TTJJ", "VVT", "VVJ", "W", "QCD"]
list makePlots_datacardsTauEsStudies.bkg_process = datacards_cbs[datacard]
string makePlots_datacardsTauEsStudies.bkg_syst_histogram_name_template = "${BIN}/${PROCESS}_${SYSTEMATIC}"
list makePlots_datacardsTauEsStudies.categories = []
tuple makePlots_datacardsTauEsStudies.category = channel+"_"
string makePlots_datacardsTauEsStudies.catForConfig = "cat"
tuple makePlots_datacardsTauEsStudies.channel = category.split("_")
dictionary makePlots_datacardsTauEsStudies.config = {}
tuple makePlots_datacardsTauEsStudies.config_rest
Initial value:
1 = sample_settings.get_config(
2  samples=[getattr(samples.Samples, sample) for sample in list_of_samples if sample not in ["ztt", "ttt", "vvt"]],
3  channel=channel,
4  category=catForConfig,
5  nick_suffix="_" + str(weight_index),
6  weight="(pt_2>20)*" + args.weight,
7  lumi=args.lumi * 1000,
8  cut_type="tauescuts2016" if args.era == "2016" else "tauescuts",
9  estimationMethod=args.background_method,
10  wj_sf_shift=wj_sf_shift,
11  ss_os_factor = ss_os_factors.get(channel, 0.0),
12  useRelaxedIsolationForW = useRelaxedIsolation,
13  useRelaxedIsolationForQCD = useRelaxedIsolation
14  )
tuple makePlots_datacardsTauEsStudies.config_ztt
Initial value:
1 = sample_settings.get_config(
2  samples=[getattr(samples.Samples, sample) for sample in list_of_samples if sample in ["ztt", "ttt", "vvt"]],
3  channel=channel,
4  category=catForConfig,
5  nick_suffix="_" + str(shift).replace(".", "_") + "_" + str(weight_index),
6  weight="(pt_2>20)*" + args.weight,
7  lumi=args.lumi * 1000,
8  cut_type="tauescuts2016" if args.era == "2016" else "tauescuts",
9  estimationMethod=args.background_method,
10  wj_sf_shift=wj_sf_shift,
11  ss_os_factor = ss_os_factors.get(channel,0.0),
12  useRelaxedIsolation = useRelaxedIsolation
13  )
list makePlots_datacardsTauEsStudies.datacard_filename_templates = ["datacards/${BIN}/${ANALYSIS}_${CHANNEL}_${BIN}_${ERA}.txt"]
tuple makePlots_datacardsTauEsStudies.datacards = taupogdatacards.TauEsDatacards(es_shifts_str, decay_modes, quantity, weight_bins, weight_type, args.era, mapping_category2binid)
dictionary makePlots_datacardsTauEsStudies.datacards_cbs = {}
tuple makePlots_datacardsTauEsStudies.datacards_per_channel_category = taupogdatacards.TauEsDatacards(cb=datacards.cb.cp().channel([channel]).bin([category]), mapping_category2binid=mapping_category2binid)
tuple makePlots_datacardsTauEsStudies.datacards_postfit_shapes = datacards.postfit_shapes_fromworkspace(datacards_cbs, datacards_workspaces, True, args.n_processes, "--sampling" + (" --print" if args.n_processes <= 1 else ""))
tuple makePlots_datacardsTauEsStudies.datacards_workspaces = datacards.text2workspace(datacards_cbs, n_processes=args.n_processes)
tuple makePlots_datacardsTauEsStudies.decay_modes = copy.deepcopy(args.decay_modes)
tuple makePlots_datacardsTauEsStudies.decayMode = category.split("_")
dictionary makePlots_datacardsTauEsStudies.decayMode_dict
Initial value:
1 = {
2  "AllDMs" :
3  {
4  "color" : "1",
5  "label" : "All decay modes"
6  },
7  "OneProng" :
8  {
9  "color" : "2",
10  "label" : "h^{#pm} decay mode"
11  },
12  "OneProngPiZeros" :
13  {
14  "color" : "4",
15  "label" : "h^{#pm}#pi^{0} decay mode"
16  },
17  "ThreeProng" :
18  {
19  "color" : "6",
20  "label" : "h^{#pm}h^{#pm}h^{#mp} decay mode"
21  }
22 }
list makePlots_datacardsTauEsStudies.deltaNLL_list = []
list makePlots_datacardsTauEsStudies.deltaNLLshifted_list = []
makePlots_datacardsTauEsStudies.DST = output_file,
tuple makePlots_datacardsTauEsStudies.err1sigmaHi = abs((mes_list[index]+mes_list[index+1])/2.0 - min_shift)
tuple makePlots_datacardsTauEsStudies.err1sigmaLow = abs((mes_list[index-1]+mes_list[index])/2.0 - min_shift)
tuple makePlots_datacardsTauEsStudies.err2sigmaHi = abs((mes_list[index]+mes_list[index+1])/2.0 - min_shift)
tuple makePlots_datacardsTauEsStudies.err2sigmaLow = abs((mes_list[index-1]+mes_list[index])/2.0 - min_shift)
list makePlots_datacardsTauEsStudies.es_shifts = [args.shift_ranges[0] + x * args.shift_binning for x in range(int((args.shift_ranges[1] - args.shift_ranges[0]) / args.shift_binning) + 1)]
list makePlots_datacardsTauEsStudies.es_shifts_str = [str(x) for x in es_shifts]
list makePlots_datacardsTauEsStudies.eta_bins = ["0", "1", "2"]
list makePlots_datacardsTauEsStudies.eta_ranges = ["0.0", "1.479", "2.3"]
list makePlots_datacardsTauEsStudies.eta_strings = ["|#eta(#tau_{h})| < 2.3", "|#eta(#tau_{h})| < 1.479", "1.479 < |#eta(#tau_{h})| < 2.3"]
list makePlots_datacardsTauEsStudies.eta_weights = ["(abs(eta_2)<2.3)", "(abs(eta_2)<1.479)", "(abs(eta_2)>1.479)*(abs(eta_2)<2.3)"]
makePlots_datacardsTauEsStudies.export_json = False,
tuple makePlots_datacardsTauEsStudies.extra_weights = (eta_weights if args.eta_binning else pt_weights)
tuple makePlots_datacardsTauEsStudies.file_mlfit = ROOT.TFile(filename_mlfit)
tuple makePlots_datacardsTauEsStudies.file_multidimfit = ROOT.TFile(filename_multidimfit)
tuple makePlots_datacardsTauEsStudies.filename_mlfit = os.path.join(os.path.dirname(datacard), args.combine_cmssw==8 * "fitDiagnostics.root" + args.combine_cmssw==7 * "mlfit.root")
tuple makePlots_datacardsTauEsStudies.filename_multidimfit = os.path.join(os.path.dirname(datacard), "higgsCombineTest.MultiDimFit.mH0.root")
tuple makePlots_datacardsTauEsStudies.fit_polOne = ROOT.TF1("f3","pol1",min(xbinsF),max(xbinsF))
tuple makePlots_datacardsTauEsStudies.fit_polZero = ROOT.TF1("f2","pol0",min(xbinsF),max(xbinsF))
tuple makePlots_datacardsTauEsStudies.fitf = ROOT.TF1("f1","pol2",min(xvaluesF_belowX),max(xvaluesF_belowX))
makePlots_datacardsTauEsStudies.found1sigmaHi = True
makePlots_datacardsTauEsStudies.found1sigmaLow = True
makePlots_datacardsTauEsStudies.found2sigmaHi = True
makePlots_datacardsTauEsStudies.found2sigmaLow = True
tuple makePlots_datacardsTauEsStudies.graphfile = ROOT.TFile(graphfilename, "RECREATE")
tuple makePlots_datacardsTauEsStudies.graphfilename = os.path.join(os.path.dirname(datacard), "parabola_" + category + ("_tightenedMassWindow" if args.tighten_mass_window else "")+".root")
list makePlots_datacardsTauEsStudies.hadd_commands = []
makePlots_datacardsTauEsStudies.histogram_name_template = bkg_histogram_name_templateifnominalelsebkg_syst_histogram_name_template
list makePlots_datacardsTauEsStudies.input_plot_configs = []
string makePlots_datacardsTauEsStudies.input_root_filename_template = "input/${ANALYSIS}_${CHANNEL}_${BIN}_${ERA}.root"
tuple makePlots_datacardsTauEsStudies.list_of_samples = (["data"] if nominal else [])
tuple makePlots_datacardsTauEsStudies.log = logging.getLogger(__name__)
dictionary makePlots_datacardsTauEsStudies.mapping_category2binid = {}
tuple makePlots_datacardsTauEsStudies.MASS = str(shift)
tuple makePlots_datacardsTauEsStudies.merged_config = {}
list makePlots_datacardsTauEsStudies.mes_list = []
list makePlots_datacardsTauEsStudies.mes_list_nll_belowX = []
list makePlots_datacardsTauEsStudies.min_nll = deltaNLL_list[0]
list makePlots_datacardsTauEsStudies.min_shift = mes_list[0]
tuple makePlots_datacardsTauEsStudies.minimumScanFit = fitf.GetMinimumX(min(xvaluesF_belowX),max(xvaluesF_belowX))
tuple makePlots_datacardsTauEsStudies.minimumScanFitY = fitf.GetMinimum(min(xvaluesF_belowX),max(xvaluesF_belowX))
list makePlots_datacardsTauEsStudies.nll_belowX = []
int makePlots_datacardsTauEsStudies.nllMax = 10
tuple makePlots_datacardsTauEsStudies.nominal = (shape_systematic == "nominal")
makePlots_datacardsTauEsStudies.output_dir = output_dir,
tuple makePlots_datacardsTauEsStudies.output_file
Initial value:
1 = os.path.join(args.output_dir, input_root_filename_template.replace("$", "").format(
2  ANALYSIS="ztt",
3  CHANNEL=channel,
4  BIN=category,
5  ERA="13TeV"
6  ))
list makePlots_datacardsTauEsStudies.output_filenames = []
tuple makePlots_datacardsTauEsStudies.output_files = list(set([os.path.join(config["output_dir"], config["filename"]+".root") for config in input_plot_configs[:args.n_plots[0]]]))
string makePlots_datacardsTauEsStudies.output_root_filename_template = "datacards/common/${ANALYSIS}.input_${ERA}.root"
list makePlots_datacardsTauEsStudies.parabola_plot_configs = []
tuple makePlots_datacardsTauEsStudies.parser
Initial value:
1 = argparse.ArgumentParser(description="Create ROOT inputs and datacards for tau energy scale measurement.",
2  parents=[logger.loggingParser])
tuple makePlots_datacardsTauEsStudies.polOne_file = ROOT.TFile(polOne_filename, "RECREATE")
tuple makePlots_datacardsTauEsStudies.polOne_filename = os.path.join(args.output_dir, "datacards/result_fit_" + ("eta" if args.eta_binning else "pt") + "_pol1_" + decayMode + "_" + quantity + ".root")
string makePlots_datacardsTauEsStudies.polOne_string1 = "%1.2f"
string makePlots_datacardsTauEsStudies.polOne_string2 = "%1.2f"
tuple makePlots_datacardsTauEsStudies.polZero_file = ROOT.TFile(polZero_filename, "RECREATE")
tuple makePlots_datacardsTauEsStudies.polZero_filename = os.path.join(args.output_dir, "datacards/result_fit_" + ("eta" if args.eta_binning else "pt") + "_pol0_" + decayMode + "_" + quantity + ".root")
string makePlots_datacardsTauEsStudies.polZero_string1 = "%1.2f"
string makePlots_datacardsTauEsStudies.polZero_string2 = "%1.2f"
list makePlots_datacardsTauEsStudies.postfit_plot_configs = []
tuple makePlots_datacardsTauEsStudies.postfit_shapes = datacards_postfit_shapes.get("fit_s", {})
tuple makePlots_datacardsTauEsStudies.pp = pprint.PrettyPrinter(indent=4)
tuple makePlots_datacardsTauEsStudies.PROCESS = datacards.configs.sample2process(sample)
list makePlots_datacardsTauEsStudies.processes = datacards.cb.cp()
list makePlots_datacardsTauEsStudies.processes_to_plot = list(processes)
list makePlots_datacardsTauEsStudies.pt_bins = [str(x) for x in range(0, len(pt_ranges))]
list makePlots_datacardsTauEsStudies.pt_ranges = ["0.0"]
list makePlots_datacardsTauEsStudies.pt_strings = ["p_{T}(#tau_{h}) > 20 GeV"]
list makePlots_datacardsTauEsStudies.pt_weights = ["(pt_2>20)"]
makePlots_datacardsTauEsStudies.quantity = args.quantity
tuple makePlots_datacardsTauEsStudies.RANGE = str(args.shift_ranges[0])
tuple makePlots_datacardsTauEsStudies.RooFitGraph_Linear
Initial value:
1 = ROOT.TGraphAsymmErrors(
2  len(xbinsF),
3  array.array("d", xbinsF),
4  array.array("d", ybinsF),
5  array.array("d", xerrsF),
6  array.array("d", xerrsF),
7  array.array("d", yerrsloF),
8  array.array("d", yerrshiF)
9  )
tuple makePlots_datacardsTauEsStudies.RooFitGraph_Parabola
Initial value:
1 = ROOT.TGraphErrors(
2  len(xvaluesF),
3  array.array("d", xvaluesF),
4  array.array("d", deltaNLLshifted_list),
5  array.array("d", [0.1]*len(xvaluesF)),
6  array.array("d", [1.0*nllMax/10.0]*len(xvaluesF)) # this is an arbitrary value in order to be able to fit also not so smooth parabolas
7  )
string makePlots_datacardsTauEsStudies.row_format = "{:^22}"
tuple makePlots_datacardsTauEsStudies.sample_settings = samples.Samples()
string makePlots_datacardsTauEsStudies.samples = "\", \""
string makePlots_datacardsTauEsStudies.sig_histogram_name_template = "${BIN}/${PROCESS}${MASS}"
list makePlots_datacardsTauEsStudies.sig_process = datacards_cbs[datacard]
string makePlots_datacardsTauEsStudies.sig_syst_histogram_name_template = "${BIN}/${PROCESS}${MASS}_${SYSTEMATIC}"
tuple makePlots_datacardsTauEsStudies.sigmaScanFit = abs(fitf.GetX(minimumScanFitY+1)-minimumScanFit)
string makePlots_datacardsTauEsStudies.SRC = " "
dictionary makePlots_datacardsTauEsStudies.ss_os_factors
Initial value:
1 = {
2  "mt" : 1.06,
3  "et" : 1.0
4  }
makePlots_datacardsTauEsStudies.STABLE = datacards.stable_options
tuple makePlots_datacardsTauEsStudies.subpath = os.path.normpath(output_dir)
makePlots_datacardsTauEsStudies.systematic = "nominal"
makePlots_datacardsTauEsStudies.SYSTEMATIC = systematic
tuple makePlots_datacardsTauEsStudies.systematics_factory = systematics.SystematicsFactory()
tuple makePlots_datacardsTauEsStudies.systematics_settings = systematics_factory.get(shape_systematic)
string makePlots_datacardsTauEsStudies.tmp_input_root_filename_template = "input/${ANALYSIS}_${CHANNEL}_${BIN}_${SYSTEMATIC}_${ERA}.root"
tuple makePlots_datacardsTauEsStudies.tmp_output_file
Initial value:
1 = os.path.join(args.output_dir, tmp_input_root_filename_template.replace("$", "").format(
2  ANALYSIS="ztt",
3  CHANNEL=channel,
4  BIN=category,
5  SYSTEMATIC=systematic,
6  ERA="13TeV"
7  ))
list makePlots_datacardsTauEsStudies.tmp_output_files = []
tuple makePlots_datacardsTauEsStudies.tree_mlfit = file_mlfit.Get("tree_fit_sb")
tuple makePlots_datacardsTauEsStudies.tree_multidimfit = file_multidimfit.Get("limit")
makePlots_datacardsTauEsStudies.update_systematics = True
int makePlots_datacardsTauEsStudies.useRelaxedIsolation = weight_index>0
makePlots_datacardsTauEsStudies.VERBOSITY = args.combine_verbosity,
tuple makePlots_datacardsTauEsStudies.weight_bins = (eta_bins if args.eta_binning else pt_bins)
list makePlots_datacardsTauEsStudies.weight_bins_loop = weight_binsifargs.no_inclusiveelseweight_bins[1:]
int makePlots_datacardsTauEsStudies.weight_index = int(category.split("_")[-1].split(weight_type + "bin")[-1])
tuple makePlots_datacardsTauEsStudies.weight_ranges = (eta_ranges if args.eta_binning else pt_ranges)
list makePlots_datacardsTauEsStudies.weight_ranges_loop = weight_rangesifargs.no_inclusiveelseweight_ranges[1:]
tuple makePlots_datacardsTauEsStudies.weight_strings = (eta_strings if args.eta_binning else pt_strings)
tuple makePlots_datacardsTauEsStudies.weight_type = ("eta" if args.eta_binning else "pt")
tuple makePlots_datacardsTauEsStudies.weightBin = int(category.split("_")[-1].split(weight_type+"bin")[-1])
list makePlots_datacardsTauEsStudies.weightbin_plot_configs = []
float makePlots_datacardsTauEsStudies.wj_sf_shift = 0.0
tuple makePlots_datacardsTauEsStudies.www = args.wwwif(subpath == "tauEsStudies_datacards")
list makePlots_datacardsTauEsStudies.www_output_dirs_parabola = []
list makePlots_datacardsTauEsStudies.www_output_dirs_postfit = []
list makePlots_datacardsTauEsStudies.www_output_dirs_weightbin = []
list makePlots_datacardsTauEsStudies.xbinsF = [0.7395, 2.2185]
list makePlots_datacardsTauEsStudies.xerrsF = [0.7395, 0.7395]
string makePlots_datacardsTauEsStudies.xerrsval = "0.7395 0.7395"
string makePlots_datacardsTauEsStudies.xval = "0.7395 2.2185"
string makePlots_datacardsTauEsStudies.xvalues = ""
list makePlots_datacardsTauEsStudies.xvaluesF = []
list makePlots_datacardsTauEsStudies.xvaluesF_belowX = []
string makePlots_datacardsTauEsStudies.yvalues = ""