Пример #1
0
def main():
    for pu in pus:
        if ('UF' in args.mode):
            combineOutputDir = SET.combine_dir
            limitsDir = SET.limits_dir
        else:
            combineOutputDir = SET.combine_dir + "/" + pu
            limitsDir = SET.limits_dir + "/" + pu

        CM.mkdir(limitsDir)
        if type_mod == "analytic":
            for smodel in smodels:
                for smode in smodes:
                    filelist = glob.glob(combineOutputDir +
                                         "/*%s*%s*%s*%s*Asymptotic*.root" %
                                         (type_mod, bmodelId, smode, smodel))
                    print "generating limit for %s %s %s" % (smodel, smode,
                                                             str(filelist))
                    generateLimit(filelist,
                                  combineOutputDir=combineOutputDir,
                                  smode=smode,
                                  smodel=smodel,
                                  limitsDir=limitsDir)
        else:
            filelist = glob.glob(combineOutputDir +
                                 "/*%s*Asymptotic*.root" % type_mod)
            generateLimit(filelist, combineOutputDir=combineOutputDir)
Пример #2
0
def main():
    for pu in pus:
        if ('UF' in args.mode):
            combineOutputDir = SET.combine_dir
            limitsDir = SET.limits_dir
        else:
            combineOutputDir = SET.combine_dir+"/"+pu
            limitsDir = SET.limits_dir+"/"+pu

        CM.mkdir(limitsDir)
        if type_mod == "analytic":
            for smodel in smodels:
                for smode in smodes:
                    filelist = glob.glob(combineOutputDir+"/*%s*%s*%s*%s*Asymptotic*.root" % (type_mod, bmodelId, smode, smodel))
                    print "generating limit for %s %s %s" % (smodel, smode, str(filelist))
                    generateLimit(filelist, combineOutputDir=combineOutputDir,
                        smode=smode, smodel=smodel, limitsDir=limitsDir)
        else:
            filelist = glob.glob(combineOutputDir+"/*%s*Asymptotic*.root" % type_mod)
            generateLimit(filelist, combineOutputDir=combineOutputDir)
Пример #3
0
    0.5: "expected"
}
physicsModelParametersToSet = {}
nuisancesToFreeze = ["MH"]


def map2string(m, sep=","):
    return ",".join(["{key}={value}".format(key=x, value=m[x]) for x in m])


#######################
### Directory Setup ###
#######################
cmsswDir = '/afs/cern.ch/user/a/abrinke1/CMSSW_7_4_7/src/'
projectDirToUse = '/afs/cern.ch/work/a/abrinke1/public/H2Mu/Limits2/'
CM.mkdir(projectDirToUse)
histDir = os.path.join(projectDirToUse, 'results', jobLabel)
CM.mkdir(histDir)
distributionsDir = os.path.join(projectDirToUse, 'distributions', jobLabel)
CM.mkdir(distributionsDir)
backgroundfitsDir = os.path.join(projectDirToUse, 'backgroundfits', jobLabel)
CM.mkdir(backgroundfitsDir)
signalfitsDir = os.path.join(projectDirToUse, 'signalfits', jobLabel)
CM.mkdir(signalfitsDir)
singalfitinterpolationsDir = os.path.join(projectDirToUse,
                                          'signalfitinterpolations', jobLabel)
CM.mkdir(singalfitinterpolationsDir)
signalfitinterpolationswithsplineDir = os.path.join(
    projectDirToUse, 'signalfitinterpolationswithspline', jobLabel)
