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

Variables

tuple log = logging.getLogger(__name__)
 
tuple parser
 
string help = "Input directory."
 
list default = ["all"]
 
tuple args = parser.parse_args()
 
list cp_mixing_angles_over_pi_half = ["{mixing:03d}".format(mixing=int(mixing*100)) for mixing in args.cp_mixings]
 
list cp_mixings_str = ["{mixing:0.2f}".format(mixing=mixing) for mixing in args.cp_mixings]
 
tuple cp_mixings_scan = list(numpy.arange(args.cp_mixings[0], args.cp_mixings[-1]+0.001, (args.cp_mixings[-1]-args.cp_mixings[0])/(args.cp_mixing_scan_points-1)))
 
tuple cp_mixings_combine_range_min = (3*cp_mixings_scan[0]-cp_mixings_scan[1])
 
tuple cp_mixings_combine_range_max = (3*cp_mixings_scan[-1]-cp_mixings_scan[-2])
 
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 = []
 
tuple datacards = cpstudiesdatacards.CPStudiesDatacards(cp_mixings_str, add_data=True)
 
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
 
string output_root_filename_template = "datacards/common/${ANALYSIS}.input_${ERA}.root"
 
tuple categories = datacards.cb.cp()
 
tuple datacards_per_channel_category = cpstudiesdatacards.CPStudiesDatacards(cb=datacards.cb.cp().channel([channel]).bin([category]))
 
list higgs_masses = args.higgs_masses[:1]
 
list additional_higgs_masses_for_shape = args.higgs_masses[1:]
 
tuple output_file
 
list tmp_output_files = []
 
tuple nominal = (shape_systematic == "nominal")
 
list list_of_bkg_samples = [datacards.configs.process2sample(process) for process in list_of_samples if process in datacards_per_channel_category.cb.cp().backgrounds().process_set()]
 
list list_of_sig_samples = [datacards.configs.process2sample(process) for process in list_of_samples if process in datacards_per_channel_category.cb.cp().signals().process_set()]
 
string systematic = "nominal"
 
dictionary config = {}
 
string samples = "\", \""
 
 channel = channel,
 
 category = category,
 
tuple config_bkg
 
tuple PROCESS = datacards.configs.sample2process(sample)
 
 BIN = category,
 
 SYSTEMATIC = systematic
 
tuple tmp_additional_higgs_masses_for_shape = copy.deepcopy(additional_higgs_masses_for_shape)
 
tuple config_sig
 
 MASS = cp_mixing_str,
 
tuple nicks_to_sum = copy.deepcopy(list_of_bkg_samples)
 
tuple systematics_settings = systematics_factory.get(shape_systematic)
 
string binnings_key = "binningHtt13TeV_"
 
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.1
 
dictionary datacards_cbs = {}
 
tuple datacards_workspaces = datacards.text2workspace(datacards_cbs, n_processes=args.n_processes)
 
list result_plot_configs = []
 
tuple datacards_postfit_shapes = datacards.postfit_shapes_fromworkspace(datacards_cbs, datacards_workspaces, False, args.n_processes, "--sampling" + (" --print" if args.n_processes <= 1 else ""))
 
 STABLE = datacards.stable_options,
 
string RANGE = "{0:f},{1:f}"
 
 POINTS = args.cp_mixing_scan_points
 

Variable Documentation

