def __init__( self , channel , nn_dir , year , features , composed_features , base_dir , post_fix , dir_suffix , selection_data_mmm , selection_mc_mmm , selection_data_mem , selection_mc_mem , selection_data_eee , selection_mc_eee , selection_data_eem , selection_mc_eem , selection_tight , lumi , epochs=1000 , early_stopping=True, skip_mc=False, val_fraction=0.3, scale_mc=1.): self.channel = channel.split('_')[0] self.channel_extra = channel.split('_')[1] if len(channel.split('_'))>1 else '' self.year = year self.features = features self.composed_features = composed_features self.base_dir = base_dir self.post_fix = post_fix self.selection_data_mmm = ' & '.join(selection_data_mmm) self.selection_mc_mmm = ' & '.join(selection_mc_mmm) self.selection_data_mem = ' & '.join(selection_data_mem) self.selection_mc_mem = ' & '.join(selection_mc_mem) self.selection_data_eee = ' & '.join(selection_data_eee) self.selection_mc_eee = ' & '.join(selection_mc_eee) self.selection_data_eem = ' & '.join(selection_data_eem) self.selection_mc_eem = ' & '.join(selection_mc_eem) self.selection_tight = selection_tight self.selection_lnt = 'not (%s)' %self.selection_tight self.lumi = lumi self.epochs = epochs self.early_stopping = early_stopping self.skip_mc = skip_mc self.val_fraction = val_fraction self.scale_mc = scale_mc self.nn_dir = '/'.join([nn_dir, '_'.join([channel, dir_suffix, get_time_str()]) ]) if self.year==2018: from plotter.samples.samples_2018 import get_data_samples, get_mc_samples, get_signal_samples if self.year==2017: from plotter.samples.samples_2017 import get_data_samples, get_mc_samples, get_signal_samples if self.year==2016: from plotter.samples.samples_2016 import get_data_samples, get_mc_samples, get_signal_samples self.get_data_samples = get_data_samples self.get_mc_samples = get_mc_samples self.get_signal_samples = get_signal_samples
def __init__(self, channel, year, plot_dir, base_dir, post_fix, selection_data, selection_mc, selection_tight, pandas_selection, lumi, model, transformation, features, process_signals, plot_signals, blinded, datacards=[], mini_signals=False, do_ratio=True, mc_subtraction=True, dir_suffix='', relaxed_mc_scaling=1., data_driven=True): self.channel = channel.split('_')[0] self.year = year self.full_channel = channel self.plt_dir = '/'.join( [plot_dir, channel, '_'.join([dir_suffix, get_time_str()])]) self.base_dir = base_dir self.post_fix = post_fix self.selection_data = ' & '.join(selection_data) self.selection_mc = ' & '.join(selection_mc) self.selection_tight = selection_tight self.pandas_selection = pandas_selection self.lumi = lumi self.model = model self.transformation = transformation self.features = features self.process_signals = process_signals self.plot_signals = plot_signals if self.process_signals else [] self.blinded = blinded self.selection_lnt = 'not (%s)' % self.selection_tight self.do_ratio = do_ratio self.mini_signals = mini_signals self.datacards = datacards self.mc_subtraction = mc_subtraction self.relaxed_mc_scaling = relaxed_mc_scaling self.data_driven = data_driven if self.year == 2018: from plotter.samples.samples_2018 import get_data_samples, get_mc_samples, get_signal_samples if self.year == 2017: from plotter.samples.samples_2017 import get_data_samples, get_mc_samples, get_signal_samples if self.year == 2016: from plotter.samples.samples_2016 import get_data_samples, get_mc_samples, get_signal_samples self.get_data_samples = get_data_samples self.get_mc_samples = get_mc_samples self.get_signal_samples = get_signal_samples