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

Functions

def addArguments
 
def merge
 
def AppendConfig
 

Variables

tuple log = logging.getLogger(__name__)
 
list colors = ['#000080', '#FF0000', '#800000', '#FFFF00', '#800080', '#000080', '#008000', '#0000FF', '#008080']
 
tuple parser = argparse.ArgumentParser(description = "Make Data-MC control plots.", parents = [logger.loggingParser])
 
tuple args = parser.parse_args()
 
list lheweights_names = []
 
 pdfkey = args.pdfkey
 
 addpdfs = args.addpdfs
 
list list_of_samples = [getattr(samples.Samples, sample) for sample in args.samples]
 
tuple sample_settings = samples.Samples(embedding=True)
 
list bkg_samples = [sample for sample in args.samples if sample not in ["data", "htt", "ggh", "bbh"]]
 
list sig_samples_raw = [sample for sample in args.samples if sample in ["htt", "ggh", "bbh"]]
 
list sig_samples = []
 
string scale_str = "_%i"
 
tuple binnings_settings = binnings.BinningsDict()
 
string global_category_string = "catHtt13TeV"
 
string global_cut_type = "ztt2015cs"
 
int whitelistbylhe = 1
 
tuple category_string = (global_category_string + "_{channel}_{category}")
 
string file_name = ""
 
tuple config = sample_settings.get_config( samples = list_of_samples, channel = args.channels[0], category = category_string )
 
tuple root_file = ROOT.TFile(file_name, "READ")
 
tuple eventTree = ROOT.gDirectory.Get(sample_settings.root_file_folder(args.channels[0]))
 
tuple list_of_leaves = eventTree.GetListOfLeaves()
 
dictionary plot_configs = {}
 
dictionary plot_configs_scale_only = {}
 
dictionary plot_configs_pdf_only = {}
 
dictionary plot_configs_alphas_only = {}
 
int printedpdf = 0
 
int printedalphas = 0
 
int printedscale = 0
 
dictionary json_config = {}
 
list json_filenames = [os.path.join(args.json_dir, "8TeV" if args.run1 else "13TeV", channel_dir, quantity+".json") for channel_dir in [channel, "default"]]
 
tuple json_filename = os.path.expandvars(json_filename)
 
tuple quantity = json_config.pop("x_expressions", [quantity])
 
 binning_string = None
 
 binnings_key = None
 
list bkg_samples_used = [nick for nick in bkg_samples if nick in config["nicks"]]
 
int hmass_temp = 125
 
string sig_nick = "htt%i"
 
tuple config_temp = sample_settings.get_config( samples = list_of_samples, channel = args.channels[0], category = category_string)
 
list centralvalue = config_temp["nicks"]
 
dictionary configs_dict
 
tuple fout = open("merged_" + args.samples[0] + "_" + channel + key + str(category) + ".json", "w")
 

Function Documentation

def makePlots_ZTTtheoryUnc.addArguments (   parser)
def makePlots_ZTTtheoryUnc.AppendConfig (   plot_configs_list,
  config,
  centralvalue = "",
  logdebug = "",
  whitelist = False,
  printednumber = 0,
  numerator = False 
)
def makePlots_ZTTtheoryUnc.merge (   config_list)

Variable Documentation

