Exemple #1
0
def scheduleMETCustomVertex(vxColl,
                            jetcoll='AntiKt4EMTopo',
                            configlist="CustomMET",
                            outputlist="CustomMET"):
    from METReconstruction.METAssocConfig import METAssocConfig, AssocConfig
    jettype = {
        'AntiKt4EMTopo': 'EMJet',
        'AntiKt4LCTopo': 'LCJet',
        'AntiKt4EMPFlow': 'PFlowJet'
    }
    associators = [
        AssocConfig(jettype[jetcoll]),
        AssocConfig('Muon'),
        AssocConfig('Ele'),
        AssocConfig('Gamma'),
        AssocConfig('Tau'),
        AssocConfig('Soft')
    ]
    cfg = METAssocConfig(
        jetcoll + vxColl,
        associators,
        jetcoll == 'AntiKt4EMPFlow'  # doPFlow
    )
    for assoc in cfg.assoclist:
        assoc.PrimVxColl = vxColl + 'PrimaryVertices'

    customMETConfigs.setdefault(configlist, {})[cfg.suffix] = cfg

    maplist.append(cfg.suffix)
    METLists.setdefault(outputlist, []).append(cfg.suffix)
Exemple #2
0
def scheduleMETCustomTrkSel(
    trkseltool,
    metname,
    jetcoll='AntiKt4EMTopo',
    configlist="CustomMET",
    outputlist="CustomMET",
):
    from METReconstruction.METAssocConfig import METAssocConfig, AssocConfig
    jettype = {
        'AntiKt4EMTopo': 'EMJet',
        'AntiKt4LCTopo': 'LCJet',
        'AntiKt4EMPFlow': 'PFlowJet'
    }
    associators = [
        AssocConfig(jettype[jetcoll]),
        AssocConfig('Muon'),
        AssocConfig('Ele'),
        AssocConfig('Gamma'),
        AssocConfig('Tau'),
        AssocConfig('Soft')
    ]

    cfg = METAssocConfig(
        suffix=jetcoll + metname,
        buildconfigs=associators,
        doPFlow=(jetcoll == 'AntiKt4EMPFlow'),  # doPFlow
        trksel=trkseltool)

    customMETConfigs.setdefault(configlist, {})[cfg.suffix] = cfg

    maplist.append(cfg.suffix)
    METLists.setdefault(outputlist, []).append(cfg.suffix)
Exemple #3
0
def addMETTruthMap(jetcoll='AntiKt4EMTopo', configlist="CustomMET"):
    assocname = 'Truth_' + jetcoll
    customMETConfigs.setdefault(configlist, {})
    if not assocname in customMETConfigs[configlist]:
        from METReconstruction.METAssocConfig import METAssocConfig, AssocConfig
        cfg_truthassoc = METAssocConfig(
            assocname, [AssocConfig('Truth', jetcoll + 'Jets')],
            doPFlow=False,
            doTruth=True)
        customMETConfigs[configlist][cfg_truthassoc.suffix] = cfg_truthassoc
    '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
cfg_truthassoc_akt4em = METAssocConfig(
    'Truth_AntiKt4EMTopo', [AssocConfig('Truth', 'AntiKt4EMTopoJets')],
    doTruth=True)

metFlags.METAssocConfigs()[
    cfg_truthassoc_akt4em.suffix] = cfg_truthassoc_akt4em
#metFlags.METAssocOutputList().append(cfg_truthassoc_akt4em.suffix)
Exemple #5
0
############################################################################
# Set up an extra associator for testing
from METReconstruction.METRecoFlags import metFlags
from METReconstruction.METAssocConfig import AssocConfig, METAssocConfig
JetType = 'EMJet'

associators = [
    AssocConfig(JetType),
    AssocConfig('Muon'),
    AssocConfig('Ele'),
    AssocConfig('Gamma'),
    AssocConfig('Tau'),
    AssocConfig('Soft')
]
cfg_akt4em = METAssocConfig('NewAntiKt4EMTopo',
                            associators,
                            doPFlow=False,
                            doOriginCorrClus=True)

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

############################################################################
# Set up an extra associator for testing
JetType = 'PFlowJet'