float makePlots_datacardsCPStudies.add_threshold = 0.1
list makePlots_datacardsCPStudies.additional_higgs_masses_for_shape = args.higgs_masses[1:]
tuple makePlots_datacardsCPStudies.args = parser.parse_args()
makePlots_datacardsCPStudies.BIN = category,
string makePlots_datacardsCPStudies.binnings_key = "binningHtt13TeV_"
tuple makePlots_datacardsCPStudies.binnings_settings = binnings.BinningsDict()
string makePlots_datacardsCPStudies.bkg_histogram_name_template = "${BIN}/${PROCESS}"
string makePlots_datacardsCPStudies.bkg_syst_histogram_name_template = "${BIN}/${PROCESS}_${SYSTEMATIC}"
tuple makePlots_datacardsCPStudies.categories = datacards.cb.cp()
makePlots_datacardsCPStudies.category = category,
makePlots_datacardsCPStudies.channel = channel,
tuple makePlots_datacardsCPStudies.config = {}
tuple makePlots_datacardsCPStudies.config_bkg
Initial value:
1 = sample_settings.get_config(
2  samples=[getattr(samples.Samples, sample) for sample in (["data"] if nominal and args.add_data else []) + list_of_bkg_samples],
3  channel=channel,
4  category="catHtt13TeV_"+category,
5  weight=args.weight,
6  cut_type = "baseline2016",
7  lumi=args.lumi * 1000,
8  no_ewk_samples = args.no_ewk_samples,
9  no_ewkz_as_dy = args.no_ewkz_as_dy
10  )
tuple makePlots_datacardsCPStudies.config_sig
Initial value:
1 = sample_settings.get_config(
2  samples=[getattr(samples.Samples, sample) for sample in list_of_sig_samples],
3  channel=channel,
4  category="catHtt13TeV_"+category,
5  nick_suffix="_"+cp_mixing_str,
6  weight=args.weight+"*"+"tauSpinnerWeightInvSample"+"*tauSpinnerWeight"+cp_mixing_angle_over_pi_half,
7  lumi=args.lumi * 1000,
8  higgs_masses=higgs_masses,
9  cut_type = "baseline2016",
10  additional_higgs_masses_for_shape=tmp_additional_higgs_masses_for_shape,
11  mssm=None,
12  normalise_to_sm_xsec=False
13  )
list makePlots_datacardsCPStudies.cp_mixing_angles_over_pi_half = ["{mixing:03d}".format(mixing=int(mixing*100)) for mixing in args.cp_mixings]
tuple makePlots_datacardsCPStudies.cp_mixings_combine_range_max = (3*cp_mixings_scan[-1]-cp_mixings_scan[-2])
tuple makePlots_datacardsCPStudies.cp_mixings_combine_range_min = (3*cp_mixings_scan[0]-cp_mixings_scan[1])
tuple makePlots_datacardsCPStudies.cp_mixings_scan = list(numpy.arange(args.cp_mixings[0], args.cp_mixings[-1]+0.001, (args.cp_mixings[-1]-args.cp_mixings[0])/(args.cp_mixing_scan_points-1)))
list makePlots_datacardsCPStudies.cp_mixings_str = ["{mixing:0.2f}".format(mixing=mixing) for mixing in args.cp_mixings]
list makePlots_datacardsCPStudies.datacard_filename_templates
Initial value:
1 = [
2  "datacards/individual/${CHANNEL}/${BINID}/${ANALYSIS}_${CHANNEL}_${BINID}_${ERA}.txt",
3  "datacards/channel/${CHANNEL}/${ANALYSIS}_${CHANNEL}_${ERA}.txt",
4  "datacards/category/${BINID}/${ANALYSIS}_${BINID}_${ERA}.txt",
5  "datacards/combined/${ANALYSIS}_${ERA}.txt",
6  ]
tuple makePlots_datacardsCPStudies.datacards = cpstudiesdatacards.CPStudiesDatacards(cp_mixings_str, add_data=True)
dictionary makePlots_datacardsCPStudies.datacards_cbs = {}
tuple makePlots_datacardsCPStudies.datacards_per_channel_category = cpstudiesdatacards.CPStudiesDatacards(cb=datacards.cb.cp().channel([channel]).bin([category]))
tuple makePlots_datacardsCPStudies.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_datacardsCPStudies.datacards_workspaces = datacards.text2workspace(datacards_cbs, n_processes=args.n_processes)
list makePlots_datacardsCPStudies.debug_plot_configs = []
string makePlots_datacardsCPStudies.default = ["all"]
makePlots_datacardsCPStudies.DST = output_file,
list makePlots_datacardsCPStudies.hadd_commands = []
string makePlots_datacardsCPStudies.help = "Input directory."
list makePlots_datacardsCPStudies.higgs_masses = args.higgs_masses[:1]
string makePlots_datacardsCPStudies.input_root_filename_template = "input/${ANALYSIS}_${CHANNEL}_${BIN}_${ERA}.root"
list makePlots_datacardsCPStudies.list_of_bkg_samples = [datacards.configs.process2sample(process) for process in list_of_samples if process in datacards_per_channel_category.cb.cp().backgrounds().process_set()]
list makePlots_datacardsCPStudies.list_of_sig_samples = [datacards.configs.process2sample(process) for process in list_of_samples if process in datacards_per_channel_category.cb.cp().signals().process_set()]
tuple makePlots_datacardsCPStudies.log = logging.getLogger(__name__)
makePlots_datacardsCPStudies.MASS = cp_mixing_str,
list makePlots_datacardsCPStudies.merged_output_files = []
tuple makePlots_datacardsCPStudies.nicks_to_sum = copy.deepcopy(list_of_bkg_samples)
tuple makePlots_datacardsCPStudies.nominal = (shape_systematic == "nominal")
tuple makePlots_datacardsCPStudies.output_file
Initial value:
1 = os.path.join(args.output_dir, input_root_filename_template.replace("$", "").format(
2  ANALYSIS="htt",
3  CHANNEL=channel,
4  BIN=category,
5  ERA="13TeV"
6  ))
tuple makePlots_datacardsCPStudies.output_files = []
string makePlots_datacardsCPStudies.output_root_filename_template = "datacards/common/${ANALYSIS}.input_${ERA}.root"
tuple makePlots_datacardsCPStudies.parser
Initial value:
1 = argparse.ArgumentParser(description="Create ROOT inputs and datacards for CP studies.",
2  parents=[logger.loggingParser])
list makePlots_datacardsCPStudies.plot_configs = []
makePlots_datacardsCPStudies.POINTS = args.cp_mixing_scan_points
tuple makePlots_datacardsCPStudies.PROCESS = datacards.configs.sample2process(sample)
tuple makePlots_datacardsCPStudies.processes = datacards.cb.cp()
string makePlots_datacardsCPStudies.RANGE = "{0:f},{1:f}"
list makePlots_datacardsCPStudies.result_plot_configs = []
tuple makePlots_datacardsCPStudies.sample_settings = samples.Samples()
string makePlots_datacardsCPStudies.samples = "\", \""
string makePlots_datacardsCPStudies.sig_histogram_name_template = "${BIN}/${PROCESS}${MASS}"
string makePlots_datacardsCPStudies.sig_syst_histogram_name_template = "${BIN}/${PROCESS}${MASS}_${SYSTEMATIC}"
string makePlots_datacardsCPStudies.SRC = " "
makePlots_datacardsCPStudies.STABLE = datacards.stable_options,
makePlots_datacardsCPStudies.systematic = "nominal"
makePlots_datacardsCPStudies.SYSTEMATIC = systematic
tuple makePlots_datacardsCPStudies.systematics_factory = systematics.SystematicsFactory()
tuple makePlots_datacardsCPStudies.systematics_settings = systematics_factory.get(shape_systematic)
tuple makePlots_datacardsCPStudies.tmp_additional_higgs_masses_for_shape = copy.deepcopy(additional_higgs_masses_for_shape)
string makePlots_datacardsCPStudies.tmp_input_root_filename_template = "input/${ANALYSIS}_${CHANNEL}_${BIN}_${SYSTEMATIC}_${ERA}.root"
tuple makePlots_datacardsCPStudies.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=category,
5  SYSTEMATIC=systematic,
6  ERA="13TeV"
7  ))
tuple makePlots_datacardsCPStudies.tmp_output_files = []
makePlots_datacardsCPStudies.update_systematics = True