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

Functions

def add_s_over_sqrtb_subplot
 
def add_s_over_sqrtb_integral_subplot
 
def blind_signal
 

Variables

tuple log = logging.getLogger(__name__)
 
tuple parser
 
string help = "Input directory."
 
list default = ["ztt", "zll", "ttj", "vv", "wj", "qcd", "data"]
 
list choices
 
tuple args = parser.parse_args()
 
list list_of_samples = [getattr(samples.Samples, sample) for sample in args.samples]
 
tuple sample_settings = samples.Samples(embedding=True,embedding_weight=args.embedded_weights)
 
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()
 
list plot_configs = []
 
string global_category_string = "catHtt13TeV"
 
string global_cut_type = "baseline"
 
tuple channels_background_methods = zip(args.channels, args.background_method)
 
dictionary channel_config = {}
 
tuple last_loop = (index == len(channels_background_methods) - 1)
 
tuple category_string = (global_category_string + "_{channel}_{category}")
 
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])
 
tuple config
 
tuple config_gen
 
 binning_string = None
 
 binnings_key = None
 
list bkg_samples_used = [nick for nick in bkg_samples if nick in config["nicks"]]
 
list scale_nicks_temp = []
 
list scale_nicks = []
 
list replaced_sig_nicks = []
 
list replaced_bkg_nicks = []
 
 nick = sample
 
list sig_samples_used = [nick if nick not in scale_nicks else "%s_Scaled"%nick for nick in replaced_sig_nicks]
 
string higgs_temp = "htt125"
 

Function Documentation

def makePlots_PolSelEfficiency.add_s_over_sqrtb_integral_subplot (   config,
  args,
  bkg_samples,
  show_subplot,
  signal_samples 
)
def makePlots_PolSelEfficiency.add_s_over_sqrtb_subplot (   config,
  args,
  bkg_samples,
  show_subplot,
  higgs_nick 
)
def makePlots_PolSelEfficiency.blind_signal (   config,
  blinding_threshold,
  ratio_true 
)

Variable Documentation

tuple makePlots_PolSelEfficiency.args = parser.parse_args()
string makePlots_PolSelEfficiency.binning_string = None
string makePlots_PolSelEfficiency.binnings_key = None
tuple makePlots_PolSelEfficiency.binnings_settings = binnings.BinningsDict()
list makePlots_PolSelEfficiency.bkg_samples = [sample for sample in args.samples if sample not in ["data", "htt", "ggh", "bbh"]]
list makePlots_PolSelEfficiency.bkg_samples_used = [nick for nick in bkg_samples if nick in config["nicks"]]
makePlots_PolSelEfficiency.category_string = (global_category_string + "_{channel}_{category}")
tuple makePlots_PolSelEfficiency.channel_config = {}
tuple makePlots_PolSelEfficiency.channels_background_methods = zip(args.channels, args.background_method)
list makePlots_PolSelEfficiency.choices
Initial value:
1 = ["ztt", "zttpospol", "zttnegpol", "zll", "zl", "zj", "ttj", "ttjt", "ttt", "ttjj", "ttjl", "vv", "vvt", "vvl", "wj", "wjt", "wjl", "qcd", "ewk", "ff",
2  "ggh", "gghsm", "gghmm", "gghps", "qqh", "bbh", "vh", "htt", "data"]
tuple makePlots_PolSelEfficiency.config
Initial value:
1 = sample_settings.get_config(
2  samples = list_of_samples,
3  channel = 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 = make_multiplication([clean_multiplication(json_config.pop("weights", ["1.0"])[0]), args.weight]),
9  lumi = args.lumi * 1000,
10  exclude_cuts = args.exclude_cuts + json_config.pop("exclude_cuts", []),
11  blind_expression = channel + "_" + quantity,
12  fakefactor_method = args.fakefactor_method,
13  stack_signal = args.stack_signal,
14  scale_signal = args.scale_signal,
15  project_to_lumi = args.project_to_lumi,
16  cut_mc_only = args.cut_mc_only,
17  scale_mc_only = args.scale_mc_only,
18  estimationMethod = background_method,
19  mssm = args.mssm,
20  controlregions = args.controlregions,
21  cut_type = global_cut_type,
22  no_ewk_samples = args.no_ewk_samples,
23  no_ewkz_as_dy = args.no_ewkz_as_dy,
24  nick_suffix = (channel if args.channel_comparison else "")
25  )
tuple makePlots_PolSelEfficiency.config_gen
Initial value:
1 = sample_settings.get_config(
2  samples = list_of_samples,
3  channel = "gen",
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 = make_multiplication([clean_multiplication(json_config.pop("weights", ["1.0"])[0]), args.weight]),
9  lumi = args.lumi * 1000,
10  exclude_cuts = args.exclude_cuts + json_config.pop("exclude_cuts", []),
11  blind_expression = channel + "_" + quantity,
12  fakefactor_method = args.fakefactor_method,
13  stack_signal = args.stack_signal,
14  scale_signal = args.scale_signal,
15  project_to_lumi = args.project_to_lumi,
16  cut_mc_only = args.cut_mc_only,
17  scale_mc_only = args.scale_mc_only,
18  estimationMethod = background_method,
19  mssm = args.mssm,
20  controlregions = args.controlregions,
21  cut_type = global_cut_type,
22  no_ewk_samples = args.no_ewk_samples,
23  no_ewkz_as_dy = args.no_ewkz_as_dy
24  )
string makePlots_PolSelEfficiency.default = ["ztt", "zll", "ttj", "vv", "wj", "qcd", "data"]
string makePlots_PolSelEfficiency.global_category_string = "catHtt13TeV"
string makePlots_PolSelEfficiency.global_cut_type = "baseline"
string makePlots_PolSelEfficiency.help = "Input directory."
string makePlots_PolSelEfficiency.higgs_temp = "htt125"
tuple makePlots_PolSelEfficiency.json_config = {}
tuple makePlots_PolSelEfficiency.json_filename = os.path.expandvars(json_filename)
list makePlots_PolSelEfficiency.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 makePlots_PolSelEfficiency.last_loop = (index == len(channels_background_methods) - 1)
list makePlots_PolSelEfficiency.list_of_samples = [getattr(samples.Samples, sample) for sample in args.samples]
tuple makePlots_PolSelEfficiency.log = logging.getLogger(__name__)
makePlots_PolSelEfficiency.nick = sample
tuple makePlots_PolSelEfficiency.parser
Initial value:
1 = argparse.ArgumentParser(description="Make Data-MC control plots.",
2  parents=[logger.loggingParser])
list makePlots_PolSelEfficiency.plot_configs = []
tuple makePlots_PolSelEfficiency.quantity = json_config.pop("x_expressions", [quantity])
list makePlots_PolSelEfficiency.replaced_bkg_nicks = []
list makePlots_PolSelEfficiency.replaced_sig_nicks = []
tuple makePlots_PolSelEfficiency.sample_settings = samples.Samples(embedding=True,embedding_weight=args.embedded_weights)
list makePlots_PolSelEfficiency.scale_nicks = []
list makePlots_PolSelEfficiency.scale_nicks_temp = []
string makePlots_PolSelEfficiency.scale_str = "_%i"
list makePlots_PolSelEfficiency.sig_samples = []
list makePlots_PolSelEfficiency.sig_samples_raw = [sample for sample in args.samples if sample in ["htt", "ggh", "bbh"]]
list makePlots_PolSelEfficiency.sig_samples_used = [nick if nick not in scale_nicks else "%s_Scaled"%nick for nick in replaced_sig_nicks]