def createVariables(mode): # Taken from Variables.py; can get subset with e.g. getVars(['mt', 'mvis']) # variables = taumu_vars # variables = getVars(['_norm_', 'mt', 'mvis', 'l1_pt', 'l2_pt', 'l1_eta', 'l2_eta', 'n_vertices', 'n_jets', 'n_bjets']) variables = [] if mode in ['sm', 'pog']: # MVA training variables, and others variables += getVars(['mt', 'l2_mt', 'n_jets', 'met_pt', 'pthiggs', 'l2_pt', 'l1_pt','mvis', 'l1_eta', 'l2_eta', 'pzeta_disc', 'jet1_pt', 'jet1_eta', 'n_vertices', 'rho', 'dil_pt', 'l2_byIsolationMVArun2v1DBoldDMwLTraw', 'l2_byCombinedIsolationDeltaBetaCorrRaw3Hits', 'l2_byIsolationMVArun2v1DBoldDMwLTraw_zoom', 'l2_nc_ratio', 'l2_pt_weighted_dr_iso', 'l2_pt_weighted_dr_signal', 'l2_pt_weighted_dphi_strip', 'l2_pt_weighted_deta_strip', 'l2_flightLength', 'l2_flightLengthSig', 'l2_dxy_Sig', 'l2_ip3d', 'l2_ip3d_Sig', 'l2_e_over_h', 'l2_n_photons', ])# 'svfit_transverse_mass', 'delta_phi_l1_l2', 'delta_eta_l1_l2', 'pt_l1l2', 'delta_phi_j1_met', # variables = taumu_vars if mode == 'cp': variables = getVars(['l2_nc_ratio']) if mode == 'mssm_signal': variables = [ VariableCfg(name='svfit_transverse_mass', binning=binning_mssm, unit='GeV', xtitle='m_{T,SVFit}'), VariableCfg(name='svfit_mass', binning=binning_mssm, unit='GeV', xtitle='m_{SVFit}'), VariableCfg(name='mvis', binning=binning_mssm, unit='GeV', xtitle='m_{vis}'), ] if mode == 'iso': variables = getVars(['mt', 'l1_pt', 'l2_pt', 'l1_eta', 'l2_eta']) return variables
def getVariables(mode): # Taken from Variables.py, can get subset with e.g. getVars(['mt', 'mvis']) # variables = tautau_vars if mode == 'control': variables = getVars([ '_norm_', 'mvis', 'mt2', 'l1_pt', 'l2_pt', 'delta_phi_l1_l2', 'delta_eta_l1_l2', 'met_pt', 'mt_total', 'mt_total_mssm', 'mt_sum', 'pzeta_met', 'l2_mt', 'mt', 'pzeta_vis', 'pzeta_disc', 'pthiggs', 'jet1_pt', 'n_jets', 'dil_pt', 'l1_byCombinedIsolationDeltaBetaCorrRaw3Hits', 'l1_byIsolationMVArun2v1DBoldDMwLTraw', 'l1_dz_sig', 'l1_log_dz', 'l1_dxy_sig', 'l1_log_dxy', 'l1_decayMode', 'l1_chargedIsoPtSum', 'l1_neutralIsoPtSum', 'l1_puCorrPtSum', 'l1_photonPtSumOutsideSignalCone', 'l1_zImpact', 'l1_jet_charge', 'l1_jet_pt_div_l1_pt' ], channel='tautau') if mode == 'mssm': variables = getVars([ 'mt_total', 'mt_total_mssm', 'mt_total_mssm_fine', 'mvis_extended', 'l1_pt', 'dil_pt' ], channel='tautau') # variables += [ # VariableCfg(name='mt2', binning={'nbinsx':15, 'xmin':0., 'xmax':150.}, unit='GeV', xtitle='m_{T2}') # ] if mode == 'mva': variables += getVars(['_norm_']) variables += [ VariableCfg(name='mva1', binning={ 'nbinsx': 10, 'xmin': 0., 'xmax': 1. }, unit='', xtitle='Stau MVA') ] if mode == 'susy': variables = getVars([ 'l1_pt', '_norm_', 'l2_pt', 'mt2', 'mt', 'mt_leg2', 'mt_total_mssm', 'min_delta_phi_tau1tau2_met' ], channel='tautau') return variables
cut=inc_cut, total_scale=r_qcd_os_ss, lumi=int_lumi, weight=total_weight) samples_mssm_method = samples_non_w + [wjets, qcd] # Taken from Variables.py, can get subset with e.g. getVars(['mt', 'mvis']) variables = all_vars # variables = getVars(['_norm_', 'mt', 'mvis', 'l1_pt', 'l2_pt', 'l1_eta', 'l2_eta', 'n_vertices', 'n_jets', 'n_bjets']) # variables = getVars(['_norm_', 'mt', 'mvis', 'n_vertices', 'met_pt', 'l1_pt', 'l2_pt']) # variables = getVars(['delta_phi_l2_met', 'met_pt', 'met_phi']) variables = getVars(['_norm_']) # variables = getVars(['mvis']) variables = [ VariableCfg(name='mvis', binning={ 'nbinsx': 35, 'xmin': 0., 'xmax': 350 }, unit='GeV', xtitle='m_{vis}') ] variables = [ VariableCfg(name='svfit_transverse_mass', binning=binning_mssm, unit='GeV',
from CMGTools.H2TauTau.proto.plotter.Samples import createSampleLists from CMGTools.H2TauTau.proto.plotter.Variables import getVars def ensure_dir(f): print 'ensure dir', f d = os.path.dirname(f) if not os.path.exists(d): ensure_dir(d) if not os.path.exists(f): os.mkdir(f) analysis_dir = '/data1/steggema/mt/051016/MuTauMC/' train_vars = getVars([ 'mt', 'l2_mt', 'n_jets', 'met_pt', 'pthiggs', 'vbf_mjj', 'vbf_deta', 'vbf_n_central', 'l2_pt', 'l1_pt','mvis', 'l1_eta', 'l2_eta', 'delta_phi_l1_l2', 'delta_eta_l1_l2', 'pt_l1l2', 'delta_phi_j1_met', 'pzeta_disc', 'jet1_pt', 'jet1_eta' ]) split_var = train_vars[10] # clf0 = joblib.load('/afs/cern.ch/work/s/steggema/GradientBoostingClassifier_clf_0.pkl') # clf1 = joblib.load('/afs/cern.ch/work/s/steggema/GradientBoostingClassifier_clf_1.pkl') clf0_0jet = joblib.load('GradientBoostingClassifier_clf_0_0jet.pkl') clf1_0jet = joblib.load('GradientBoostingClassifier_clf_1_0jet.pkl') clf0_1jet = joblib.load('GradientBoostingClassifier_clf_0_1jet.pkl') clf1_1jet = joblib.load('GradientBoostingClassifier_clf_1_1jet.pkl') clf0_vbf = joblib.load('GradientBoostingClassifier_clf_0_vbf.pkl') clf1_vbf = joblib.load('GradientBoostingClassifier_clf_1_vbf.pkl') out_dict = {}
# cut_names = [cut for cut in cuts] # for cut in cut_names: # # cuts[cut+'invmu'] = cuts[cut].replace('l1_reliso05<0.1', 'l1_reliso05>0.1') # cuts[cut+'invtau'] = cuts[cut].replace('l2_byCombinedIsolationDeltaBetaCorrRaw3Hits<1.5', 'l2_byCombinedIsolationDeltaBetaCorrRaw3Hits>1.5') qcd_from_same_sign = False # -> Command line analysis_dir = '/afs/cern.ch/user/s/steggema/work/public/mt/NewProd' tree_prod_name = 'H2TauTauTreeProducerTauMu' data_dir = analysis_dir # Taken from Variables.py, can get subset with e.g. getVars(['mt', 'mvis']) variables = getVars([ 'l1_pt', 'l2_pt', 'l1_gen_pdgId', 'l2_gen_pdgId', 'l1_reliso05_04', 'l1_reliso05', 'l2_byCombinedIsolationDeltaBetaCorrRaw3Hits' ]) variables += [v for v in all_vars if 'dxy' in v.name or 'dz' in v.name] variables = getVars([ '_norm_', 'l2_pt', 'l2_eta', 'l2_mass', 'l2_decayMode', 'mvis', 'mt', 'delta_r_l1_l2', 'l2_gen_pdgId', 'l2_mt' ]) # variables = all_vars for cut_name in cuts: cfg_tight = HistogramCfg(name='tight', var=None, cfgs=samples, cut=inc_cut, lumi=int_lumi,
def ensure_dir(f): print 'ensure dir', f d = os.path.dirname(f) if not os.path.exists(d): ensure_dir(d) if not os.path.exists(f): os.mkdir(f) analysis_dir = '/data1/steggema/tt/230816/DiTauNewMC' train_vars = getVars([ # 'mvis', 'mt2', 'l1_pt', 'l2_pt', 'delta_phi_l1_l2', 'delta_eta_l1_l2', 'met_pt', 'mt_total', 'mt_sum', 'pzeta_vis', 'pzeta_met', 'l2_mt', 'mt', 'pzeta_disc', 'pthiggs', 'jet1_pt', 'n_jets', 'pt_l1l2' 'mt2', 'delta_phi_l1_l2', 'delta_eta_l1_l2', 'mt', 'l2_mt', 'pzeta_disc', 'pt_l1l2' ]) split_var = train_vars[0] clf0 = joblib.load('GradientBoostingClassifier_clf_stau_mtsum200_0.pkl') clf1 = joblib.load('GradientBoostingClassifier_clf_stau_mtsum200_1.pkl') out_dict = {} samples_mc, samples_data, samples, all_samples, sampleDict = createSampleLists( analysis_dir=analysis_dir, channel='tt', mode='susy',
# -> Command line analysis_dir = '/data1/steggema/mt/051016/MuTauMC/' tree_prod_name = 'H2TauTauTreeProducerTauMu' data_dir = analysis_dir samples_mc, samples_data, samples, all_samples, sampleDict = createSampleLists( analysis_dir=analysis_dir) samples_mc_w = [s for s in samples_mc if fnmatch.fnmatch(s.name, 'W*Jet*')] samples_mc_tt = [s for s in samples_mc if fnmatch.fnmatch(s.name, 'TT*')] samples = samples_mc_w + samples_mc_tt # Taken from Variables.py, can get subset with e.g. getVars(['mt', 'mvis']) variables = getVars(['l1_pt', 'l2_eta']) variables += [ VariableCfg(name='l2_jet_pt', binning=array( [20., 30., 40., 50., 60., 70., 80., 90., 100., 150., 200.]), unit='GeV', xtitle='tau jet p_{T}'), VariableCfg(name='l2_pt', binning=array( [20., 25., 30., 35., 40., 50., 60., 80., 120., 200.]), unit='GeV', xtitle='tau p_{T}'), VariableCfg(name='l2_jet_pt_div_l2_pt', drawname='l2_jet_pt/l2_pt',
def createVariables(mode): # Taken from Variables.py; can get subset with e.g. getVars(['mt', 'mvis']) # variables = taumu_vars # variables = getVars(['_norm_', 'mt', 'mvis', 'l1_pt', 'l2_pt', 'l1_eta', 'l2_eta', 'n_vertices', 'n_jets', 'n_bjets']) variables = [] if mode == 'sm': variables = [ # VariableCfg(name='mva', binning={'nbinsx':20, 'xmin':0., 'xmax':1.}, unit='', xtitle='s_{BDT}'), VariableCfg(name='svfit_mass', binning={ 'nbinsx': 20, 'xmin': 50., 'xmax': 250 }, unit='GeV', xtitle='m_{SVFit}'), VariableCfg(name='mva0', binning={ 'nbinsx': 20, 'xmin': 0., 'xmax': 1.0001 }, unit='', xtitle='s_{BDT} (BG)'), VariableCfg(name='mva1', binning={ 'nbinsx': 20, 'xmin': 0., 'xmax': 1.0001 }, unit='', xtitle='s_{BDT} (ZTT)'), VariableCfg(name='mva2', binning=binning_mva2, unit='', xtitle='s_{BDT} (Higgs)'), # VariableCfg(name='mva2div1', drawname='mva2/(mva1+mva2)', binning={'nbinsx':20, 'xmin':0., 'xmax':1.0001}, unit='', xtitle='s_{BDT}^{Higgs}/s_{BDT}^{ZTT}'), VariableCfg(name='mva2div1', drawname='mva2/(mva1+mva2)', binning=binning_mva, unit='', xtitle='s_{BDT}^{Higgs}/s_{BDT}^{ZTT}'), ] # MVA training variables variables += getVars([ 'mt', 'n_jets', 'met_pt', 'pthiggs', 'vbf_mjj', 'vbf_deta', 'vbf_n_central', 'l2_pt', 'l1_pt', 'svfit_transverse_mass', 'delta_phi_l1_l2', 'delta_eta_l1_l2', 'mvis' ]) if mode == 'cp': variables = getVars(['l2_nc_ratio']) if mode == 'mssm_signal': variables = [ VariableCfg(name='svfit_transverse_mass', binning=binning_mssm, unit='GeV', xtitle='m_{T,SVFit}'), VariableCfg(name='svfit_mass', binning=binning_mssm, unit='GeV', xtitle='m_{SVFit}'), VariableCfg(name='mvis', binning=binning_mssm, unit='GeV', xtitle='m_{vis}'), ] if mode == 'iso': variables = getVars(['mt', 'l1_pt', 'l2_pt', 'l1_eta', 'l2_eta']) return variables
# cuts['OS_PU_mZ_eq1jet_tau1_noptouter'] = ( # inc_cut + '&& l1_charge != l2_charge && abs(l1_eta) < 2.1 && abs(l2_eta) < 2.1 && mvis>70 && mvis<100 && n_jets==1 && tau1_decayModeFinding>0. && tau1_byCombinedIsolationDeltaBetaCorrRaw3Hits<1.5', # inc_cut + '&& l1_charge != l2_charge && abs(l1_eta) < 2.1 && abs(l2_eta) < 2.1 && mvis>70 && mvis<100 && n_jets==1 && tau1_decayModeFinding>0.') samples_mc, samples_data, samples, all_samples, sampleDict = createSampleLists( analysis_dir, channel='mm', ztt_cut='(l1_gen_match == 4 && l2_gen_match == 4)', zl_cut='(l1_gen_match == 2 && l2_gen_match == 2)', zj_cut= '(l1_gen_match != l2_gen_match || (l1_gen_match != 4 && l1_gen_match != 2))', data2016G=data2016G) # Taken from Variables.py, can get subset with e.g. getVars(['mt', 'mvis']) # variables = mumu_vars variables = getVars(['tau1_eta']) #'tau1_pt', variables += [ VariableCfg(name='jet1_pt', binning=array( [30., 40., 50., 60., 80., 100., 120., 160., 200., 350.]), unit='GeV', xtitle='jet p_{T}'), VariableCfg(name='tau1_pt', binning=array( [30., 35., 40., 45., 50., 60., 80., 100., 140., 200.]), unit='GeV', xtitle='tau p_{T}'), VariableCfg(name='jet1_eta', binning={ 'nbinsx': 25, 'xmin': -2.5,
# Subtract background from data sample.scale = -scale qcd = HistogramCfg(name='QCD', var=None, cfgs=samples_ss, cut=inc_cut, lumi=int_lumi) samples_qcdfromss.append(qcd) # Taken from Variables.py, can get subset with e.g. getVars(['mt', 'mvis']) variables = all_vars # variables = getVars(['_norm_', 'mt', 'mvis', 'l1_pt', 'l2_pt', 'l1_eta', 'l2_eta', 'n_vertices', 'n_jets', 'n_bjets']) variables = getVars(['_norm_', 'mt', 'mvis', 'n_vertices']) # variables = getVars(['_norm_', 'met_pt', 'met_phi']) # variables = getVars(['_norm_']) # variables = [ # VariableCfg(name='mvis', binning={'nbinsx':35, 'xmin':0, 'xmax':350}, unit='GeV', xtitle='m_{vis}') # ] for cut_name in cuts: if qcd_from_same_sign and not 'SS' in cut_name: cfg_example = HistogramCfg(name='example', var=None, cfgs=samples_qcdfromss, cut=inc_cut, lumi=int_lumi,
# iso and charge cuts, need to have them explicitly for the QCD estimation iso_cut = inc_sig_tau1_iso & inc_sig_tau2_iso max_iso_cut = Cut( 'l1_byIsolationMVArun2v1DBoldDMwLT > 3.5 && l2_byIsolationMVArun2v1DBoldDMwLT > 3.5' ) iso_sideband_cut = (~iso_cut) & max_iso_cut charge_cut = Cut('l1_charge != l2_charge') # append categories to plot cuts.append(myCut('inclusive', inc_cut)) # cuts.append(myCut('1jet' , jet1_cut)) # cuts.append(myCut('vbf' , vbf_cut )) # Taken from Variables.py, can get subset with e.g. getVars(['mt', 'mvis']) variables = all_vars variables = getVars(['mvis', 'svfit_mass']) #, 'l1_pt', 'l2_pt']) for cut in cuts: all_samples_qcd = qcd_estimation( cut.cut & iso_sideband_cut & charge_cut, cut.cut & iso_cut & (~charge_cut), cut.cut & iso_sideband_cut & (~charge_cut), all_samples, int_lumi, total_weight) # now include charge and isolation too cut = myCut(cut.name, cut.cut & iso_cut & charge_cut) for variable in variables: cfg_total = HistogramCfg(name=cut.name, var=variable,
scale = 1.06 for sample in samples_ss: sample.scale = scale if sample.name != 'data_obs': # Subtract background from data sample.scale = -scale qcd = HistogramCfg(name='QCD', var=None, cfgs=samples_ss, cut=inc_cut, lumi=int_lumi) samples_qcdfromss.append(qcd) # Taken from Variables.py, can get subset with e.g. getVars(['mt', 'mvis']) variables = all_vars variables = getVars(['_norm_', 'mt', 'met_pt', 'mvis', 'l1_pt', 'l2_pt', 'l1_eta', 'l2_eta', 'n_vertices', 'n_jets', 'n_bjets']) # variables = getVars(['_norm_', 'mt', 'mvis', 'n_vertices']) # variables = getVars(['_norm_', 'met_pt', 'met_phi']) # variables = getVars(['_norm_']) variables = [ VariableCfg(name='mvis', binning={'nbinsx':35, 'xmin':0, 'xmax':350}, unit='GeV', xtitle='m_{vis}') ] # variables += getVars(['_norm_']) for cut_name in cuts: if qcd_from_same_sign and not 'SS' in cut_name : cfg_example = HistogramCfg(name=cut_name, var=None, cfgs=samples_qcdfromss, cut=inc_cut, lumi=int_lumi, weight=total_weight)
# # cuts[cut+'invmu'] = cuts[cut].replace('l1_reliso05<0.1', 'l1_reliso05>0.1') # cuts[cut+'invtau'] = cuts[cut].replace('tau_byCombinedIsolationDeltaBetaCorrRaw3Hits<1.5', 'tau_byCombinedIsolationDeltaBetaCorrRaw3Hits>1.5') qcd_from_same_sign = False # -> Command line analysis_dir = '/data1/steggema/TauFRPU' data_dir = analysis_dir samples_mc, samples_data, samples, all_samples, sampleDict = createSampleLists(analysis_dir=analysis_dir, channel='tau_fr') samples_mc_w = [s for s in samples_mc if fnmatch.fnmatch(s.name, 'W*Jet*')] samples_mc_tt = [s for s in samples_mc if fnmatch.fnmatch(s.name, 'TT*')] # Taken from Variables.py, can get subset with e.g. getVars(['mt', 'mvis']) variables = getVars(['n_jets']) variables += [ VariableCfg(name='muon_pt', binning={'nbinsx':40, 'xmin':0., 'xmax':100.}, unit='GeV', xtitle='muon p_{T}'), VariableCfg(name='tau_pt', binning={'nbinsx':40, 'xmin':0., 'xmax':100.}, unit='GeV', xtitle='tau p_{T}'), VariableCfg(name='jet_pt', binning=array([20., 30., 40., 50., 60., 70., 80., 90., 100., 150., 200.]), unit='GeV', xtitle='tau jet p_{T}'), VariableCfg(name='tau_pt', binning=array([20., 25., 30., 35., 40., 50., 60., 80., 120., 200.]), unit='GeV', xtitle='tau p_{T}'), ] # variables += [v for v in all_vars if 'dxy' in v.name or 'dz' in v.name] # variables = getVars(['_norm_', 'tau_pt', 'tau_eta', 'tau_mass', 'tau_decayMode', 'mvis', 'mt', 'delta_r_l1_l2', 'tau_gen_pdgId', 'tau_mt']) # variables = all_vars for cut_name in cuts: cfg_tight = HistogramCfg(name='tight', var=None, cfgs=samples_mc_w, cut=inc_cut, lumi=int_lumi, weight=total_weight + ' * ((tau_gen_match == 6))')
# ) cuts = cuts.copy() for cut in cuts: print cut print cuts[cut] analysis_dir = '/data1/steggema/em/06092016/MuEleRealMCPlusTau' samples_mc, samples_data, samples, all_samples, sampleDict = createSampleLists(analysis_dir, channel='em', ztt_cut='(l1_gen_match>2 && l2_gen_match>3)', zl_cut='l2_gen_match==99',zj_cut='l2_gen_match==99', data2016G=data2016G) # Taken from Variables.py, can get subset with e.g. getVars(['mt', 'mvis']) variables = emu_vars variables = getVars(['tau1_eta', 'n_jets']) #'tau1_pt', variables += [ VariableCfg(name='jet1_pt', binning=array([30., 40., 50., 60., 80., 100., 120., 160., 200., 350.]), unit='GeV', xtitle='jet p_{T}'), VariableCfg(name='tau1_pt', binning=array([30., 35., 40., 45., 50., 60., 80., 100., 140., 200.]), unit='GeV', xtitle='tau p_{T}'), VariableCfg(name='jet1_eta', binning={'nbinsx':10, 'xmin':-2.5, 'xmax':2.5}, unit='', xtitle='jet #eta'), VariableCfg(name='HT_jets', binning=array([0., 100., 200., 300., 500., 1000.]), unit='GeV', xtitle='#Sigma jet p_{T}') ] for cut_name in cuts: cfg_tight = HistogramCfg(name='tight', var=None, cfgs=samples, cut=inc_cut, lumi=lumi, weight=total_weight+'*( (abs(tau1_gen_pdgId)!=15) - (abs(tau1_gen_pdgId)==15))') cfg_loose = HistogramCfg(name='loose', var=None, cfgs=samples, cut=inc_cut, lumi=lumi, weight=total_weight+'*( (abs(tau1_gen_pdgId)!=15) - (abs(tau1_gen_pdgId)==15))') cfg_tight_data = HistogramCfg(name='tight_data', var=None, cfgs=samples, cut=inc_cut, lumi=lumi, weight=total_weight+'*( (is_data>0.5) - (abs(tau1_gen_pdgId)==15))') cfg_loose_data = HistogramCfg(name='loose_data', var=None, cfgs=samples, cut=inc_cut, lumi=lumi, weight=total_weight+'*( (is_data>0.5) - (abs(tau1_gen_pdgId)==15))') cfg_tight.cut = cuts[cut_name][1]
# for pzeta_cut in pzeta_disc_cuts: # cut_name = 'susy_jan_{c1}_{c2}_{c3}'.format(c1=met_sig_cut, c2=sum_mt_cut, c3=pzeta_cut) # cut = 'met_pt/sqrt(met_cov00 + met_cov11) > {met_sig_cut} && mvis>100 && mt + mt_leg2 > {sum_mt_cut} && n_bjets==0 && pzeta_disc < {pzeta_disc_cut}'.format(met_sig_cut=met_sig_cut, sum_mt_cut=sum_mt_cut, pzeta_disc_cut=pzeta_cut) # cuts.append(myCut(cut_name, inc_cut & cut)) # cuts.append(myCut('susy_jan_SS', inc_cut & Cut('met_pt/sqrt(met_cov00 + met_cov11) > 1. && mvis>100 && mt + mt_leg2 > 150. && n_bjets==0 && pzeta_disc < -40.'))) # cuts.append(myCut('1jet' , jet1_cut)) # cuts.append(myCut('vbf' , vbf_cut )) # Taken from Variables.py, can get subset with e.g. getVars(['mt', 'mvis']) variables = tautau_vars variables = getVars([ 'mvis', 'mt2', 'l1_pt', 'l2_pt', 'delta_phi_l1_l2', 'delta_eta_l1_l2', 'met_pt', 'mt_total', 'mt_sum', 'pzeta_met', 'l2_mt', 'mt', 'pzeta_vis', 'pzeta_disc', 'pthiggs', 'jet1_pt', 'n_jets', 'pt_l1l2' ]) #, 'l1_pt', '_norm_', ]) # variables += [ # VariableCfg(name='mt2', binning={'nbinsx':15, 'xmin':0., 'xmax':150.}, unit='GeV', xtitle='m_{T2}') # ] if mode == 'mva': variables += getVars(['_norm_']) variables += [ VariableCfg(name='mva1', binning={ 'nbinsx': 10, 'xmin': 0., 'xmax': 1. }, unit='',
qcd_from_same_sign = False # -> Command line analysis_dir = '/data1/steggema/mt/051016/MuTauMC/' tree_prod_name = 'H2TauTauTreeProducerTauMu' data_dir = analysis_dir samples_mc, samples_data, samples, all_samples, sampleDict = createSampleLists( analysis_dir=analysis_dir) samples_mc_w = [s for s in samples_mc if fnmatch.fnmatch(s.name, 'W*Jet*')] samples_mc_tt = [s for s in samples_mc if fnmatch.fnmatch(s.name, 'TT*')] # Taken from Variables.py, can get subset with e.g. getVars(['mt', 'mvis']) variables = getVars(['l1_pt', 'l2_pt', 'l2_eta', 'l2_jet_pt']) variables += [ VariableCfg(name='l2_jet_pt', binning=array( [20., 30., 40., 50., 60., 70., 80., 90., 100., 150., 200.]), unit='GeV', xtitle='tau jet p_{T}'), VariableCfg(name='l2_pt', binning=array( [20., 25., 30., 35., 40., 50., 60., 80., 120., 200.]), unit='GeV', xtitle='tau p_{T}'), ]