"HLT_IsoMu24_eta2p1_v1","HLT_IsoMu24_eta2p1_v2","HLT_IsoMu24_eta2p1_v3","HLT_IsoMu24_eta2p1_v4","HLT_IsoMu24_eta2p1_v5",\
                   "HLT_IsoMu24_eta2p1_v6","HLT_IsoMu24_eta2p1_v7","HLT_IsoMu24_eta2p1_v8"
                   ]

TTJets.files = getFiles('/TTJets_TuneZ2_7TeV-madgraph-tauola/Fall11-PU_S6_START42_V14B-v2/AODSIM/V5_B/PAT_CMG_V5_6_0_B', 'cmgtools', '.*root')
TTJets.files = TTJets.files[:1]
# TTJets.triggers = ["HLT_IsoMu24_v[1,2,3,4,5,6,7,8,9,10,11,12,13,14]"]
TTJets.triggers = ["HLT_IsoMu24_v1","HLT_IsoMu24_v2","HLT_IsoMu24_v3","HLT_IsoMu24_v4","HLT_IsoMu24_v5","HLT_IsoMu24_v6","HLT_IsoMu24_v7",\
                   "HLT_IsoMu24_v8","HLT_IsoMu24_v9","HLT_IsoMu24_v10","HLT_IsoMu24_v11","HLT_IsoMu24_v12","HLT_IsoMu24_v13","HLT_IsoMu24_v14",\
                   "HLT_IsoMu24_eta2p1_v1","HLT_IsoMu24_eta2p1_v2","HLT_IsoMu24_eta2p1_v3","HLT_IsoMu24_eta2p1_v4","HLT_IsoMu24_eta2p1_v5",\
                   "HLT_IsoMu24_eta2p1_v6","HLT_IsoMu24_eta2p1_v7","HLT_IsoMu24_eta2p1_v8"
                   ]

# selectedComponents = [DYJets, WJets]
selectedComponents = [WJets]
# selectedComponents = [DYJets]
# selectedComponents = [TTJets]


DYJets.splitFactor = 1
WJets.splitFactor = 1
TTJets.splitFactor = 1

config = cfg.Config( components = selectedComponents,
                     sequence = sequence )

                     
printComps(config.components, True)


Beispiel #2
0
#-------- HOW TO RUN
test = 1
if test==1:
    # test a single component, using a single thread.
    # necessary to debug the code, until it doesn't crash anymore
    #comp = TW
    comp = TTHToWW_PUS14
    selectedComponents = [comp]
    comp.splitFactor = 1
    ## search for memory leaks
    #import ROOT;
    #hook = ROOT.SetupIgProfDumpHook()
    #hook.start()
elif test==2:    
    # test all components (1 thread per component).
    # important to make sure that your code runs on any kind of component
    for comp in selectedComponents:
        comp.splitFactor = 1
        comp.files = comp.files[:1]

     

# creation of the processing configuration.
# we define here on which components to run, and
# what is the sequence of analyzers to run on each event. 
config = cfg.Config( components = selectedComponents,
                     sequence = sequence )

printComps(config.components, True)
MC_list = copy.copy(mc_ewk)
MC_list.extend(mc_diboson_inc)

allsamples = copy.copy(MC_list)
allsamples.extend(data_list)

# the pattern provided to this function is a SQL pattern.
# % represents the wildcard.
# this pattern allows to select a whole group of samples.

connect(allsamples,
        '%CMGPF_V5_16_0',
        'cmgTuple.*root',
        aliases,
        cache=True,
        verbose=False)

# guessing the best split factor for each component,
# to get about the same number of events in each job
for c in allsamples:
    c.splitFactor = splitFactor(c, nEventsPerJob=2e5)

# picking up the json file automatically. Here, we use the dcs jsons.
for data in data_list:
    if len(data.files):
        data.json = jsonPick(data.files[0], jsonMap)

if __name__ == '__main__':
    from CMGTools.RootTools.fwlite.Config import printComps
    printComps(allsamples, True)
Beispiel #4
0
# #selectedComponents.remove(TTJets)

test = 10

if test==1:
    # test a single component, using a single thread.
    # necessary to debug the code, until it doesn't crash anymore
    comp = selectedComponents[0]
    comp.files = comp.files[:1]
    selectedComponents = [comp]
    comp.splitFactor = 1
elif test==2:    
    # test all components (1 thread per component.
    # important to make sure that your code runs on any kind of component
    #selectedComponents = dataSamples1Mu
    printComps(selectedComponents, True)
    for comp in selectedComponents:
        comp.splitFactor = 1
elif test==3:
    # test two components, using many threads, to check if variables are ok
    comp = SingleMuD
    comp.files = comp.files[:20]
    comp.splitFactor = 3
    selectedComponents = [comp]
    comp = QCDMuPt15
    comp.files = comp.files[:20]
    comp.splitFactor = 3
    selectedComponents += [comp]
elif test==4:
    for c in selectedComponents:
        c.files = c.files[10:610]


MC_list = copy.copy( mc_ewk )
MC_list.extend( mc_diboson_inc ) 
    
allsamples = copy.copy(MC_list)
allsamples.extend( data_list )

# the pattern provided to this function is a SQL pattern.
# % represents the wildcard.
# this pattern allows to select a whole group of samples.

connect( allsamples, '%CMGPF_V5_16_0', 'cmgTuple.*root', aliases, cache=True, verbose=False)


# guessing the best split factor for each component,
# to get about the same number of events in each job
for c in allsamples:
    c.splitFactor = splitFactor(c, nEventsPerJob=2e5)

# picking up the json file automatically. Here, we use the dcs jsons.
for data in data_list:
    if len(data.files):
        data.json = jsonPick( data.files[0], jsonMap )


if __name__ == '__main__':
    from CMGTools.RootTools.fwlite.Config import printComps
    printComps(allsamples, True)
# #selectedComponents.remove(TTJets)

test = 0

if test == 1:
    # test a single component, using a single thread.
    # necessary to debug the code, until it doesn't crash anymore
    comp = selectedComponents[0]
    comp.files = comp.files[:1]
    selectedComponents = [comp]
    comp.splitFactor = 1
elif test == 2:
    # test all components (1 thread per component.
    # important to make sure that your code runs on any kind of component
    #selectedComponents = dataSamples1Mu
    printComps(selectedComponents, True)
    for comp in selectedComponents:
        comp.splitFactor = 1
elif test == 3:
    # test two components, using many threads, to check if variables are ok
    comp = SingleMuD
    comp.files = comp.files[:20]
    comp.splitFactor = 3
    selectedComponents = [comp]
    comp = QCDMuPt15
    comp.files = comp.files[:20]
    comp.splitFactor = 3
    selectedComponents += [comp]
elif test == 4:
    for c in selectedComponents:
        c.files = c.files[10:610]