Пример #1
0
              checkOnly=True)  #photonselection always false for qcd estimate

# Select estimate
if args.selectEstimator == "Data":
    estimate = DataObservation(name="Data", process=setup.processes["Data"])
    estimate.isData = True
else:
    estimators = EstimatorList(setup, processes=[args.selectEstimator])
    estimate = getattr(estimators, args.selectEstimator)
    estimate.isData = False

if not estimate:
    logger.warning(args.selectEstimator + " not known")
    sys.exit(0)

estimate.initCache(setup.defaultCacheDir())
setup3p = setup.sysClone(parameters=parameters3p)
setup3 = setup.sysClone(parameters=parameters3)
setup4p = setup.sysClone(parameters=parameters4p)


def wrapper(arg):
    r, channel, setup3p, addon, setup3, setup4p = arg
    logger.info(
        "Running estimate for region %s, channel %s in setup %s for estimator %s"
        % (r, channel, args.controlRegion if args.controlRegion else "None",
           args.selectEstimator if args.selectEstimator else "None"))
    res3 = estimate.cachedEstimate(r,
                                   channel,
                                   setup3,
                                   signalAddon=addon,
Пример #2
0
                                        res,
                                        signalAddon=addon,
                                        overwrite=args.overwrite)
    else:
        print "Did not copy: ", args.selectEstimator, estimateFrom.uniqueKey(
            r, channel, setup), args.controlRegion
    return (estimateTo.uniqueKey(r, channel, setup), res)


#fromDir = "/eos/vbc/incoming/user/lukas.lechner/TTGammaEFT/cache_read/analysis/%i/estimates/"%args.year
fromDir = "/scratch/lukas.lechner/TTGammaEFT/cache_read/analysis/%i/estimates" % args.year
print "copy from: %s" % fromDir
print "copy to: %s" % setup.defaultCacheDir()

estimateTo = copy.deepcopy(estimateFrom)
estimateFrom.initCache(fromDir)
estimateTo.initCache(setup.defaultCacheDir())

if "all" in channels: channels = ["e", "mu"]
jobs = []
for channel in channels:
    for (i, r) in enumerate(allPhotonRegions):
        #        if args.selectRegion != i: continue
        jobs.append((r, channel, setup, None))
        if not estimateFrom.isData and not args.noSystematics:
            if "TTG" in args.selectEstimator:
                jobs.extend(estimateFrom.getSigSysJobs(r, channel, setup))
            else:
                jobs.extend(estimateFrom.getBkgSysJobs(r, channel, setup))

print "Running %i jobs in total." % len(jobs)