Esempio n. 1
0
def getCachedBaseW(sample_list):
    sample_list.sort()
    sample_key = '__'.join(sample_list)
    if not sample_key in baseW_cache:
        baseW_cache[sample_key] = getBaseWnAOD(mcDirectory, mcProduction, sample_list)
        baseW_cache_file_o = open(baseW_cache_file, 'w')
        baseW_cache_file_o.write(json.dumps(baseW_cache, indent=2))
    print('getCachedBaseW return: '+baseW_cache[sample_key] +'/baseW')
    return str(baseW_cache[sample_key] +'/baseW')
Esempio n. 2
0
# }


# signals.append('WWewk')

# TEST SAMPLES

files = nanoGetSampleFiles(mcDirectory, 'TTTo2L2Nu') + \
    nanoGetSampleFiles(mcDirectory, 'ST_s-channel') + \
    nanoGetSampleFiles(mcDirectory, 'ST_t-channel_antitop') + \
    nanoGetSampleFiles(mcDirectory, 'ST_t-channel_top') + \
    nanoGetSampleFiles(mcDirectory, 'ST_tW_antitop') + \
    nanoGetSampleFiles(mcDirectory, 'ST_tW_top')

samples['top'] = {
    'name': files,
    'weight': mcCommonWeight,
    'FilesPerJob': 1,
}

TTTo2L2Nu_baseW = getBaseWnAOD(mcDirectory, mcProduction, ['TTTo2L2Nu'])
addSampleWeight(samples, 'top', 'TTTo2L2Nu', TTTo2L2Nu_baseW + "/baseW")

signals = []
samples['WWewk'] = {
    'name': nanoGetSampleFiles(mcDirectory, 'WpWmJJ_EWK_noTop'),
    'weight': mcCommonWeight + '*0.2571' + '*(Sum(abs(GenPart_pdgId)==6 || GenPart_pdgId==25)==0)', #filter tops and Higgs, factor to adjust the XS
    'FilesPerJob': 2
}

signals.append('WWewk')
Esempio n. 3
0
###########################################
#############  BACKGROUNDS  ###############
###########################################

samples['ZZ'] = {
    'name':
    getSampleFilesNano(directoryMC, 'ZZTo4L') +
    getSampleFilesNano(directoryMC, 'ZZTo4L_ext1'),
    'weight':
    XSweight + '*' + SFweight + '*' + GenLepMatch3l + '*' + METFilter_MC,
    'suppressNegativeNuisances': ['all'],
    'FilesPerJob':
    3,
}

ZZbaseW = getBaseWnAOD(directoryMC, 'Summer16_102X_nAODv5_Full2016v6',
                       ['ZZTo4L', 'ZZTo4L_ext1'])
addSampleWeight(samples, 'ZZ', 'ZZTo4L', ZZbaseW + '/baseW')
addSampleWeight(samples, 'ZZ', 'ZZTo4L_ext1', ZZbaseW + '/baseW')

samples['WZ'] = {
    'name':
    getSampleFilesNano(directoryMC, 'WZTo3LNu') +
    getSampleFilesNano(directoryMC, 'WZTo3LNu_ext1'),
    'weight':
    '(( Alt$(CleanJet_pt[1],0) < 30 )*' + wz1jSF +
    '+( Alt$(CleanJet_pt[1],0) >= 30 )*' + wz2jSF + ')*' + XSweight + '*' +
    SFweight + '*' + GenLepMatch3l + '*' + METFilter_MC,
    'suppressNegativeNuisances': ['all'],
    'FilesPerJob':
    1,
}
    getSampleFilesNano(directory, 'DYJetsToLL_M-50_HT-400to600_ext1') +
    getSampleFilesNano(directory, 'DYJetsToLL_M-50_HT-600to800') +
    getSampleFilesNano(directory, 'DYJetsToLL_M-50_HT-800to1200') +
    getSampleFilesNano(directory, 'DYJetsToLL_M-50_HT-1200to2500') +
    getSampleFilesNano(directory, 'DYJetsToLL_M-50_HT-2500toInf'),
    'weight':
    XSWeight + '*' + SFweight + '*' + PromptGenLepMatch + '*' + METFilter_MC +
    '*' + Zgfilter,
    'FilesPerJob':
    5,
    'suppressNegative': ['all'],
    'suppressNegativeNuisances': ['all'],
}

M10baseW = getBaseWnAOD(
    directory, 'Fall2017_102X_nAODv4_Full2017v5',
    ['DYJetsToLL_M-10to50-LO', 'DYJetsToLL_M-10to50-LO_ext1'])
M50baseW = getBaseWnAOD(directory, 'Fall2017_102X_nAODv4_Full2017v5',
                        ['DYJetsToLL_M-50-LO', 'DYJetsToLL_M-50-LO_ext1'])
HT100M4baseW = getBaseWnAOD(
    directory, 'Fall2017_102X_nAODv4_Full2017v5',
    ['DYJetsToLL_M-4to50_HT-100to200', 'DYJetsToLL_M-4to50_HT-100to200_ext1'])
HT200M4baseW = getBaseWnAOD(
    directory, 'Fall2017_102X_nAODv4_Full2017v5',
    ['DYJetsToLL_M-4to50_HT-200to400', 'DYJetsToLL_M-4to50_HT-200to400_ext1'])
HT400M4baseW = getBaseWnAOD(
    directory, 'Fall2017_102X_nAODv4_Full2017v5',
    ['DYJetsToLL_M-4to50_HT-400to600', 'DYJetsToLL_M-4to50_HT-400to600_ext1'])
HT600M4baseW = getBaseWnAOD(
    directory, 'Fall2017_102X_nAODv4_Full2017v5',
    ['DYJetsToLL_M-4to50_HT-600toInf', 'DYJetsToLL_M-4to50_HT-600toInf_ext1'])
Esempio n. 5
0
#samples['VZ'] = {
#    'name': files,
#    'weight': mcCommonWeight + '*1.11',
#    'FilesPerJob': 4
#}

########## W+jets #########

#files = nanoGetSampleFiles(mcDirectory, 'WJetsToLNu_Wpt100To250')
#files+= nanoGetSampleFiles(mcDirectory, 'WJetsToLNu_Wpt250To400')
#files+= nanoGetSampleFiles(mcDirectory, 'WJetsToLNu_Wpt400To600')
#files+= nanoGetSampleFiles(mcDirectory, 'WJetsToLNu_Wpt600ToInf')

#_ext4 not processed
# NLO combine stat
oldbW100pt = getBaseWnAOD(mcDirectory, mcProduction,
                          ['WJetsToLNu_Wpt100To250'])
newbW100pt = getBaseWnAOD(
    mcDirectory, mcProduction,
    ['WJetsToLNu_Wpt100To250', 'WJetsToLNu_Wpt100To250_ext1'])
newbW100w = newbW100pt + '/baseW'