makePlots_ZTTtheoryUnc.addpdfs = args.addpdfs
tuple makePlots_ZTTtheoryUnc.args = parser.parse_args()
makePlots_ZTTtheoryUnc.binning_string = None
string makePlots_ZTTtheoryUnc.binnings_key = None
tuple makePlots_ZTTtheoryUnc.binnings_settings = binnings.BinningsDict()
list makePlots_ZTTtheoryUnc.bkg_samples = [sample for sample in args.samples if sample not in ["data", "htt", "ggh", "bbh"]]
list makePlots_ZTTtheoryUnc.bkg_samples_used = [nick for nick in bkg_samples if nick in config["nicks"]]
tuple makePlots_ZTTtheoryUnc.category_string = (global_category_string + "_{channel}_{category}")
list makePlots_ZTTtheoryUnc.centralvalue = config_temp["nicks"]
list makePlots_ZTTtheoryUnc.colors = ['#000080', '#FF0000', '#800000', '#FFFF00', '#800080', '#000080', '#008000', '#0000FF', '#008080']
tuple makePlots_ZTTtheoryUnc.config = sample_settings.get_config( samples = list_of_samples, channel = args.channels[0], category = category_string )
tuple makePlots_ZTTtheoryUnc.config_temp = sample_settings.get_config( samples = list_of_samples, channel = args.channels[0], category = category_string)
dictionary makePlots_ZTTtheoryUnc.configs_dict
Initial value:
1 = {#"_all_": plot_configs,
2  "_pdf_only_": plot_configs_pdf_only,
3  #"_alphas_only_": plot_configs_alphas_only,
4  "_scale_only_": plot_configs_scale_only
5  }
tuple makePlots_ZTTtheoryUnc.eventTree = ROOT.gDirectory.Get(sample_settings.root_file_folder(args.channels[0]))
tuple makePlots_ZTTtheoryUnc.file_name = ""
tuple makePlots_ZTTtheoryUnc.fout = open("merged_" + args.samples[0] + "_" + channel + key + str(category) + ".json", "w")
string makePlots_ZTTtheoryUnc.global_category_string = "catHtt13TeV"
string makePlots_ZTTtheoryUnc.global_cut_type = "ztt2015cs"
tuple makePlots_ZTTtheoryUnc.hmass_temp = 125
tuple makePlots_ZTTtheoryUnc.json_config = {}
tuple makePlots_ZTTtheoryUnc.json_filename = os.path.expandvars(json_filename)
list makePlots_ZTTtheoryUnc.json_filenames = [os.path.join(args.json_dir, "8TeV" if args.run1 else "13TeV", channel_dir, quantity+".json") for channel_dir in [channel, "default"]]
list makePlots_ZTTtheoryUnc.lheweights_names = []
tuple makePlots_ZTTtheoryUnc.list_of_leaves = eventTree.GetListOfLeaves()
list makePlots_ZTTtheoryUnc.list_of_samples = [getattr(samples.Samples, sample) for sample in args.samples]
tuple makePlots_ZTTtheoryUnc.log = logging.getLogger(__name__)
tuple makePlots_ZTTtheoryUnc.parser = argparse.ArgumentParser(description = "Make Data-MC control plots.", parents = [logger.loggingParser])
makePlots_ZTTtheoryUnc.pdfkey = args.pdfkey
dictionary makePlots_ZTTtheoryUnc.plot_configs = {}
dictionary makePlots_ZTTtheoryUnc.plot_configs_alphas_only = {}
dictionary makePlots_ZTTtheoryUnc.plot_configs_pdf_only = {}
dictionary makePlots_ZTTtheoryUnc.plot_configs_scale_only = {}
tuple makePlots_ZTTtheoryUnc.printedalphas = 0
tuple makePlots_ZTTtheoryUnc.printedpdf = 0
tuple makePlots_ZTTtheoryUnc.printedscale = 0
tuple makePlots_ZTTtheoryUnc.quantity = json_config.pop("x_expressions", [quantity])
tuple makePlots_ZTTtheoryUnc.root_file = ROOT.TFile(file_name, "READ")
tuple makePlots_ZTTtheoryUnc.sample_settings = samples.Samples(embedding=True)
string makePlots_ZTTtheoryUnc.scale_str = "_%i"
string makePlots_ZTTtheoryUnc.sig_nick = "htt%i"
list makePlots_ZTTtheoryUnc.sig_samples = []
list makePlots_ZTTtheoryUnc.sig_samples_raw = [sample for sample in args.samples if sample in ["htt", "ggh", "bbh"]]
int makePlots_ZTTtheoryUnc.whitelistbylhe = 1