コード例 #1
0
from StopsDilepton.analysis.SetupHelpers import channels
from StopsDilepton.analysis.mcAnalysis import setup, regions, bkgEstimators
from StopsDilepton.analysis.defaultAnalysis import setup, regions, bkgEstimators

from MCBasedEstimate import MCBasedEstimate
from StopsDilepton.samples.cmgTuples_FastSimT2tt_mAODv2_25ns_2l_postProcessed import *
from StopsDilepton.samples.cmgTuples_FullSimTTbarDM_mAODv2_25ns_2l_postProcessed import *

setup.analysis_results='/afs/hephy.at/data/rschoefbeck01/StopsDilepton/results/test5'
setup.verbose=True

#signal = T2tt_450_0
#signalSetup = setup.sysClone(sys={'reweight':['reweightLeptonFastSimSF']}, parameters={'useTriggers':False})

signal = TTbarDMJets_pseudoscalar_Mchi1_Mphi50
signalSetup = setup.sysClone(sys={'reweight':[]}, parameters={'useTriggers':False})

#from StopsDilepton.tools.objectSelection import multiIsoLepString
#wp = 'VL'
#setup.externalCuts.append(multiIsoLepString(wp, ('l1_index','l2_index')))
#setup.prefixes.append('multiIso'+wp)

signalEstimators = [ MCBasedEstimate(name=s.name,    sample={channel:s for channel in channels}, cacheDir=None ) for s in [signal] ]

#channel = 'MuMu'
channel = 'all'
sigEstimate = signalEstimators[0]
from StopsDilepton.analysis.Region import Region
region=Region('dl_mt2ll', (140,-1))

コード例 #2
0
from StopsDilepton.analysis.SetupHelpers import channels
from StopsDilepton.analysis.mcAnalysis import setup, regions, bkgEstimators
from StopsDilepton.analysis.defaultAnalysis import setup, regions, bkgEstimators

from MCBasedEstimate import MCBasedEstimate
from StopsDilepton.samples.cmgTuples_FastSimT2tt_mAODv2_25ns_2l_postProcessed import *
from StopsDilepton.samples.cmgTuples_FullSimTTbarDM_mAODv2_25ns_2l_postProcessed import *

setup.analysis_results = '/afs/hephy.at/data/rschoefbeck01/StopsDilepton/results/test5'
setup.verbose = True

#signal = T2tt_450_0
#signalSetup = setup.sysClone(sys={'reweight':['reweightLeptonFastSimSF']}, parameters={'useTriggers':False})

signal = TTbarDMJets_pseudoscalar_Mchi1_Mphi50
signalSetup = setup.sysClone(sys={'reweight': []},
                             parameters={'useTriggers': False})

#from StopsDilepton.tools.objectSelection import multiIsoLepString
#wp = 'VL'
#setup.externalCuts.append(multiIsoLepString(wp, ('l1_index','l2_index')))
#setup.prefixes.append('multiIso'+wp)

signalEstimators = [
    MCBasedEstimate(name=s.name,
                    sample={channel: s
                            for channel in channels},
                    cacheDir=None) for s in [signal]
]

#channel = 'MuMu'
channel = 'all'
コード例 #3
0
elif options.signal == "T2tt":
    signalEstimators = [
        MCBasedEstimate(name=s.name, sample={channel: s for channel in allChannels}, cacheDir=setup.defaultCacheDir())
        for s in [T2tt_450_0]
    ]
    isFastSim = True
elif options.signal == "allT2tt":
    signalEstimators = [
        MCBasedEstimate(name=s.name, sample={channel: s for channel in allChannels}, cacheDir=setup.defaultCacheDir())
        for s in signals_T2tt
    ]
    isFastSim = True
else:
    raise Exception("Unknown signal estimator choice")

signalSetup = setup.sysClone(parameters={"useTriggers": False})


def wrapper(args):
    r, channel, setup = args
    res = estimate.cachedEstimate(r, channel, setup, save=False)
    return (estimate.uniqueKey(r, channel, setup), res)


for isSignal, estimators_ in [[True, signalEstimators], [False, bkgEstimators]]:
    for estimate in estimators_:
        setup_ = signalSetup if isSignal else setup
        if not options.dontSkipIfCachefileExists and estimate.cache.cacheFileLoaded:
            print "Cache file %s was loaded -> Skipping." % estimate.cache.filename
            continue
        jobs = []