oldbW250pt = getBaseWnAOD(mcDirectory, mcProduction,
                          ['WJetsToLNu_Wpt250To400'])
newbW250pt = getBaseWnAOD(
    mcDirectory, mcProduction,
    ['WJetsToLNu_Wpt250To400', 'WJetsToLNu_Wpt250To400_ext1'])
newbW250w = newbW250pt + '/baseW'

oldbW400pt = getBaseWnAOD(mcDirectory, mcProduction,
                          ['WJetsToLNu_Wpt400To600'])
newbW400pt = getBaseWnAOD(
#}


########## W+jets #########

# Pt binned + LO
#files = nanoGetSampleFiles(mcDirectory, 'WJetsToLNu_Pt50to100')
#files+= nanoGetSampleFiles(mcDirectory, 'WJetsToLNu_Pt100to250')
#files+= nanoGetSampleFiles(mcDirectory, 'WJetsToLNu_Pt250to400')
#files+= nanoGetSampleFiles(mcDirectory, 'WJetsToLNu_Pt400to600')
#files+= nanoGetSampleFiles(mcDirectory, 'WJetsToLNu_Pt600toInf')
#files+= nanoGetSampleFiles(mcDirectory, 'WJetsToLNu-LO')

# statistical merge
#oldbW1J = getBaseWnAOD(mcDirectory, mcProduction, ['WJetsToLNu-1J'])
newbW1J = getBaseWnAOD(mcDirectory, mcProduction, ['WJetsToLNu-1J', 'WJetsToLNu-1J_ext1'])
newbW1Jw = newbW1J+'/baseW'

#oldbW2J = getBaseWnAOD(mcDirectory, mcProduction, ['WJetsToLNu-2J'])
newbW2J = getBaseWnAOD(mcDirectory, mcProduction, ['WJetsToLNu-2J', 'WJetsToLNu-2J_ext1'])
newbW2Jw = newbW2J+'/baseW'

files = nanoGetSampleFiles(mcDirectory, 'WJetsToLNu_Pt100to250')
files+= nanoGetSampleFiles(mcDirectory, 'WJetsToLNu_Pt250to400')
files+= nanoGetSampleFiles(mcDirectory, 'WJetsToLNu_Pt400to600')
files+= nanoGetSampleFiles(mcDirectory, 'WJetsToLNu_Pt600toInf')
files+= nanoGetSampleFiles(mcDirectory, 'WJetsToLNu-0J')
files+= nanoGetSampleFiles(mcDirectory, 'WJetsToLNu-1J')
files+= nanoGetSampleFiles(mcDirectory, 'WJetsToLNu-1J_ext1')
files+= nanoGetSampleFiles(mcDirectory, 'WJetsToLNu-2J')
files+= nanoGetSampleFiles(mcDirectory, 'WJetsToLNu-2J_ext1')
Esempio n. 7
0
    getSampleFilesNano(directory, 'DYJetsToLL_M-50_HT-400to600_ext2') +
    getSampleFilesNano(directory, 'DYJetsToLL_M-50_HT-600to800') +
    getSampleFilesNano(directory, 'DYJetsToLL_M-50_HT-800to1200') +
    getSampleFilesNano(directory, 'DYJetsToLL_M-50_HT-1200to2500') +
    getSampleFilesNano(directory, 'DYJetsToLL_M-50_HT-2500toInf'),
    'weight':
    XSWeight + '*' + SFweight + '*' + PromptGenLepMatch + '*' + METFilter_MC +
    '*' + Zgfilter,
    'FilesPerJob':
    5,
    'suppressNegative': ['all'],
    'suppressNegativeNuisances': ['all'],
}

M10baseW = getBaseWnAOD(
    directory, 'Autumn18_102X_nAODv6_Full2018v6',
    ['DYJetsToLL_M-10to50-LO', 'DYJetsToLL_M-10to50-LO_ext1'])
HT400baseW = getBaseWnAOD(
    directory, 'Autumn18_102X_nAODv6_Full2018v6',
    ['DYJetsToLL_M-50_HT-400to600', 'DYJetsToLL_M-50_HT-400to600_ext2'])

addSampleWeight(samples, 'DY', 'DYJetsToLL_M-10to50-LO',
                ptllDYW_LO + '*(LHE_HT<100.0)*' + M10baseW + '/baseW')
addSampleWeight(samples, 'DY', 'DYJetsToLL_M-10to50-LO_ext1',
                ptllDYW_LO + '*(LHE_HT<100.0)*' + M10baseW + '/baseW')
addSampleWeight(samples, 'DY', 'DYJetsToLL_M-50-LO',
                ptllDYW_LO + '*(LHE_HT<70.0)')
addSampleWeight(samples, 'DY', 'DYJetsToLL_M-4to50_HT-100to200', ptllDYW_LO)
addSampleWeight(samples, 'DY', 'DYJetsToLL_M-4to50_HT-200to400', ptllDYW_LO)
addSampleWeight(samples, 'DY', 'DYJetsToLL_M-4to50_HT-400to600', ptllDYW_LO)
addSampleWeight(samples, 'DY', 'DYJetsToLL_M-4to50_HT-600toInf', ptllDYW_LO)
Esempio n. 8
0
if useWgFXFX:
    files = nanoGetSampleFiles(mcDirectory, 'Wg_AMCNLOFXFX') + \
        nanoGetSampleFiles(mcDirectory, 'Wg_AMCNLOFXFX_PDFWeights') + \
        nanoGetSampleFiles(mcDirectory, 'Wg_AMCNLOFXFX_PDFWeights_ext1') + \
        nanoGetSampleFiles(mcDirectory, 'ZGToLLG')

    samples['Vg'] = {
        'name': files,
        'weight':
        mcCommonWeightNoMatch + embed_tautauveto + '*(Gen_ZGstar_mass <= 0)',
        'FilesPerJob': 2
    }

    wgbasew = getBaseWnAOD(mcDirectory, 'Fall2017_102X_nAODv7_Full2017v7', [
        'Wg_AMCNLOFXFX', 'Wg_AMCNLOFXFX_PDFWeights',
        'Wg_AMCNLOFXFX_PDFWeights_ext1'
    ])
    addSampleWeight(samples, 'Vg', 'Wg_AMCNLOFXFX',
                    '191.4/586.*' + wgbasew + '/baseW')
    addSampleWeight(samples, 'Vg', 'Wg_AMCNLOFXFX_PDFWeights',
                    '191.4/586.*' + wgbasew + '/baseW')
    addSampleWeight(samples, 'Vg', 'Wg_AMCNLOFXFX_PDFWeights_ext1',
                    '191.4/586.*' + wgbasew + '/baseW')

    ######## VgS ########

    files = nanoGetSampleFiles(mcDirectory, 'Wg_AMCNLOFXFX') + \
        nanoGetSampleFiles(mcDirectory, 'Wg_AMCNLOFXFX_PDFWeights') + \
        nanoGetSampleFiles(mcDirectory, 'Wg_AMCNLOFXFX_PDFWeights_ext1') + \
        nanoGetSampleFiles(mcDirectory, 'ZGToLLG') + \
        nanoGetSampleFiles(mcDirectory, 'WZTo3LNu_mllmin01')
