示例#1
0
def scheduleMETAssocAlg(sequence=DerivationFrameworkJob,
                        configlist="CustomMET"):
    algname = 'METAssociation_' + configlist
    assocAlg = None
    if algname in metalgs.keys():
        print("Get preexisting alg:", algname, metalgs[algname])
        assocAlg = metalgs[algname]
    else:
        from METReconstruction.METAssocConfig import getMETAssocAlg
        assocAlg = getMETAssocAlg(algname, customMETConfigs[configlist])
        metalgs[algname] = assocAlg
        print("Generate MET alg:", algname, assocAlg)
    if not hasattr(sequence, algname):
        sequence += assocAlg
示例#2
0
    AssocConfig('Soft')
]
cfg_akt4pf = METAssocConfig(
    'NewAntiKt4EMPFlow',
    associators,
    doPFlow=True,
)

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

from METReconstruction.METAssocConfig import getMETAssocAlg

# Get the configuration directly from METRecoFlags
# Can also provide a dict of configurations or list of RecoTools or both
metAlg = getMETAssocAlg('METAssociation')
filterseq += metAlg

from METUtilities.METMakerConfig import getMETMakerAlg
makerAlgEM = getMETMakerAlg("NewAntiKt4EMTopo", jetColl="AntiKt4EMTopoJets")
# ToolSvc.METMaker_NewAntiKt4EMTopo.OutputLevel=VERBOSE
ToolSvc.METMaker_NewAntiKt4EMTopo.DoRemoveElecTrks = False
filterseq += makerAlgEM
makerAlgPF = getMETMakerAlg("NewAntiKt4EMPFlow", jetColl="AntiKt4EMPFlowJets")
# ToolSvc.METMaker_NewAntiKt4EMPFlow.OutputLevel=VERBOSE
ToolSvc.METMaker_NewAntiKt4EMPFlow.DoRemoveElecTrks = False
filterseq += makerAlgPF

# filterseq += CfgMgr.met__METAssocTestAlg("TestMETAssocEMTopo",
#                                          OutputLevel=VERBOSE,
#                                          FailOnInconsistency=True,