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

Variables

tuple log = logging.getLogger(__name__)
 
tuple parser
 
string help = "Datacards."
 
list default = ["data_obs"]
 
tuple args = parser.parse_args()
 
list plot_configs = []
 
tuple fit_result = os.path.join(os.path.dirname(datacard), "out", "mlfit.root")
 
tuple output_dir = os.path.join(os.path.dirname(datacard), "shapes")
 
tuple mass = str(mass)
 
tuple mass_output_dir = os.path.join(output_dir, mass)
 
tuple shapes_root_file = os.path.join(mass_output_dir, os.path.splitext(os.path.basename(datacard))[0]+"_"+fit_type+".root")
 
string command = "PostFitShapes"
 
tuple root_file = ROOT.TFile(shapes_root_file, "READ")
 
tuple keys = root_file.GetListOfKeys()
 
list directories = [keys.At(index).GetName() for index in range(keys.GetSize()) if keys.At(index).GetClassName() == "TDirectoryFile"]
 
dictionary histograms = {}
 
tuple root_dir = root_file.Get(directory)
 
dictionary datas = {directory : [h for h in histos if h in args.data_processes] for directory, histos in histograms.items()}
 
dictionary backgrounds = {directory : [h for h in histos if h in args.background_processes] for directory, histos in histograms.items()}
 
dictionary background_uncertainties = {directory : [h for h in histos if h in args.background_uncertainties] for directory, histos in histograms.items()}
 
dictionary signals = {directory : [h for h in histos if h in args.signal_processes] for directory, histos in histograms.items()}
 
dictionary colors
 
tuple data = datas.get(directory, [])
 
tuple background = backgrounds.get(directory, [])
 
tuple background_uncertainty = background_uncertainties.get(directory, [])
 
tuple signal = signals.get(directory, [])
 

Variable Documentation

tuple makePlots_datacardsPostfitPlots.args = parser.parse_args()
tuple makePlots_datacardsPostfitPlots.background = backgrounds.get(directory, [])
dictionary makePlots_datacardsPostfitPlots.background_uncertainties = {directory : [h for h in histos if h in args.background_uncertainties] for directory, histos in histograms.items()}
tuple makePlots_datacardsPostfitPlots.background_uncertainty = background_uncertainties.get(directory, [])
dictionary makePlots_datacardsPostfitPlots.backgrounds = {directory : [h for h in histos if h in args.background_processes] for directory, histos in histograms.items()}
dictionary makePlots_datacardsPostfitPlots.colors
Initial value:
1 = {
2  "data_obs" : "#000000",
3  "ZTT" : "#FFCC66",
4  "ZL" : "#4496C8",
5  "ZJ" : "#64B6E8",
6  "TT" : "#9999CC",
7  "VV" : "#DE5A6A",
8  "W" : "#FE7A8A",
9  "QCD" : "#FFCCFF",
10  "TotalSig" : "#000080",
11  "TotalBkg" : "#000000",
12  }
tuple makePlots_datacardsPostfitPlots.command = "PostFitShapes"
tuple makePlots_datacardsPostfitPlots.data = datas.get(directory, [])
dictionary makePlots_datacardsPostfitPlots.datas = {directory : [h for h in histos if h in args.data_processes] for directory, histos in histograms.items()}
list makePlots_datacardsPostfitPlots.default = ["data_obs"]
list makePlots_datacardsPostfitPlots.directories = [keys.At(index).GetName() for index in range(keys.GetSize()) if keys.At(index).GetClassName() == "TDirectoryFile"]
tuple makePlots_datacardsPostfitPlots.fit_result = os.path.join(os.path.dirname(datacard), "out", "mlfit.root")
string makePlots_datacardsPostfitPlots.help = "Datacards."
dictionary makePlots_datacardsPostfitPlots.histograms = {}
tuple makePlots_datacardsPostfitPlots.keys = root_file.GetListOfKeys()
tuple makePlots_datacardsPostfitPlots.log = logging.getLogger(__name__)
tuple makePlots_datacardsPostfitPlots.mass = str(mass)
tuple makePlots_datacardsPostfitPlots.mass_output_dir = os.path.join(output_dir, mass)
tuple makePlots_datacardsPostfitPlots.output_dir = os.path.join(os.path.dirname(datacard), "shapes")
tuple makePlots_datacardsPostfitPlots.parser
Initial value:
1 = argparse.ArgumentParser(description="Make prefit/postfit plots based on datacards and max. likelihood fit results.",
2  parents=[logger.loggingParser])
list makePlots_datacardsPostfitPlots.plot_configs = []
tuple makePlots_datacardsPostfitPlots.root_dir = root_file.Get(directory)
tuple makePlots_datacardsPostfitPlots.root_file = ROOT.TFile(shapes_root_file, "READ")
tuple makePlots_datacardsPostfitPlots.shapes_root_file = os.path.join(mass_output_dir, os.path.splitext(os.path.basename(datacard))[0]+"_"+fit_type+".root")
tuple makePlots_datacardsPostfitPlots.signal = signals.get(directory, [])
dictionary makePlots_datacardsPostfitPlots.signals = {directory : [h for h in histos if h in args.signal_processes] for directory, histos in histograms.items()}