Esempio n. 9
0
    getSampleFilesNano(directory, 'ZZTo2L2Q') +
    getSampleFilesNano(directory, 'ZZTo4L_ext1') +
    getSampleFilesNano(directory, 'ZZTo4L_ext2') +
    getSampleFilesNano(directory, 'ggZZ4m') +
    getSampleFilesNano(directory, 'ggZZ4m_ext1') +
    getSampleFilesNano(directory, 'ggZZ4t') +
    getSampleFilesNano(directory, 'ggZZ2e2t') +
    getSampleFilesNano(directory, 'ggZZ2m2t') +
    getSampleFilesNano(directory, 'ggZZ2e2m'),
    'weight':
    XSWeight + '*' + SFweight + '*' + PromptGenLepMatch + '*' + METFilter_MC,
    'FilesPerJob':
    3,
}

ZZ2LbaseW = getBaseWnAOD(directory, 'Autumn18_102X_nAODv7_Full2018v7',
                         ['ZZTo2L2Nu_ext1', 'ZZTo2L2Nu_ext2'])
ZZ4LbaseW = getBaseWnAOD(directory, 'Autumn18_102X_nAODv7_Full2018v7',
                         ['ZZTo4L_ext1', 'ZZTo4L_ext2'])
ggZZbaseW = getBaseWnAOD(directory, 'Autumn18_102X_nAODv7_Full2018v7',
                         ['ggZZ4m', 'ggZZ4m_ext1'])

addSampleWeight(
    samples, 'ZZ', 'ZZTo2L2Nu_ext1', "1.07*" + ZZ2LbaseW + "/baseW"
)  ## The non-ggZZ NNLO/NLO k-factor, cited from https://arxiv.org/abs/1405.2219v1
addSampleWeight(samples, 'ZZ', 'ZZTo2L2Nu_ext2',
                "1.07*" + ZZ2LbaseW + "/baseW")
addSampleWeight(samples, 'ZZ', 'ZZTo2L2Q', "1.07")
addSampleWeight(samples, 'ZZ', 'ZZTo4L_ext1', "1.07*" + ZZ4LbaseW + "/baseW")
addSampleWeight(samples, 'ZZ', 'ZZTo4L_ext2', "1.07*" + ZZ4LbaseW + "/baseW")
addSampleWeight(
    samples, 'ZZ', 'ggZZ2e2t', "1.68"
Esempio n. 10
0
###########################################
#############  BACKGROUNDS  ###############
###########################################

samples['ZZ'] = {
    'name':
    getSampleFilesNano(directoryMC, 'ZZTo4L') +
    getSampleFilesNano(directoryMC, 'ZZTo4L_ext1'),
    'weight':
    XSweight + '*' + SFweight + '*' + GenLepMatch3l + '*' + METFilter_MC,
    'suppressNegativeNuisances': ['all'],
    'FilesPerJob':
    3,
}

ZZbaseW = getBaseWnAOD(directoryMC, 'Fall2017_102X_nAODv4_Full2017v5',
                       ['ZZTo4L', 'ZZTo4L_ext1'])
addSampleWeight(samples, 'ZZ', 'ZZTo4L', ZZbaseW + '/baseW')
addSampleWeight(samples, 'ZZ', 'ZZTo4L_ext1', ZZbaseW + '/baseW')

samples['WZ'] = {
    'name':
    getSampleFilesNano(directoryMC, 'WZTo3LNu_mllmin01'),
    'weight':
    '(( Alt$(CleanJet_pt[1],0) < 30 )*' + wz1jSF +
    '+( Alt$(CleanJet_pt[1],0) >= 30 )*' + wz2jSF + ')*' + XSweight + '*' +
    SFweight + '*' + GenLepMatch3l + '*' + METFilter_MC,
    'suppressNegativeNuisances': ['all'],
    'FilesPerJob':
    1,
}
Esempio n. 11
0
    getSampleFilesNano(directory, 'DYJetsToLL_M-50_HT-400to600') +
    getSampleFilesNano(directory, 'DYJetsToLL_M-50_HT-400to600_ext1') +
    getSampleFilesNano(directory, 'DYJetsToLL_M-50_HT-600to800') +
    getSampleFilesNano(directory, 'DYJetsToLL_M-50_HT-800to1200') +
    getSampleFilesNano(directory, 'DYJetsToLL_M-50_HT-1200to2500') +
    getSampleFilesNano(directory, 'DYJetsToLL_M-50_HT-2500toinf'),
    'weight':
    XSWeight + '*' + SFweight + '*' + PromptGenLepMatch + '*' + METFilter_MC +
    '*' + Zgfilter,
    'FilesPerJob':
    10,
    'suppressNegative': ['all'],
    'suppressNegativeNuisances': ['all'],
}

M50baseW = getBaseWnAOD(directory, 'Summer16_102X_nAODv4_Full2016v5',
                        ['DYJetsToLL_M-50-LO_ext1', 'DYJetsToLL_M-50-LO_ext2'])
HT100M5baseW = getBaseWnAOD(
    directory, 'Summer16_102X_nAODv4_Full2016v5',
    ['DYJetsToLL_M-5to50_HT-100to200', 'DYJetsToLL_M-5to50_HT-100to200_ext1'])
HT200M5baseW = getBaseWnAOD(
    directory, 'Summer16_102X_nAODv4_Full2016v5',
    ['DYJetsToLL_M-5to50_HT-200to400', 'DYJetsToLL_M-5to50_HT-200to400_ext1'])
HT400M5baseW = getBaseWnAOD(
    directory, 'Summer16_102X_nAODv4_Full2016v5',
    ['DYJetsToLL_M-5to50_HT-400to600', 'DYJetsToLL_M-5to50_HT-400to600_ext1'])
HT100M50baseW = getBaseWnAOD(
    directory, 'Summer16_102X_nAODv4_Full2016v5',
    ['DYJetsToLL_M-50_HT-100to200', 'DYJetsToLL_M-50_HT-100to200_ext1'])
HT200M50baseW = getBaseWnAOD(
    directory, 'Summer16_102X_nAODv4_Full2016v5',
    ['DYJetsToLL_M-50_HT-200to400', 'DYJetsToLL_M-50_HT-200to400_ext1'])
Esempio n. 12
0
######## Vg ########

useWgFXFX = True

