Beispiel #1
0
def getMETRecoAlg(algName='METReconstruction', configs={}, tools=[]):

    recoTools = []
    recoTools += tools

    from METReconstruction.METRecoFlags import metFlags
    if configs == {} and tools == []:
        print prefix, 'Taking configurations from METRecoFlags'
        configs = metFlags.METConfigs()

    for key, conf in configs.iteritems():
        print prefix, 'Generate METRecoTool for MET_' + key
        recotool = getMETRecoTool(conf)
        recoTools.append(recotool)
        metFlags.METRecoTools()[key] = recotool
        if conf.doRegions:
            regiontool = getRegionRecoTool(conf)
            recoTools.append(regiontool)

    from AthenaCommon.AppMgr import ToolSvc
    for tool in recoTools:
        ToolSvc += tool
        print prefix, 'Added METRecoTool \'' + tool.name(
        ) + '\' to alg ' + algName

    recoAlg = CfgMgr.met__METRecoAlg(name=algName, RecoTools=recoTools)
    return recoAlg
Beispiel #2
0
                BuildConfig('SoftClus'),
                BuildConfig('SoftTrk')]
met_refiners = [RefConfig('JetFilter','RefJet_JVFCut'),
                RefConfig('TrackFilter','PVSoftTrk')]

# Define the details of the full configuration
METConfigs_Top[met_key] = METConfig('EleLHTightNoGammaNoTau', # Container suffix
                                    met_builders,
                                    met_refiners,
                                    doSum=True,
                                    doTracks=True,
                                    duplicateWarning=False
                                    )

# Access the tool configurations here
# Switch electron selection to Tight
METConfigs_Top[met_key].builders['Ele'].PIDSel = 'Electrons.DFCommonElectronsLHTight'

######################################## MET FLAGS #######################################
# Update the common METFlags with the defined configurations
print ("DFMissingET -- Defined custom MET configurations for TOP:")
for key,cfg in METConfigs_Top.items():
    print ("DFMissingET --    ",key)
    metFlags.METConfigs()[key] = cfg
    metFlags.METOutputList().append(key)
import METCommon
METCommon.METLists['Top'] = METConfigs_Top.keys()

DerivationFrameworkMetAlg_Top = getMETRecoAlg('METReco_DF_Top', METConfigs_Top)
DerivationFrameworkJob += DerivationFrameworkMetAlg_Top
from METReconstruction.METRecoFlags import metFlags
from METReconstruction.METRecoConfig import BuildConfig, METConfig
from METReconstruction.METAssocConfig import METAssocConfig, AssocConfig

## Simple truth terms

cfg_truth = METConfig(
    'Truth',
    [BuildConfig('NonInt'),
     BuildConfig('Int'),
     BuildConfig('IntOut')],
    doRegions=True)

metFlags.METConfigs()[cfg_truth.suffix] = cfg_truth
metFlags.METOutputList().append(cfg_truth.suffix)
metFlags.METOutputList().append(cfg_truth.suffix + "Regions")

## Truth association maps

############################################################################
# AntiKt4LCTopo
cfg_truthassoc_akt4lc = METAssocConfig(
    'Truth_AntiKt4LCTopo', [AssocConfig('Truth', 'AntiKt4LCTopoJets')],
    doTruth=True)

metFlags.METAssocConfigs()[
    cfg_truthassoc_akt4lc.suffix] = cfg_truthassoc_akt4lc
metFlags.METAssocOutputList().append(cfg_truthassoc_akt4lc.suffix)

############################################################################
# AntiKt4EMTopo
Beispiel #4
0
# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration

from METReconstruction.METRecoFlags import metFlags
from METReconstruction.METRecoConfig import BuildConfig, RefConfig, METConfig,clusterSigStates
#from METReconstruction.METRecoConfig_Associator import BuildConfig, RefConfig, METConfig,clusterSigStates

############################################################################
# EMTopo

cfg_emt = METConfig('EMTopo',[BuildConfig('SoftClus','EMTopo')],
                    doRegions=True,
                    doOriginCorrClus=False
                    )

metFlags.METConfigs()[cfg_emt.suffix] = cfg_emt
metFlags.METOutputList().append(cfg_emt.suffix)
metFlags.METOutputList().append(cfg_emt.suffix+"Regions")

############################################################################
# LocHadTopo

cfg_lht = METConfig('LocHadTopo',[BuildConfig('SoftClus','LocHadTopo')],
                    doRegions=True,
                    doOriginCorrClus=False
                    )

metFlags.METConfigs()[cfg_lht.suffix] = cfg_lht
metFlags.METOutputList().append(cfg_lht.suffix)
metFlags.METOutputList().append(cfg_lht.suffix+"Regions")

Beispiel #5
0
# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration

from METReconstruction.METRecoFlags import metFlags
from METReconstruction.METRecoConfig import BuildConfig, RefConfig, METConfig

############################################################################
# Simple PFlow

cfg_pflow = METConfig('PFlow', [BuildConfig('SoftPFlow', 'PFlow')])

metFlags.METConfigs()[cfg_pflow.suffix] = cfg_pflow
metFlags.METOutputList().append(cfg_pflow.suffix)
metFlags.METOutputList().append(cfg_pflow.suffix + "Regions")
Beispiel #6
0
# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration

from METReconstruction.METRecoFlags import metFlags
from METReconstruction.METRecoConfig import BuildConfig, METConfig

cfg_calo = METConfig('Calo', [BuildConfig('CaloReg')], doCells=True)

metFlags.METConfigs()[cfg_calo.suffix] = cfg_calo
metFlags.METOutputList().append(cfg_calo.suffix)
cfg_mrf.builders['Ele'].MaxEta = 2.47
cfg_mrf.builders['Ele'].PIDSel = 'Medium'
cfg_mrf.builders['Ele'].AuthorSel = 17  # AuthorElectron | AuthorAmbiguous
#
cfg_mrf.builders['Gamma'].MinPt = 10e3
cfg_mrf.builders['Gamma'].MaxEta = 2.47
cfg_mrf.builders['Gamma'].PIDSel = 'Tight'
cfg_mrf.builders['Gamma'].AuthorSel = 20  # AuthorPhoton | AuthorAmbiguous
#
cfg_mrf.builders['Tau'].MinPt = 20e3
cfg_mrf.builders['Tau'].MaxEta = 2.5
cfg_mrf.builders['Tau'].IsTauFlag = 20  # JetBDTSigMedium
cfg_mrf.builders['Tau'].ElVeto = 23  # EleBDTMedium
cfg_mrf.builders['Tau'].MuVeto = 4  # MuonVeto
cfg_mrf.builders['Tau'].MinWet = 0.5
#
cfg_mrf.builders[
    'Jet'].MinPt = 0  # Perform OR on all jets, but don't select now
cfg_mrf.builders[
    'Jet'].MaxEta = 5  # Will rerun RefJet and SoftTerms with calibration
cfg_mrf.builders['Jet'].MinWet = 0.5
cfg_mrf.builders['Jet'].DoMinWetPtCut = False
#
#
cfg_mrf.builders['SoftClus'].VetoNegEClus = True
cfg_mrf.builders['SoftClus'].SignalState = clusterSigStates['LocHad']

metFlags.METConfigs()[cfg_mrf.suffix] = cfg_mrf
metFlags.METOutputList().append(cfg_mrf.suffix)
metFlags.METOutputList().append(cfg_mrf.suffix + "Regions")