associators = [
    AssocConfig(JetType),
    AssocConfig('Muon'),
    AssocConfig('Ele'),
    AssocConfig('Gamma'),
    AssocConfig('Tau'),
Exemple #6
0
# Make sure the MET knows what we've done
# First we need to rebuild charged pflow objects
from eflowRec.ScheduleCHSPFlowMods import scheduleCHSPFlowMods
scheduleCHSPFlowMods(SeqPHYSLITE)
# Now build MET from our analysis objects
from DerivationFrameworkJetEtMiss import METCommon
from METReconstruction.METAssocConfig import METAssocConfig,AssocConfig
associators = [AssocConfig('PFlowJet', 'AnalysisJets'),
               AssocConfig('Muon', 'AnalysisMuons'),
               AssocConfig('Ele', 'AnalysisElectrons'),
               AssocConfig('Gamma', 'AnalysisPhotons'),
               AssocConfig('Tau', 'AnalysisTauJets'),
               AssocConfig('Soft', '')]
PHYSLITE_cfg = METAssocConfig('AnalysisMET',
                              associators,
                              doPFlow=True)
METCommon.customMETConfigs.setdefault('AnalysisMET',{})[PHYSLITE_cfg.suffix] = PHYSLITE_cfg
scheduleMETAssocAlg(sequence=SeqPHYSLITE,configlist="AnalysisMET")

#====================================================================
# TRIGGER CONTENT
#====================================================================
# See https://twiki.cern.ch/twiki/bin/view/Atlas/TriggerAPI
# Get single and multi mu, e, photon triggers
# Jet, tau, multi-object triggers not available in the matching code
# Note this comes relatively late as we have to re-do the matching to our analysis objects
allperiods = TriggerPeriod.y2015 | TriggerPeriod.y2016 | TriggerPeriod.y2017 | TriggerPeriod.y2018 | TriggerPeriod.future2e34
trig_el  = TriggerAPI.getLowestUnprescaledAnyPeriod(allperiods, triggerType=TriggerType.el,  livefraction=0.8)
trig_mu  = TriggerAPI.getLowestUnprescaledAnyPeriod(allperiods, triggerType=TriggerType.mu,  livefraction=0.8)
trig_g   = TriggerAPI.getLowestUnprescaledAnyPeriod(allperiods, triggerType=TriggerType.g,   livefraction=0.8)
Exemple #7
0
############################################################################
# AntiKt4LCTopo
JetType = 'LCJet'

associators = [
    AssocConfig(JetType),
    AssocConfig('Muon'),
    AssocConfig('Ele'),
    AssocConfig('Gamma'),
    AssocConfig('Tau'),
    AssocConfig('Soft')
]
cfg_akt4lc = METAssocConfig('AntiKt4LCTopo',
                            associators,
                            doPFlow=False,
                            modConstKey=modConstKey,
                            modClusColls=modClusColls)

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

############################################################################
# AntiKt4EMTopo
JetType = 'EMJet'

associators = [
    AssocConfig(JetType),
    AssocConfig('Muon'),
    AssocConfig('Ele'),
    AssocConfig('Gamma'),
Exemple #8
0
############################################################################
# Set up an extra associator for testing
from METReconstruction.METRecoFlags import metFlags
from METReconstruction.METAssocConfig import AssocConfig, METAssocConfig
JetType = 'EMJet'
#todo check pflow

associators = [
    AssocConfig(JetType),
    AssocConfig('Muon'),
    AssocConfig('Ele'),
    AssocConfig('Gamma'),
    AssocConfig('Tau'),
    AssocConfig('Soft')
]
cfg_akt4em = METAssocConfig('NewAntiKt4EMTopo', associators, doPFlow=False)
for assoc in cfg_akt4em.assoclist:
    assoc.IgnoreJetConst = True
    assoc.ForwardColl = "CellTowers"

associators2 = [
    AssocConfig(JetType),
    AssocConfig('Muon'),
    AssocConfig('Ele'),
    AssocConfig('Gamma'),
    AssocConfig('Tau'),
    AssocConfig('Soft')
]
cfg_akt4em2 = METAssocConfig('NewAntiKt4EMTopo2', associators2, doPFlow=False)
for assoc in cfg_akt4em2.assoclist:
    assoc.IgnoreJetConst = True
from METReconstruction.METRecoFlags import metFlags
from METReconstruction.METAssocConfig import AssocConfig, METAssocConfig

############################################################################
# AntiKt4LCTopo
JetType = 'LCJet'

associators = [AssocConfig(JetType),
               AssocConfig('Ele'),
               AssocConfig('Gamma'),
               AssocConfig('Tau'),
               AssocConfig('Soft')]
cfg_akt4lc = METAssocConfig('AntiKt4LCTopo',
                            associators,
                            doPFlow=False
                            )

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

############################################################################
# AntiKt4EMTopo
JetType = 'EMJet'
    
associators = [AssocConfig(JetType),
               AssocConfig('Ele'),
               AssocConfig('Gamma'),
               AssocConfig('Tau'),
               AssocConfig('Soft')]
cfg_akt4em = METAssocConfig('AntiKt4EMTopo',
                            associators,
Exemple #10
0
from METReconstruction.METRecoFlags import metFlags

# ############################################################################
# # 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
cfg_truthassoc_akt4em = METAssocConfig(
    'Truth_AntiKt4EMTopo', [AssocConfig('Truth', 'AntiKt4EMTopoJets')],
    doTruth=True)

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

# JetType = 'EMJet'
# associators = [AssocConfig(JetType),
#                AssocConfig('Muon'),
#                AssocConfig('Ele'),
#                AssocConfig('Gamma'),
#                AssocConfig('Tau'),
#                AssocConfig('Soft')]

# cfg_assoc_akt4em = METAssocConfig('NewAntiKt4EMTopo',
Exemple #11
0
from METReconstruction.METRecoFlags import metFlags
from METReconstruction.METAssocConfig import AssocConfig, METAssocConfig

############################################################################
# AntiKt4LCTopo
JetType = 'LCJet'

associators = [AssocConfig(JetType),
               AssocConfig('Muon'),
               AssocConfig('Ele'),
               AssocConfig('Gamma'),
               AssocConfig('Tau'),
               AssocConfig('Soft')]
cfg_akt4lc = METAssocConfig('AntiKt4LCTopo',
                            associators,
                            doPFlow=False,
                            doOriginCorrClus=metFlags.UseTracks()
                            )

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

############################################################################
# AntiKt4EMTopo
JetType = 'EMJet'
    
associators = [AssocConfig(JetType),
               AssocConfig('Muon'),
               AssocConfig('Ele'),
               AssocConfig('Gamma'),
               AssocConfig('Tau'),