if useWgFXFX:
    files = nanoGetSampleFiles(mcDirectory, 'Wg_AMCNLOFXFX_01J') + \
        nanoGetSampleFiles(mcDirectory, 'Wg_AMCNLOFXFX_01J_ext1') + \
        nanoGetSampleFiles(mcDirectory, 'Zg')

    samples['Vg'] = {
        'name': files,
        'weight':
        mcCommonWeightNoMatch + embed_tautauveto + '*(!(Gen_ZGstar_mass > 0))',
        'FilesPerJob': 2
    }
    wgbasew = getBaseWnAOD(mcDirectory, 'Summer16_102X_nAODv7_Full2016v7',
                           ['Wg_AMCNLOFXFX_01J', 'Wg_AMCNLOFXFX_01J_ext1'])
    addSampleWeight(samples, 'Vg', 'Wg_AMCNLOFXFX_01J',
                    '191.4/586.*' + wgbasew + '/baseW')
    addSampleWeight(samples, 'Vg', 'Wg_AMCNLOFXFX_01J_ext1',
                    '191.4/586.*' + wgbasew + '/baseW')

    ######## VgS ########

    files = nanoGetSampleFiles(mcDirectory, 'Wg_AMCNLOFXFX_01J') + \
        nanoGetSampleFiles(mcDirectory, 'Wg_AMCNLOFXFX_01J_ext1') + \
        nanoGetSampleFiles(mcDirectory, 'Zg') + \
        nanoGetSampleFiles(mcDirectory, 'WZTo3LNu_mllmin01')

    samples['VgS'] = {
        'name': files,
        'weight': mcCommonWeight + embed_tautauveto +
Esempio n. 13
0
           }

###########################################
#############  BACKGROUNDS  ###############
###########################################

############ Top ############

samples['ttV'] = {    'name'   :   getSampleFilesNano(directory,'TTWJetsToLNu_PSweights') #missing TTWJetsToLNu for v7
                                 + getSampleFilesNano(directory,'TTZjets')
                                 + getSampleFilesNano(directory,'TTZjets_ext1'),
                     'weight' : XSWeight+'*'+SFweight+'*'+PromptGenLepMatch+'*'+METFilter_MC ,
                     'FilesPerJob' : 5,
                 }

ttZbaseW = getBaseWnAOD(directory,'Fall2017_102X_nAODv7_Full2017v7',['TTZjets','TTZjets_ext1'])

addSampleWeight(samples,'ttV','TTZjets'     ,ttZbaseW+'/baseW')
addSampleWeight(samples,'ttV','TTZjets_ext1',ttZbaseW+'/baseW')

###### Zg

samples['Zg']  =  {     'name'   :    getSampleFilesNano(directory,'ZGToLLG'),
                        'weight' : XSWeight+'*'+SFweight+'*'+METFilter_MC + '*(Gen_ZGstar_mass <= 0)',
                        'FilesPerJob' : 3 ,
                  }

###### Zg*

