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

Classes

class  CutOptimizer
 

Functions

def make_Histogram
 
def optimize
 
def test_function
 

Variables

tuple log = logging.getLogger(__name__)
 
tuple parser
 
string help = "Input directory."
 
list default = ["ztt", "zll", "zl", "zj", "ttj", "vv", "wj", "qcd", "data"]
 
list choices = ["ztt", "zll", "zl", "zj", "ttj", "vv", "wj", "qcd", "ff", "ggh", "qqh", "bbh", "vh", "htt", "data"]
 
tuple args = parser.parse_args()
 
list list_of_samples = [getattr(samples.Samples, sample) for sample in args.samples]
 
tuple sample_settings = samples.Samples()
 
list bkg_samples = [sample for sample in args.samples if sample not in ["data", "htt", "bbh"]]
 
list sig_samples_raw = [sample for sample in args.samples if sample in ["htt", "bbh"]]
 
list sig_samples = []
 
string scale_str = "_%i"
 
tuple binnings_settings = binnings.BinningsDict()
 
 category_string = None
 
tuple config
 
list x_bins = [x for x in range(int(float(args.x_range[0])*100),int(float(args.x_range[1])*100)+1, int((float(args.x_range[1])-float(args.x_range[0]))*4))]
 
list y_bins = []
 
list z_bins = []
 
list variables = [args.x_quantity]
 
list current_cuts = []
 
int current_max = 0
 
list real_values = []
 
list b_max_index = current_cuts[0]
 
list b_min = x_bins[b_max_index-3]
 
list b_max = x_bins[b_max_index+3]
 
tuple step = (b_max-b_min)
 
tuple tfile = ROOT.TFile(os.path.expandvars(os.path.join(args.output_dir, "CutOptimizerStorage.root")), "READ")
 
list hist_list = [tfile.Get(name) for name in bkg_samples]
 
tuple htt = tfile.Get(sig_samples[0])
 
tuple bkg_hist = hist_list.pop(0)
 
tuple opt_test = CutOptimizer(variables, [htt,bkg_hist])
 

Function Documentation

def cutOptimizer.make_Histogram ( )
def cutOptimizer.optimize (   root_histogram)
def cutOptimizer.test_function (   kwargs)

Variable Documentation

tuple cutOptimizer.args = parser.parse_args()
tuple cutOptimizer.b_max = x_bins[b_max_index+3]
list cutOptimizer.b_max_index = current_cuts[0]
tuple cutOptimizer.b_min = x_bins[b_max_index-3]
tuple cutOptimizer.binnings_settings = binnings.BinningsDict()
tuple cutOptimizer.bkg_hist = hist_list.pop(0)
list cutOptimizer.bkg_samples = [sample for sample in args.samples if sample not in ["data", "htt", "bbh"]]
tuple cutOptimizer.category_string = None
list cutOptimizer.choices = ["ztt", "zll", "zl", "zj", "ttj", "vv", "wj", "qcd", "ff", "ggh", "qqh", "bbh", "vh", "htt", "data"]
tuple cutOptimizer.config
Initial value:
1 = sample_settings.get_config(
2  samples=list_of_samples,
3  channel=args.channel,
4  category=category_string,
5  higgs_masses=args.higgs_masses,
6  normalise_signal_to_one_pb=False,
7  ztt_from_mc=args.ztt_from_mc,
8  weight="({0})".format(args.weight),
9  lumi = args.lumi * 1000,
10  exclude_cuts=args.exclude_cuts,
11  fakefactor_method=args.fakefactor_method,
12  scale_signal=args.scale_signal,
13  project_to_lumi=args.project_to_lumi,
14  cut_mc_only=args.cut_mc_only,
15  scale_mc_only=args.scale_mc_only,
16  mssm=args.mssm,
17  cut_type="mssm2016" if (args.era == "2016" and args.mssm) else "mssm" if args.mssm else "baseline2016" if args.era == "2016" else "baseline"
18  )
list cutOptimizer.current_cuts = []
int cutOptimizer.current_max = 0
string cutOptimizer.default = ["ztt", "zll", "zl", "zj", "ttj", "vv", "wj", "qcd", "data"]
string cutOptimizer.help = "Input directory."
list cutOptimizer.hist_list = [tfile.Get(name) for name in bkg_samples]
tuple cutOptimizer.htt = tfile.Get(sig_samples[0])
list cutOptimizer.list_of_samples = [getattr(samples.Samples, sample) for sample in args.samples]
tuple cutOptimizer.log = logging.getLogger(__name__)
tuple cutOptimizer.opt_test = CutOptimizer(variables, [htt,bkg_hist])
tuple cutOptimizer.parser
Initial value:
1 = argparse.ArgumentParser(description="Make Data-MC control plots.",
2  parents=[logger.loggingParser])
list cutOptimizer.real_values = []
tuple cutOptimizer.sample_settings = samples.Samples()
string cutOptimizer.scale_str = "_%i"
list cutOptimizer.sig_samples = []
list cutOptimizer.sig_samples_raw = [sample for sample in args.samples if sample in ["htt", "bbh"]]
tuple cutOptimizer.step = (b_max-b_min)
tuple cutOptimizer.tfile = ROOT.TFile(os.path.expandvars(os.path.join(args.output_dir, "CutOptimizerStorage.root")), "READ")
list cutOptimizer.variables = [args.x_quantity]
list cutOptimizer.x_bins = [x for x in range(int(float(args.x_range[0])*100),int(float(args.x_range[1])*100)+1, int((float(args.x_range[1])-float(args.x_range[0]))*4))]
list cutOptimizer.y_bins = []
list cutOptimizer.z_bins = []