Ejemplo n.º 1
0
import os, sys, glob, subprocess, optparse

sys.path.append(os.path.abspath(os.path.curdir))
from Core import NTupleTools, parseInputArgs, listifyInputFiles, DatasetManager

datasets = DatasetManager.DatasetManager()
samples = None


def parseInputArgs():
    parser = optparse.OptionParser(
        description='MergeOutput script configuration.')
    parser.add_option('-i',
                      '--inFiles',
                      default=None,
                      help='List of comma-separated input files')
    parser.add_option('-o',
                      '--outFile',
                      default=None,
                      help='Name of output file (use with --inFiles)')
    parser.add_option(
        '-r',
        '--inRunDir',
        default=None,
        help='Directory that contains downloaded samples (overrides --inFiles)'
    )
    parser.add_option(
        '-d',
        '--outRunDir',
        default=None,
        help='Directory that contains combined samples (use with --inRunDir)')
Ejemplo n.º 2
0
    agree = '%ICON{choice-yes}%' if obs == exp else '%ICON{choice-no}%'
    if exp != 0:
        fraction = obs / exp
    elif exp == obs == 0:
        fraction = 1.0
    else:
        fraction = 0.0
    return '| =%s= | %s | %i | %i | %s | %.3f |\n' % (
        name(d3pd), dsid(d3pd), obs, exp, agree, fraction)


# Load the dataset names
Data = 'Files/Data_D3PD_datasets.txt'
MC = 'Files/MC_D3PD_datasets.txt'
Embed = 'Files/Embedding_D3PD_datasets.txt'
dm = DatasetManager.DatasetManager([MC, Data, Embed])

# Dataset tags
version = "lhCNv00-00"
mc_tags = ['mc12a', 'p1130']
emb_tags = ['EXT0']
data_tags = ['data12', 'p1131']  # JetTauEtmiss, Muons, Egamma

# Note: Uncomment sample groups that you want to bookkeep
d3pds = []
d3pds += dm.getList(tags=["Muons", "PeriodA"] + data_tags)

### Signal samples
#d3pds += dm.getList(tags=['Signal', 'VBF']+mc_tags)
#d3pds += dm.getList(tags=['Signal', 'ggF']+mc_tags)
#d3pds += dm.getList(tags=['Signal', 'WH']+mc_tags)