samples['ZgS']  = {    'name'   :   getSampleFilesNano(directory,'ZGToLLG'),
                       'weight' : XSWeight+'*'+SFweight+'*'+PromptGenLepMatch+'*'+METFilter_MC+'*(Gen_ZGstar_mass > 0)',
Esempio n. 14
0
###### WW ########

###### WZ ########

###### ZZ ########

########## W+jets #########

## NLO samples

# baseW
print('Extracting basW NLO samples')
#oldbW100pt = getBaseWnAOD(mcDirectory, 'Summer16_102X_nAODv7_Full2016v7', ['WJetsToLNu_Wpt100To250'])
newbW100pt = getBaseWnAOD(
    mcDirectory, 'Summer16_102X_nAODv7_Full2016v7',
    ['WJetsToLNu_Wpt100To250', 'WJetsToLNu_Wpt100To250_ext1'])
newbW100w = newbW100pt + '/baseW'

#oldbW250pt = getBaseWnAOD(mcDirectory, 'Summer16_102X_nAODv7_Full2016v7', ['WJetsToLNu_Wpt250To400'])
newbW250pt = getBaseWnAOD(
    mcDirectory, 'Summer16_102X_nAODv7_Full2016v7',
    ['WJetsToLNu_Wpt250To400', 'WJetsToLNu_Wpt250To400_ext1'])
newbW250w = newbW250pt + '/baseW'

#oldbW400pt = getBaseWnAOD(mcDirectory, 'Summer16_102X_nAODv7_Full2016v7', ['WJetsToLNu_Wpt400To600'])
newbW400pt = getBaseWnAOD(
    mcDirectory, 'Summer16_102X_nAODv7_Full2016v7',
    ['WJetsToLNu_Wpt400To600', 'WJetsToLNu_Wpt400To600_ext1'])
newbW400w = newbW400pt + '/baseW'
Esempio n. 15
0
samples['Wjets_NLOin'] = {
    'name': files,
    'weight': mcCommonWeight + '*(LHE_Vpt < 120)*EWKnloW[0]',
    'FilesPerJob': 4,
}

samples['Wjets_NLOinR'] = {
    'name': files,
    'weight': mcCommonWeightRaw + '*(LHE_Vpt < 120)',
    'FilesPerJob': 4,
    'isData': ['all'],
}

# Pt binned
oldbW100pt = getBaseWnAOD(mcDirectory, 'Summer16_102X_nAODv7_Full2016v7',
                          ['WJetsToLNu_Wpt100To250'])
newbW100pt = getBaseWnAOD(
    mcDirectory, 'Summer16_102X_nAODv7_Full2016v7',
    ['WJetsToLNu_Wpt100To250', 'WJetsToLNu_Wpt100To250_ext1'])
newbW100w = newbW100pt + '/baseW'

oldbW250pt = getBaseWnAOD(mcDirectory, 'Summer16_102X_nAODv7_Full2016v7',
                          ['WJetsToLNu_Wpt250To400'])
newbW250pt = getBaseWnAOD(
    mcDirectory, 'Summer16_102X_nAODv7_Full2016v7',
    ['WJetsToLNu_Wpt250To400', 'WJetsToLNu_Wpt250To400_ext1'])
newbW250w = newbW250pt + '/baseW'

oldbW400pt = getBaseWnAOD(mcDirectory, 'Summer16_102X_nAODv7_Full2016v7',
                          ['WJetsToLNu_Wpt400To600'])
newbW400pt = getBaseWnAOD(
Esempio n. 16
0
def CombineBaseW(samples, proc, samplelist):
    newbaseW = getBaseWnAOD(mcDirectory, mcProduction, samplelist)
    for s in samplelist:
        addSampleWeight(samples, proc, s, newbaseW + '/baseW')
Esempio n. 17
0
                                 + getSampleFilesNano(directory,'DYJetsToLL_M-50_HT-100to200_ext1')
                                 + getSampleFilesNano(directory,'DYJetsToLL_M-50_HT-200to400')
                                 + getSampleFilesNano(directory,'DYJetsToLL_M-50_HT-200to400_ext1')
                                 + getSampleFilesNano(directory,'DYJetsToLL_M-50_HT-400to600')
                                 + getSampleFilesNano(directory,'DYJetsToLL_M-50_HT-400to600_ext1')
                                 + getSampleFilesNano(directory,'DYJetsToLL_M-50_HT-600to800')
                                 + getSampleFilesNano(directory,'DYJetsToLL_M-50_HT-800to1200')
                                 + getSampleFilesNano(directory,'DYJetsToLL_M-50_HT-1200to2500')
                                 + getSampleFilesNano(directory,'DYJetsToLL_M-50_HT-2500toinf'),
                     'weight' : XSWeight+'*'+SFweight+'*'+PromptGenLepMatch+'*'+METFilter_MC+'*'+Zgfilter ,
                     'FilesPerJob' : 10,
                     'suppressNegative' :['all'],
                     'suppressNegativeNuisances' :['all'],
                 }

M50baseW      = getBaseWnAOD(directory,'Summer16_102X_nAODv5_Full2016v6',['DYJetsToLL_M-50-LO_ext1',       'DYJetsToLL_M-50-LO_ext2'])
HT100M5baseW  = getBaseWnAOD(directory,'Summer16_102X_nAODv5_Full2016v6',['DYJetsToLL_M-5to50_HT-100to200','DYJetsToLL_M-5to50_HT-100to200_ext1'])
HT200M5baseW  = getBaseWnAOD(directory,'Summer16_102X_nAODv5_Full2016v6',['DYJetsToLL_M-5to50_HT-200to400','DYJetsToLL_M-5to50_HT-200to400_ext1'])
HT400M5baseW  = getBaseWnAOD(directory,'Summer16_102X_nAODv5_Full2016v6',['DYJetsToLL_M-5to50_HT-400to600','DYJetsToLL_M-5to50_HT-400to600_ext1'])
HT600M5baseW  = getBaseWnAOD(directory,'Summer16_102X_nAODv5_Full2016v6',['DYJetsToLL_M-5to50_HT-600toinf','DYJetsToLL_M-5to50_HT-600toinf_ext1'])
HT100M50baseW = getBaseWnAOD(directory,'Summer16_102X_nAODv5_Full2016v6',['DYJetsToLL_M-50_HT-100to200',   'DYJetsToLL_M-50_HT-100to200_ext1'])
HT200M50baseW = getBaseWnAOD(directory,'Summer16_102X_nAODv5_Full2016v6',['DYJetsToLL_M-50_HT-200to400',   'DYJetsToLL_M-50_HT-200to400_ext1'])
HT400M50baseW = getBaseWnAOD(directory,'Summer16_102X_nAODv5_Full2016v6',['DYJetsToLL_M-50_HT-400to600',   'DYJetsToLL_M-50_HT-400to600_ext1'])

addSampleWeight(samples,'DY','DYJetsToLL_M-10to50-LO'              ,ptllDYW_LO+'*(LHE_HT<70.0)')
addSampleWeight(samples,'DY','DYJetsToLL_M-50-LO_ext1'             ,ptllDYW_LO+'*(LHE_HT<70.0)*'+M50baseW+'/baseW')
addSampleWeight(samples,'DY','DYJetsToLL_M-50-LO_ext2'             ,ptllDYW_LO+'*(LHE_HT<70.0)*'+M50baseW+'/baseW')
addSampleWeight(samples,'DY','DYJetsToLL_M-5to50_HT-70to100'       ,ptllDYW_LO)
addSampleWeight(samples,'DY','DYJetsToLL_M-5to50_HT-100to200'      ,ptllDYW_LO+'*'+HT100M5baseW+'/baseW')
addSampleWeight(samples,'DY','DYJetsToLL_M-5to50_HT-100to200_ext1' ,ptllDYW_LO+'*'+HT100M5baseW+'/baseW')
addSampleWeight(samples,'DY','DYJetsToLL_M-5to50_HT-200to400'      ,ptllDYW_LO+'*'+HT200M5baseW+'/baseW')
Esempio n. 18
0
###########################################
#############  BACKGROUNDS  ###############
###########################################

samples['ZZ'] = {
    'name':
    getSampleFilesNano(directoryMC, 'ZZTo4L_ext1') +
    getSampleFilesNano(directoryMC, 'ZZTo4L_ext2'),
    'weight':
    XSweight + '*' + SFweight + '*' + GenLepMatch3l + '*' + METFilter_MC,
    'suppressNegativeNuisances': ['all'],
    'FilesPerJob':
    3,
}

ZZbaseW = getBaseWnAOD(directoryMC, 'Autumn18_102X_nAODv5_Full2018v5',
                       ['ZZTo4L_ext1', 'ZZTo4L_ext2'])
addSampleWeight(samples, 'ZZ', 'ZZTo4L_ext1', ZZbaseW + '/baseW')
addSampleWeight(samples, 'ZZ', 'ZZTo4L_ext2', ZZbaseW + '/baseW')

samples['WZ'] = {
    'name':
    getSampleFilesNano(directoryMC, 'WZTo3LNu_mllmin01'),
    'weight':
    '(( Alt$(CleanJet_pt[1],0) < 30 )*' + wz1jSF +
    '+( Alt$(CleanJet_pt[1],0) >= 30 )*' + wz2jSF + ')*' + XSweight + '*' +
    SFweight + '*' + GenLepMatch3l + '*' + METFilter_MC,
    'suppressNegativeNuisances': ['all'],
    'FilesPerJob':
    1,
}
Esempio n. 19
0
    # ... Add DY HT Samples
    if useDYHT:
        samples['DY']['name'] +=     nanoGetSampleFiles(mcDirectory, 'DYJetsToLL_M-4to50_HT-200to400' ) \
                                   + nanoGetSampleFiles(mcDirectory, 'DYJetsToLL_M-4to50_HT-400to600' ) \
                                   + nanoGetSampleFiles(mcDirectory, 'DYJetsToLL_M-4to50_HT-600toInf') \
                                   + nanoGetSampleFiles(mcDirectory, 'DYJetsToLL_M-50_HT-70to100') \
                                   + nanoGetSampleFiles(mcDirectory, 'DYJetsToLL_M-50_HT-100to200') \
                                   + nanoGetSampleFiles(mcDirectory, 'DYJetsToLL_M-50_HT-200to400') \
                                   + nanoGetSampleFiles(mcDirectory, 'DYJetsToLL_M-50_HT-400to600') \
                                   + nanoGetSampleFiles(mcDirectory, 'DYJetsToLL_M-50_HT-600to800') \
                                   + nanoGetSampleFiles(mcDirectory, 'DYJetsToLL_M-50_HT-800to1200')  \
                                   + nanoGetSampleFiles(mcDirectory, 'DYJetsToLL_M-50_HT-1200to2500') \
                                   + nanoGetSampleFiles(mcDirectory, 'DYJetsToLL_M-50_HT-2500toInf')

    M10baseW = getBaseWnAOD(
        mcDirectory, 'Autumn18_102X_nAODv6_Full2018v6',
        ['DYJetsToLL_M-10to50-LO', 'DYJetsToLL_M-10to50-LO_ext1'])

    addSampleWeight(samples, 'DY', 'DYJetsToLL_M-50_ext2', ptllDYW_NLO)
    addSampleWeight(samples, 'DY', 'DYJetsToLL_M-10to50-LO',
                    ptllDYW_LO + '*' + M10baseW + '/baseW')
    addSampleWeight(samples, 'DY', 'DYJetsToLL_M-10to50-LO_ext1',
                    ptllDYW_LO + '*' + M10baseW + '/baseW')

    if useDYHT:
        # Remove high HT from inclusive samples
        addSampleWeight(samples, 'DY', 'DYJetsToLL_M-10to50-LO_ext1',
                        '(LHE_HT<100)')
        addSampleWeight(samples, 'DY', 'DYJetsToLL_M-10to50-LO',
                        '(LHE_HT<100)')
        addSampleWeight(samples, 'DY', 'DYJetsToLL_M-50_ext2', '(LHE_HT<70)')
Esempio n. 20
0
}

