Exemple #1
0
    print "err!"
    pass

sub_total = open("sub_total.jobb", "w")

#copy MC datasets file here so it can be used
os.system("cp ../MCDatasets/map_MCdatasets_xs.py .")

fileDatasetMap = {}

#retrieve MC datasets, query DAS, and make a list of input files
if opts.proxyPath != "noproxy":
    fileList = open('list_cff.py', 'w')
    fileList.write("inputFileNames=[\n")
    from map_MCdatasets_xs import datasetCrossSectionMap
    for dataset in datasetCrossSectionMap.keys():
        das_command = runCommand('dasgoclient --query="file dataset=%s"' %
                                 dataset)
        stdout, stderr = das_command.communicate()

        for line in stdout.splitlines():
            fileList.write("'" + line + "',\n")
            fileDatasetMap[line] = dataset

    fileList.write("]\n")
    fileList.close()
else:
    from list_cff import inputFileNames
    for ffile in inputFileNames:
        fileDatasetMap[ffile] = hardCodedDataset
    print fileDatasetMap
                n_events += int(row[1])

LS_length = 23.31  #seconds
scaleFactor = 0
subDir = "argh"
xs = 0
if opts.dataMC == "data":
    if nLS != 0:
        scaleFactor = opts.lumiTarget / opts.lumiIn * opts.hltPS / (nLS *
                                                                    LS_length)
    subDir = "Data"
else:
    subDir = "MC/"
    from map_MCdatasets_xs import datasetCrossSectionMap
    dataset = ""
    for datasetKey in datasetCrossSectionMap.keys():
        dataset = datasetKey
        if dataset == opts.dataMC:
            xs = datasetCrossSectionMap[datasetKey]
            subDir += dataset.replace("/", "_")
            break
        dataset = dataset.lstrip("/")
        dataset = dataset.replace("/", "_")
        if dataset == opts.dataMC:
            xs = datasetCrossSectionMap[datasetKey]
            subDir += dataset
            break
    #0.01 = converting from picobarns to 10^-34 cm^2
    if n_events != 0: scaleFactor = opts.lumiTarget * (xs * 0.01) / n_events

print '\n\n\n'