CM.mkdir(signalfitinterpolationswithsplineDir)
backgroundfitswithroomultipdfDir = os.path.join(
Пример #4
0
    from categories_UF_AWB import *
    import AuxTools.python.UF_AWB_settings as SET
if (args.mode == 'UF_AMC'):
    from categories_UF_AMC import *
    import AuxTools.python.UF_AMC_settings as SET

#
#   List all the constants and some initializations
#

## Modify input and output locations - AWB 23.02.17
resultsdir = SET.in_hist_dir
workspacesDir = SET.workspaces_dir
datacardsDir = SET.datacards_dir

CM.mkdir(datacardsDir)

default = -0.999
aux = "Mu24"


def generate(variables, (data, mcbg, mcsig), **wargs):
    if wargs["Verbose"]:
        print "-" * 40
        print data
        print mcbg
        print mcsig
    shouldScale = wargs["shouldScale"]
    auxParameters = wargs["auxParameters"]

    #   Create the pic directory
Пример #5
0
    from categories_UF_AWB import *
    import AuxTools.python.UF_AWB_settings as SET
if (args.mode == 'UF_AMC'):
    from categories_UF_AMC import *
    import AuxTools.python.UF_AMC_settings as SET

#
#   List all the constants and some initializations
#

## Modify input and output locations - AWB 23.02.17
resultsdir    = SET.in_hist_dir
workspacesDir = SET.workspaces_dir
datacardsDir  = SET.datacards_dir

CM.mkdir(datacardsDir)

default = -0.999
aux = "Mu24"

def generate(variables, (data, mcbg, mcsig), **wargs):
    if wargs["Verbose"]:
        print "-"*40
        print data
        print mcbg
        print mcsig
    shouldScale = wargs["shouldScale"]
    auxParameters = wargs["auxParameters"]

    #   Create the pic directory
    sub = "" if aux==None or aux=="" else "__%s" % aux
Пример #6
0
if (args.mode == 'Iowa'):
    import AuxTools.python.Iowa_settings as SET
if (args.mode == 'UF_AWB'):
    import AuxTools.python.UF_AWB_settings as SET
if (args.mode == 'UF_AMC'):
    import AuxTools.python.UF_AMC_settings as SET

in_file = R.TFile(SET.orig_file)
in_file.ls()
signalsDir = in_file.GetDirectory(SET.orig_sig_dir)
mapPP2ListOfCats = {} ## What is this? - AWB 23.02.17

out_path = SET.in_hist_dir
in_to_out_category_map = SET.in_to_out_category_map
CM.mkdir(out_path)

## Conversion between UF and Iowa label format ("UF" : "Iowa")
signalPPConversion = {
    "gg" : "GluGlu_HToMuMu_M125_13TeV_powheg_pythia8",
    "VBF" : "VBF_HToMuMu_M125_13TeV_powheg_pythia8",
    "ZH" : "ZH_HToMuMu_M125_13TeV_powheg_pythia8",
    "WH_pos" : "WPlusH_HToMuMu_M125_13TeV_powheg_pythia8",
    "WH_neg" : "WMinusH_HToMuMu_M125_13TeV_powheg_pythia8"
}


#print in_to_out_category_map
#
# Signals
#
if (args.mode == 'UF_AWB'):
    from categories_UF_AWB import *
    import AuxTools.python.UF_AWB_settings as SET
if (args.mode == 'UF_AMC'):
    from categories_UF_AMC import *
    import AuxTools.python.UF_AMC_settings as SET

#
#   List all the constants and some initializations
#

resultsdir    = SET.in_hist_dir
workspacesDir = SET.workspaces_dir
fitsDir       = SET.sig_fits_dir

CM.mkdir(workspacesDir)
CM.mkdir(fitsDir)

default = -0.999
aux = "Mu24"

def generate(variables, (data, mcbg, mcsig), **wargs):
    if wargs["Verbose"]:
        print "-"*40
        print data
        print mcbg
        print mcsig
    shouldScale = wargs["shouldScale"]
    auxParameters = wargs["auxParameters"]

    #   Create the pic directory
Пример #8
0
if (args.mode == 'UF_AWB'):
    from categories_UF_AWB import *
    import AuxTools.python.UF_AWB_settings as SET
if (args.mode == 'UF_AMC'):
    from categories_UF_AMC import *
    import AuxTools.python.UF_AMC_settings as SET

#
#   List all the constants and some initializations
#

resultsdir    = SET.in_hist_dir
workspacesDir = SET.workspaces_dir
fitsDir       = SET.bkg_fits_dir

CM.mkdir(workspacesDir)
CM.mkdir(fitsDir)

default = -0.999
aux = "Mu24"

def generate(variables, (data, groupName, lModels), **wargs):
    if wargs["Verbose"]:
        print "-"*40
        print data
        print mcbg
        print mcsig

    smode = wargs["smode"]
    smodel = wargs["smodel"]
    mass = wargs["mass"]
Пример #9
0
    0.025 : "m2sigma",
    0.975 : "p2sigma",
    0.5 : "expected"
}
physicsModelParametersToSet = {}
nuisancesToFreeze = ["MH"]
def map2string(m, sep=","):
    return ",".join(["{key}={value}".format(key=x, value=m[x]) for x in m])


#######################
### Directory Setup ###
#######################
cmsswDir                             = '/afs/cern.ch/work/a/acarnes/public/h2mumu/limit_setting/combine/CMSSW_7_4_7/src/'
projectDirToUse                      = '/afs/cern.ch/work/a/acarnes/public/h2mumu/limit_setting/out/limits_and_bias/'
CM.mkdir(projectDirToUse)
histDir                              = os.path.join(projectDirToUse, 'results', jobLabel)
CM.mkdir(histDir)
distributionsDir                     = os.path.join(projectDirToUse, 'distributions', jobLabel);
CM.mkdir(distributionsDir)
backgroundfitsDir                    = os.path.join(projectDirToUse, 'backgroundfits', jobLabel)
CM.mkdir(backgroundfitsDir)
signalfitsDir                        = os.path.join(projectDirToUse, 'signalfits', jobLabel)
CM.mkdir(signalfitsDir)
singalfitinterpolationsDir           = os.path.join(projectDirToUse, 'signalfitinterpolations', jobLabel)
CM.mkdir(singalfitinterpolationsDir)
signalfitinterpolationswithsplineDir = os.path.join(projectDirToUse, 'signalfitinterpolationswithspline', jobLabel)
CM.mkdir(signalfitinterpolationswithsplineDir)
backgroundfitswithroomultipdfDir     = os.path.join(projectDirToUse, 'backgroundfitswithroomultipdf', jobLabel)
CM.mkdir(backgroundfitswithroomultipdfDir)
datacardsworkspacesDir               = os.path.join(projectDirToUse, 'datacardsworkspaces', jobLabel)