samples['WZ'] = {
    'name':
    getSampleFilesNano(directoryMC, 'WZTo3LNu') +
    getSampleFilesNano(directoryMC, 'WZTo3LNu_ext1'),
    'weight':
    '(( Alt$(CleanJet_pt[1],0) < 30 )*' + wz1jSF +
    '+( Alt$(CleanJet_pt[1],0) >= 30 )*' + wz2jSF + ')*' + XSweight + '*' +
    SFweight + '*' + GenLepMatch3l + '*' + METFilter_MC,
    'suppressNegativeNuisances': ['all'],
    'FilesPerJob':
    1,
}

WZbaseW = getBaseWnAOD(directoryMC, 'Summer16_102X_nAODv4_Full2016v5',
                       ['WZTo3LNu', 'WZTo3LNu_ext1'])
addSampleWeight(samples, 'WZ', 'WZTo3LNu', WZbaseW + '/baseW')
addSampleWeight(samples, 'WZ', 'WZTo3LNu_ext1', WZbaseW + '/baseW')

samples['VVV'] = {
    'name':
    getSampleFilesNano(directoryMC, 'WZZ') +
    getSampleFilesNano(directoryMC, 'ZZZ') +
    getSampleFilesNano(directoryMC, 'WWZ') +
    getSampleFilesNano(directoryMC, 'WWW'),
    'weight':
    XSweight + '*' + SFweight + '*' + GenLepMatch3l + '*' + METFilter_MC,
    'suppressNegativeNuisances': ['all'],
    'FilesPerJob':
    5,
}
Esempio n. 21
0
#useEmbeddedDY = False
#useDYtt = True

files = nanoGetSampleFiles(mcDirectory, 'DYJetsToTT_MuEle_M-50') + \
        nanoGetSampleFiles(mcDirectory, 'DYJetsToLL_M-10to50-LO')+ \
        nanoGetSampleFiles(mcDirectory, 'DYJetsToLL_M-10to50-LO_ext1')

samples['DY'] = {
    'name': files,
    'weight': mcCommonWeight+ '*( !(Sum$(PhotonGen_isPrompt==1 && PhotonGen_pt>15 && abs(PhotonGen_eta)<2.6) > 0 &&\
                                     Sum$(LeptonGen_isPrompt==1 && LeptonGen_pt>15)>=2) )',
    'FilesPerJob': 10,
}

DYbaseW = getBaseWnAOD(mcDirectory, mcProduction, ['DYJetsToLL_M-10to50-LO', 'DYJetsToLL_M-10to50-LO_ext1'])

addSampleWeight(samples,'DY','DYJetsToTT_MuEle_M-50',      'DY_NLO_pTllrw')
addSampleWeight(samples,'DY','DYJetsToLL_M-10to50-LO',     'DY_LO_pTllrw*'+DYbaseW+'/baseW')
addSampleWeight(samples,'DY','DYJetsToLL_M-10to50-LO_ext1','DY_LO_pTllrw*'+DYbaseW+'/baseW')

###### Top #######

files = nanoGetSampleFiles(mcDirectory, 'TTTo2L2Nu') + \
    nanoGetSampleFiles(mcDirectory, 'ST_s-channel_ext1') + \
    nanoGetSampleFiles(mcDirectory, 'ST_t-channel_antitop') + \
    nanoGetSampleFiles(mcDirectory, 'ST_t-channel_top') + \
    nanoGetSampleFiles(mcDirectory, 'ST_tW_antitop_ext1') + \
    nanoGetSampleFiles(mcDirectory, 'ST_tW_top_ext1')

