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

Functions

def poi_ranges_default
 
def poi_ranges_default_bbb
 

Variables

tuple log = logging.getLogger(__name__)
 
dictionary models
 
tuple parser
 
string help = "Datacards."
 
tuple choices = models.keys()
 
list default = [mixing/100.0 for mixing in range(0, 101, 25)]
 
tuple args = parser.parse_args()
 
tuple datacards_configs = datacardconfigs.DatacardConfigs()
 
list filename_templates
 
list plot_configs = []
 
tuple cb = ch.CombineHarvester()
 
tuple template_tag = template.split("$")
 
tuple matched_template = os.path.join(datacard[:datacard.index(template_tag)], template)
 
tuple datacards = cpstudiesdatacards.CPStudiesDatacards(cb=cb)
 
tuple model_settings = models.get(model, {})
 
dictionary datacards_workspaces = {}
 
 output_dir_base = args.output_dir
 
tuple sub_dir_base = os.path.join("projection", model, "statUnc" if freeze_syst_uncs else "totUnc")
 
dictionary datacards_cbs = {}
 
dictionary datacards_poi_ranges = {}
 
tuple output_dir = os.path.join(output_dir_base, "{:06}".format(lumi))
 
tuple scaled_datacards = cpstudiesdatacards.CPStudiesDatacards(cb=datacards.cb.deep())
 
 lumi_scale_factor = lumi/args.lumi_datacards
 
tuple scaled_datacards_cbs
 
list json_configs = []
 
list tmp_datacards_workspaces = datacards_workspaces[fit_name]
 
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}"
 
tuple POINTS = len(args.cp_mixings)
 
tuple limit_file = os.path.join(os.path.splitext(datacard)[0],"projection/default/totUnc/"+str("{:06}".format(lumi))+"/higgsCombine.Asymptotic.mH0.root")
 
tuple file = ROOT.TFile(limit_file)
 
tuple tree = file.Get("limit")
 
list quantile_expected_list = []
 
list limits_list = []
 
list channel = ["em","et","mt","tt"]
 
list lst = [(lumi/1000) for lumi in args.lumis]
 
string xbins = " "
 
dictionary config
 
tuple config_limitsoverlumi = jsonTools.JsonDict(os.path.expandvars("HiggsAnalysis/KITHiggsToTauTau/data/plots/configs/combine/exp_limit_over_lumi.json"))
 
list dir_list = [os.path.join(output_dir_base, "{:06}".format(lumi)) for lumi in args.lumis]
 

Function Documentation

def makePlots_datacardsCPStudies_projection.poi_ranges_default (   lumi)
def makePlots_datacardsCPStudies_projection.poi_ranges_default_bbb (   lumi)

Variable Documentation

