Beispiel #1
0
from StopsDilepton.analysis.Region import Region
from StopsDilepton.analysis.defaultAnalysis import setup

#Always taking data lumi
setup.lumi = {
    channel: setup.sample['Data'][channel]['lumi']
    for channel in setup.sample['Data'].keys()
}
setup.loadChains()

from StopsDilepton.analysis.DataDrivenDYEstimate import DataDrivenDYEstimate
estimateDY = DataDrivenDYEstimate(name='DY-DD', cacheDir=None)

regionDY = Region('dl_mt2ll', (140, -1))

for channel in ['MuMu']:
    res = estimateDY.cachedEstimate(regionDY, channel, setup)
    print "\n Result in ", channel, " for estimate ", estimateDY.name, regionDY, ":", res  #, 'jer',jer, 'jec', jec
Beispiel #2
0
def getRegionsFromThresholds(var, vals):
    return [Region(var, (vals[i], vals[i + 1]))
            for i in range(len(vals) - 1)] + [Region(var, (vals[-1], -1))]
Beispiel #3
0
#!/usr/bin/env python
from StopsDilepton.analysis.Region import Region
from StopsDilepton.analysis.estimators import setup
from StopsDilepton.samples.cmgTuples_Data25ns_mAODv2_postProcessed import *
from StopsDilepton.analysis.DataDrivenTTZEstimate import DataDrivenTTZEstimate

setup.dataSamples = {
    "EE": DoubleEG_Run2015D,
    "MuMu": DoubleMuon_Run2015D,
    "EMu": MuonEG_Run2015D
}
setup.verbose = True

estimateTTZ = DataDrivenTTZEstimate(name='TTZ-DD', cacheDir=None)

regionTTZ = Region('dl_mt2ll', (0, -1))

for channel, sample in setup.dataSamples.iteritems():
    setup.lumi[channel] = sample.lumi
    res = estimateTTZ.cachedEstimate(regionTTZ, channel, setup)
    print "\n Result in ", channel, " for estimate ", estimateTTZ.name, regionTTZ, ":", res  #, 'jer',jer, 'jec', jec
Beispiel #4
0
defaultRegions = getRegions3D(mt2llThresholds=[0, 140, 240],
                              mt2blblThresholds=[0, 100, 200],
                              mt2bbThresholds=[70, 170, 270])
reducedRegionsA = getRegions3D(mt2llThresholds=[0, 140, 240],
                               mt2blblThresholds=[0, 100, 200],
                               mt2bbThresholds=[70, 170])
reducedRegionsB = getRegions3D(mt2llThresholds=[0, 140, 240],
                               mt2blblThresholds=[0, 100],
                               mt2bbThresholds=[70, 170, 270])
reducedRegionsAB = getRegions3D(mt2llThresholds=[0, 140, 240],
                                mt2blblThresholds=[0, 100],
                                mt2bbThresholds=[70, 170])

reducedRegionsNew = [
    Region("dl_mt2ll",
           (0, 100)) + Region("dl_mt2bb",
                              (0, -1)) + Region("dl_mt2blbl", (0, -1))
]  # whole mt2ll < 140 as control region
reducedRegionsNew += getRegions3D(mt2llThresholds=[100, 140, 240],
                                  mt2blblThresholds=[0, 100, 200],
                                  mt2bbThresholds=[70, 170])

reducedRegionsC = [
    Region("dl_mt2ll",
           (0, 100)) + Region("dl_mt2bb",
                              (0, -1)) + Region("dl_mt2blbl", (0, -1))
]  # whole mt2ll < 140 as control region
reducedRegionsC += getRegions3D(mt2llThresholds=[100, 140, 240],
                                mt2blblThresholds=[0, 150],
                                mt2bbThresholds=[70, 170])