samples['top'] = {
###### DY #######

###### Top #######

###### VBF V ######

###### WW ########

###### WZ ########

###### ZZ ########

########## W+jets #########

oldbW1J = getBaseWnAOD(mcDirectory, 'Fall2017_102X_nAODv7_Full2017v7',
                       ['WJetsToLNu-1J'])
extbW1J = getBaseWnAOD(mcDirectory, 'Fall2017_102X_nAODv7_Full2017v7',
                       ['WJetsToLNu-1J_ext1'])
newbW1J = getBaseWnAOD(mcDirectory, 'Fall2017_102X_nAODv7_Full2017v7',
                       ['WJetsToLNu-1J', 'WJetsToLNu-1J_ext1'])
newbW1Jw = newbW1J + '/baseW'
print(' 1J old baseW: ' + oldbW1J + ', new baseW: ' + newbW1J +
      ', ext baseW: ' + extbW1J)

oldbW2J = getBaseWnAOD(mcDirectory, 'Fall2017_102X_nAODv7_Full2017v7',
                       ['WJetsToLNu-2J'])
extbW2J = getBaseWnAOD(mcDirectory, 'Fall2017_102X_nAODv7_Full2017v7',
                       ['WJetsToLNu-2J_ext1'])
newbW2J = getBaseWnAOD(mcDirectory, 'Fall2017_102X_nAODv7_Full2017v7',
                       ['WJetsToLNu-2J', 'WJetsToLNu-2J_ext1'])
newbW2Jw = newbW2J + '/baseW'
Esempio n. 23
0
files += nanoGetSampleFiles(mcDirectory, 'TTWjets')
files += nanoGetSampleFiles(mcDirectory, 'TTZjets')
files += nanoGetSampleFiles(mcDirectory, 'ST_s-channel_ext1')
files += nanoGetSampleFiles(mcDirectory, 'ST_t-channel_antitop')
files += nanoGetSampleFiles(mcDirectory, 'ST_t-channel_top')
files += nanoGetSampleFiles(mcDirectory, 'ST_tW_antitop_ext1')
files += nanoGetSampleFiles(mcDirectory, 'ST_tW_top_ext1')

samples['top'] = {
    'name': files,
    'weight': mcCommonWeight,
    'FilesPerJob': 3,
    #'FilesPerJob': 2,
}

oldbWTTToSem = getBaseWnAOD(mcDirectory, mcProduction, ['TTToSemiLeptonic'])
newbWTTToSem = getBaseWnAOD(mcDirectory, mcProduction,
                            ['TTToSemiLeptonic', 'TTToSemiLeptonic_ext3'])
newbWTTToSemw = newbWTTToSem + '/baseW'

addSampleWeight(samples, 'top', 'TTToSemiLeptonic', newbWTTToSemw)
addSampleWeight(samples, 'top', 'TTToSemiLeptonic_ext3', newbWTTToSemw)

# ttbar pT re-weighting
# https://twiki.cern.ch/twiki/bin/viewauth/CMS/TopPtReweighting
# https://indico.cern.ch/event/904971/contributions/3857701/attachments/2036949/3410728/TopPt_20.05.12.pdf
addSampleWeight(samples, 'top', 'TTToSemiLeptonic', 'Top_pTrw')
addSampleWeight(samples, 'top', 'TTToSemiLeptonic_ext3', 'Top_pTrw')
addSampleWeight(samples, 'top', 'TTTo2L2Nu', 'Top_pTrw')
addSampleWeight(samples, 'top', 'TTWjets', 'Top_pTrw')
addSampleWeight(samples, 'top', 'TTZjets', 'Top_pTrw')
def CombineBaseW(samples, proc, samplelist):
    newbaseW = getBaseWnAOD(mcDirectory, 'Fall2017_102X_nAODv7_Full2017v7',
                            samplelist)
    for s in samplelist:
        addSampleWeight(samples, proc, s, newbaseW + '/baseW')
Esempio n. 25
0
###########################################

############ Top ############

samples['ttV'] = {
    'name':
    getSampleFilesNano(directory, 'TTWJetsToLNu_ext1') +
    getSampleFilesNano(directory, 'TTWJetsToLNu_ext2') +
    getSampleFilesNano(directory, 'TTZjets'),
    'weight':
    XSWeight + '*' + SFweight + '*' + PromptGenLepMatch + '*' + METFilter_MC,
    'FilesPerJob':
    10,
}

ttWbaseW = getBaseWnAOD(directory, 'Summer16_102X_nAODv7_Full2016v7',
                        ['TTWJetsToLNu_ext1', 'TTWJetsToLNu_ext2'])

addSampleWeight(samples, 'ttV', 'TTWJetsToLNu_ext1', ttWbaseW + '/baseW')
addSampleWeight(samples, 'ttV', 'TTWJetsToLNu_ext2', ttWbaseW + '/baseW')

###### Zg

samples['Zg'] = {
    'name': getSampleFilesNano(directory, 'Zg'),
    'weight':
    XSWeight + '*' + SFweight + '*' + METFilter_MC + '*(Gen_ZGstar_mass <= 0)',
    'FilesPerJob': 10,
}

###### Zg*
Esempio n. 26
0
        'name':
        nanoGetSampleFiles(mcDirectory, 'VBFHToWWToLNuQQ_M' + MX) +
        nanoGetSampleFiles(mcDirectory, 'VBFHToWWToLNuQQ_M125') +
        nanoGetSampleFiles(mcDirectory, 'WpWmJJ_QCD_noTop'),
        'weight':
        mcCommonWeight,
        'FilesPerJob':
        5
    }
    addSampleWeight(
        samples, 'QQHSBI_' + MX + model_name, 'VBFHToWWToLNuQQ_M' + MX,
        '(' + model + ' + ' + model_I + ') * (abs(' + model_I + ') < 500)')

    if MX in ['4000', '5000'
              ]:  # Just to be sure, recalculate baseW with new cross sections
        newbasew = getBaseWnAOD(mcDirectory, mcProduction,
                                ['VBFHToWWToLNuQQ_M' + MX])
        addSampleWeight(samples, 'QQH_' + MX + model_name,
                        'VBFHToWWToLNuQQ_M' + MX, newbasew + '/baseW')
        addSampleWeight(samples, 'QQHSBI_' + MX + model_name,
                        'VBFHToWWToLNuQQ_M' + MX, newbasew + '/baseW')

    samples['QQH_H_' + MX + model_name] = {
        'name': nanoGetSampleFiles(mcDirectory, 'VBFHToWWToLNuQQ_M' + MX),
        'weight':
        mcCommonWeight + '*(' + model + '_H)* (abs(' + model_H + ') < 5000)',
        'FilesPerJob': 5
    }

    # Model dependent -> Xsec*BR is applied in later step, so remove "SM"-Xsec*BR
    SMxsec = HiggsXS.GetHiggsXS4Sample('YR4', '13TeV',
                                       'VBFHToWWToLNuQQ_M' + MX)['xs']
Esempio n. 27
0
###########################################

###### DY #######

files = nanoGetSampleFiles(mcDirectory, 'DYJetsToTT_MuEle_M-50') + \
    nanoGetSampleFiles(mcDirectory, 'DYJetsToTT_MuEle_M-50_ext1') + \
    nanoGetSampleFiles(mcDirectory, 'DYJetsToLL_M-10to50')

samples['DY'] = {
    'name': files,
    'weight': mcCommonWeight +
    '*( !(Sum$(PhotonGen_isPrompt==1 && PhotonGen_pt>10 && abs(PhotonGen_eta)<2.6) > 0))',
    'FilesPerJob': 8,
}

DYbaseW = getBaseWnAOD(mcDirectory, mcProduction,
                       ['DYJetsToTT_MuEle_M-50', 'DYJetsToTT_MuEle_M-50_ext1'])

addSampleWeight(samples, 'DY', 'DYJetsToTT_MuEle_M-50',
                'DY_NLO_pTllrw*' + DYbaseW + '/baseW')
addSampleWeight(samples, 'DY', 'DYJetsToTT_MuEle_M-50_ext1',
                'DY_NLO_pTllrw*' + DYbaseW + '/baseW')
addSampleWeight(samples, 'DY', 'DYJetsToLL_M-10to50', 'DY_NLO_pTllrw')

###### Top #######

files = nanoGetSampleFiles(mcDirectory, 'TTTo2L2Nu') + \
    nanoGetSampleFiles(mcDirectory, 'ST_s-channel') + \
    nanoGetSampleFiles(mcDirectory, 'ST_t-channel_antitop') + \
    nanoGetSampleFiles(mcDirectory, 'ST_t-channel_top') + \
    nanoGetSampleFiles(mcDirectory, 'ST_tW_antitop') + \
    nanoGetSampleFiles(mcDirectory, 'ST_tW_top')