tuple makePlots_datacardsCPStudies_projection.args = parser.parse_args()
tuple makePlots_datacardsCPStudies_projection.cb = ch.CombineHarvester()
list makePlots_datacardsCPStudies_projection.channel = ["em","et","mt","tt"]
tuple makePlots_datacardsCPStudies_projection.choices = models.keys()
dictionary makePlots_datacardsCPStudies_projection.config
Initial value:
1 = {
2  "folders": [
3  "limit"
4  ],
5  "x_label": "Integrated Luminosity / fb^{-1}",
6  "y_label": "CP-mixing-angle #alpha_{#tau}",
7  "files": [
8  file
9  ],
10  "filename": "lumivscpmixing_normal_"+channel[i],
11  "x_bins":[xbins],
12  "y_bins":["20,0,1.65"],
13  "x_expressions":"lumi/1000",
14  "y_expressions":"cpmixing*TMath::Pi()/2",
15  "weights": "deltaNLL*(t_real<=0.00001)",
16  "markers": "COLZ",
17  "z_label": "-2 #Delta ln(L)",
18  "output_dir": os.path.join(os.path.splitext(datacard)[0],"projection/")
19  }
tuple makePlots_datacardsCPStudies_projection.config_limitsoverlumi = jsonTools.JsonDict(os.path.expandvars("HiggsAnalysis/KITHiggsToTauTau/data/plots/configs/combine/exp_limit_over_lumi.json"))
tuple makePlots_datacardsCPStudies_projection.datacards = cpstudiesdatacards.CPStudiesDatacards(cb=cb)
dictionary makePlots_datacardsCPStudies_projection.datacards_cbs = {}
tuple makePlots_datacardsCPStudies_projection.datacards_configs = datacardconfigs.DatacardConfigs()
dictionary makePlots_datacardsCPStudies_projection.datacards_poi_ranges = {}
tuple makePlots_datacardsCPStudies_projection.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_projection.datacards_workspaces = {}
list makePlots_datacardsCPStudies_projection.default = [mixing/100.0 for mixing in range(0, 101, 25)]
list makePlots_datacardsCPStudies_projection.dir_list = [os.path.join(output_dir_base, "{:06}".format(lumi)) for lumi in args.lumis]
tuple makePlots_datacardsCPStudies_projection.file = ROOT.TFile(limit_file)
list makePlots_datacardsCPStudies_projection.filename_templates
Initial value:
1 = [
2  "datacards/individual/${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  ]
string makePlots_datacardsCPStudies_projection.help = "Datacards."
list makePlots_datacardsCPStudies_projection.json_configs = []
tuple makePlots_datacardsCPStudies_projection.limit_file = os.path.join(os.path.splitext(datacard)[0],"projection/default/totUnc/"+str("{:06}".format(lumi))+"/higgsCombine.Asymptotic.mH0.root")
list makePlots_datacardsCPStudies_projection.limits_list = []
tuple makePlots_datacardsCPStudies_projection.log = logging.getLogger(__name__)
list makePlots_datacardsCPStudies_projection.lst = [(lumi/1000) for lumi in args.lumis]
makePlots_datacardsCPStudies_projection.lumi_scale_factor = lumi/args.lumi_datacards
tuple makePlots_datacardsCPStudies_projection.matched_template = os.path.join(datacard[:datacard.index(template_tag)], template)
tuple makePlots_datacardsCPStudies_projection.model_settings = models.get(model, {})
dictionary makePlots_datacardsCPStudies_projection.models
Initial value:
1 = {
2  "default" : {
3  "fit" : {
4  "" : {
5  "method" : "MultiDimFit",#"MaxLikelihoodFit",
6  "options" : "--algo singles",
7  "poi_ranges" : poi_ranges_default,
8  "poi_ranges_bbb" : poi_ranges_default_bbb,
9  },
10  },
11  "fit_plots" : {
12  "$CMSSW_BASE/src/HiggsAnalysis/KITHiggsToTauTau/data/plots/configs/combine/exp_best_fit_mu_over_lumi.json",
13  "$CMSSW_BASE/src/HiggsAnalysis/KITHiggsToTauTau/data/plots/configs/combine/exp_best_fit_mu_split_over_lumi.json",
14  "$CMSSW_BASE/src/HiggsAnalysis/KITHiggsToTauTau/data/plots/configs/combine/exp_best_fit_mu_unc_over_lumi.json",
15  "$CMSSW_BASE/src/HiggsAnalysis/KITHiggsToTauTau/data/plots/configs/combine/exp_best_fit_mu_unc_split_over_lumi.json",
16  },
17  },
18  }
tuple makePlots_datacardsCPStudies_projection.output_dir = os.path.join(output_dir_base, "{:06}".format(lumi))
tuple makePlots_datacardsCPStudies_projection.output_dir_base = args.output_dir
tuple makePlots_datacardsCPStudies_projection.parser
Initial value:
1 = argparse.ArgumentParser(description="Make Projections of the expected limits based on existing datacards.",
2  parents=[logger.loggingParser])
list makePlots_datacardsCPStudies_projection.plot_configs = []
tuple makePlots_datacardsCPStudies_projection.POINTS = len(args.cp_mixings)
list makePlots_datacardsCPStudies_projection.quantile_expected_list = []
string makePlots_datacardsCPStudies_projection.RANGE = "{0:f},{1:f}"
tuple makePlots_datacardsCPStudies_projection.scaled_datacards = cpstudiesdatacards.CPStudiesDatacards(cb=datacards.cb.deep())
tuple makePlots_datacardsCPStudies_projection.scaled_datacards_cbs
Initial value:
1 = scaled_datacards.write_datacards(
2  os.path.basename(datacard),
3  os.path.splitext(os.path.basename(datacard))[0]+"_input.root",
4  output_dir
5  )
makePlots_datacardsCPStudies_projection.STABLE = datacards.stable_options,
tuple makePlots_datacardsCPStudies_projection.sub_dir_base = os.path.join("projection", model, "statUnc" if freeze_syst_uncs else "totUnc")
tuple makePlots_datacardsCPStudies_projection.template_tag = template.split("$")
list makePlots_datacardsCPStudies_projection.tmp_datacards_workspaces = datacards_workspaces[fit_name]
tuple makePlots_datacardsCPStudies_projection.tree = file.Get("limit")
string makePlots_datacardsCPStudies_projection.xbins = " "