From 3a68743d74f1599d078f645d59ad6480e2c5f566 Mon Sep 17 00:00:00 2001 From: Elena Vernazza Date: Fri, 6 Aug 2021 10:54:28 +0200 Subject: [PATCH] remove old config WZin --- .../VBSlllnu/WZin/conf_WZin_BSM/aliases.py | 279 ------- .../WZin/conf_WZin_BSM/configuration.py | 45 -- .../VBSlllnu/WZin/conf_WZin_BSM/cuts.py | 13 - .../VBSlllnu/WZin/conf_WZin_BSM/nuisances.py | 47 -- .../VBSlllnu/WZin/conf_WZin_BSM/plot.py | 48 -- .../VBSlllnu/WZin/conf_WZin_BSM/samples.py | 697 ------------------ .../VBSlllnu/WZin/conf_WZin_BSM/structure.py | 79 -- .../WZin/conf_WZin_BSM/total_nuisances.py | 341 --------- .../VBSlllnu/WZin/conf_WZin_BSM/variables.py | 181 ----- .../VBSlllnu/WZin/conf_WZin_QCD/aliases.py | 279 ------- .../WZin/conf_WZin_QCD/configuration.py | 46 -- .../VBSlllnu/WZin/conf_WZin_QCD/cuts.py | 15 - .../VBSlllnu/WZin/conf_WZin_QCD/nuisances.py | 42 -- .../VBSlllnu/WZin/conf_WZin_QCD/plot.py | 15 - .../VBSlllnu/WZin/conf_WZin_QCD/samples.py | 66 -- .../VBSlllnu/WZin/conf_WZin_QCD/structure.py | 9 - .../VBSlllnu/WZin/conf_WZin_QCD/variables.py | 188 ----- .../VBSlllnu/WZin/conf_WZin_SM/aliases.py | 279 ------- .../WZin/conf_WZin_SM/configuration.py | 46 -- .../VBSlllnu/WZin/conf_WZin_SM/cuts.py | 15 - .../VBSlllnu/WZin/conf_WZin_SM/nuisances.py | 42 -- .../VBSlllnu/WZin/conf_WZin_SM/plot.py | 15 - .../VBSlllnu/WZin/conf_WZin_SM/samples.py | 61 -- .../VBSlllnu/WZin/conf_WZin_SM/structure.py | 9 - .../VBSlllnu/WZin/conf_WZin_SM/variables.py | 188 ----- 25 files changed, 3045 deletions(-) delete mode 100755 Configurations/VBSlllnu/WZin/conf_WZin_BSM/aliases.py delete mode 100755 Configurations/VBSlllnu/WZin/conf_WZin_BSM/configuration.py delete mode 100755 Configurations/VBSlllnu/WZin/conf_WZin_BSM/cuts.py delete mode 100755 Configurations/VBSlllnu/WZin/conf_WZin_BSM/nuisances.py delete mode 100755 Configurations/VBSlllnu/WZin/conf_WZin_BSM/plot.py delete mode 100755 Configurations/VBSlllnu/WZin/conf_WZin_BSM/samples.py delete mode 100755 Configurations/VBSlllnu/WZin/conf_WZin_BSM/structure.py delete mode 100755 Configurations/VBSlllnu/WZin/conf_WZin_BSM/total_nuisances.py delete mode 100755 Configurations/VBSlllnu/WZin/conf_WZin_BSM/variables.py delete mode 100755 Configurations/VBSlllnu/WZin/conf_WZin_QCD/aliases.py delete mode 100755 Configurations/VBSlllnu/WZin/conf_WZin_QCD/configuration.py delete mode 100755 Configurations/VBSlllnu/WZin/conf_WZin_QCD/cuts.py delete mode 100755 Configurations/VBSlllnu/WZin/conf_WZin_QCD/nuisances.py delete mode 100755 Configurations/VBSlllnu/WZin/conf_WZin_QCD/plot.py delete mode 100755 Configurations/VBSlllnu/WZin/conf_WZin_QCD/samples.py delete mode 100755 Configurations/VBSlllnu/WZin/conf_WZin_QCD/structure.py delete mode 100755 Configurations/VBSlllnu/WZin/conf_WZin_QCD/variables.py delete mode 100755 Configurations/VBSlllnu/WZin/conf_WZin_SM/aliases.py delete mode 100755 Configurations/VBSlllnu/WZin/conf_WZin_SM/configuration.py delete mode 100755 Configurations/VBSlllnu/WZin/conf_WZin_SM/cuts.py delete mode 100755 Configurations/VBSlllnu/WZin/conf_WZin_SM/nuisances.py delete mode 100755 Configurations/VBSlllnu/WZin/conf_WZin_SM/plot.py delete mode 100755 Configurations/VBSlllnu/WZin/conf_WZin_SM/samples.py delete mode 100755 Configurations/VBSlllnu/WZin/conf_WZin_SM/structure.py delete mode 100755 Configurations/VBSlllnu/WZin/conf_WZin_SM/variables.py diff --git a/Configurations/VBSlllnu/WZin/conf_WZin_BSM/aliases.py b/Configurations/VBSlllnu/WZin/conf_WZin_BSM/aliases.py deleted file mode 100755 index c993313953..0000000000 --- a/Configurations/VBSlllnu/WZin/conf_WZin_BSM/aliases.py +++ /dev/null @@ -1,279 +0,0 @@ -import inspect -import os - -configurations = os.path.realpath(inspect.getfile(inspect.currentframe())) # this file -configurations = os.path.dirname(configurations) # Full2017 -configurations = os.path.dirname(configurations) # ggH -configurations = os.path.dirname(configurations) # Configurations - -#aliases = {} -bAlgo = 'DeepB' -bWP = '0.4184' - -mc = [skey for skey in samples if skey not in ('Fake','DATA')] - -aliases['wzinc'] = { - 'linesToAdd': ['.L %s/macros/wzinc.cc+' % configurations], - 'class': 'Wzinc', -} - -aliases['wzinc1'] = { - 'linesToAdd': ['.L %s/macros/wzinc1.cc+' % configurations], - 'class': 'Wzinc1', -} - -aliases['wzeu_var'] = { - 'linesToAdd': [ - 'gSystem->Load("libLatinoAnalysisMultiDraw.so")', - '.L {}/macros/wzeu.cc+'.format(configurations) - ], - 'class': 'WZeu', - 'args': (), -} - -# tau veto -aliases['tauVeto_wz'] = { - 'expr': '(Sum$(Tau_pt > 18 && abs(Tau_eta)<2.3 && (Tau_idMVAoldDM2017v2>> 1 & 1) && Tau_idDecayMode &&sqrt( pow(Tau_eta - Lepton_eta[0], 2) + pow(abs(abs(Tau_phi - Lepton_phi[0])-pi)-pi, 2) ) >= 0.4 && sqrt( pow(Tau_eta - Lepton_eta[1], 2) + pow(abs(abs(Tau_phi - Lepton_phi[1])-pi)-pi, 2) ) >= 0.4 && sqrt( pow(Tau_eta - Lepton_eta[2], 2) + pow(abs(abs(Tau_phi - Lepton_phi[2])-pi)-pi, 2) ) >= 0.4) == 0)' -} -aliases['softmuon_veto']={ - 'expr':'(Sum$(abs(Muon_dxy)<0.02 && abs(Muon_dz)<0.1 && Muon_softId && Muon_pt>5 && abs(Muon_eta)<2.4 && sqrt( pow(Muon_eta - Lepton_eta[0], 2) + pow(abs(abs(Muon_phi - Lepton_phi[0])-pi)-pi, 2) ) >= 0.4 && sqrt( pow(Muon_eta - Lepton_eta[1], 2) + pow(abs(abs(Muon_phi - Lepton_phi[1])-pi)-pi, 2) ) >= 0.4)==0)' -} - -eleWP = 'mvaFall17V1Iso_WP90_SS' - -muWP = 'cut_Tight_HWWW' - -aliases['LepWPCut'] = { - 'expr': 'LepCut3l__ele_'+eleWP+'__mu_'+muWP, - 'samples': mc + ['DATA'] -} -aliases['gstarLow'] = { - 'expr': 'Gen_ZGstar_mass >0 && Gen_ZGstar_mass < 4', - 'samples': ['VgS','VgS1','VgS2'] -} - -aliases['gstarHigh'] = { - 'expr': 'Gen_ZGstar_mass <0 || Gen_ZGstar_mass > 4', - 'samples': ['VgS','VgS1','VgS2'] -} -# Fake leptons transfer factor -aliases['fakeW'] = { - #'expr': 'fakeW2l_ele_'+eleWP+'_mu_'+muWP, - 'expr': 'fakeW_ele_'+eleWP+'_mu_'+muWP+'_3l', - 'samples': ['Fake'] -} -# And variations - already divided by central values in formulas ! -aliases['fakeW'] = { - #'expr': 'fakeW2l_ele_'+eleWP+'_mu_'+muWP, - 'expr': 'fakeW_ele_'+eleWP+'_mu_'+muWP+'_3l', - 'samples': ['Fake'] -} -# And variations - already divided by central values in formulas ! -aliases['fakeWEleUp'] = { - #'expr': 'fakeW2l_ele_'+eleWP+'_mu_'+muWP+'_EleUp', - 'expr': 'fakeW_ele_'+eleWP+'_mu_'+muWP+'_3lElUp', - 'samples': ['Fake'] -} -aliases['fakeWEleDown'] = { - #'expr': 'fakeW2l_ele_'+eleWP+'_mu_'+muWP+'_EleDown', - 'expr': 'fakeW_ele_'+eleWP+'_mu_'+muWP+'_3lElDown', - 'samples': ['Fake'] -} -aliases['fakeWMuUp'] = { - #'expr': 'fakeW2l_ele_'+eleWP+'_mu_'+muWP+'_MuUp', - 'expr': 'fakeW_ele_'+eleWP+'_mu_'+muWP+'_3lMuUp', - 'samples': ['Fake'] -} -aliases['fakeWMuDown'] = { - #'expr': 'fakeW2l_ele_'+eleWP+'_mu_'+muWP+'_MuDown', - 'expr': 'fakeW_ele_'+eleWP+'_mu_'+muWP+'_3lMuDown', - 'samples': ['Fake'] -} -aliases['fakeWStatEleUp'] = { - #'expr': 'fakeW2l_ele_'+eleWP+'_mu_'+muWP+'_statEleUp', - 'expr': 'fakeW_ele_'+eleWP+'_mu_'+muWP+'_3lstatElUp', - 'samples': ['Fake'] -} -aliases['fakeWStatEleDown'] = { - #'expr': 'fakeW2l_ele_'+eleWP+'_mu_'+muWP+'_statEleDown', - 'expr': 'fakeW_ele_'+eleWP+'_mu_'+muWP+'_3lstatElDown', - 'samples': ['Fake'] -} -aliases['fakeWStatMuUp'] = { - #'expr': 'fakeW2l_ele_'+eleWP+'_mu_'+muWP+'_statMuUp', - 'expr': 'fakeW_ele_'+eleWP+'_mu_'+muWP+'_3lstatMuUp', - 'samples': ['Fake'] -} -aliases['fakeWStatMuDown'] = { - #'expr': 'fakeW2l_ele_'+eleWP+'_mu_'+muWP+'_statMuDown', - 'expr': 'fakeW_ele_'+eleWP+'_mu_'+muWP+'_3lstatMuDown', - 'samples': ['Fake'] -} -# gen-matching to prompt only (GenLepMatch2l matches to *any* gen lepton) -aliases['PromptGenLepMatch2l'] = { - 'expr': 'Alt$(Lepton_promptgenmatched[0]*Lepton_promptgenmatched[1], 0)', - 'samples': mc -} -aliases['PromptGenLepMatch3l'] = { - 'expr': 'Alt$(Lepton_promptgenmatched[0]*Lepton_promptgenmatched[1]*Lepton_promptgenmatched[2], 0)', - 'samples': mc -} -# PostProcessing did not create (anti)topGenPt for ST samples with _ext1 -lastcopy = (1 << 13) - -aliases['isTTbar'] = { - 'expr': 'Sum$(TMath::Abs(GenPart_pdgId) == 6 && TMath::Odd(GenPart_statusFlags / %d)) == 2' % lastcopy, - 'samples': ['top'] -} - -aliases['isSingleTop'] = { - 'expr': 'Sum$(TMath::Abs(GenPart_pdgId) == 6 && TMath::Odd(GenPart_statusFlags / %d)) == 1' % lastcopy, - 'samples': ['top'] -} - -aliases['Top_pTrw'] = { - 'expr': 'isTTbar * (TMath::Sqrt(TMath::Exp(0.0615 - 0.0005 * topGenPtOTF) * TMath::Exp(0.0615 - 0.0005 * antitopGenPtOTF))) + isSingleTop', - 'samples': ['top'] -} - -#bjet -# No jet with pt > 30 GeV -aliases['zeroJet'] = { - 'expr': 'Alt$(CleanJet_pt[0], 0) < 30.' -} - -# ==1 jet with pt > 30 GeV -aliases['oneJet'] = { - 'expr': 'Alt$(CleanJet_pt[0], 0) >= 30. && Alt$(CleanJet_pt[1], 0) < 30.' -} - -# ==2 jets with pt > 30 GeV -aliases['twoJet'] = { - 'expr': 'Alt$(CleanJet_pt[0], 0) >= 30. && Alt$(CleanJet_pt[1], 0) >= 30. && Alt$(CleanJet_pt[2], 0) < 30.' -} - -# >=2 jets with pt > 30 GeV -aliases['twoJetOrMore'] = { - 'expr': 'Alt$(CleanJet_pt[0], 0) >= 30. && Alt$(CleanJet_pt[1], 0) >= 30.' -} - -aliases['bVeto'] = { - 'expr': 'Sum$(CleanJet_pt > 20. && abs(CleanJet_eta) < 2.5 && Jet_btagDeepB[CleanJet_jetIdx] > 0.4184) == 0' -} - -aliases['bReq'] = { - 'expr': 'Sum$(CleanJet_pt > 30. && abs(CleanJet_eta) < 2.5 && Jet_btagDeepB[CleanJet_jetIdx] > 0.4184) >= 1' -} - -aliases['btag0'] = { - 'expr': 'zeroJet && !bVeto' -} - -aliases['btag1'] = { - 'expr': 'oneJet && bReq' -} - -aliases['btag2'] = { - 'expr': 'twoJet && bReq' -} - -# lepton eta range -aliases['lep0eta']={ - 'expr': '((abs(Alt$(Lepton_pdgId[0],-9999))==11 && abs(Alt$(Lepton_eta[0],-9999.)) <2.5) || (abs(Alt$(Lepton_pdgId[0],-9999))==13 && abs(Alt$(Lepton_eta[0],-9999.)) <2.4))' -} -aliases['lep1eta']={ - 'expr': '((abs(Alt$(Lepton_pdgId[1],-9999))==11 && abs(Alt$(Lepton_eta[1],-9999.)) <2.5) || (abs(Alt$(Lepton_pdgId[1],-9999))==13 && abs(Alt$(Lepton_eta[1],-9999.)) <2.4))' -} -aliases['jetpt30']={ - 'expr': 'Alt$(CleanJet_pt[0],-9999.) >30 && Alt$(CleanJet_pt[1],-9999.) >30 && abs(Alt$(CleanJet_eta[0],-9999.)) < 4.7&& abs(Alt$(CleanJet_eta[1],-9999.)) < 4.7' -} -aliases['jetpt50']={ - 'expr': 'Alt$(CleanJet_pt[0],-9999.) >50 && Alt$(CleanJet_pt[1],-9999.) >50 && abs(Alt$(CleanJet_eta[0],-9999.)) < 4.7&& abs(Alt$(CleanJet_eta[1],-9999.)) < 4.7' -} -aliases['jetpt_opt']={ - 'expr': 'Alt$(CleanJet_pt[0],-9999.) >50 && Alt$(CleanJet_pt[1],-9999.) >35 && abs(Alt$(CleanJet_eta[0],-9999.)) < 4.7&& abs(Alt$(CleanJet_eta[1],-9999.)) < 4.7' -} - -aliases['leppt0']={ - 'expr': 'Alt$(Lepton_pt[0],-9999.) >25 && Alt$(Lepton_pt[1],-9999.) >20' -} -aliases['leppt1']={ - 'expr': 'Alt$(Lepton_pt[0],-9999.) >30 && Alt$(Lepton_pt[1],-9999.) >30' -} -# -3.2-3.2 && Alt$(CleanJet_eta[0],-9999.)<-1.3 && Alt$(CleanJet_phi[0],-9999.)>-1.57 && Alt$(CleanJet_phi[0],-9999.)<-0.87) || \ - (Alt$(CleanJet_eta[1],-9999.)>-3.2 && Alt$(CleanJet_eta[1],-9999.)<-1.3 && Alt$(CleanJet_phi[1],-9999.)>-1.57 && Alt$(CleanJet_phi[1],-9999.)<-0.87)' -} -# ssww region -aliases['zlep_wz']={ - 'expr': 'abs((Alt$(Lepton_eta[0],-9999.) - (Alt$(CleanJet_eta[0],-9999.)+Alt$(CleanJet_eta[1],-9999.))/2)/detajj) < 1 && abs((Alt$(Lepton_eta[1],-9999.) - (Alt$(CleanJet_eta[0],-9999.)+Alt$(CleanJet_eta[1],-9999.))/2)/detajj) < 1 && abs((Alt$(Lepton_eta[2],-9999.) - (Alt$(CleanJet_eta[0],-9999.)+Alt$(CleanJet_eta[1],-9999.))/2)/detajj) <1' -} - -aliases['zveto_ww']={ - 'expr': '(abs(Alt$(Lepton_pdgId[0],-9999)) * abs(Alt$(Lepton_pdgId[1],-9999)) != 11*11 || abs(mll - 91.1876) > 15)' -} - -aliases['bVetoSF'] = { - 'expr': 'TMath::Exp(Sum$(TMath::Log((CleanJet_pt>20 && abs(CleanJet_eta)<2.5)*Jet_btagSF_deepcsv_shape[CleanJet_jetIdx]+1*(CleanJet_pt<20 || abs(CleanJet_eta)>2.5))))', - 'samples': mc -} - -aliases['btag0SF'] = { - 'expr': 'TMath::Exp(Sum$(TMath::Log((CleanJet_pt>20 && CleanJet_pt<30 && abs(CleanJet_eta)<2.5)*Jet_btagSF_deepcsv_shape[CleanJet_jetIdx]+1*(CleanJet_pt<20 || CleanJet_pt>30 || abs(CleanJet_eta)>2.5))))', - 'samples': mc -} - -aliases['btagnSF'] = { - 'expr': 'TMath::Exp(Sum$(TMath::Log((CleanJet_pt>30 && abs(CleanJet_eta)<2.5)*Jet_btagSF_deepcsv_shape[CleanJet_jetIdx] + (CleanJet_pt<30 || abs(CleanJet_eta)>2.5))))', - 'samples': mc -} - -aliases['btagSF'] = { - 'expr': 'bVetoSF*bVeto + btag0SF*btag0 + btagnSF*(btag1 + btag2) + (!bVeto && !btag0 && !btag1 && !btag2)', - 'samples': mc -} - -for shift in ['jes','lf','hf','lfstats1','lfstats2','hfstats1','hfstats2','cferr1','cferr2']: - for targ in ['bVeto', 'btag0', 'btagn']: - alias = aliases['%sSF%sup' % (targ, shift)] = copy.deepcopy(aliases['%sSF' % targ]) - alias['expr'] = alias['expr'].replace('btagSF_shape', 'btagSF_shape_up_%s' % shift) - - alias = aliases['%sSF%sdown' % (targ, shift)] = copy.deepcopy(aliases['%sSF' % targ]) - alias['expr'] = alias['expr'].replace('btagSF_shape', 'btagSF_shape_down_%s' % shift) - - aliases['btagSF%sup' % shift] = { - 'expr': 'bVetoSF{shift}up*bVeto + btag0SF{shift}up*btag0 + btagnSF{shift}up*(btag1 + btag2) + (!bVeto && !btag0 && !btag1 && !btag2)'.format(shift = shift), - 'samples': mc - } - - aliases['btagSF%sdown' % shift] = { - 'expr': 'bVetoSF{shift}down*bVeto + btag0SF{shift}down*btag0 + btagnSF{shift}down*(btag1 + btag2) + (!bVeto && !btag0 && !btag1 && !btag2)'.format(shift = shift), - 'samples': mc - } - -# data/MC scale factors -aliases['SFweight'] = { - 'expr': ' * '.join(['SFweight3l','LepSF3l__ele_' + eleWP + '__mu_' + muWP, 'LepWPCut','XSWeight','METFilter_MC','btagSF']), #bveto_sf*lep_sf*trig_sf*mu_roc_sf - #'expr': 'LepWPCut', - 'samples': mc -} -# variations -aliases['SFweightEleUp'] = { - 'expr': 'LepSF3l__ele_'+eleWP+'__Up', - 'samples': mc -} -aliases['SFweightEleDown'] = { - 'expr': 'LepSF3l__ele_'+eleWP+'__Do', - 'samples': mc -} -aliases['SFweightMuUp'] = { - 'expr': 'LepSF3l__mu_'+muWP+'__Up', - 'samples': mc -} -aliases['SFweightMuDown'] = { - 'expr': 'LepSF3l__mu_'+muWP+'__Do', - 'samples': mc -} -aliases['zlep1'] = {'expr' : '(Alt$(Lepton_eta[0],-9999.) - (Alt$(CleanJet_eta[0],-9999.)+Alt$(CleanJet_eta[1],-9999.))/2)/detajj'} -aliases['zlep2'] = {'expr' : '(Alt$(Lepton_eta[1],-9999.) - (Alt$(CleanJet_eta[0],-9999.)+Alt$(CleanJet_eta[1],-9999.))/2)/detajj'} diff --git a/Configurations/VBSlllnu/WZin/conf_WZin_BSM/configuration.py b/Configurations/VBSlllnu/WZin/conf_WZin_BSM/configuration.py deleted file mode 100755 index f5c4e743eb..0000000000 --- a/Configurations/VBSlllnu/WZin/conf_WZin_BSM/configuration.py +++ /dev/null @@ -1,45 +0,0 @@ -#example of configuration file -treeName= 'Events' - -#date='_Nov252018_ptll' -date='_l3_2018' - -tag = 'VBS_WZin'+date+'_BSM2D' - -# used by mkShape to define output directory for root files -outputDir = 'rootFile'+date+'_BSM2D' - -# file with TTree aliases -aliasesFile = 'aliases.py' - -# file with list of variables -variablesFile = 'variables.py' - -# file with list of cuts -cutsFile = 'cuts.py' -#cutsFile = 'cuts_forPlots.py' - -# file with list of samples -samplesFile = 'samples.py' - -# file with list of samples -plotFile = 'plot.py' - -# luminosity to normalize to (in 1/fb) -lumi =59.74 - -# used by mkPlot to define output directory for plots -# different from "outputDir" to do things more tidy -outputDirPlots = 'plotVBS'+date+'_BSM2D' - - -# used by mkDatacards to define output directory for datacards -outputDirDatacard = 'datacards'+date - - -# structure file for datacard -structureFile = 'structure.py' - - -# nuisances file for mkDatacards and for mkShape -nuisancesFile = 'total_nuisances.py' diff --git a/Configurations/VBSlllnu/WZin/conf_WZin_BSM/cuts.py b/Configurations/VBSlllnu/WZin/conf_WZin_BSM/cuts.py deleted file mode 100755 index 7926209348..0000000000 --- a/Configurations/VBSlllnu/WZin/conf_WZin_BSM/cuts.py +++ /dev/null @@ -1,13 +0,0 @@ -# cuts -# cuts = {} -#Different supercut used - -#supercut for test on succesive selections - -## Signal regions - -supercut='nLepton>2' - -cuts['wz_jetpt30_zlep'] = 'wzinc && bVeto && MET_pt>30 && tauVeto_wz && jetpt30 && abs(detajj)>2.5 && mjj>500 && zlep_wz' -cuts['wz_jetpt50_zlep'] = 'wzinc && bVeto && MET_pt>30 && tauVeto_wz && jetpt50 && abs(detajj)>2.5 && mjj>500 && zlep_wz' -cuts['wz_zlep'] = 'wzinc && bVeto && MET_pt>20 && tauVeto_wz && jetpt_opt && abs(detajj)>1.5 && mjj>400 && zlep_wz' diff --git a/Configurations/VBSlllnu/WZin/conf_WZin_BSM/nuisances.py b/Configurations/VBSlllnu/WZin/conf_WZin_BSM/nuisances.py deleted file mode 100755 index 48101e0b83..0000000000 --- a/Configurations/VBSlllnu/WZin/conf_WZin_BSM/nuisances.py +++ /dev/null @@ -1,47 +0,0 @@ - -# nuisances - -#nuisances = {} - -# name of samples here must match keys in samples.py - -################################ EXPERIMENTAL UNCERTAINTIES ################################# - -#### Luminosity -# luminosity uncertainty is 2.3% - -nuisances['lumi'] = { - 'name' : 'lumi_13TeV_2018', - 'samples' : { - 'sm' : '1.023', - 'Vg' : '1.023', - 'VgS' : '1.023', - 'ZZ' : '1.023', - 'VVV' : '1.023', - 'DPS' : '1.023', - 'WpWp_QCD' : '1.023', - 'SSWW' : '1.023', - }, - 'type' : 'lnN', -} - -# statistical fluctuation -# on MC/data -# "stat" is a special word to identify this nuisance -# Use the following if you want to apply the automatic combine MC stat nuisances->Faster than bin-by-bin -nuisances['stat'] = { - 'type' : 'auto', - 'maxPoiss' : '10', - 'includeSignal' : '1', - 'samples' : {} -} - - - -# Differnt type of uncentainties: type->ln N: (modify only event yeld) use a lognorm distributions with sigma = uncertainty. For normalization rateParam -# can be used--> use a uniform distribution; -# Shape: modify not only the events yelds but the event selection too (the shape) will run the varied shapes -# according to the following two possible kinds -# kind-> weight: Use the specified weight to reweight events; -# tree: uses the provided alternative trees; -# The MC statistics is a particular uncertainty: is caused by our finite statistics used to elaborate the template fits. Two approach: unfied and bin-by-bin (bbb) diff --git a/Configurations/VBSlllnu/WZin/conf_WZin_BSM/plot.py b/Configurations/VBSlllnu/WZin/conf_WZin_BSM/plot.py deleted file mode 100755 index f7fe62e4e3..0000000000 --- a/Configurations/VBSlllnu/WZin/conf_WZin_BSM/plot.py +++ /dev/null @@ -1,48 +0,0 @@ -# plot configuration - -# groupPlot = {} -# -# Groups of samples to improve the plots. -# If not defined, normal plots is used -# - -# groupPlot = {} -# -# Groups of samples to improve the plots (merge different sample during plot). -# If not defined, normal plots is used -# -Red=632; Violet=880; Green=416; Orange=800; Yellow=400; Azure=840; Blue=600; - -#Signal -plot['sm'] = dict(color=Azure, isSignal=1, isData=0, scale=1.0) - -#Reducible Background -plot['SSWW'] = dict(color=Azure, isSignal=0, isData=0, scale=1.0) -plot['WpWp_QCD'] = dict(color=Azure, isSignal=0, isData=0, scale=1.0) -plot['WZ_QCD'] = dict(color=Azure, isSignal=0, isData=0, scale=1.0) -plot['ZZ4L'] = dict(color=Azure, isSignal=0, isData=0, scale=1.0) -plot['ggZZ'] = dict(color=Azure, isSignal=0, isData=0, scale=1.0) -plot['TTV'] = dict(color=Azure, isSignal=0, isData=0, scale=1.0) -plot['tZq'] = dict(color=Azure, isSignal=0, isData=0, scale=1.0) -plot['Vg'] = dict(color=Azure, isSignal=0, isData=0, scale=1.0) -plot['VgS1_H'] = dict(color=Azure, isSignal=0, isData=0, scale=1.0) -plot['VgS1_L'] = dict(color=Azure, isSignal=0, isData=0, scale=1.0) -plot['DPS'] = dict(color=Azure, isSignal=0, isData=0, scale=1.0) -plot['VVV'] = dict(color=Azure, isSignal=0, isData=0, scale=1.0) -plot['Fake'] = dict(color=Azure, isSignal=0, isData=0, scale=1.0) - -plot['DATA'] = dict(nameHR='Data', color=1, isSignal=0, isData=1, isBlind=0, scale=1.0) - -groupPlot['ZZ'] = dict(nameHR="ZZ", isSignal=0, color=ROOT.kMagenta-10, samples=['ZZ4L','ggZZ']) -groupPlot['WpWp'] = dict(nameHR="W^{#pm}W^{#pm}", isSignal=0, color=ROOT.kOrange+1, samples=['SSWW','WpWp_QCD']) -groupPlot['WZ_QCD'] = dict(nameHR="WZ QCD", isSignal=0, color=ROOT.kMagenta, samples=['WZ_QCD']) -groupPlot['VVV'] = dict(nameHR='VVV', isSignal=0, color=ROOT.kSpring-9, samples=['VVV']) -groupPlot['TTV'] = dict(nameHR='TTV', isSignal=0, color=ROOT.kGray+5, samples=['TTV','tZq']) -groupPlot['DPS'] = dict(nameHR='DPS', isSignal=0, color=ROOT.kGray, samples=['DPS']) -groupPlot['Vg'] = dict(nameHR="V#gamma", isSignal=0, color=ROOT.kCyan-7, samples=['Vg', 'VgS1_H', 'VgS1_L']) -groupPlot['Fake'] = dict(nameHR='non-Prompt', isSignal=0, color=ROOT.kYellow-4, samples=['Fake']) -groupPlot['sm'] = dict(nameHR="WZ EWK", isSignal=0, color=ROOT.kRed, samples=['sm']) - -# additional options -legend['lumi'] = 'L = 59.74/fb' -legend['sqrt'] = '#sqrt{s} = 13 TeV' diff --git a/Configurations/VBSlllnu/WZin/conf_WZin_BSM/samples.py b/Configurations/VBSlllnu/WZin/conf_WZin_BSM/samples.py deleted file mode 100755 index 359342b37f..0000000000 --- a/Configurations/VBSlllnu/WZin/conf_WZin_BSM/samples.py +++ /dev/null @@ -1,697 +0,0 @@ -import os -import inspect - -configurations = os.path.realpath(inspect.getfile(inspect.currentframe())) # this file -configurations = os.path.dirname(configurations) # ggH2016 -configurations = os.path.dirname(configurations) # Differential -configurations = os.path.dirname(configurations) # Configurations - -from LatinoAnalysis.Tools.commonTools import getSampleFiles, getBaseW, addSampleWeight - -def nanoGetSampleFiles(inputDir, sample): - try: - if _samples_noload: - return [] - except NameError: - pass - - return getSampleFiles(inputDir, sample, True, 'nanoLatino_') - -# samples - -try: - len(samples) -except NameError: - import collections - samples = collections.OrderedDict() - -################################################ -############ BASIC MC WEIGHTS ################## -################################################ -mcCommonWeightNoMatch = 'SFweight' -mcCommonWeight = 'SFweight*PromptGenLepMatch3l' - -################################################ -############ PRIVATE SAMPLES ################### -################################################ - -mcDirectory = '/eos/user/e/evernazz/nanoAOD_PostProc_ntuple_WZin/Autumn18_102X_nAODv7_Full2018v7/MCl1loose2018v7__MCCorr2018v7__l2loose__l2tightOR2018v7' -treeBaseDir = '/eos/user/e/evernazz/nanoAOD_PostProc_ntuple_WZin' -mcProduction = 'Autumn18_102X_nAODv7_Full2018v7' -mcSteps = 'MCl1loose2018v7__MCCorr2018v7__l2loose__l2tightOR2018v7{var}' - -def makeMCDirectory(var=''): - if var: - return os.path.join(treeBaseDir, mcProduction, mcSteps.format(var='__' + var)) - else: - return os.path.join(treeBaseDir, mcProduction, mcSteps.format(var='')) - -files = nanoGetSampleFiles(mcDirectory, 'WZin_SM') -samples['sm'] = { - 'name': files, - 'weight': mcCommonWeight, - 'FilesPerJob': 10, -} - -# EFTNeg cqq11 -files = nanoGetSampleFiles(mcDirectory, 'WZin_SM') + \ - nanoGetSampleFiles(mcDirectory, 'WZin_cqq11_LI') + \ - nanoGetSampleFiles(mcDirectory, 'WZin_cqq11_QU') -samples['sm_lin_quad_cqq11'] = { - 'name': files, - 'weight': mcCommonWeight, - 'FilesPerJob': 10, -} - -files = nanoGetSampleFiles(mcDirectory, 'WZin_cqq11_QU') -samples['quad_cqq11'] = { - 'name': files, - 'weight': mcCommonWeight, - 'FilesPerJob': 10, -} - -# EFTNeg cqq1 -files = nanoGetSampleFiles(mcDirectory, 'WZin_SM') + \ - nanoGetSampleFiles(mcDirectory, 'WZin_cqq1_LI') + \ - nanoGetSampleFiles(mcDirectory, 'WZin_cqq1_QU') -samples['sm_lin_quad_cqq1'] = { - 'name': files, - 'weight': mcCommonWeight, - 'FilesPerJob': 10, -} - -files = nanoGetSampleFiles(mcDirectory, 'WZin_cqq1_QU') -samples['quad_cqq1'] = { - 'name': files, - 'weight': mcCommonWeight, - 'FilesPerJob': 10, -} - -# EFTNeg cqq31 -files = nanoGetSampleFiles(mcDirectory, 'WZin_SM') + \ - nanoGetSampleFiles(mcDirectory, 'WZin_cqq31_LI') + \ - nanoGetSampleFiles(mcDirectory, 'WZin_cqq31_QU') -samples['sm_lin_quad_cqq31'] = { - 'name': files, - 'weight': mcCommonWeight, - 'FilesPerJob': 10, -} - -files = nanoGetSampleFiles(mcDirectory, 'WZin_cqq31_QU') -samples['quad_cqq31'] = { - 'name': files, - 'weight': mcCommonWeight, - 'FilesPerJob': 10, -} - -# EFTNeg cqq3 -files = nanoGetSampleFiles(mcDirectory, 'WZin_SM') + \ - nanoGetSampleFiles(mcDirectory, 'WZin_cqq3_LI') + \ - nanoGetSampleFiles(mcDirectory, 'WZin_cqq3_QU') -samples['sm_lin_quad_cqq3'] = { - 'name': files, - 'weight': mcCommonWeight, - 'FilesPerJob': 10, -} - -files = nanoGetSampleFiles(mcDirectory, 'WZin_cqq3_QU') -samples['quad_cqq3'] = { - 'name': files, - 'weight': mcCommonWeight, - 'FilesPerJob': 10, -} - -# EFTNeg cW -files = nanoGetSampleFiles(mcDirectory, 'WZin_SM') + \ - nanoGetSampleFiles(mcDirectory, 'WZin_cW_LI') + \ - nanoGetSampleFiles(mcDirectory, 'WZin_cW_QU') -samples['sm_lin_quad_cW'] = { - 'name': files, - 'weight': mcCommonWeight, - 'FilesPerJob': 10, -} - -files = nanoGetSampleFiles(mcDirectory, 'WZin_cW_QU') -samples['quad_cW'] = { - 'name': files, - 'weight': mcCommonWeight, - 'FilesPerJob': 10, -} - -# EFTNeg cHl3 -files = nanoGetSampleFiles(mcDirectory, 'WZin_SM') + \ - nanoGetSampleFiles(mcDirectory, 'WZin_cHl3_LI') + \ - nanoGetSampleFiles(mcDirectory, 'WZin_cHl3_QU') -samples['sm_lin_quad_cHl3'] = { - 'name': files, - 'weight': mcCommonWeight, - 'FilesPerJob': 10, -} - -files = nanoGetSampleFiles(mcDirectory, 'WZin_cHl3_QU') -samples['quad_cHl3'] = { - 'name': files, - 'weight': mcCommonWeight, - 'FilesPerJob': 10, -} - -# EFTNeg cHq3 -files = nanoGetSampleFiles(mcDirectory, 'WZin_SM') + \ - nanoGetSampleFiles(mcDirectory, 'WZin_cHq3_LI') + \ - nanoGetSampleFiles(mcDirectory, 'WZin_cHq3_QU') -samples['sm_lin_quad_cHq3'] = { - 'name': files, - 'weight': mcCommonWeight, - 'FilesPerJob': 10, -} - -files = nanoGetSampleFiles(mcDirectory, 'WZin_cHq3_QU') -samples['quad_cHq3'] = { - 'name': files, - 'weight': mcCommonWeight, - 'FilesPerJob': 10, -} - -# EFTNeg cll1 -files = nanoGetSampleFiles(mcDirectory, 'WZin_SM') + \ - nanoGetSampleFiles(mcDirectory, 'WZin_cll1_LI') + \ - nanoGetSampleFiles(mcDirectory, 'WZin_cll1_QU') -samples['sm_lin_quad_cll1'] = { - 'name': files, - 'weight': mcCommonWeight, - 'FilesPerJob': 10, -} - -files = nanoGetSampleFiles(mcDirectory, 'WZin_cll1_QU') -samples['quad_cll1'] = { - 'name': files, - 'weight': mcCommonWeight, - 'FilesPerJob': 10, -} - -# Mixing - -files = nanoGetSampleFiles(mcDirectory, 'WZin_SM') + \ - nanoGetSampleFiles(mcDirectory, 'WZin_cqq1_LI') + \ - nanoGetSampleFiles(mcDirectory, 'WZin_cqq1_QU') + \ - nanoGetSampleFiles(mcDirectory, 'WZin_cqq11_LI') + \ - nanoGetSampleFiles(mcDirectory, 'WZin_cqq11_QU') + \ - nanoGetSampleFiles(mcDirectory, 'WZin_cqq1_cqq11_IN') -samples['sm_lin_quad_mixed_cqq1_cqq11'] = { - 'name': files, - 'weight': mcCommonWeight, - 'FilesPerJob': 20, -} - -files = nanoGetSampleFiles(mcDirectory, 'WZin_SM') + \ - nanoGetSampleFiles(mcDirectory, 'WZin_cqq1_LI') + \ - nanoGetSampleFiles(mcDirectory, 'WZin_cqq1_QU') + \ - nanoGetSampleFiles(mcDirectory, 'WZin_cqq3_LI') + \ - nanoGetSampleFiles(mcDirectory, 'WZin_cqq3_QU') + \ - nanoGetSampleFiles(mcDirectory, 'WZin_cqq1_cqq3_IN') -samples['sm_lin_quad_mixed_cqq1_cqq3'] = { - 'name': files, - 'weight': mcCommonWeight, - 'FilesPerJob': 20, -} - -# files = nanoGetSampleFiles(mcDirectory, 'WZin_SM') + \ -# nanoGetSampleFiles(mcDirectory, 'WZin_cqq1_LI') + \ -# nanoGetSampleFiles(mcDirectory, 'WZin_cqq1_QU') + \ -# nanoGetSampleFiles(mcDirectory, 'WZin_cqq31_LI') + \ -# nanoGetSampleFiles(mcDirectory, 'WZin_cqq31_QU') + \ -# nanoGetSampleFiles(mcDirectory, 'WZin_cqq1_cqq31_IN') -# samples['sm_lin_quad_mixed_cqq1_cqq31'] = { -# 'name': files, -# 'weight': mcCommonWeight, -# 'FilesPerJob': 20, -# } - -# files = nanoGetSampleFiles(mcDirectory, 'WZin_SM') + \ -# nanoGetSampleFiles(mcDirectory, 'WZin_cqq11_LI') + \ -# nanoGetSampleFiles(mcDirectory, 'WZin_cqq11_QU') + \ -# nanoGetSampleFiles(mcDirectory, 'WZin_cqq3_LI') + \ -# nanoGetSampleFiles(mcDirectory, 'WZin_cqq3_QU') + \ -# nanoGetSampleFiles(mcDirectory, 'WZin_cqq11_cqq3_IN') -# samples['sm_lin_quad_mixed_cqq11_cqq3'] = { -# 'name': files, -# 'weight': mcCommonWeight, -# 'FilesPerJob': 20, -# } - -files = nanoGetSampleFiles(mcDirectory, 'WZin_SM') + \ - nanoGetSampleFiles(mcDirectory, 'WZin_cqq11_LI') + \ - nanoGetSampleFiles(mcDirectory, 'WZin_cqq11_QU') + \ - nanoGetSampleFiles(mcDirectory, 'WZin_cqq31_LI') + \ - nanoGetSampleFiles(mcDirectory, 'WZin_cqq31_QU') + \ - nanoGetSampleFiles(mcDirectory, 'WZin_cqq11_cqq31_IN') -samples['sm_lin_quad_mixed_cqq11_cqq31'] = { - 'name': files, - 'weight': mcCommonWeight, - 'FilesPerJob': 20, -} - -files = nanoGetSampleFiles(mcDirectory, 'WZin_SM') + \ - nanoGetSampleFiles(mcDirectory, 'WZin_cqq3_LI') + \ - nanoGetSampleFiles(mcDirectory, 'WZin_cqq3_QU') + \ - nanoGetSampleFiles(mcDirectory, 'WZin_cqq31_LI') + \ - nanoGetSampleFiles(mcDirectory, 'WZin_cqq31_QU') + \ - nanoGetSampleFiles(mcDirectory, 'WZin_cqq3_cqq31_IN') -samples['sm_lin_quad_mixed_cqq3_cqq31'] = { - 'name': files, - 'weight': mcCommonWeight, - 'FilesPerJob': 20, -} - -files = nanoGetSampleFiles(mcDirectory, 'WZin_SM') + \ - nanoGetSampleFiles(mcDirectory, 'WZin_cW_LI') + \ - nanoGetSampleFiles(mcDirectory, 'WZin_cW_QU') + \ - nanoGetSampleFiles(mcDirectory, 'WZin_cqq1_LI') + \ - nanoGetSampleFiles(mcDirectory, 'WZin_cqq1_QU') + \ - nanoGetSampleFiles(mcDirectory, 'WZin_cW_cqq1_IN') -samples['sm_lin_quad_mixed_cW_cqq1'] = { - 'name': files, - 'weight': mcCommonWeight, - 'FilesPerJob': 20, -} - -files = nanoGetSampleFiles(mcDirectory, 'WZin_SM') + \ - nanoGetSampleFiles(mcDirectory, 'WZin_cW_LI') + \ - nanoGetSampleFiles(mcDirectory, 'WZin_cW_QU') + \ - nanoGetSampleFiles(mcDirectory, 'WZin_cqq11_LI') + \ - nanoGetSampleFiles(mcDirectory, 'WZin_cqq11_QU') + \ - nanoGetSampleFiles(mcDirectory, 'WZin_cW_cqq11_IN') -samples['sm_lin_quad_mixed_cW_cqq11'] = { - 'name': files, - 'weight': mcCommonWeight, - 'FilesPerJob': 20, -} - -files = nanoGetSampleFiles(mcDirectory, 'WZin_SM') + \ - nanoGetSampleFiles(mcDirectory, 'WZin_cW_LI') + \ - nanoGetSampleFiles(mcDirectory, 'WZin_cW_QU') + \ - nanoGetSampleFiles(mcDirectory, 'WZin_cqq3_LI') + \ - nanoGetSampleFiles(mcDirectory, 'WZin_cqq3_QU') + \ - nanoGetSampleFiles(mcDirectory, 'WZin_cW_cqq3_IN') -samples['sm_lin_quad_mixed_cW_cqq3'] = { - 'name': files, - 'weight': mcCommonWeight, - 'FilesPerJob': 20, -} - -files = nanoGetSampleFiles(mcDirectory, 'WZin_SM') + \ - nanoGetSampleFiles(mcDirectory, 'WZin_cW_LI') + \ - nanoGetSampleFiles(mcDirectory, 'WZin_cW_QU') + \ - nanoGetSampleFiles(mcDirectory, 'WZin_cqq31_LI') + \ - nanoGetSampleFiles(mcDirectory, 'WZin_cqq31_QU') + \ - nanoGetSampleFiles(mcDirectory, 'WZin_cW_cqq31_IN') -samples['sm_lin_quad_mixed_cW_cqq31'] = { - 'name': files, - 'weight': mcCommonWeight, - 'FilesPerJob': 20, -} - -# files = nanoGetSampleFiles(mcDirectory, 'WZin_SM') + \ -# nanoGetSampleFiles(mcDirectory, 'WZin_cW_LI') + \ -# nanoGetSampleFiles(mcDirectory, 'WZin_cW_QU') + \ -# nanoGetSampleFiles(mcDirectory, 'WZin_cll1_LI') + \ -# nanoGetSampleFiles(mcDirectory, 'WZin_cll1_QU') + \ -# nanoGetSampleFiles(mcDirectory, 'WZin_cW_cll1_IN') -# samples['sm_lin_quad_mixed_cW_cll1'] = { -# 'name': files, -# 'weight': mcCommonWeight, -# 'FilesPerJob': 20, -# } - -files = nanoGetSampleFiles(mcDirectory, 'WZin_SM') + \ - nanoGetSampleFiles(mcDirectory, 'WZin_cll1_LI') + \ - nanoGetSampleFiles(mcDirectory, 'WZin_cll1_QU') + \ - nanoGetSampleFiles(mcDirectory, 'WZin_cqq1_LI') + \ - nanoGetSampleFiles(mcDirectory, 'WZin_cqq1_QU') + \ - nanoGetSampleFiles(mcDirectory, 'WZin_cll1_cqq1_IN') -samples['sm_lin_quad_mixed_cll1_cqq1'] = { - 'name': files, - 'weight': mcCommonWeight, - 'FilesPerJob': 20, -} - -files = nanoGetSampleFiles(mcDirectory, 'WZin_SM') + \ - nanoGetSampleFiles(mcDirectory, 'WZin_cll1_LI') + \ - nanoGetSampleFiles(mcDirectory, 'WZin_cll1_QU') + \ - nanoGetSampleFiles(mcDirectory, 'WZin_cqq11_LI') + \ - nanoGetSampleFiles(mcDirectory, 'WZin_cqq11_QU') + \ - nanoGetSampleFiles(mcDirectory, 'WZin_cll1_cqq11_IN') -samples['sm_lin_quad_mixed_cll1_cqq11'] = { - 'name': files, - 'weight': mcCommonWeight, - 'FilesPerJob': 20, -} - -files = nanoGetSampleFiles(mcDirectory, 'WZin_SM') + \ - nanoGetSampleFiles(mcDirectory, 'WZin_cll1_LI') + \ - nanoGetSampleFiles(mcDirectory, 'WZin_cll1_QU') + \ - nanoGetSampleFiles(mcDirectory, 'WZin_cqq3_LI') + \ - nanoGetSampleFiles(mcDirectory, 'WZin_cqq3_QU') + \ - nanoGetSampleFiles(mcDirectory, 'WZin_cll1_cqq3_IN') -samples['sm_lin_quad_mixed_cll1_cqq3'] = { - 'name': files, - 'weight': mcCommonWeight, - 'FilesPerJob': 20, -} - -files = nanoGetSampleFiles(mcDirectory, 'WZin_SM') + \ - nanoGetSampleFiles(mcDirectory, 'WZin_cll1_LI') + \ - nanoGetSampleFiles(mcDirectory, 'WZin_cll1_QU') + \ - nanoGetSampleFiles(mcDirectory, 'WZin_cqq31_LI') + \ - nanoGetSampleFiles(mcDirectory, 'WZin_cqq31_QU') + \ - nanoGetSampleFiles(mcDirectory, 'WZin_cll1_cqq31_IN') -samples['sm_lin_quad_mixed_cll1_cqq31'] = { - 'name': files, - 'weight': mcCommonWeight, - 'FilesPerJob': 20, -} - -files = nanoGetSampleFiles(mcDirectory, 'WZin_SM') + \ - nanoGetSampleFiles(mcDirectory, 'WZin_cHq3_LI') + \ - nanoGetSampleFiles(mcDirectory, 'WZin_cHq3_QU') + \ - nanoGetSampleFiles(mcDirectory, 'WZin_cqq1_LI') + \ - nanoGetSampleFiles(mcDirectory, 'WZin_cqq1_QU') + \ - nanoGetSampleFiles(mcDirectory, 'WZin_cHq3_cqq1_IN') -samples['sm_lin_quad_mixed_cHq3_cqq1'] = { - 'name': files, - 'weight': mcCommonWeight, - 'FilesPerJob': 20, -} - -files = nanoGetSampleFiles(mcDirectory, 'WZin_SM') + \ - nanoGetSampleFiles(mcDirectory, 'WZin_cHq3_LI') + \ - nanoGetSampleFiles(mcDirectory, 'WZin_cHq3_QU') + \ - nanoGetSampleFiles(mcDirectory, 'WZin_cqq11_LI') + \ - nanoGetSampleFiles(mcDirectory, 'WZin_cqq11_QU') + \ - nanoGetSampleFiles(mcDirectory, 'WZin_cHq3_cqq11_IN') -samples['sm_lin_quad_mixed_cHq3_cqq11'] = { - 'name': files, - 'weight': mcCommonWeight, - 'FilesPerJob': 20, -} - -files = nanoGetSampleFiles(mcDirectory, 'WZin_SM') + \ - nanoGetSampleFiles(mcDirectory, 'WZin_cHq3_LI') + \ - nanoGetSampleFiles(mcDirectory, 'WZin_cHq3_QU') + \ - nanoGetSampleFiles(mcDirectory, 'WZin_cqq3_LI') + \ - nanoGetSampleFiles(mcDirectory, 'WZin_cqq3_QU') + \ - nanoGetSampleFiles(mcDirectory, 'WZin_cHq3_cqq3_IN') -samples['sm_lin_quad_mixed_cHq3_cqq3'] = { - 'name': files, - 'weight': mcCommonWeight, - 'FilesPerJob': 20, -} - -files = nanoGetSampleFiles(mcDirectory, 'WZin_SM') + \ - nanoGetSampleFiles(mcDirectory, 'WZin_cHq3_LI') + \ - nanoGetSampleFiles(mcDirectory, 'WZin_cHq3_QU') + \ - nanoGetSampleFiles(mcDirectory, 'WZin_cqq31_LI') + \ - nanoGetSampleFiles(mcDirectory, 'WZin_cqq31_QU') + \ - nanoGetSampleFiles(mcDirectory, 'WZin_cHq3_cqq31_IN') -samples['sm_lin_quad_mixed_cHq3_cqq31'] = { - 'name': files, - 'weight': mcCommonWeight, - 'FilesPerJob': 20, -} - -files = nanoGetSampleFiles(mcDirectory, 'WZin_SM') + \ - nanoGetSampleFiles(mcDirectory, 'WZin_cHq3_LI') + \ - nanoGetSampleFiles(mcDirectory, 'WZin_cHq3_QU') + \ - nanoGetSampleFiles(mcDirectory, 'WZin_cll1_LI') + \ - nanoGetSampleFiles(mcDirectory, 'WZin_cll1_QU') + \ - nanoGetSampleFiles(mcDirectory, 'WZin_cHq3_cll1_IN') -samples['sm_lin_quad_mixed_cHq3_cll1'] = { - 'name': files, - 'weight': mcCommonWeight, - 'FilesPerJob': 20, -} - -files = nanoGetSampleFiles(mcDirectory, 'WZin_SM') + \ - nanoGetSampleFiles(mcDirectory, 'WZin_cHq3_LI') + \ - nanoGetSampleFiles(mcDirectory, 'WZin_cHq3_QU') + \ - nanoGetSampleFiles(mcDirectory, 'WZin_cW_LI') + \ - nanoGetSampleFiles(mcDirectory, 'WZin_cW_QU') + \ - nanoGetSampleFiles(mcDirectory, 'WZin_cHq3_cW_IN') -samples['sm_lin_quad_mixed_cHq3_cW'] = { - 'name': files, - 'weight': mcCommonWeight, - 'FilesPerJob': 20, -} - -# files = nanoGetSampleFiles(mcDirectory, 'WZin_SM') + \ -# nanoGetSampleFiles(mcDirectory, 'WZin_cHl3_LI') + \ -# nanoGetSampleFiles(mcDirectory, 'WZin_cHl3_QU') + \ -# nanoGetSampleFiles(mcDirectory, 'WZin_cqq1_LI') + \ -# nanoGetSampleFiles(mcDirectory, 'WZin_cqq1_QU') + \ -# nanoGetSampleFiles(mcDirectory, 'WZin_cHl3_cqq1_IN') -# samples['sm_lin_quad_mixed_cHl3_cqq1'] = { -# 'name': files, -# 'weight': mcCommonWeight, -# 'FilesPerJob': 20, -# } - -# files = nanoGetSampleFiles(mcDirectory, 'WZin_SM') + \ -# nanoGetSampleFiles(mcDirectory, 'WZin_cHl3_LI') + \ -# nanoGetSampleFiles(mcDirectory, 'WZin_cHl3_QU') + \ -# nanoGetSampleFiles(mcDirectory, 'WZin_cqq11_LI') + \ -# nanoGetSampleFiles(mcDirectory, 'WZin_cqq11_QU') + \ -# nanoGetSampleFiles(mcDirectory, 'WZin_cHl3_cqq11_IN') -# samples['sm_lin_quad_mixed_cHl3_cqq11'] = { -# 'name': files, -# 'weight': mcCommonWeight, -# 'FilesPerJob': 20, -# } - -# files = nanoGetSampleFiles(mcDirectory, 'WZin_SM') + \ -# nanoGetSampleFiles(mcDirectory, 'WZin_cHl3_LI') + \ -# nanoGetSampleFiles(mcDirectory, 'WZin_cHl3_QU') + \ -# nanoGetSampleFiles(mcDirectory, 'WZin_cqq3_LI') + \ -# nanoGetSampleFiles(mcDirectory, 'WZin_cqq3_QU') + \ -# nanoGetSampleFiles(mcDirectory, 'WZin_cHl3_cqq3_IN') -# samples['sm_lin_quad_mixed_cHl3_cqq3'] = { -# 'name': files, -# 'weight': mcCommonWeight, -# 'FilesPerJob': 20, -# } - -# files = nanoGetSampleFiles(mcDirectory, 'WZin_SM') + \ -# nanoGetSampleFiles(mcDirectory, 'WZin_cHl3_LI') + \ -# nanoGetSampleFiles(mcDirectory, 'WZin_cHl3_QU') + \ -# nanoGetSampleFiles(mcDirectory, 'WZin_cqq31_LI') + \ -# nanoGetSampleFiles(mcDirectory, 'WZin_cqq31_QU') + \ -# nanoGetSampleFiles(mcDirectory, 'WZin_cHl3_cqq31_IN') -# samples['sm_lin_quad_mixed_cHl3_cqq31'] = { -# 'name': files, -# 'weight': mcCommonWeight, -# 'FilesPerJob': 20, -# } - -# files = nanoGetSampleFiles(mcDirectory, 'WZin_SM') + \ -# nanoGetSampleFiles(mcDirectory, 'WZin_cHl3_LI') + \ -# nanoGetSampleFiles(mcDirectory, 'WZin_cHl3_QU') + \ -# nanoGetSampleFiles(mcDirectory, 'WZin_cll1_LI') + \ -# nanoGetSampleFiles(mcDirectory, 'WZin_cll1_QU') + \ -# nanoGetSampleFiles(mcDirectory, 'WZin_cHl3_cll1_IN') -# samples['sm_lin_quad_mixed_cHl3_cll1'] = { -# 'name': files, -# 'weight': mcCommonWeight, -# 'FilesPerJob': 20, -# } - -# files = nanoGetSampleFiles(mcDirectory, 'WZin_SM') + \ -# nanoGetSampleFiles(mcDirectory, 'WZin_cHl3_LI') + \ -# nanoGetSampleFiles(mcDirectory, 'WZin_cHl3_QU') + \ -# nanoGetSampleFiles(mcDirectory, 'WZin_cW_LI') + \ -# nanoGetSampleFiles(mcDirectory, 'WZin_cW_QU') + \ -# nanoGetSampleFiles(mcDirectory, 'WZin_cHl3_cW_IN') -# samples['sm_lin_quad_mixed_cHl3_cW'] = { -# 'name': files, -# 'weight': mcCommonWeight, -# 'FilesPerJob': 20, -# } - -# files = nanoGetSampleFiles(mcDirectory, 'WZin_SM') + \ -# nanoGetSampleFiles(mcDirectory, 'WZin_cHl3_LI') + \ -# nanoGetSampleFiles(mcDirectory, 'WZin_cHl3_QU') + \ -# nanoGetSampleFiles(mcDirectory, 'WZin_cHq3_LI') + \ -# nanoGetSampleFiles(mcDirectory, 'WZin_cHq3_QU') + \ -# nanoGetSampleFiles(mcDirectory, 'WZin_cHl3_cHq3_IN') -# samples['sm_lin_quad_mixed_cHl3_cHq3'] = { -# 'name': files, -# 'weight': mcCommonWeight, -# 'FilesPerJob': 20, -# } - -# ############################################### -# ########### BACKGROUND SAMPLES ################ -# ############################################### - -# SSWW -files = nanoGetSampleFiles(mcDirectory, 'WpWpJJ_EWK_madgraph') -samples['SSWW'] = { - 'name': files, - 'weight': mcCommonWeight, - 'FilesPerJob': 4 -} - -# SSWW QCD -files = nanoGetSampleFiles(mcDirectory, 'WpWpJJ_QCD') -samples['WpWp_QCD'] = { - 'name': files, - 'weight': mcCommonWeight, - 'FilesPerJob': 4 -} - -# WZ QCD -files = nanoGetSampleFiles(mcDirectory, 'WLLJJToLNu_M-50_QCD_0Jet') + \ - nanoGetSampleFiles(mcDirectory, 'WLLJJToLNu_M-50_QCD_1Jet') + \ - nanoGetSampleFiles(mcDirectory, 'WLLJJToLNu_M-50_QCD_3Jet') + \ - nanoGetSampleFiles(mcDirectory, 'WLLJJToLNu_M-4To50_QCD_0Jet') + \ - nanoGetSampleFiles(mcDirectory, 'WLLJJToLNu_M-4To50_QCD_2Jet') + \ - nanoGetSampleFiles(mcDirectory, 'WLLJJToLNu_M-4To50_QCD_3Jet') -samples['WZ_QCD'] = { - 'name': files, - 'weight': mcCommonWeight+'*1.2', - 'FilesPerJob': 4 -} - -# ZZ -files = nanoGetSampleFiles(mcDirectory, 'ZZTo4L_ext2') -samples['ZZ4L'] = { - 'name': files, - 'weight': mcCommonWeight, - 'FilesPerJob': 4 -} - -files = nanoGetSampleFiles(mcDirectory, 'ggZZ2m2t') + \ - nanoGetSampleFiles(mcDirectory, 'ggZZ2e2t') + \ - nanoGetSampleFiles(mcDirectory, 'ggZZ2e2m') + \ - nanoGetSampleFiles(mcDirectory, 'ggZZ4t') + \ - nanoGetSampleFiles(mcDirectory, 'ggZZ4m_ext1') -samples['ggZZ'] = { - 'name': files, - 'weight': mcCommonWeight, - 'FilesPerJob': 4 -} - -### TVX -files = nanoGetSampleFiles(mcDirectory, 'TTZToLLNuNu_M-10') + \ - nanoGetSampleFiles(mcDirectory, 'TTWJetsToLNu') -samples['TTV'] = { - 'name': files, - 'weight': mcCommonWeight, - 'FilesPerJob': 4 -} - -files = nanoGetSampleFiles(mcDirectory, 'tZq_ll') -samples['tZq'] = { - 'name': files, - 'weight': mcCommonWeight, - 'FilesPerJob': 4 -} - -# Vg -files = nanoGetSampleFiles(mcDirectory, 'ZGToLLG') + \ - nanoGetSampleFiles(mcDirectory, 'WGJJ') -samples['Vg'] = { - 'name': files, - 'weight': mcCommonWeightNoMatch + '*!(Gen_ZGstar_mass > 0)', - 'FilesPerJob': 10 -} - -files = nanoGetSampleFiles(mcDirectory, 'ZGToLLG') + \ - nanoGetSampleFiles(mcDirectory, 'WGJJ') + \ - nanoGetSampleFiles(mcDirectory, 'WZTo3LNu_mllmin01') -samples['VgS1'] = { - 'name': files, - 'weight': mcCommonWeight + ' * (gstarLow * 0.94 + gstarHigh * 1.14)', - 'FilesPerJob': 4, - 'subsamples': { - 'L': 'gstarLow', - 'H': 'gstarHigh' - } -} -addSampleWeight(samples, 'VgS1', 'WGJJ', '(Gen_ZGstar_mass > 0 && Gen_ZGstar_mass < 0.1)') -addSampleWeight(samples, 'VgS1', 'ZGToLLG', '(Gen_ZGstar_mass > 0)') -addSampleWeight(samples, 'VgS1', 'WZTo3LNu_mllmin01', '(Gen_ZGstar_mass > 0.1 && Gen_ZGstar_mass<4)') - -# Others -files = nanoGetSampleFiles(mcDirectory, 'WWTo2L2Nu_DoubleScattering') -samples['DPS'] = { - 'name': files, - 'weight': mcCommonWeight, - 'FilesPerJob': 4 -} - -files = nanoGetSampleFiles(mcDirectory, 'ZZZ') + \ - nanoGetSampleFiles(mcDirectory, 'WZZ') + \ - nanoGetSampleFiles(mcDirectory, 'WWZ') + \ - nanoGetSampleFiles(mcDirectory, 'WWW') + \ - nanoGetSampleFiles(mcDirectory, 'WWG') -samples['VVV'] = { - 'name': files, - 'weight': mcCommonWeight, - 'FilesPerJob': 4 -} - -################################################ -############ FAKE SAMPLES ###################### -################################################ - -DataRun = [ - ['A','Run2018A-02Apr2020-v1'] , - ['B','Run2018B-02Apr2020-v1'] , - ['C','Run2018C-02Apr2020-v1'] , - ['D','Run2018D-02Apr2020-v1'] , -] - -DataSets = ['MuonEG','DoubleMuon','SingleMuon','EGamma'] - -DataTrig = { - 'MuonEG' : 'Trigger_ElMu' , - 'DoubleMuon' : '!Trigger_ElMu && Trigger_dblMu' , - 'SingleMuon' : '!Trigger_ElMu && !Trigger_dblMu && Trigger_sngMu' , - 'EGamma' : '!Trigger_ElMu && !Trigger_dblMu && !Trigger_sngMu && (Trigger_sngEl || Trigger_dblEl)' , -} - -fkDirectory = '/eos/user/e/evernazz/nanoAOD_PostProc_ntuple_WZin/Autumn18_102X_nAODv7_Full2018v7/DATAl1loose2018v7__l2loose__fakeW' - -samples['Fake'] = { - 'name': [], - 'weight': 'METFilter_DATA*fakeW', - 'weights': [], - 'isData': ['all'], - 'FilesPerJob': 47 -} -for _, sd in DataRun: - for pd in DataSets: - files = nanoGetSampleFiles(fkDirectory, pd + '_' + sd) - samples['Fake']['name'].extend(files) - samples['Fake']['weights'].extend([DataTrig[pd]] * len(files)) - -################################################ -############ DATA SAMPLES ### ################## -################################################ - -dtDirectory = '/eos/user/e/evernazz/nanoAOD_PostProc_ntuple_WZin/Autumn18_102X_nAODv7_Full2018v7/DATAl1loose2018v7__l2loose__l2tightOR2018v7' - -samples['DATA'] = { - 'name': [], - 'weight': 'METFilter_DATA*LepWPCut', - 'weights': [], - 'isData': ['all'], - 'FilesPerJob': 47 -} - -for _, sd in DataRun: - for pd in DataSets: - files = nanoGetSampleFiles(dtDirectory, pd + '_' + sd) - samples['DATA']['name'].extend(files) - samples['DATA']['weights'].extend([DataTrig[pd]] * len(files)) - - diff --git a/Configurations/VBSlllnu/WZin/conf_WZin_BSM/structure.py b/Configurations/VBSlllnu/WZin/conf_WZin_BSM/structure.py deleted file mode 100755 index f056f92d63..0000000000 --- a/Configurations/VBSlllnu/WZin/conf_WZin_BSM/structure.py +++ /dev/null @@ -1,79 +0,0 @@ -# structure configuration for datacard - -#structure = {} - -# keys here must match keys in samples.py -# - -## Reducible Bkg - -structure['sm'] = {'isSignal' : 1, 'isData' : 0} - -structure['sm_lin_quad_cqq11'] = {'isSignal' : 1, 'isData' : 0} -structure['quad_cqq11'] = {'isSignal' : 1, 'isData' : 0} - -structure['sm_lin_quad_cqq1'] = {'isSignal' : 1, 'isData' : 0} -structure['quad_cqq1'] = {'isSignal' : 1, 'isData' : 0} - -structure['sm_lin_quad_cqq31'] = {'isSignal' : 1, 'isData' : 0} -structure['quad_cqq31'] = {'isSignal' : 1, 'isData' : 0} - -structure['sm_lin_quad_cqq3'] = {'isSignal' : 1, 'isData' : 0} -structure['quad_cqq3'] = {'isSignal' : 1, 'isData' : 0} - -structure['sm_lin_quad_cW'] = {'isSignal' : 1, 'isData' : 0} -structure['quad_cW'] = {'isSignal' : 1, 'isData' : 0} - -structure['sm_lin_quad_cHl3'] = {'isSignal' : 1, 'isData' : 0} -structure['quad_cHl3'] = {'isSignal' : 1, 'isData' : 0} - -structure['sm_lin_quad_cHq3'] = {'isSignal' : 1, 'isData' : 0} -structure['quad_cHq3'] = {'isSignal' : 1, 'isData' : 0} - -structure['sm_lin_quad_cll1'] = {'isSignal' : 1, 'isData' : 0} -structure['quad_cll1'] = {'isSignal' : 1, 'isData' : 0} - -structure['sm_lin_quad_mixed_cqq1_cqq11'] = {'isSignal' : 1, 'isData' : 0} -structure['sm_lin_quad_mixed_cqq1_cqq3'] = {'isSignal' : 1, 'isData' : 0} -# structure['sm_lin_quad_mixed_cqq1_cqq31'] = {'isSignal' : 1, 'isData' : 0} -# structure['sm_lin_quad_mixed_cqq11_cqq3'] = {'isSignal' : 1, 'isData' : 0} -structure['sm_lin_quad_mixed_cqq11_cqq31'] = {'isSignal' : 1, 'isData' : 0} -structure['sm_lin_quad_mixed_cqq3_cqq31'] = {'isSignal' : 1, 'isData' : 0} -structure['sm_lin_quad_mixed_cW_cqq1'] = {'isSignal' : 1, 'isData' : 0} -structure['sm_lin_quad_mixed_cW_cqq11'] = {'isSignal' : 1, 'isData' : 0} -structure['sm_lin_quad_mixed_cW_cqq3'] = {'isSignal' : 1, 'isData' : 0} -structure['sm_lin_quad_mixed_cW_cqq31'] = {'isSignal' : 1, 'isData' : 0} -# structure['sm_lin_quad_mixed_cW_cll1'] = {'isSignal' : 1, 'isData' : 0} -structure['sm_lin_quad_mixed_cll1_cqq1'] = {'isSignal' : 1, 'isData' : 0} -structure['sm_lin_quad_mixed_cll1_cqq11'] = {'isSignal' : 1, 'isData' : 0} -structure['sm_lin_quad_mixed_cll1_cqq3'] = {'isSignal' : 1, 'isData' : 0} -structure['sm_lin_quad_mixed_cll1_cqq31'] = {'isSignal' : 1, 'isData' : 0} -structure['sm_lin_quad_mixed_cHq3_cqq1'] = {'isSignal' : 1, 'isData' : 0} -structure['sm_lin_quad_mixed_cHq3_cqq11'] = {'isSignal' : 1, 'isData' : 0} -structure['sm_lin_quad_mixed_cHq3_cqq3'] = {'isSignal' : 1, 'isData' : 0} -structure['sm_lin_quad_mixed_cHq3_cqq31'] = {'isSignal' : 1, 'isData' : 0} -structure['sm_lin_quad_mixed_cHq3_cll1'] = {'isSignal' : 1, 'isData' : 0} -structure['sm_lin_quad_mixed_cHq3_cW'] = {'isSignal' : 1, 'isData' : 0} -# structure['sm_lin_quad_mixed_cHl3_cqq1'] = {'isSignal' : 1, 'isData' : 0} -# structure['sm_lin_quad_mixed_cHl3_cqq11'] = {'isSignal' : 1, 'isData' : 0} -# structure['sm_lin_quad_mixed_cHl3_cqq3'] = {'isSignal' : 1, 'isData' : 0} -# structure['sm_lin_quad_mixed_cHl3_cqq31'] = {'isSignal' : 1, 'isData' : 0} -# structure['sm_lin_quad_mixed_cHl3_cll1'] = {'isSignal' : 1, 'isData' : 0} -# structure['sm_lin_quad_mixed_cHl3_cW'] = {'isSignal' : 1, 'isData' : 0} -# structure['sm_lin_quad_mixed_cHl3_cHq3'] = {'isSignal' : 1, 'isData' : 0} - -structure['SSWW'] = {'isSignal' : 0, 'isData' : 0} -structure['WpWp_QCD'] = {'isSignal' : 0, 'isData' : 0} -structure['WZ_QCD'] = {'isSignal' : 0, 'isData' : 0} -structure['ZZ4L'] = {'isSignal' : 0, 'isData' : 0} -structure['ggZZ'] = {'isSignal' : 0, 'isData' : 0} -structure['TTV'] = {'isSignal' : 0, 'isData' : 0} -structure['tZq'] = {'isSignal' : 0, 'isData' : 0} -structure['Vg'] = {'isSignal' : 0, 'isData' : 0} -structure['VgS1_L'] = {'isSignal' : 0, 'isData' : 0} -structure['VgS1_H'] = {'isSignal' : 0, 'isData' : 0} -structure['DPS'] = {'isSignal' : 0, 'isData' : 0} -structure['VVV'] = {'isSignal' : 0, 'isData' : 0} - -structure['Fake'] = {'isSignal' : 0, 'isData' : 0} -structure['DATA'] = {'isSignal' : 0, 'isData' : 1} diff --git a/Configurations/VBSlllnu/WZin/conf_WZin_BSM/total_nuisances.py b/Configurations/VBSlllnu/WZin/conf_WZin_BSM/total_nuisances.py deleted file mode 100755 index b1ccac527e..0000000000 --- a/Configurations/VBSlllnu/WZin/conf_WZin_BSM/total_nuisances.py +++ /dev/null @@ -1,341 +0,0 @@ - -# nuisances -from LatinoAnalysis.Tools.commonTools import getSampleFiles, getBaseW, addSampleWeight - -def nanoGetSampleFiles(inputDir, Sample): - return getSampleFiles(inputDir, Sample, False, 'nanoLatino_') - -try: - mc = [skey for skey in samples if skey != 'DATA' and not skey.startswith('Fake')] -except NameError: - mc = [] - cuts = {} - nuisances = {} - def makeMCDirectory(x=''): - return '' - -#### Luminosity - -#nuisances['lumi'] = { -# 'name': 'lumi_13TeV_2018', -# 'type': 'lnN', -# 'samples': dict((skey, '1.025') for skey in mc if skey not in ['WW', 'top', 'DY']) -#} - -nuisances['lumi_Uncorrelated'] = { - 'name': 'lumi_13TeV_2018', - 'type': 'lnN', - 'samples': dict((skey, '1.015') for skey in mc if skey not in ['WW', 'Top', 'DY', 'Higgs']) -} - -nuisances['lumi_XYFact'] = { - 'name': 'lumi_13TeV_XYFact', - 'type': 'lnN', - 'samples': dict((skey, '1.02') for skey in mc if skey not in ['WW', 'Top', 'DY', 'Higgs']) -} - -nuisances['lumi_LScale'] = { - 'name': 'lumi_13TeV_LSCale', - 'type': 'lnN', - 'samples': dict((skey, '1.002') for skey in mc if skey not in ['WW', 'Top', 'DY', 'Higgs']) -} - -nuisances['lumi_CurrCalib'] = { - 'name': 'lumi_13TeV_CurrCalib', - 'type': 'lnN', - 'samples': dict((skey, '1.002') for skey in mc if skey not in ['WW', 'Top', 'DY', 'Higgs']) -} - -#### FAKES - -## FIXME: check the 30% lnN -nuisances['fake_syst'] = { - 'name': 'CMS_fake_syst', - 'type': 'lnN', - 'samples': { - 'Fake': '1.3' - }, - #'perRecoBin': True -} - -nuisances['fake_ele'] = { - 'name': 'CMS_fake_e_2018', - 'kind': 'weight', - 'type': 'shape', - 'samples': { - 'Fake': ['fakeWEleUp', 'fakeWEleDown'], - } -} - -nuisances['fake_ele_stat'] = { - 'name': 'CMS_fake_stat_e_2018', - 'kind': 'weight', - 'type': 'shape', - 'samples': { - 'Fake': ['fakeWStatEleUp', 'fakeWStatEleDown'] - } -} - -nuisances['fake_mu'] = { - 'name': 'CMS_fake_m_2018', - 'kind': 'weight', - 'type': 'shape', - 'samples': { - 'Fake': ['fakeWMuUp', 'fakeWMuDown'], - } -} - -nuisances['fake_mu_stat'] = { - 'name': 'CMS_fake_stat_m_2018', - 'kind': 'weight', - 'type': 'shape', - 'samples': { - 'Fake': ['fakeWStatMuUp', 'fakeWStatMuDown'], - } -} - -##### B-tagger - -for shift in ['jes', 'lf', 'hf', 'hfstats1', 'hfstats2', 'lfstats1', 'lfstats2', 'cferr1', 'cferr2']: - btag_syst = ['(btagSF%sup)/(btagSF)' % shift, '(btagSF%sdown)/(btagSF)' % shift] - - name = 'CMS_btag_%s' % shift - if 'stats' in shift: - name += '_2018' - - nuisances['btag_shape_%s' % shift] = { - 'name': name, - 'kind': 'weight', - 'type': 'shape', - 'samples': dict((skey, btag_syst) for skey in mc), - } - -##### Trigger Efficiency - -trig_syst = ['((TriggerEffWeight_2l_u)/(TriggerEffWeight_2l))*(TriggerEffWeight_2l>0.02) + (TriggerEffWeight_2l<=0.02)', '(TriggerEffWeight_2l_d)/(TriggerEffWeight_2l)'] - -nuisances['trigg'] = { - 'name': 'CMS_eff_hwwtrigger_2018', - 'kind': 'weight', - 'type': 'shape', - 'samples': dict((skey, trig_syst) for skey in mc) -} - -##### Electron Efficiency and energy scale - -nuisances['eff_e'] = { - 'name': 'CMS_eff_e_2018', - 'kind': 'weight', - 'type': 'shape', - 'samples': dict((skey, ['SFweightEleUp', 'SFweightEleDown']) for skey in mc) -} -nuisances['electronpt'] = { - 'name': 'CMS_scale_e_2018', - 'kind': 'suffix', - 'type': 'shape', - 'mapUp': 'ElepTup', - 'mapDown': 'ElepTdo', - 'samples': dict((skey, ['1', '1']) for skey in mc), - 'folderUp': makeMCDirectory('ElepTup_suffix'), - 'folderDown': makeMCDirectory('ElepTdo_suffix'), -} - - -##### Muon Efficiency and energy scale - -nuisances['eff_m'] = { - 'name': 'CMS_eff_m_2018', - 'kind': 'weight', - 'type': 'shape', - 'samples': dict((skey, ['SFweightMuUp', 'SFweightMuDown']) for skey in mc) -} - -nuisances['muonpt'] = { - 'name': 'CMS_scale_m_2018', - 'kind': 'suffix', - 'type': 'shape', - 'mapUp': 'MupTup', - 'mapDown': 'MupTdo', - 'samples': dict((skey, ['1', '1']) for skey in mc), - 'folderUp': makeMCDirectory('MupTup_suffix'), - 'folderDown': makeMCDirectory('MupTdo_suffix'), -} -##### Jet energy scale - -nuisances['jes'] = { - 'name': 'CMS_scale_j_2018', - 'kind': 'suffix', - 'type': 'shape', - 'mapUp': 'JESup', - 'mapDown': 'JESdo', - 'samples': dict((skey, ['1', '1']) for skey in mc if skey not in ['tZq']), - 'folderUp': makeMCDirectory('JESTotalup_suffix'), - 'folderDown': makeMCDirectory('JESTotaldo_suffix'), -} -##### MET energy scale - -nuisances['met'] = { - 'name': 'CMS_scale_met_2018', - 'kind': 'suffix', - 'type': 'shape', - 'mapUp': 'METup', - 'mapDown': 'METdo', - 'samples': dict((skey, ['1', '1']) for skey in mc), - 'folderUp': makeMCDirectory('METup_suffix'), - 'folderDown': makeMCDirectory('METdo_suffix'), -} -##### Pileup - -nuisances['PU'] = { - 'name': 'CMS_PU_2018', - 'kind': 'weight', - 'type': 'shape', - 'samples': dict((skey, ['(puWeightUp/puWeight)', '(puWeightDown/puWeight)']) for skey in mc), -} -# EW corrections -nuisances['EW_correction'] = { - 'name': 'EW_correction', - 'kind': 'weight', - 'type': 'shape', - 'samples': { - 'LL': ['(EW_weight_up/EW_weight)', '(EW_weight_do/EW_weight)'], - 'TL': ['(EW_weight_up/EW_weight)', '(EW_weight_do/EW_weight)'], - 'TT': ['(EW_weight_up/EW_weight)', '(EW_weight_do/EW_weight)'], - }, -} -#qcd scale -nuisances['QCDscale_LL'] = { - 'name': 'QCDscale_LL', - 'kind': 'weight', - 'type': 'shape', - 'samples': { - 'LL': ['ScaleW_up', 'ScaleW_do'], - 'LL2': ['ScaleW_up', 'ScaleW_do'], - }, -} -nuisances['QCDscale_TL'] = { - 'name': 'QCDscale_TL', - 'kind': 'weight', - 'type': 'shape', - 'samples': { - 'TL': ['ScaleW_up', 'ScaleW_do'], - 'TL2': ['ScaleW_up', 'ScaleW_do'], - }, -} -nuisances['QCDscale_TT'] = { - 'name': 'QCDscale_TT', - 'kind': 'weight', - 'type': 'shape', - 'samples': { - 'TT': ['ScaleW_up', 'ScaleW_do'], - 'TT2': ['ScaleW_up', 'ScaleW_do'], - }, -} -# pdf scale -nuisances['pdfscale_LL'] = { - 'name': 'pdfscale_LL', - 'type': 'lnN', - 'samples': { - 'LL': '1.00028', - 'LL2': '1.00028', - }, -} -nuisances['pdfscale_TL'] = { - 'name': 'pdfscale_TL', - 'type': 'lnN', - 'samples': { - 'TL': '1.00035', - 'TL2': '1.00035', - }, -} -nuisances['pdfscale_TT'] = { - 'name': 'pdfscale_TT', - 'type': 'lnN', - 'samples': { - 'TT': '1.0012', - 'TT2': '1.0012', - }, -} - -variations = ['LHEScaleWeight[%d]' % i for i in [0,1,3,5,7,8]] - -nuisances['QCDscale'] = { - 'name': 'QCDscale', - 'skipCMS': 1, - 'kind': 'weight_envelope', - 'type': 'shape', - 'samples': { - 'WpWp_QCD': variations, - 'WZ_QCD': variations, - }, -} - -variations = ['LHEPdfWeight[%d]' % i for i in range(0,33)] - -nuisances['pdf'] = { - 'name': 'pdf', - 'skipCMS': 1, - 'kind': 'weight_envelope', - 'type': 'shape', - 'samples': { - 'WZ_QCD': variations, - 'WpWp_QCD': variations, - }, -} - -#nuisances['TLscale2018'] = { -# 'name' : 'TLscale2018', -# 'samples' : { -# 'TL' : '1.00', # change sample name -# }, -# 'type' : 'rateParam', -#} -#nuisances['TTscale2018'] = { -# 'name' : 'TTscale2018', -# 'samples' : { -# 'TT' : '1.00', # change sample name -# }, -# 'type' : 'rateParam', -#} -nuisances['WZscale2018'] = { - 'name' : 'WZscale2018', - 'samples' : { - 'WZ_QCD' : '1.00', # change sample name - }, - 'type' : 'rateParam', -} -nuisances['tZqscale2018'] = { - 'name' : 'tZqscale2018', - 'samples' : { - 'tZq' : '1.00', # change sample name - }, - 'type' : 'rateParam', -} -nuisances['ZZscale2018'] = { - 'name' : 'ZZscale2018', - 'samples' : { - 'ZZ4L' : '1.00', # change sample name - }, - 'type' : 'rateParam', -} -# statistical fluctuation -# on MC/data -# "stat" is a special word to identify this nuisance -# Use the following if you want to apply the automatic combine MC stat nuisances->Faster than bin-by-bin -nuisances['stat'] = { - 'type' : 'auto', - 'maxPoiss' : '10', - 'includeSignal' : '1', - 'samples' : {} -} -# Differnt type of uncentainties: type->ln N: (modify only event yeld) use a lognorm distributions with sigma = uncertainty. For normalization rateParam -# can be used--> use a uniform distribution; -# Shape: modify not only the events yelds but the event selection too (the shape) will run the varied shapes -# according to the following two possible kinds -# kind-> weight: Use the specified weight to reweight events; -# tree: uses the provided alternative trees; -# The MC statistics is a particular uncertainty: is caused by our finite statistics used to elaborate the template fits. Two approach: unfied and bin-by-bin (bbb) -for n in nuisances.values(): - n['skipCMS'] = 1 - -print ' '.join(nuis['name'] for nname, nuis in nuisances.iteritems() if nname not in ('lumi', 'stat')) diff --git a/Configurations/VBSlllnu/WZin/conf_WZin_BSM/variables.py b/Configurations/VBSlllnu/WZin/conf_WZin_BSM/variables.py deleted file mode 100755 index 716c042633..0000000000 --- a/Configurations/VBSlllnu/WZin/conf_WZin_BSM/variables.py +++ /dev/null @@ -1,181 +0,0 @@ -# variables - -# variables = {} - -# 'fold' : # 0 = not fold (default), 1 = fold underflowbin, 2 = fold overflow bin, 3 = fold underflow and overflow - -variables['nJet'] = { - 'name' : 'Sum$(CleanJet_pt>30)', - 'range' : (4,0,4), - 'xaxis' : 'njets', - 'fold' : 3 -} - -variables['mll'] = { - 'name' : 'mll', - 'range' : (12,20.,300), - 'xaxis' : 'mll [GeV]', - 'fold' : 3 -} - -variables['mllZ'] = { - 'name' : 'wzeu_var[1]', - 'range' : (10,80.,100), - 'xaxis' : 'mll Z [GeV]', - 'fold' : 3 -} - -variables['ptl1'] = { - 'name' : 'Alt$(Lepton_pt[0],-9999.)', - 'range' : (15,30,350), - 'xaxis' : 'p_{T} 1st lep [GeV]', - 'fold' : 3 -} - -variables['ptl1Z'] = { - 'name' : 'wzeu_var[3]', - 'range' : (15,25,350), - 'xaxis' : 'p_{T} 1st lep Z [GeV]', - 'fold' : 3 -} - -variables['ptl2'] = { - 'name' : 'Alt$(Lepton_pt[1],-9999.)', - 'range' : (15,20,200), - 'xaxis' : 'p_{T} 2nd lep [GeV]', - 'fold' : 3 -} - -variables['ptl2Z'] = { - 'name' : 'wzeu_var[4]', - 'range' : (10,10,100), - 'xaxis' : 'p_{T} 2nd lep Z [GeV]', - 'fold' : 3 -} - - -variables['ptl3'] = { - 'name' : 'Alt$(Lepton_pt[2],-9999.)', - 'range' : (12,10,90), - 'xaxis' : 'p_{T} 3rd lep [GeV]', - 'fold' : 3 -} - -variables['ptlW'] = { - 'name' : 'wzeu_var[5]', - 'range' : (10,10,150), - 'xaxis' : 'p_{T} lep W [GeV]', - 'fold' : 3 -} - -variables['etal1'] = { - 'name' : 'Alt$(Lepton_eta[0],-9999.)', - 'range' : (12,-2.,2.), - 'xaxis' : 'eta lep1', - 'fold' : 3 -} - -variables['etal1Z'] = { - 'name' : 'wzeu_var[6]', - 'range' : (15,-2.,2.), - 'xaxis' : 'eta lep1 Z', - 'fold' : 3 -} - -variables['etal2'] = { - 'name' : 'Alt$(Lepton_eta[1],-9999.)', - 'range' : (12,-2.,2.), - 'xaxis' : 'eta lep2', - 'fold' : 3 -} - -variables['etal2Z'] = { - 'name' : 'wzeu_var[7]', - 'range' : (15,-2.,2.), - 'xaxis' : 'eta lep2 Z', - 'fold' : 3 -} - -variables['etal3'] = { - 'name' : 'Alt$(Lepton_eta[2],-9999.)', - 'range' : (12,-2.,2.), - 'xaxis' : 'eta lep3', - 'fold' : 3 -} - -variables['etalW'] = { - 'name' : 'wzeu_var[8]', - 'range' : (10,-2.,2.), - 'xaxis' : 'eta lep W', - 'fold' : 3 -} - -variables['mjj'] = { - 'name' : 'mjj', - 'range' : ([400,500,600,700,800,900,1000,1100,1200,1400,1600,2000,2500,3000],), - 'xaxis' : 'mjj [GeV]', - 'fold' : 3 -} - -variables['ptj1'] = { - 'name' : 'Alt$(CleanJet_pt[0],-9999.)', - 'range' : (8,50,450), - 'xaxis' : 'p_{T} 1st jet [GeV]', - 'fold' : 3 -} - -variables['ptj2'] = { - 'name' : 'Alt$(CleanJet_pt[1],-9999.)', - 'range' : (8,35,200), - 'xaxis' : 'p_{T} 2nd jet [GeV]', - 'fold' : 3 -} - -variables['etaj1'] = { - 'name' : 'Alt$(CleanJet_eta[0],-9999.)', - 'range' : (10,-4,4), - 'xaxis' : 'eta j1', - 'fold' : 3 -} - -variables['etaj2'] = { - 'name' : 'Alt$(CleanJet_eta[1],-9999.)', - 'range' : (10,-4,4), - 'xaxis' : 'eta j2', - 'fold' : 3 -} - -variables['detajj'] = { - 'name' : 'detajj', - 'range' : (15,1.5,6.5), - 'xaxis' : 'deta jj', - 'fold' : 3 -} - -variables['dphijj'] = { - 'name' : 'dphijj', - 'range' : (15,0.0,3.141592), - 'xaxis' : 'dphi jj', - 'fold' : 3 -} - -variables['met'] = { - 'name' : 'MET_pt', - 'range' : (12,20,200), - 'xaxis' : 'met [GeV]', - 'fold' : 3 -} - -variables['Zlep1'] = { - 'name' : 'zlep1', - 'range': (15,-1.,1.), - 'xaxis' : 'Z^{lep}_{1}', - 'fold' : 3 -} - -variables['Zlep2'] = { - 'name': 'zlep2', - 'range': (15,-1.,1.), - 'xaxis': 'Z^{lep}_{2}', - 'fold': 3 -} diff --git a/Configurations/VBSlllnu/WZin/conf_WZin_QCD/aliases.py b/Configurations/VBSlllnu/WZin/conf_WZin_QCD/aliases.py deleted file mode 100755 index c993313953..0000000000 --- a/Configurations/VBSlllnu/WZin/conf_WZin_QCD/aliases.py +++ /dev/null @@ -1,279 +0,0 @@ -import inspect -import os - -configurations = os.path.realpath(inspect.getfile(inspect.currentframe())) # this file -configurations = os.path.dirname(configurations) # Full2017 -configurations = os.path.dirname(configurations) # ggH -configurations = os.path.dirname(configurations) # Configurations - -#aliases = {} -bAlgo = 'DeepB' -bWP = '0.4184' - -mc = [skey for skey in samples if skey not in ('Fake','DATA')] - -aliases['wzinc'] = { - 'linesToAdd': ['.L %s/macros/wzinc.cc+' % configurations], - 'class': 'Wzinc', -} - -aliases['wzinc1'] = { - 'linesToAdd': ['.L %s/macros/wzinc1.cc+' % configurations], - 'class': 'Wzinc1', -} - -aliases['wzeu_var'] = { - 'linesToAdd': [ - 'gSystem->Load("libLatinoAnalysisMultiDraw.so")', - '.L {}/macros/wzeu.cc+'.format(configurations) - ], - 'class': 'WZeu', - 'args': (), -} - -# tau veto -aliases['tauVeto_wz'] = { - 'expr': '(Sum$(Tau_pt > 18 && abs(Tau_eta)<2.3 && (Tau_idMVAoldDM2017v2>> 1 & 1) && Tau_idDecayMode &&sqrt( pow(Tau_eta - Lepton_eta[0], 2) + pow(abs(abs(Tau_phi - Lepton_phi[0])-pi)-pi, 2) ) >= 0.4 && sqrt( pow(Tau_eta - Lepton_eta[1], 2) + pow(abs(abs(Tau_phi - Lepton_phi[1])-pi)-pi, 2) ) >= 0.4 && sqrt( pow(Tau_eta - Lepton_eta[2], 2) + pow(abs(abs(Tau_phi - Lepton_phi[2])-pi)-pi, 2) ) >= 0.4) == 0)' -} -aliases['softmuon_veto']={ - 'expr':'(Sum$(abs(Muon_dxy)<0.02 && abs(Muon_dz)<0.1 && Muon_softId && Muon_pt>5 && abs(Muon_eta)<2.4 && sqrt( pow(Muon_eta - Lepton_eta[0], 2) + pow(abs(abs(Muon_phi - Lepton_phi[0])-pi)-pi, 2) ) >= 0.4 && sqrt( pow(Muon_eta - Lepton_eta[1], 2) + pow(abs(abs(Muon_phi - Lepton_phi[1])-pi)-pi, 2) ) >= 0.4)==0)' -} - -eleWP = 'mvaFall17V1Iso_WP90_SS' - -muWP = 'cut_Tight_HWWW' - -aliases['LepWPCut'] = { - 'expr': 'LepCut3l__ele_'+eleWP+'__mu_'+muWP, - 'samples': mc + ['DATA'] -} -aliases['gstarLow'] = { - 'expr': 'Gen_ZGstar_mass >0 && Gen_ZGstar_mass < 4', - 'samples': ['VgS','VgS1','VgS2'] -} - -aliases['gstarHigh'] = { - 'expr': 'Gen_ZGstar_mass <0 || Gen_ZGstar_mass > 4', - 'samples': ['VgS','VgS1','VgS2'] -} -# Fake leptons transfer factor -aliases['fakeW'] = { - #'expr': 'fakeW2l_ele_'+eleWP+'_mu_'+muWP, - 'expr': 'fakeW_ele_'+eleWP+'_mu_'+muWP+'_3l', - 'samples': ['Fake'] -} -# And variations - already divided by central values in formulas ! -aliases['fakeW'] = { - #'expr': 'fakeW2l_ele_'+eleWP+'_mu_'+muWP, - 'expr': 'fakeW_ele_'+eleWP+'_mu_'+muWP+'_3l', - 'samples': ['Fake'] -} -# And variations - already divided by central values in formulas ! -aliases['fakeWEleUp'] = { - #'expr': 'fakeW2l_ele_'+eleWP+'_mu_'+muWP+'_EleUp', - 'expr': 'fakeW_ele_'+eleWP+'_mu_'+muWP+'_3lElUp', - 'samples': ['Fake'] -} -aliases['fakeWEleDown'] = { - #'expr': 'fakeW2l_ele_'+eleWP+'_mu_'+muWP+'_EleDown', - 'expr': 'fakeW_ele_'+eleWP+'_mu_'+muWP+'_3lElDown', - 'samples': ['Fake'] -} -aliases['fakeWMuUp'] = { - #'expr': 'fakeW2l_ele_'+eleWP+'_mu_'+muWP+'_MuUp', - 'expr': 'fakeW_ele_'+eleWP+'_mu_'+muWP+'_3lMuUp', - 'samples': ['Fake'] -} -aliases['fakeWMuDown'] = { - #'expr': 'fakeW2l_ele_'+eleWP+'_mu_'+muWP+'_MuDown', - 'expr': 'fakeW_ele_'+eleWP+'_mu_'+muWP+'_3lMuDown', - 'samples': ['Fake'] -} -aliases['fakeWStatEleUp'] = { - #'expr': 'fakeW2l_ele_'+eleWP+'_mu_'+muWP+'_statEleUp', - 'expr': 'fakeW_ele_'+eleWP+'_mu_'+muWP+'_3lstatElUp', - 'samples': ['Fake'] -} -aliases['fakeWStatEleDown'] = { - #'expr': 'fakeW2l_ele_'+eleWP+'_mu_'+muWP+'_statEleDown', - 'expr': 'fakeW_ele_'+eleWP+'_mu_'+muWP+'_3lstatElDown', - 'samples': ['Fake'] -} -aliases['fakeWStatMuUp'] = { - #'expr': 'fakeW2l_ele_'+eleWP+'_mu_'+muWP+'_statMuUp', - 'expr': 'fakeW_ele_'+eleWP+'_mu_'+muWP+'_3lstatMuUp', - 'samples': ['Fake'] -} -aliases['fakeWStatMuDown'] = { - #'expr': 'fakeW2l_ele_'+eleWP+'_mu_'+muWP+'_statMuDown', - 'expr': 'fakeW_ele_'+eleWP+'_mu_'+muWP+'_3lstatMuDown', - 'samples': ['Fake'] -} -# gen-matching to prompt only (GenLepMatch2l matches to *any* gen lepton) -aliases['PromptGenLepMatch2l'] = { - 'expr': 'Alt$(Lepton_promptgenmatched[0]*Lepton_promptgenmatched[1], 0)', - 'samples': mc -} -aliases['PromptGenLepMatch3l'] = { - 'expr': 'Alt$(Lepton_promptgenmatched[0]*Lepton_promptgenmatched[1]*Lepton_promptgenmatched[2], 0)', - 'samples': mc -} -# PostProcessing did not create (anti)topGenPt for ST samples with _ext1 -lastcopy = (1 << 13) - -aliases['isTTbar'] = { - 'expr': 'Sum$(TMath::Abs(GenPart_pdgId) == 6 && TMath::Odd(GenPart_statusFlags / %d)) == 2' % lastcopy, - 'samples': ['top'] -} - -aliases['isSingleTop'] = { - 'expr': 'Sum$(TMath::Abs(GenPart_pdgId) == 6 && TMath::Odd(GenPart_statusFlags / %d)) == 1' % lastcopy, - 'samples': ['top'] -} - -aliases['Top_pTrw'] = { - 'expr': 'isTTbar * (TMath::Sqrt(TMath::Exp(0.0615 - 0.0005 * topGenPtOTF) * TMath::Exp(0.0615 - 0.0005 * antitopGenPtOTF))) + isSingleTop', - 'samples': ['top'] -} - -#bjet -# No jet with pt > 30 GeV -aliases['zeroJet'] = { - 'expr': 'Alt$(CleanJet_pt[0], 0) < 30.' -} - -# ==1 jet with pt > 30 GeV -aliases['oneJet'] = { - 'expr': 'Alt$(CleanJet_pt[0], 0) >= 30. && Alt$(CleanJet_pt[1], 0) < 30.' -} - -# ==2 jets with pt > 30 GeV -aliases['twoJet'] = { - 'expr': 'Alt$(CleanJet_pt[0], 0) >= 30. && Alt$(CleanJet_pt[1], 0) >= 30. && Alt$(CleanJet_pt[2], 0) < 30.' -} - -# >=2 jets with pt > 30 GeV -aliases['twoJetOrMore'] = { - 'expr': 'Alt$(CleanJet_pt[0], 0) >= 30. && Alt$(CleanJet_pt[1], 0) >= 30.' -} - -aliases['bVeto'] = { - 'expr': 'Sum$(CleanJet_pt > 20. && abs(CleanJet_eta) < 2.5 && Jet_btagDeepB[CleanJet_jetIdx] > 0.4184) == 0' -} - -aliases['bReq'] = { - 'expr': 'Sum$(CleanJet_pt > 30. && abs(CleanJet_eta) < 2.5 && Jet_btagDeepB[CleanJet_jetIdx] > 0.4184) >= 1' -} - -aliases['btag0'] = { - 'expr': 'zeroJet && !bVeto' -} - -aliases['btag1'] = { - 'expr': 'oneJet && bReq' -} - -aliases['btag2'] = { - 'expr': 'twoJet && bReq' -} - -# lepton eta range -aliases['lep0eta']={ - 'expr': '((abs(Alt$(Lepton_pdgId[0],-9999))==11 && abs(Alt$(Lepton_eta[0],-9999.)) <2.5) || (abs(Alt$(Lepton_pdgId[0],-9999))==13 && abs(Alt$(Lepton_eta[0],-9999.)) <2.4))' -} -aliases['lep1eta']={ - 'expr': '((abs(Alt$(Lepton_pdgId[1],-9999))==11 && abs(Alt$(Lepton_eta[1],-9999.)) <2.5) || (abs(Alt$(Lepton_pdgId[1],-9999))==13 && abs(Alt$(Lepton_eta[1],-9999.)) <2.4))' -} -aliases['jetpt30']={ - 'expr': 'Alt$(CleanJet_pt[0],-9999.) >30 && Alt$(CleanJet_pt[1],-9999.) >30 && abs(Alt$(CleanJet_eta[0],-9999.)) < 4.7&& abs(Alt$(CleanJet_eta[1],-9999.)) < 4.7' -} -aliases['jetpt50']={ - 'expr': 'Alt$(CleanJet_pt[0],-9999.) >50 && Alt$(CleanJet_pt[1],-9999.) >50 && abs(Alt$(CleanJet_eta[0],-9999.)) < 4.7&& abs(Alt$(CleanJet_eta[1],-9999.)) < 4.7' -} -aliases['jetpt_opt']={ - 'expr': 'Alt$(CleanJet_pt[0],-9999.) >50 && Alt$(CleanJet_pt[1],-9999.) >35 && abs(Alt$(CleanJet_eta[0],-9999.)) < 4.7&& abs(Alt$(CleanJet_eta[1],-9999.)) < 4.7' -} - -aliases['leppt0']={ - 'expr': 'Alt$(Lepton_pt[0],-9999.) >25 && Alt$(Lepton_pt[1],-9999.) >20' -} -aliases['leppt1']={ - 'expr': 'Alt$(Lepton_pt[0],-9999.) >30 && Alt$(Lepton_pt[1],-9999.) >30' -} -# -3.2-3.2 && Alt$(CleanJet_eta[0],-9999.)<-1.3 && Alt$(CleanJet_phi[0],-9999.)>-1.57 && Alt$(CleanJet_phi[0],-9999.)<-0.87) || \ - (Alt$(CleanJet_eta[1],-9999.)>-3.2 && Alt$(CleanJet_eta[1],-9999.)<-1.3 && Alt$(CleanJet_phi[1],-9999.)>-1.57 && Alt$(CleanJet_phi[1],-9999.)<-0.87)' -} -# ssww region -aliases['zlep_wz']={ - 'expr': 'abs((Alt$(Lepton_eta[0],-9999.) - (Alt$(CleanJet_eta[0],-9999.)+Alt$(CleanJet_eta[1],-9999.))/2)/detajj) < 1 && abs((Alt$(Lepton_eta[1],-9999.) - (Alt$(CleanJet_eta[0],-9999.)+Alt$(CleanJet_eta[1],-9999.))/2)/detajj) < 1 && abs((Alt$(Lepton_eta[2],-9999.) - (Alt$(CleanJet_eta[0],-9999.)+Alt$(CleanJet_eta[1],-9999.))/2)/detajj) <1' -} - -aliases['zveto_ww']={ - 'expr': '(abs(Alt$(Lepton_pdgId[0],-9999)) * abs(Alt$(Lepton_pdgId[1],-9999)) != 11*11 || abs(mll - 91.1876) > 15)' -} - -aliases['bVetoSF'] = { - 'expr': 'TMath::Exp(Sum$(TMath::Log((CleanJet_pt>20 && abs(CleanJet_eta)<2.5)*Jet_btagSF_deepcsv_shape[CleanJet_jetIdx]+1*(CleanJet_pt<20 || abs(CleanJet_eta)>2.5))))', - 'samples': mc -} - -aliases['btag0SF'] = { - 'expr': 'TMath::Exp(Sum$(TMath::Log((CleanJet_pt>20 && CleanJet_pt<30 && abs(CleanJet_eta)<2.5)*Jet_btagSF_deepcsv_shape[CleanJet_jetIdx]+1*(CleanJet_pt<20 || CleanJet_pt>30 || abs(CleanJet_eta)>2.5))))', - 'samples': mc -} - -aliases['btagnSF'] = { - 'expr': 'TMath::Exp(Sum$(TMath::Log((CleanJet_pt>30 && abs(CleanJet_eta)<2.5)*Jet_btagSF_deepcsv_shape[CleanJet_jetIdx] + (CleanJet_pt<30 || abs(CleanJet_eta)>2.5))))', - 'samples': mc -} - -aliases['btagSF'] = { - 'expr': 'bVetoSF*bVeto + btag0SF*btag0 + btagnSF*(btag1 + btag2) + (!bVeto && !btag0 && !btag1 && !btag2)', - 'samples': mc -} - -for shift in ['jes','lf','hf','lfstats1','lfstats2','hfstats1','hfstats2','cferr1','cferr2']: - for targ in ['bVeto', 'btag0', 'btagn']: - alias = aliases['%sSF%sup' % (targ, shift)] = copy.deepcopy(aliases['%sSF' % targ]) - alias['expr'] = alias['expr'].replace('btagSF_shape', 'btagSF_shape_up_%s' % shift) - - alias = aliases['%sSF%sdown' % (targ, shift)] = copy.deepcopy(aliases['%sSF' % targ]) - alias['expr'] = alias['expr'].replace('btagSF_shape', 'btagSF_shape_down_%s' % shift) - - aliases['btagSF%sup' % shift] = { - 'expr': 'bVetoSF{shift}up*bVeto + btag0SF{shift}up*btag0 + btagnSF{shift}up*(btag1 + btag2) + (!bVeto && !btag0 && !btag1 && !btag2)'.format(shift = shift), - 'samples': mc - } - - aliases['btagSF%sdown' % shift] = { - 'expr': 'bVetoSF{shift}down*bVeto + btag0SF{shift}down*btag0 + btagnSF{shift}down*(btag1 + btag2) + (!bVeto && !btag0 && !btag1 && !btag2)'.format(shift = shift), - 'samples': mc - } - -# data/MC scale factors -aliases['SFweight'] = { - 'expr': ' * '.join(['SFweight3l','LepSF3l__ele_' + eleWP + '__mu_' + muWP, 'LepWPCut','XSWeight','METFilter_MC','btagSF']), #bveto_sf*lep_sf*trig_sf*mu_roc_sf - #'expr': 'LepWPCut', - 'samples': mc -} -# variations -aliases['SFweightEleUp'] = { - 'expr': 'LepSF3l__ele_'+eleWP+'__Up', - 'samples': mc -} -aliases['SFweightEleDown'] = { - 'expr': 'LepSF3l__ele_'+eleWP+'__Do', - 'samples': mc -} -aliases['SFweightMuUp'] = { - 'expr': 'LepSF3l__mu_'+muWP+'__Up', - 'samples': mc -} -aliases['SFweightMuDown'] = { - 'expr': 'LepSF3l__mu_'+muWP+'__Do', - 'samples': mc -} -aliases['zlep1'] = {'expr' : '(Alt$(Lepton_eta[0],-9999.) - (Alt$(CleanJet_eta[0],-9999.)+Alt$(CleanJet_eta[1],-9999.))/2)/detajj'} -aliases['zlep2'] = {'expr' : '(Alt$(Lepton_eta[1],-9999.) - (Alt$(CleanJet_eta[0],-9999.)+Alt$(CleanJet_eta[1],-9999.))/2)/detajj'} diff --git a/Configurations/VBSlllnu/WZin/conf_WZin_QCD/configuration.py b/Configurations/VBSlllnu/WZin/conf_WZin_QCD/configuration.py deleted file mode 100755 index 4cb61d044b..0000000000 --- a/Configurations/VBSlllnu/WZin/conf_WZin_QCD/configuration.py +++ /dev/null @@ -1,46 +0,0 @@ -#example of configuration file -treeName= 'Events' - -#date='_Nov252018_ptll' -date='_l3_2018' - -tag = 'VBS_WZin_'+date+'_QCD' - - -# used by mkShape to define output directory for root files -outputDir = 'rootFile'+date+'_QCD' - -# file with TTree aliases -aliasesFile = 'aliases.py' - -# file with list of variables -variablesFile = 'variables.py' - -# file with list of cuts -cutsFile = 'cuts.py' -#cutsFile = 'cuts_forPlots.py' - -# file with list of samples -samplesFile = 'samples.py' - -# file with list of samples -plotFile = 'plot.py' - -# luminosity to normalize to (in 1/fb) -lumi =59.74 - -# used by mkPlot to define output directory for plots -# different from "outputDir" to do things more tidy -outputDirPlots = 'plotVBS'+date+'_QCD' - - -# used by mkDatacards to define output directory for datacards -outputDirDatacard = 'datacards'+date - - -# structure file for datacard -structureFile = 'structure.py' - - -# nuisances file for mkDatacards and for mkShape -nuisancesFile = 'nuisances.py' diff --git a/Configurations/VBSlllnu/WZin/conf_WZin_QCD/cuts.py b/Configurations/VBSlllnu/WZin/conf_WZin_QCD/cuts.py deleted file mode 100755 index 3369d82b16..0000000000 --- a/Configurations/VBSlllnu/WZin/conf_WZin_QCD/cuts.py +++ /dev/null @@ -1,15 +0,0 @@ -# cuts -# cuts = {} -#Different supercut used - -#supercut for test on succesive selections - -## Signal regions - -supercut='nLepton>2' - -cuts['wz_jetpt30_zlep'] = 'wzinc && bVeto && MET_pt>30 && tauVeto_wz && jetpt30 && abs(detajj)>2.5 && mjj>500 && zlep_wz' -cuts['wz_jetpt50_zlep'] = 'wzinc && bVeto && MET_pt>30 && tauVeto_wz && jetpt50 && abs(detajj)>2.5 && mjj>500 && zlep_wz' -cuts['wz_zlep'] = 'wzinc && bVeto && MET_pt>20 && tauVeto_wz && jetpt_opt && abs(detajj)>1.5 && mjj>400 && zlep_wz' -cuts['no_cuts'] = '' - diff --git a/Configurations/VBSlllnu/WZin/conf_WZin_QCD/nuisances.py b/Configurations/VBSlllnu/WZin/conf_WZin_QCD/nuisances.py deleted file mode 100755 index 3926637c25..0000000000 --- a/Configurations/VBSlllnu/WZin/conf_WZin_QCD/nuisances.py +++ /dev/null @@ -1,42 +0,0 @@ - -# nuisances - -#nuisances = {} - -# name of samples here must match keys in samples.py - -################################ EXPERIMENTAL UNCERTAINTIES ################################# - -#### Luminosity -# luminosity uncertainty is 2.3% - -nuisances['lumi'] = { - 'name' : 'lumi_13TeV_2018', - 'samples' : { - 'SM' : '1.023', - 'WZ_EWK' : '1.023', - }, - 'type' : 'lnN', -} - -# statistical fluctuation -# on MC/data -# "stat" is a special word to identify this nuisance -# Use the following if you want to apply the automatic combine MC stat nuisances->Faster than bin-by-bin - -nuisances['stat'] = { - 'type' : 'auto', - 'maxPoiss' : '10', - 'includeSignal' : '1', - 'samples' : {} -} - - - -# Differnt type of uncentainties: type->ln N: (modify only event yeld) use a lognorm distributions with sigma = uncertainty. For normalization rateParam -# can be used--> use a uniform distribution; -# Shape: modify not only the events yelds but the event selection too (the shape) will run the varied shapes -# according to the following two possible kinds -# kind-> weight: Use the specified weight to reweight events; -# tree: uses the provided alternative trees; -# The MC statistics is a particular uncertainty: is caused by our finite statistics used to elaborate the template fits. Two approach: unfied and bin-by-bin (bbb) diff --git a/Configurations/VBSlllnu/WZin/conf_WZin_QCD/plot.py b/Configurations/VBSlllnu/WZin/conf_WZin_QCD/plot.py deleted file mode 100755 index b11973c48c..0000000000 --- a/Configurations/VBSlllnu/WZin/conf_WZin_QCD/plot.py +++ /dev/null @@ -1,15 +0,0 @@ -# plot configuration - -# groupPlot = {} - -Red=632; Violet=880; Green=416; Orange=800; Yellow=400; Azure=840; Blue=600; - -plot['QCD_SM'] = dict(nameHR="WZ QCD priv", color=1, isSignal=1, isData=0, scale=1.0, samples=['QCD_SM']) -plot['WZ_QCD'] = dict(nameHR="WZ QCD", color=Red, isSignal=0, isData=0, scale=1.0, samples=['WZ_QCD']) - -groupPlot['QCD_SM'] = dict(nameHR="WZ QCD priv", isSignal=1, color=Green, samples=['QCD_SM']) -groupPlot['WZ_QCD'] = dict(nameHR="WZ QCD", isSignal=2, color=Violet, samples=['WZ_QCD']) - -# additional options -legend['lumi'] = 'L = 59.74/fb' -legend['sqrt'] = '#sqrt{s} = 13 TeV' diff --git a/Configurations/VBSlllnu/WZin/conf_WZin_QCD/samples.py b/Configurations/VBSlllnu/WZin/conf_WZin_QCD/samples.py deleted file mode 100755 index e02c5b6d83..0000000000 --- a/Configurations/VBSlllnu/WZin/conf_WZin_QCD/samples.py +++ /dev/null @@ -1,66 +0,0 @@ -import os -import inspect - -configurations = os.path.realpath(inspect.getfile(inspect.currentframe())) # this file -configurations = os.path.dirname(configurations) # ggH2016 -configurations = os.path.dirname(configurations) # Differential -configurations = os.path.dirname(configurations) # Configurations - -from LatinoAnalysis.Tools.commonTools import getSampleFiles, getBaseW, addSampleWeight - -def nanoGetSampleFiles(inputDir, sample): - try: - if _samples_noload: - return [] - except NameError: - pass - - return getSampleFiles(inputDir, sample, True, 'nanoLatino_') - -# samples - -try: - len(samples) -except NameError: - import collections - samples = collections.OrderedDict() - -################################################ -############ BASIC MC WEIGHTS ################## -################################################ -mcCommonWeightNoMatch = 'SFweight' -mcCommonWeight = 'SFweight*PromptGenLepMatch3l' - -################################################ -############ PRIVATE SAMPLES ################### -################################################ - -mcDirectory = '/eos/user/e/evernazz/nanoAOD_PostProc_ntuple_WZin/Autumn18_102X_nAODv7_Full2018v7/MCl1loose2018v7__MCCorr2018v7__l2loose__l2tightOR2018v7' -treeBaseDir = '/eos/user/e/evernazz/nanoAOD_PostProc_ntuple_WZin' -mcProduction = 'Autumn18_102X_nAODv7_Full2018v7' -mcSteps = 'MCl1loose2018v7__MCCorr2018v7__l2loose__l2tightOR2018v7{var}' - -def makeMCDirectory(var=''): - if var: - return os.path.join(treeBaseDir, mcProduction, mcSteps.format(var='__' + var)) - else: - return os.path.join(treeBaseDir, mcProduction, mcSteps.format(var='')) - -files = nanoGetSampleFiles(mcDirectory, 'WLLJJToLNu_M-50_QCD_0Jet') + \ - nanoGetSampleFiles(mcDirectory, 'WLLJJToLNu_M-50_QCD_1Jet') + \ - nanoGetSampleFiles(mcDirectory, 'WLLJJToLNu_M-50_QCD_3Jet') + \ - nanoGetSampleFiles(mcDirectory, 'WLLJJToLNu_M-4To50_QCD_0Jet') + \ - nanoGetSampleFiles(mcDirectory, 'WLLJJToLNu_M-4To50_QCD_2Jet') + \ - nanoGetSampleFiles(mcDirectory, 'WLLJJToLNu_M-4To50_QCD_3Jet') -samples['WZ_QCD'] = { - 'name': files, - 'weight': mcCommonWeight, - 'FilesPerJob': 4 -} - -files = nanoGetSampleFiles(mcDirectory, 'WZQCD_SM') -samples['QCD_SM'] = { - 'name': files, - 'weight': mcCommonWeight, - 'FilesPerJob': 10, -} diff --git a/Configurations/VBSlllnu/WZin/conf_WZin_QCD/structure.py b/Configurations/VBSlllnu/WZin/conf_WZin_QCD/structure.py deleted file mode 100755 index 1b0abc1a48..0000000000 --- a/Configurations/VBSlllnu/WZin/conf_WZin_QCD/structure.py +++ /dev/null @@ -1,9 +0,0 @@ -# structure configuration for datacard - -#structure = {} - -# keys here must match keys in samples.py - -structure['QCD_SM'] = {'isSignal' : 0, 'isData' : 0} - -structure['WZ_QCD'] = {'isSignal' : 0, 'isData' : 0} diff --git a/Configurations/VBSlllnu/WZin/conf_WZin_QCD/variables.py b/Configurations/VBSlllnu/WZin/conf_WZin_QCD/variables.py deleted file mode 100755 index 83adc8e2ba..0000000000 --- a/Configurations/VBSlllnu/WZin/conf_WZin_QCD/variables.py +++ /dev/null @@ -1,188 +0,0 @@ -# variables - -# variables = {} - -# 'fold' : # 0 = not fold (default), 1 = fold underflowbin, 2 = fold overflow bin, 3 = fold underflow and overflow - -variables['nJet'] = { - 'name' : 'Sum$(CleanJet_pt>30)', - 'range' : (4,0,4), - 'xaxis' : 'njets', - 'fold' : 3 -} - -variables['mll'] = { - 'name' : 'mll', - 'range' : (10,20.,300), - 'xaxis' : 'mll [GeV]', - 'fold' : 3 -} - -variables['mllZ'] = { - 'name' : 'wzeu_var[1]', - 'range' : (5,80.,100), - 'xaxis' : 'mll Z [GeV]', - 'fold' : 3 -} - -variables['mee'] = { - 'name' : 'wzeu_var[0]', - 'range' : (5,80.,100), - 'xaxis' : 'mee [GeV]', - 'fold' : 3 -} - -variables['ptl1'] = { - 'name' : 'Alt$(Lepton_pt[0],-9999.)', - 'range' : (15,30,350), - 'xaxis' : 'p_{T} 1st lep [GeV]', - 'fold' : 3 -} - -variables['ptl1Z'] = { - 'name' : 'wzeu_var[3]', - 'range' : (15,25,350), - 'xaxis' : 'p_{T} 1st lep Z [GeV]', - 'fold' : 3 -} - -variables['ptl2'] = { - 'name' : 'Alt$(Lepton_pt[1],-9999.)', - 'range' : (15,20,200), - 'xaxis' : 'p_{T} 2nd lep [GeV]', - 'fold' : 3 -} - -variables['ptl2Z'] = { - 'name' : 'wzeu_var[4]', - 'range' : (10,10,100), - 'xaxis' : 'p_{T} 2nd lep Z [GeV]', - 'fold' : 3 -} - - -variables['ptl3'] = { - 'name' : 'Alt$(Lepton_pt[2],-9999.)', - 'range' : (10,10,100), - 'xaxis' : 'p_{T} 3rd lep [GeV]', - 'fold' : 3 -} - -variables['ptlW'] = { - 'name' : 'wzeu_var[5]', - 'range' : (10,10,150), - 'xaxis' : 'p_{T} lep W [GeV]', - 'fold' : 3 -} - -variables['etal1'] = { - 'name' : 'Alt$(Lepton_eta[0],-9999.)', - 'range' : (10,-2.,2.), - 'xaxis' : 'eta lep1', - 'fold' : 3 -} - -variables['etal1Z'] = { - 'name' : 'wzeu_var[6]', - 'range' : (10,-2.,2.), - 'xaxis' : 'eta lep1 Z', - 'fold' : 3 -} - -variables['etal2'] = { - 'name' : 'Alt$(Lepton_eta[1],-9999.)', - 'range' : (10,-2.,2.), - 'xaxis' : 'eta lep2', - 'fold' : 3 -} - -variables['etal2Z'] = { - 'name' : 'wzeu_var[7]', - 'range' : (10,-2.,2.), - 'xaxis' : 'eta lep2 Z', - 'fold' : 3 -} - -variables['etal3'] = { - 'name' : 'Alt$(Lepton_eta[2],-9999.)', - 'range' : (10,-2.,2.), - 'xaxis' : 'eta lep3', - 'fold' : 3 -} - -variables['etalW'] = { - 'name' : 'wzeu_var[8]', - 'range' : (10,-2.,2.), - 'xaxis' : 'eta lep W', - 'fold' : 3 -} - -variables['mjj'] = { - 'name' : 'mjj', - 'range' : ([400,700,1000,1300,1600,2000,2500,3000],), - 'xaxis' : 'mjj [GeV]', - 'fold' : 3 -} - -variables['ptj1'] = { - 'name' : 'Alt$(CleanJet_pt[0],-9999.)', - 'range' : (8,50,450), - 'xaxis' : 'p_{T} 1st jet [GeV]', - 'fold' : 3 -} - -variables['ptj2'] = { - 'name' : 'Alt$(CleanJet_pt[1],-9999.)', - 'range' : (8,35,200), - 'xaxis' : 'p_{T} 2nd jet [GeV]', - 'fold' : 3 -} - -variables['etaj1'] = { - 'name' : 'Alt$(CleanJet_eta[0],-9999.)', - 'range' : (10,-5,5), - 'xaxis' : 'eta j1', - 'fold' : 3 -} - -variables['etaj2'] = { - 'name' : 'Alt$(CleanJet_eta[1],-9999.)', - 'range' : (10,-5,5), - 'xaxis' : 'eta j2', - 'fold' : 3 -} - -variables['detajj'] = { - 'name' : 'detajj', - 'range' : ([1.5,1.75,2,2.25,2.5,2.75,3,3.5,4,4.5,5,5.5,6,6.5,7,7.5],), - 'xaxis' : 'deta jj', - 'fold' : 3 -} - -variables['dphijj'] = { - 'name' : 'dphijj', - 'range' : (5,0.0,3.141592), - 'xaxis' : 'dphi jj', - 'fold' : 3 -} - -variables['met'] = { - 'name' : 'MET_pt', - 'range' : (10,20,200), - 'xaxis' : 'met [GeV]', - 'fold' : 3 -} - -variables['Zlep1'] = { - 'name' : 'zlep1', - 'range': ([-1,-0.6,-0.4,-0.2,0,0.2,0.4,0.6,1.],), - 'xaxis' : 'Z^{lep}_{1}', - 'fold' : 3 -} - -variables['Zlep2'] = { - 'name': 'zlep2', - 'range': ([-1,-0.6,-0.4,-0.2,0,0.2,0.4,0.6,1.],), - 'xaxis': 'Z^{lep}_{2}', - 'fold': 3 -} diff --git a/Configurations/VBSlllnu/WZin/conf_WZin_SM/aliases.py b/Configurations/VBSlllnu/WZin/conf_WZin_SM/aliases.py deleted file mode 100755 index c993313953..0000000000 --- a/Configurations/VBSlllnu/WZin/conf_WZin_SM/aliases.py +++ /dev/null @@ -1,279 +0,0 @@ -import inspect -import os - -configurations = os.path.realpath(inspect.getfile(inspect.currentframe())) # this file -configurations = os.path.dirname(configurations) # Full2017 -configurations = os.path.dirname(configurations) # ggH -configurations = os.path.dirname(configurations) # Configurations - -#aliases = {} -bAlgo = 'DeepB' -bWP = '0.4184' - -mc = [skey for skey in samples if skey not in ('Fake','DATA')] - -aliases['wzinc'] = { - 'linesToAdd': ['.L %s/macros/wzinc.cc+' % configurations], - 'class': 'Wzinc', -} - -aliases['wzinc1'] = { - 'linesToAdd': ['.L %s/macros/wzinc1.cc+' % configurations], - 'class': 'Wzinc1', -} - -aliases['wzeu_var'] = { - 'linesToAdd': [ - 'gSystem->Load("libLatinoAnalysisMultiDraw.so")', - '.L {}/macros/wzeu.cc+'.format(configurations) - ], - 'class': 'WZeu', - 'args': (), -} - -# tau veto -aliases['tauVeto_wz'] = { - 'expr': '(Sum$(Tau_pt > 18 && abs(Tau_eta)<2.3 && (Tau_idMVAoldDM2017v2>> 1 & 1) && Tau_idDecayMode &&sqrt( pow(Tau_eta - Lepton_eta[0], 2) + pow(abs(abs(Tau_phi - Lepton_phi[0])-pi)-pi, 2) ) >= 0.4 && sqrt( pow(Tau_eta - Lepton_eta[1], 2) + pow(abs(abs(Tau_phi - Lepton_phi[1])-pi)-pi, 2) ) >= 0.4 && sqrt( pow(Tau_eta - Lepton_eta[2], 2) + pow(abs(abs(Tau_phi - Lepton_phi[2])-pi)-pi, 2) ) >= 0.4) == 0)' -} -aliases['softmuon_veto']={ - 'expr':'(Sum$(abs(Muon_dxy)<0.02 && abs(Muon_dz)<0.1 && Muon_softId && Muon_pt>5 && abs(Muon_eta)<2.4 && sqrt( pow(Muon_eta - Lepton_eta[0], 2) + pow(abs(abs(Muon_phi - Lepton_phi[0])-pi)-pi, 2) ) >= 0.4 && sqrt( pow(Muon_eta - Lepton_eta[1], 2) + pow(abs(abs(Muon_phi - Lepton_phi[1])-pi)-pi, 2) ) >= 0.4)==0)' -} - -eleWP = 'mvaFall17V1Iso_WP90_SS' - -muWP = 'cut_Tight_HWWW' - -aliases['LepWPCut'] = { - 'expr': 'LepCut3l__ele_'+eleWP+'__mu_'+muWP, - 'samples': mc + ['DATA'] -} -aliases['gstarLow'] = { - 'expr': 'Gen_ZGstar_mass >0 && Gen_ZGstar_mass < 4', - 'samples': ['VgS','VgS1','VgS2'] -} - -aliases['gstarHigh'] = { - 'expr': 'Gen_ZGstar_mass <0 || Gen_ZGstar_mass > 4', - 'samples': ['VgS','VgS1','VgS2'] -} -# Fake leptons transfer factor -aliases['fakeW'] = { - #'expr': 'fakeW2l_ele_'+eleWP+'_mu_'+muWP, - 'expr': 'fakeW_ele_'+eleWP+'_mu_'+muWP+'_3l', - 'samples': ['Fake'] -} -# And variations - already divided by central values in formulas ! -aliases['fakeW'] = { - #'expr': 'fakeW2l_ele_'+eleWP+'_mu_'+muWP, - 'expr': 'fakeW_ele_'+eleWP+'_mu_'+muWP+'_3l', - 'samples': ['Fake'] -} -# And variations - already divided by central values in formulas ! -aliases['fakeWEleUp'] = { - #'expr': 'fakeW2l_ele_'+eleWP+'_mu_'+muWP+'_EleUp', - 'expr': 'fakeW_ele_'+eleWP+'_mu_'+muWP+'_3lElUp', - 'samples': ['Fake'] -} -aliases['fakeWEleDown'] = { - #'expr': 'fakeW2l_ele_'+eleWP+'_mu_'+muWP+'_EleDown', - 'expr': 'fakeW_ele_'+eleWP+'_mu_'+muWP+'_3lElDown', - 'samples': ['Fake'] -} -aliases['fakeWMuUp'] = { - #'expr': 'fakeW2l_ele_'+eleWP+'_mu_'+muWP+'_MuUp', - 'expr': 'fakeW_ele_'+eleWP+'_mu_'+muWP+'_3lMuUp', - 'samples': ['Fake'] -} -aliases['fakeWMuDown'] = { - #'expr': 'fakeW2l_ele_'+eleWP+'_mu_'+muWP+'_MuDown', - 'expr': 'fakeW_ele_'+eleWP+'_mu_'+muWP+'_3lMuDown', - 'samples': ['Fake'] -} -aliases['fakeWStatEleUp'] = { - #'expr': 'fakeW2l_ele_'+eleWP+'_mu_'+muWP+'_statEleUp', - 'expr': 'fakeW_ele_'+eleWP+'_mu_'+muWP+'_3lstatElUp', - 'samples': ['Fake'] -} -aliases['fakeWStatEleDown'] = { - #'expr': 'fakeW2l_ele_'+eleWP+'_mu_'+muWP+'_statEleDown', - 'expr': 'fakeW_ele_'+eleWP+'_mu_'+muWP+'_3lstatElDown', - 'samples': ['Fake'] -} -aliases['fakeWStatMuUp'] = { - #'expr': 'fakeW2l_ele_'+eleWP+'_mu_'+muWP+'_statMuUp', - 'expr': 'fakeW_ele_'+eleWP+'_mu_'+muWP+'_3lstatMuUp', - 'samples': ['Fake'] -} -aliases['fakeWStatMuDown'] = { - #'expr': 'fakeW2l_ele_'+eleWP+'_mu_'+muWP+'_statMuDown', - 'expr': 'fakeW_ele_'+eleWP+'_mu_'+muWP+'_3lstatMuDown', - 'samples': ['Fake'] -} -# gen-matching to prompt only (GenLepMatch2l matches to *any* gen lepton) -aliases['PromptGenLepMatch2l'] = { - 'expr': 'Alt$(Lepton_promptgenmatched[0]*Lepton_promptgenmatched[1], 0)', - 'samples': mc -} -aliases['PromptGenLepMatch3l'] = { - 'expr': 'Alt$(Lepton_promptgenmatched[0]*Lepton_promptgenmatched[1]*Lepton_promptgenmatched[2], 0)', - 'samples': mc -} -# PostProcessing did not create (anti)topGenPt for ST samples with _ext1 -lastcopy = (1 << 13) - -aliases['isTTbar'] = { - 'expr': 'Sum$(TMath::Abs(GenPart_pdgId) == 6 && TMath::Odd(GenPart_statusFlags / %d)) == 2' % lastcopy, - 'samples': ['top'] -} - -aliases['isSingleTop'] = { - 'expr': 'Sum$(TMath::Abs(GenPart_pdgId) == 6 && TMath::Odd(GenPart_statusFlags / %d)) == 1' % lastcopy, - 'samples': ['top'] -} - -aliases['Top_pTrw'] = { - 'expr': 'isTTbar * (TMath::Sqrt(TMath::Exp(0.0615 - 0.0005 * topGenPtOTF) * TMath::Exp(0.0615 - 0.0005 * antitopGenPtOTF))) + isSingleTop', - 'samples': ['top'] -} - -#bjet -# No jet with pt > 30 GeV -aliases['zeroJet'] = { - 'expr': 'Alt$(CleanJet_pt[0], 0) < 30.' -} - -# ==1 jet with pt > 30 GeV -aliases['oneJet'] = { - 'expr': 'Alt$(CleanJet_pt[0], 0) >= 30. && Alt$(CleanJet_pt[1], 0) < 30.' -} - -# ==2 jets with pt > 30 GeV -aliases['twoJet'] = { - 'expr': 'Alt$(CleanJet_pt[0], 0) >= 30. && Alt$(CleanJet_pt[1], 0) >= 30. && Alt$(CleanJet_pt[2], 0) < 30.' -} - -# >=2 jets with pt > 30 GeV -aliases['twoJetOrMore'] = { - 'expr': 'Alt$(CleanJet_pt[0], 0) >= 30. && Alt$(CleanJet_pt[1], 0) >= 30.' -} - -aliases['bVeto'] = { - 'expr': 'Sum$(CleanJet_pt > 20. && abs(CleanJet_eta) < 2.5 && Jet_btagDeepB[CleanJet_jetIdx] > 0.4184) == 0' -} - -aliases['bReq'] = { - 'expr': 'Sum$(CleanJet_pt > 30. && abs(CleanJet_eta) < 2.5 && Jet_btagDeepB[CleanJet_jetIdx] > 0.4184) >= 1' -} - -aliases['btag0'] = { - 'expr': 'zeroJet && !bVeto' -} - -aliases['btag1'] = { - 'expr': 'oneJet && bReq' -} - -aliases['btag2'] = { - 'expr': 'twoJet && bReq' -} - -# lepton eta range -aliases['lep0eta']={ - 'expr': '((abs(Alt$(Lepton_pdgId[0],-9999))==11 && abs(Alt$(Lepton_eta[0],-9999.)) <2.5) || (abs(Alt$(Lepton_pdgId[0],-9999))==13 && abs(Alt$(Lepton_eta[0],-9999.)) <2.4))' -} -aliases['lep1eta']={ - 'expr': '((abs(Alt$(Lepton_pdgId[1],-9999))==11 && abs(Alt$(Lepton_eta[1],-9999.)) <2.5) || (abs(Alt$(Lepton_pdgId[1],-9999))==13 && abs(Alt$(Lepton_eta[1],-9999.)) <2.4))' -} -aliases['jetpt30']={ - 'expr': 'Alt$(CleanJet_pt[0],-9999.) >30 && Alt$(CleanJet_pt[1],-9999.) >30 && abs(Alt$(CleanJet_eta[0],-9999.)) < 4.7&& abs(Alt$(CleanJet_eta[1],-9999.)) < 4.7' -} -aliases['jetpt50']={ - 'expr': 'Alt$(CleanJet_pt[0],-9999.) >50 && Alt$(CleanJet_pt[1],-9999.) >50 && abs(Alt$(CleanJet_eta[0],-9999.)) < 4.7&& abs(Alt$(CleanJet_eta[1],-9999.)) < 4.7' -} -aliases['jetpt_opt']={ - 'expr': 'Alt$(CleanJet_pt[0],-9999.) >50 && Alt$(CleanJet_pt[1],-9999.) >35 && abs(Alt$(CleanJet_eta[0],-9999.)) < 4.7&& abs(Alt$(CleanJet_eta[1],-9999.)) < 4.7' -} - -aliases['leppt0']={ - 'expr': 'Alt$(Lepton_pt[0],-9999.) >25 && Alt$(Lepton_pt[1],-9999.) >20' -} -aliases['leppt1']={ - 'expr': 'Alt$(Lepton_pt[0],-9999.) >30 && Alt$(Lepton_pt[1],-9999.) >30' -} -# -3.2-3.2 && Alt$(CleanJet_eta[0],-9999.)<-1.3 && Alt$(CleanJet_phi[0],-9999.)>-1.57 && Alt$(CleanJet_phi[0],-9999.)<-0.87) || \ - (Alt$(CleanJet_eta[1],-9999.)>-3.2 && Alt$(CleanJet_eta[1],-9999.)<-1.3 && Alt$(CleanJet_phi[1],-9999.)>-1.57 && Alt$(CleanJet_phi[1],-9999.)<-0.87)' -} -# ssww region -aliases['zlep_wz']={ - 'expr': 'abs((Alt$(Lepton_eta[0],-9999.) - (Alt$(CleanJet_eta[0],-9999.)+Alt$(CleanJet_eta[1],-9999.))/2)/detajj) < 1 && abs((Alt$(Lepton_eta[1],-9999.) - (Alt$(CleanJet_eta[0],-9999.)+Alt$(CleanJet_eta[1],-9999.))/2)/detajj) < 1 && abs((Alt$(Lepton_eta[2],-9999.) - (Alt$(CleanJet_eta[0],-9999.)+Alt$(CleanJet_eta[1],-9999.))/2)/detajj) <1' -} - -aliases['zveto_ww']={ - 'expr': '(abs(Alt$(Lepton_pdgId[0],-9999)) * abs(Alt$(Lepton_pdgId[1],-9999)) != 11*11 || abs(mll - 91.1876) > 15)' -} - -aliases['bVetoSF'] = { - 'expr': 'TMath::Exp(Sum$(TMath::Log((CleanJet_pt>20 && abs(CleanJet_eta)<2.5)*Jet_btagSF_deepcsv_shape[CleanJet_jetIdx]+1*(CleanJet_pt<20 || abs(CleanJet_eta)>2.5))))', - 'samples': mc -} - -aliases['btag0SF'] = { - 'expr': 'TMath::Exp(Sum$(TMath::Log((CleanJet_pt>20 && CleanJet_pt<30 && abs(CleanJet_eta)<2.5)*Jet_btagSF_deepcsv_shape[CleanJet_jetIdx]+1*(CleanJet_pt<20 || CleanJet_pt>30 || abs(CleanJet_eta)>2.5))))', - 'samples': mc -} - -aliases['btagnSF'] = { - 'expr': 'TMath::Exp(Sum$(TMath::Log((CleanJet_pt>30 && abs(CleanJet_eta)<2.5)*Jet_btagSF_deepcsv_shape[CleanJet_jetIdx] + (CleanJet_pt<30 || abs(CleanJet_eta)>2.5))))', - 'samples': mc -} - -aliases['btagSF'] = { - 'expr': 'bVetoSF*bVeto + btag0SF*btag0 + btagnSF*(btag1 + btag2) + (!bVeto && !btag0 && !btag1 && !btag2)', - 'samples': mc -} - -for shift in ['jes','lf','hf','lfstats1','lfstats2','hfstats1','hfstats2','cferr1','cferr2']: - for targ in ['bVeto', 'btag0', 'btagn']: - alias = aliases['%sSF%sup' % (targ, shift)] = copy.deepcopy(aliases['%sSF' % targ]) - alias['expr'] = alias['expr'].replace('btagSF_shape', 'btagSF_shape_up_%s' % shift) - - alias = aliases['%sSF%sdown' % (targ, shift)] = copy.deepcopy(aliases['%sSF' % targ]) - alias['expr'] = alias['expr'].replace('btagSF_shape', 'btagSF_shape_down_%s' % shift) - - aliases['btagSF%sup' % shift] = { - 'expr': 'bVetoSF{shift}up*bVeto + btag0SF{shift}up*btag0 + btagnSF{shift}up*(btag1 + btag2) + (!bVeto && !btag0 && !btag1 && !btag2)'.format(shift = shift), - 'samples': mc - } - - aliases['btagSF%sdown' % shift] = { - 'expr': 'bVetoSF{shift}down*bVeto + btag0SF{shift}down*btag0 + btagnSF{shift}down*(btag1 + btag2) + (!bVeto && !btag0 && !btag1 && !btag2)'.format(shift = shift), - 'samples': mc - } - -# data/MC scale factors -aliases['SFweight'] = { - 'expr': ' * '.join(['SFweight3l','LepSF3l__ele_' + eleWP + '__mu_' + muWP, 'LepWPCut','XSWeight','METFilter_MC','btagSF']), #bveto_sf*lep_sf*trig_sf*mu_roc_sf - #'expr': 'LepWPCut', - 'samples': mc -} -# variations -aliases['SFweightEleUp'] = { - 'expr': 'LepSF3l__ele_'+eleWP+'__Up', - 'samples': mc -} -aliases['SFweightEleDown'] = { - 'expr': 'LepSF3l__ele_'+eleWP+'__Do', - 'samples': mc -} -aliases['SFweightMuUp'] = { - 'expr': 'LepSF3l__mu_'+muWP+'__Up', - 'samples': mc -} -aliases['SFweightMuDown'] = { - 'expr': 'LepSF3l__mu_'+muWP+'__Do', - 'samples': mc -} -aliases['zlep1'] = {'expr' : '(Alt$(Lepton_eta[0],-9999.) - (Alt$(CleanJet_eta[0],-9999.)+Alt$(CleanJet_eta[1],-9999.))/2)/detajj'} -aliases['zlep2'] = {'expr' : '(Alt$(Lepton_eta[1],-9999.) - (Alt$(CleanJet_eta[0],-9999.)+Alt$(CleanJet_eta[1],-9999.))/2)/detajj'} diff --git a/Configurations/VBSlllnu/WZin/conf_WZin_SM/configuration.py b/Configurations/VBSlllnu/WZin/conf_WZin_SM/configuration.py deleted file mode 100755 index 947a2aeedb..0000000000 --- a/Configurations/VBSlllnu/WZin/conf_WZin_SM/configuration.py +++ /dev/null @@ -1,46 +0,0 @@ -#example of configuration file -treeName= 'Events' - -#date='_Nov252018_ptll' -date='_l3_2018' - -tag = 'VBS_WZin_'+date+'_SM' - - -# used by mkShape to define output directory for root files -outputDir = 'rootFile'+date+'_SM' - -# file with TTree aliases -aliasesFile = 'aliases.py' - -# file with list of variables -variablesFile = 'variables.py' - -# file with list of cuts -cutsFile = 'cuts.py' -#cutsFile = 'cuts_forPlots.py' - -# file with list of samples -samplesFile = 'samples.py' - -# file with list of samples -plotFile = 'plot.py' - -# luminosity to normalize to (in 1/fb) -lumi =59.74 - -# used by mkPlot to define output directory for plots -# different from "outputDir" to do things more tidy -outputDirPlots = 'plotVBS'+date+'_SM' - - -# used by mkDatacards to define output directory for datacards -outputDirDatacard = 'datacards'+date - - -# structure file for datacard -structureFile = 'structure.py' - - -# nuisances file for mkDatacards and for mkShape -nuisancesFile = 'nuisances.py' diff --git a/Configurations/VBSlllnu/WZin/conf_WZin_SM/cuts.py b/Configurations/VBSlllnu/WZin/conf_WZin_SM/cuts.py deleted file mode 100755 index 3369d82b16..0000000000 --- a/Configurations/VBSlllnu/WZin/conf_WZin_SM/cuts.py +++ /dev/null @@ -1,15 +0,0 @@ -# cuts -# cuts = {} -#Different supercut used - -#supercut for test on succesive selections - -## Signal regions - -supercut='nLepton>2' - -cuts['wz_jetpt30_zlep'] = 'wzinc && bVeto && MET_pt>30 && tauVeto_wz && jetpt30 && abs(detajj)>2.5 && mjj>500 && zlep_wz' -cuts['wz_jetpt50_zlep'] = 'wzinc && bVeto && MET_pt>30 && tauVeto_wz && jetpt50 && abs(detajj)>2.5 && mjj>500 && zlep_wz' -cuts['wz_zlep'] = 'wzinc && bVeto && MET_pt>20 && tauVeto_wz && jetpt_opt && abs(detajj)>1.5 && mjj>400 && zlep_wz' -cuts['no_cuts'] = '' - diff --git a/Configurations/VBSlllnu/WZin/conf_WZin_SM/nuisances.py b/Configurations/VBSlllnu/WZin/conf_WZin_SM/nuisances.py deleted file mode 100755 index 3926637c25..0000000000 --- a/Configurations/VBSlllnu/WZin/conf_WZin_SM/nuisances.py +++ /dev/null @@ -1,42 +0,0 @@ - -# nuisances - -#nuisances = {} - -# name of samples here must match keys in samples.py - -################################ EXPERIMENTAL UNCERTAINTIES ################################# - -#### Luminosity -# luminosity uncertainty is 2.3% - -nuisances['lumi'] = { - 'name' : 'lumi_13TeV_2018', - 'samples' : { - 'SM' : '1.023', - 'WZ_EWK' : '1.023', - }, - 'type' : 'lnN', -} - -# statistical fluctuation -# on MC/data -# "stat" is a special word to identify this nuisance -# Use the following if you want to apply the automatic combine MC stat nuisances->Faster than bin-by-bin - -nuisances['stat'] = { - 'type' : 'auto', - 'maxPoiss' : '10', - 'includeSignal' : '1', - 'samples' : {} -} - - - -# Differnt type of uncentainties: type->ln N: (modify only event yeld) use a lognorm distributions with sigma = uncertainty. For normalization rateParam -# can be used--> use a uniform distribution; -# Shape: modify not only the events yelds but the event selection too (the shape) will run the varied shapes -# according to the following two possible kinds -# kind-> weight: Use the specified weight to reweight events; -# tree: uses the provided alternative trees; -# The MC statistics is a particular uncertainty: is caused by our finite statistics used to elaborate the template fits. Two approach: unfied and bin-by-bin (bbb) diff --git a/Configurations/VBSlllnu/WZin/conf_WZin_SM/plot.py b/Configurations/VBSlllnu/WZin/conf_WZin_SM/plot.py deleted file mode 100755 index cb1c494f0b..0000000000 --- a/Configurations/VBSlllnu/WZin/conf_WZin_SM/plot.py +++ /dev/null @@ -1,15 +0,0 @@ -# plot configuration - -# groupPlot = {} - -Red=632; Violet=880; Green=416; Orange=800; Yellow=400; Azure=840; Blue=600; - -plot['SM'] = dict(nameHR="SM", color=1, isSignal=1, isData=0, scale=1.0, samples=['SM']) -plot['WZ_EWK'] = dict(nameHR="WZ EWK", color=Red, isSignal=0, isData=0, scale=1.0, samples=['WZ_EWK']) - -groupPlot['SM'] = dict(nameHR="WZ EWK priv", isSignal=1, color=Green, samples=['SM']) -groupPlot['WZ_EWK'] = dict(nameHR="WZ EWK pub", isSignal=2, color=Violet, samples=['WZ_EWK']) - -# additional options -legend['lumi'] = 'L = 59.74/fb' -legend['sqrt'] = '#sqrt{s} = 13 TeV' diff --git a/Configurations/VBSlllnu/WZin/conf_WZin_SM/samples.py b/Configurations/VBSlllnu/WZin/conf_WZin_SM/samples.py deleted file mode 100755 index 83754d57a5..0000000000 --- a/Configurations/VBSlllnu/WZin/conf_WZin_SM/samples.py +++ /dev/null @@ -1,61 +0,0 @@ -import os -import inspect - -configurations = os.path.realpath(inspect.getfile(inspect.currentframe())) # this file -configurations = os.path.dirname(configurations) # ggH2016 -configurations = os.path.dirname(configurations) # Differential -configurations = os.path.dirname(configurations) # Configurations - -from LatinoAnalysis.Tools.commonTools import getSampleFiles, getBaseW, addSampleWeight - -def nanoGetSampleFiles(inputDir, sample): - try: - if _samples_noload: - return [] - except NameError: - pass - - return getSampleFiles(inputDir, sample, True, 'nanoLatino_') - -# samples - -try: - len(samples) -except NameError: - import collections - samples = collections.OrderedDict() - -################################################ -############ BASIC MC WEIGHTS ################## -################################################ -mcCommonWeightNoMatch = 'SFweight' -mcCommonWeight = 'SFweight*PromptGenLepMatch3l' - -################################################ -############ PRIVATE SAMPLES ################### -################################################ - -mcDirectory = '/eos/user/e/evernazz/nanoAOD_PostProc_ntuple_WZin/Autumn18_102X_nAODv7_Full2018v7/MCl1loose2018v7__MCCorr2018v7__l2loose__l2tightOR2018v7' -treeBaseDir = '/eos/user/e/evernazz/nanoAOD_PostProc_ntuple_WZin' -mcProduction = 'Autumn18_102X_nAODv7_Full2018v7' -mcSteps = 'MCl1loose2018v7__MCCorr2018v7__l2loose__l2tightOR2018v7{var}' - -def makeMCDirectory(var=''): - if var: - return os.path.join(treeBaseDir, mcProduction, mcSteps.format(var='__' + var)) - else: - return os.path.join(treeBaseDir, mcProduction, mcSteps.format(var='')) - -files = nanoGetSampleFiles(mcDirectory, 'WLLJJ_WToLNu_EWK') -samples['WZ_EWK'] = { - 'name': files, - 'weight': mcCommonWeight, - 'FilesPerJob': 3, -} - -files = nanoGetSampleFiles(mcDirectory, 'WZin_SM') -samples['SM'] = { - 'name': files, - 'weight': mcCommonWeight, - 'FilesPerJob': 10, -} diff --git a/Configurations/VBSlllnu/WZin/conf_WZin_SM/structure.py b/Configurations/VBSlllnu/WZin/conf_WZin_SM/structure.py deleted file mode 100755 index 3678f7dfca..0000000000 --- a/Configurations/VBSlllnu/WZin/conf_WZin_SM/structure.py +++ /dev/null @@ -1,9 +0,0 @@ -# structure configuration for datacard - -#structure = {} - -# keys here must match keys in samples.py - -structure['SM'] = {'isSignal' : 0, 'isData' : 0} - -structure['WZ_EWK'] = {'isSignal' : 0, 'isData' : 0} diff --git a/Configurations/VBSlllnu/WZin/conf_WZin_SM/variables.py b/Configurations/VBSlllnu/WZin/conf_WZin_SM/variables.py deleted file mode 100755 index 83adc8e2ba..0000000000 --- a/Configurations/VBSlllnu/WZin/conf_WZin_SM/variables.py +++ /dev/null @@ -1,188 +0,0 @@ -# variables - -# variables = {} - -# 'fold' : # 0 = not fold (default), 1 = fold underflowbin, 2 = fold overflow bin, 3 = fold underflow and overflow - -variables['nJet'] = { - 'name' : 'Sum$(CleanJet_pt>30)', - 'range' : (4,0,4), - 'xaxis' : 'njets', - 'fold' : 3 -} - -variables['mll'] = { - 'name' : 'mll', - 'range' : (10,20.,300), - 'xaxis' : 'mll [GeV]', - 'fold' : 3 -} - -variables['mllZ'] = { - 'name' : 'wzeu_var[1]', - 'range' : (5,80.,100), - 'xaxis' : 'mll Z [GeV]', - 'fold' : 3 -} - -variables['mee'] = { - 'name' : 'wzeu_var[0]', - 'range' : (5,80.,100), - 'xaxis' : 'mee [GeV]', - 'fold' : 3 -} - -variables['ptl1'] = { - 'name' : 'Alt$(Lepton_pt[0],-9999.)', - 'range' : (15,30,350), - 'xaxis' : 'p_{T} 1st lep [GeV]', - 'fold' : 3 -} - -variables['ptl1Z'] = { - 'name' : 'wzeu_var[3]', - 'range' : (15,25,350), - 'xaxis' : 'p_{T} 1st lep Z [GeV]', - 'fold' : 3 -} - -variables['ptl2'] = { - 'name' : 'Alt$(Lepton_pt[1],-9999.)', - 'range' : (15,20,200), - 'xaxis' : 'p_{T} 2nd lep [GeV]', - 'fold' : 3 -} - -variables['ptl2Z'] = { - 'name' : 'wzeu_var[4]', - 'range' : (10,10,100), - 'xaxis' : 'p_{T} 2nd lep Z [GeV]', - 'fold' : 3 -} - - -variables['ptl3'] = { - 'name' : 'Alt$(Lepton_pt[2],-9999.)', - 'range' : (10,10,100), - 'xaxis' : 'p_{T} 3rd lep [GeV]', - 'fold' : 3 -} - -variables['ptlW'] = { - 'name' : 'wzeu_var[5]', - 'range' : (10,10,150), - 'xaxis' : 'p_{T} lep W [GeV]', - 'fold' : 3 -} - -variables['etal1'] = { - 'name' : 'Alt$(Lepton_eta[0],-9999.)', - 'range' : (10,-2.,2.), - 'xaxis' : 'eta lep1', - 'fold' : 3 -} - -variables['etal1Z'] = { - 'name' : 'wzeu_var[6]', - 'range' : (10,-2.,2.), - 'xaxis' : 'eta lep1 Z', - 'fold' : 3 -} - -variables['etal2'] = { - 'name' : 'Alt$(Lepton_eta[1],-9999.)', - 'range' : (10,-2.,2.), - 'xaxis' : 'eta lep2', - 'fold' : 3 -} - -variables['etal2Z'] = { - 'name' : 'wzeu_var[7]', - 'range' : (10,-2.,2.), - 'xaxis' : 'eta lep2 Z', - 'fold' : 3 -} - -variables['etal3'] = { - 'name' : 'Alt$(Lepton_eta[2],-9999.)', - 'range' : (10,-2.,2.), - 'xaxis' : 'eta lep3', - 'fold' : 3 -} - -variables['etalW'] = { - 'name' : 'wzeu_var[8]', - 'range' : (10,-2.,2.), - 'xaxis' : 'eta lep W', - 'fold' : 3 -} - -variables['mjj'] = { - 'name' : 'mjj', - 'range' : ([400,700,1000,1300,1600,2000,2500,3000],), - 'xaxis' : 'mjj [GeV]', - 'fold' : 3 -} - -variables['ptj1'] = { - 'name' : 'Alt$(CleanJet_pt[0],-9999.)', - 'range' : (8,50,450), - 'xaxis' : 'p_{T} 1st jet [GeV]', - 'fold' : 3 -} - -variables['ptj2'] = { - 'name' : 'Alt$(CleanJet_pt[1],-9999.)', - 'range' : (8,35,200), - 'xaxis' : 'p_{T} 2nd jet [GeV]', - 'fold' : 3 -} - -variables['etaj1'] = { - 'name' : 'Alt$(CleanJet_eta[0],-9999.)', - 'range' : (10,-5,5), - 'xaxis' : 'eta j1', - 'fold' : 3 -} - -variables['etaj2'] = { - 'name' : 'Alt$(CleanJet_eta[1],-9999.)', - 'range' : (10,-5,5), - 'xaxis' : 'eta j2', - 'fold' : 3 -} - -variables['detajj'] = { - 'name' : 'detajj', - 'range' : ([1.5,1.75,2,2.25,2.5,2.75,3,3.5,4,4.5,5,5.5,6,6.5,7,7.5],), - 'xaxis' : 'deta jj', - 'fold' : 3 -} - -variables['dphijj'] = { - 'name' : 'dphijj', - 'range' : (5,0.0,3.141592), - 'xaxis' : 'dphi jj', - 'fold' : 3 -} - -variables['met'] = { - 'name' : 'MET_pt', - 'range' : (10,20,200), - 'xaxis' : 'met [GeV]', - 'fold' : 3 -} - -variables['Zlep1'] = { - 'name' : 'zlep1', - 'range': ([-1,-0.6,-0.4,-0.2,0,0.2,0.4,0.6,1.],), - 'xaxis' : 'Z^{lep}_{1}', - 'fold' : 3 -} - -variables['Zlep2'] = { - 'name': 'zlep2', - 'range': ([-1,-0.6,-0.4,-0.2,0,0.2,0.4,0.6,1.],), - 'xaxis': 'Z^{lep}_{2}', - 'fold': 3 -}