def nanoGetSampleFiles(inputDir, sample): try: if _samples_noload: return [sample] except NameError: pass return getSampleFiles(inputDir, sample, True, 'nanoLatino_')
def getSampleFilesNano(inputDir, Sample, absPath=False, rootFilePrefix='nanoLatino_', FromPostProc=True): """ Use "nanoLatino_" instead of "latino_" as the sample file prefix """ return [ s.lstrip('#') for s in getSampleFiles(inputDir, Sample, absPath, rootFilePrefix, FromPostProc) ]
def nanoGetSampleFiles(inputDir, Sample): return getSampleFiles(inputDir, Sample, False, 'nanoLatino_')
def getSampleFilesNano(inputDir, Sample, absPath=False): return getSampleFiles(inputDir, Sample, absPath, 'nanoLatino_')
###### DY ####### useDYHT = False # be carefull DY HT is LO useDYtt = True mixDYttandHT = False # be carefull DY HT is LO (HT better stat for HT>450 GEV) ### These weights were evaluated on ICHEP16 MC -> Update ? ptllDYW_NLO = '(0.876979+gen_ptll*(4.11598e-03)-(2.35520e-05)*gen_ptll*gen_ptll)*(1.10211*(0.958512-0.131835*TMath::Erf((gen_ptll-14.1972)/10.1525)))*(gen_ptll<140)+0.891188*(gen_ptll>=140)' ptllDYW_LO = '(8.61313e-01+gen_ptll*4.46807e-03-1.52324e-05*gen_ptll*gen_ptll)*(1.08683*(0.95-0.0657370*TMath::Erf((gen_ptll-11.)/5.51582)))*(gen_ptll<140)+1.141996*(gen_ptll>=140)' samples['DY'] = {'weight': mcCommonWeight} if useDYtt: # Use e-mu exclusive trees samples['DY']['name'] = getSampleFiles(mcDirectory,'DYJetsToLL_M-10to50') \ + getSampleFiles(mcDirectory,'DYJetsToTT_MuEle_M-50') \ + getSampleFiles(mcDirectory,'DYJetsToTT_MuEle_M-50_ext1') # pt_ll weight addSampleWeight(samples, 'DY', 'DYJetsToLL_M-10to50', ptllDYW_NLO) addSampleWeight(samples, 'DY', 'DYJetsToTT_MuEle_M-50', ptllDYW_NLO) addSampleWeight(samples, 'DY', 'DYJetsToTT_MuEle_M-50_ext1', ptllDYW_NLO) # set baseW across both samples addSampleWeight( samples, 'DY', 'DYJetsToTT_MuEle_M-50', getBaseW(mcDirectory, ['DYJetsToTT_MuEle_M-50', 'DYJetsToTT_MuEle_M-50_ext1']) + '/baseW') addSampleWeight( samples, 'DY', 'DYJetsToTT_MuEle_M-50_ext1',
signals = [] ############ WH H->WW ############ ''' samples['WH_hww'] = { 'name': nanoGetSampleFiles(mcDirectory, 'HWplusJ_HToWW_M125') + nanoGetSampleFiles(mcDirectory, 'HWminusJ_HToWW_M125'), 'weight': mcCommonWeightMatched, 'FilesPerJob': 4 } signals.append('WH_hww') ''' samples['WH_hww'] = { 'name': getSampleFiles(makeMCDirectory(), 'HWplusJ_HToWW_M125', True, 'nanoLatino_') + getSampleFiles(makeMCDirectory(), 'HWminusJ_HToWW_M125', True, 'nanoLatino_'), 'weight': mcCommonWeightMatched, 'suppressNegativeNuisances': ['all'], 'subsamples': { 'PTV_LT150': 'HTXS_stage1_1_cat_pTjet30GeV==301 || HTXS_stage1_1_cat_pTjet30GeV==302', 'PTV_GT150': 'HTXS_stage1_1_cat_pTjet30GeV==303 || HTXS_stage1_1_cat_pTjet30GeV==304 || HTXS_stage1_1_cat_pTjet30GeV==305', 'FWDH': 'HTXS_stage1_1_cat_pTjet30GeV==300' } } signals.append('WH_hww')
files = nanoGetSampleFiles(mcDirectory, 'DYJetsToTT_MuEle_M-50') + \ nanoGetSampleFiles(mcDirectory, 'DYJetsToLL_M-10to50-LO') samples['DY'] = { 'name': files, 'weight': 'XSWeight*SFweight*PromptGenLepMatch2l*METFilter_MC' + '*(Sum$(GenPart_pdgId == 22 && TMath::Odd(GenPart_statusFlags) && GenPart_pt > 20.) == 0)', 'FilesPerJob': 2, 'suppressNegative': ['all'], 'suppressNegativeNuisances': ['all'], } addSampleWeight(samples, 'DY', 'DYJetsToTT_MuEle_M-50', ptllDYW_NLO) addSampleWeight(samples, 'DY', 'DYJetsToLL_M-10to50-LO', ptllDYW_LO) else: files = getSampleFiles(directory, 'DYJetsToLL_M-50_ext',False,'nanoLatino_') + \ getSampleFiles(directory, 'DYJetsToLL_M-10to50-LO_ext1',False,'nanoLatino_') samples['DY'] = { 'name': files, 'weight': 'XSWeight*SFweight*PromptGenLepMatch2l*METFilter_MC' + '*(Sum$(GenPart_pdgId == 22 && TMath::Odd(GenPart_statusFlags) && GenPart_pt > 20.) == 0)', 'FilesPerJob': 2, 'suppressNegative': ['all'], 'suppressNegativeNuisances': ['all'], } # ... Add DY HT Samples if useDYHT: samples['DY']['name'] += getSampleFiles(directory, 'DYJetsToLL_M-4to50_HT-200to400' ,False,'nanoLatino_') \ + getSampleFiles(directory, 'DYJetsToLL_M-4to50_HT-400to600' ,False,'nanoLatino_') \
def nanoGetSampleFiles(inputDir, sample): return getSampleFiles(inputDir, sample, True, 'nanoLatino_')
'weight': XSWeight + '*' + SFweight + '*' + PromptGenLepMatch + '*' + METFilter_MC, } ############ ZH H->WW ############ #samples['ZH_hww'] = { 'name' : nanoGetSampleFiles(mcDirectory,'HZJ_HToWW_M125'), #FIXME replace with 125 GeV sample when available # 'weight' : XSWeight+'*'+SFweight+'*'+PromptGenLepMatch+'*'+METFilter_MC , # } #samples['ggZH_hww'] = { 'name' : nanoGetSampleFiles(mcDirectory,'GluGluZH_HToWWTo2L2Nu_M125'), # 'weight' : XSWeight+'*'+SFweight+'*'+PromptGenLepMatch+'*'+METFilter_MC , # } samples['ZH_hww'] = { 'name': getSampleFiles(mcDirectory, 'HZJ_HToWW_M125', True, 'nanoLatino_'), 'weight': XSWeight + '*' + SFweight + '*' + PromptGenLepMatch + '*' + METFilter_MC, 'subsamples': { 'PTV_LT150': 'HTXS_stage1_1_cat_pTjet30GeV==401 || HTXS_stage1_1_cat_pTjet30GeV==402', 'PTV_GT150': 'HTXS_stage1_1_cat_pTjet30GeV==403 || HTXS_stage1_1_cat_pTjet30GeV==404 || HTXS_stage1_1_cat_pTjet30GeV==405', 'FWDH': 'HTXS_stage1_1_cat_pTjet30GeV==400' } } samples['ggZH_hww'] = { 'name': getSampleFiles(mcDirectory, 'ggZH_HToWW_M125', True, 'nanoLatino_'), 'weight':
useDYHT = False # be carefull DY HT is LO useDYtt = True mixDYttandHT = False # be carefull DY HT is LO (HT better stat for HT>450 GEV) ### These weights were evaluated on ICHEP16 MC -> Update ? ptllDYW_NLO = '(0.876979+gen_ptll*(4.11598e-03)-(2.35520e-05)*gen_ptll*gen_ptll)*(1.10211*(0.958512-0.131835*TMath::Erf((gen_ptll-14.1972)/10.1525)))*(gen_ptll<140)+0.891188*(gen_ptll>=140)' ptllDYW_LO = '(8.61313e-01+gen_ptll*4.46807e-03-1.52324e-05*gen_ptll*gen_ptll)*(1.08683*(0.95-0.0657370*TMath::Erf((gen_ptll-11.)/5.51582)))*(gen_ptll<140)+1.141996*(gen_ptll>=140)' samples['DY'] = { 'weight': mcCommonWeight } if useDYtt : # Use e-mu exclusive trees samples['DY']['name'] = getSampleFiles(mcDirectory,'DYJetsToLL_M-10to50') \ + getSampleFiles(mcDirectory,'DYJetsToTT_MuEle_M-50') \ + getSampleFiles(mcDirectory,'DYJetsToTT_MuEle_M-50_ext1') # pt_ll weight addSampleWeight(samples,'DY','DYJetsToLL_M-10to50',ptllDYW_NLO) addSampleWeight(samples,'DY','DYJetsToTT_MuEle_M-50',ptllDYW_NLO) addSampleWeight(samples,'DY','DYJetsToTT_MuEle_M-50_ext1',ptllDYW_NLO) # set baseW across both samples addSampleWeight(samples,'DY','DYJetsToTT_MuEle_M-50', getBaseW(mcDirectory,['DYJetsToTT_MuEle_M-50','DYJetsToTT_MuEle_M-50_ext1'])+'/baseW') addSampleWeight(samples,'DY','DYJetsToTT_MuEle_M-50_ext1', getBaseW(mcDirectory,['DYJetsToTT_MuEle_M-50','DYJetsToTT_MuEle_M-50_ext1'])+'/baseW') samples['DY']['FilesPerJob'] = 1 #samples['DY']['EventsPerJob'] = 100000 else:
addSampleWeight(samples,'DY','DYJetsToLL_M-50-LO_ext1', DYbaseW+'/baseW') addSampleWeight(samples,'DY','DYJetsToLL_M-50-LO_ext2',DYbaseW+'/baseW') #addSampleWeight(samples,'DY','DYJetsToLL_M-50_ext2',ptllDYW_NLO) addSampleWeight(samples,'DY','DYJetsToLL_M-50-LO_ext1',ptllDYW_LO) addSampleWeight(samples,'DY','DYJetsToLL_M-50-LO_ext2',ptllDYW_LO) #addSampleWeight(samples,'DY','DYJetsToTT_MuEle_M-50',ptllDYW_NLO) addSampleWeight(samples,'DY','DYJetsToLL_M-10to50-LO',ptllDYW_LO) ''' ############ Top ############ Top_pTrw = '(TMath::Sqrt( TMath::Exp(0.0615-0.0005*topGenPt) * TMath::Exp(0.0615-0.0005*antitopGenPt) ) )' samples['top'] = { 'name': getSampleFiles(directory, 'TTTo2L2Nu', False, 'nanoLatino_') + getSampleFiles(directory, 'ST_s-channel', False, 'nanoLatino_') + getSampleFiles(directory, 'ST_t-channel_antitop', False, 'nanoLatino_') + getSampleFiles(directory, 'ST_t-channel_top', False, 'nanoLatino_') + getSampleFiles(directory, 'ST_tW_antitop', False, 'nanoLatino_') + getSampleFiles(directory, 'ST_tW_top', False, 'nanoLatino_'), 'weight': XSWeight + '*' + SFweight + '*' + GenLepMatch + '*' + METFilter_MC, 'FilesPerJob': 5, } addSampleWeight(samples, 'top', 'TTTo2L2Nu', Top_pTrw) ############ WW ############