Esempio n. 28
0
    getSampleFilesNano(directory, 'DYJetsToLL_M-50_HT-400to600') +
    getSampleFilesNano(directory, 'DYJetsToLL_M-50_HT-600to800') +
    getSampleFilesNano(directory, 'DYJetsToLL_M-50_HT-800to1200') +
    getSampleFilesNano(directory, 'DYJetsToLL_M-50_HT-1200to2500') +
    getSampleFilesNano(directory, 'DYJetsToLL_M-50_HT-2500toInf'),
    'weight':
    XSWeight + '*' + SFweight + '*' + PromptGenLepMatch + '*' + METFilter_MC +
    '*' + Zgfilter,
    'FilesPerJob':
    5,
    'suppressNegative': ['all'],
    'suppressNegativeNuisances': ['all'],
}

M10baseW = getBaseWnAOD(
    directory, 'Autumn18_102X_nAODv5_Full2018v5',
    ['DYJetsToLL_M-10to50-LO', 'DYJetsToLL_M-10to50-LO_ext1'])

addSampleWeight(samples, 'DY', 'DYJetsToLL_M-10to50-LO',
                ptllDYW_LO + '*(LHE_HT<200.0)*' + M10baseW + '/baseW')
addSampleWeight(samples, 'DY', 'DYJetsToLL_M-10to50-LO_ext1',
                ptllDYW_LO + '*(LHE_HT<200.0)*' + M10baseW + '/baseW')
addSampleWeight(samples, 'DY', 'DYJetsToLL_M-50-LO',
                ptllDYW_LO + '*(LHE_HT<70.0)')
addSampleWeight(samples, 'DY', 'DYJetsToLL_M-4to50_HT-200to400', ptllDYW_LO)
addSampleWeight(samples, 'DY', 'DYJetsToLL_M-4to50_HT-400to600', ptllDYW_LO)
addSampleWeight(samples, 'DY', 'DYJetsToLL_M-4to50_HT-600toInf', ptllDYW_LO)
addSampleWeight(samples, 'DY', 'DYJetsToLL_M-50_HT-70to100', ptllDYW_LO)
addSampleWeight(samples, 'DY', 'DYJetsToLL_M-50_HT-100to200', ptllDYW_LO)
addSampleWeight(samples, 'DY', 'DYJetsToLL_M-50_HT-200to400', ptllDYW_LO)
addSampleWeight(samples, 'DY', 'DYJetsToLL_M-50_HT-400to600', ptllDYW_LO)
Esempio n. 29
0
    if useDYHT:
        samples['DY']['name'] +=     nanoGetSampleFiles(mcDirectory, 'DYJetsToLL_M-4to50_HT-100to200' ) \
                                   + nanoGetSampleFiles(mcDirectory, 'DYJetsToLL_M-4to50_HT-200to400' ) \
                                   + nanoGetSampleFiles(mcDirectory, 'DYJetsToLL_M-4to50_HT-400to600' ) \
                                   + nanoGetSampleFiles(mcDirectory, 'DYJetsToLL_M-4to50_HT-600toInf') \
                                   + nanoGetSampleFiles(mcDirectory, 'DYJetsToLL_M-50_HT-70to100') \
                                   + nanoGetSampleFiles(mcDirectory, 'DYJetsToLL_M-50_HT-100to200') \
                                   + nanoGetSampleFiles(mcDirectory, 'DYJetsToLL_M-50_HT-200to400') \
                                   + nanoGetSampleFiles(mcDirectory, 'DYJetsToLL_M-50_HT-400to600') \
                                   + nanoGetSampleFiles(mcDirectory, 'DYJetsToLL_M-50_HT-600to800') \
                                   + nanoGetSampleFiles(mcDirectory, 'DYJetsToLL_M-50_HT-800to1200')  \
                                   + nanoGetSampleFiles(mcDirectory, 'DYJetsToLL_M-50_HT-1200to2500') \
                                   + nanoGetSampleFiles(mcDirectory, 'DYJetsToLL_M-50_HT-2500toInf')

    M10baseW = getBaseWnAOD(
        mcDirectory, 'Autumn18_102X_nAODv6_Full2018v6',
        ['DYJetsToLL_M-10to50-LO', 'DYJetsToLL_M-10to50-LO_ext1'])

    addSampleWeight(samples, 'DY', 'DYJetsToLL_M-50_ext2', 'DY_NLO_pTllrw')
    addSampleWeight(samples, 'DY', 'DYJetsToLL_M-10to50-LO',
                    'DY_LO_pTllrw' + '*' + M10baseW + '/baseW')
    addSampleWeight(samples, 'DY', 'DYJetsToLL_M-10to50-LO_ext1',
                    'DY_LO_pTllrw' + '*' + M10baseW + '/baseW')

    if useDYHT:
        # Remove high HT from inclusive samples
        addSampleWeight(samples, 'DY', 'DYJetsToLL_M-10to50-LO_ext1',
                        '(LHE_HT<100)')
        addSampleWeight(samples, 'DY', 'DYJetsToLL_M-10to50-LO',
                        '(LHE_HT<100)')
        addSampleWeight(samples, 'DY', 'DYJetsToLL_M-50_ext2', '(LHE_HT<70)')
Esempio n. 30
0
files = nanoGetSampleFiles(mcDirectory, 'TTTo2L2Nu') + \
    nanoGetSampleFiles(mcDirectory, 'ST_s-channel') + \
    nanoGetSampleFiles(mcDirectory, 'ST_t-channel_antitop') + \
    nanoGetSampleFiles(mcDirectory, 'ST_t-channel_top') + \
    nanoGetSampleFiles(mcDirectory, 'ST_tW_antitop') + \
    nanoGetSampleFiles(mcDirectory, 'ST_tW_top') + \
    nanoGetSampleFiles(mcDirectory, 'TTTo2L2Nu_PSWeights')

samples['top'] = {
    'name': files,
    'weight': mcCommonWeight,
    'FilesPerJob': 1,
}

TTTo2L2Nu_baseW = getBaseWnAOD(mcDirectory, mcProduction,
                               ['TTTo2L2Nu', 'TTTo2L2Nu_PSWeights'])
addSampleWeight(samples, 'top', 'TTTo2L2Nu', TTTo2L2Nu_baseW + "/baseW")
addSampleWeight(samples, 'top', 'TTTo2L2Nu_PSWeights',
                TTTo2L2Nu_baseW + "/baseW")
#addSampleWeight(samples,'top','TTTo2L2Nu', 'Top_pTrw')
#addSampleWeight(samples, 'top', 'TTTo2L2Nu_PSWeights', 'Top_pTrw')

###### WW ########
'''
samples['WW'] = {
    'name': nanoGetSampleFiles(mcDirectory, 'WWTo2L2Nu'),
    'weight': mcCommonWeight + '*nllW',
    'FilesPerJob': 1
}
'''
samples['WW'] = {