288 kwargs.setdefault(
"neutral_FE_cont_name",
"")
289 kwargs.setdefault(
"charged_FE_cont_name",
"")
290 kwargs.setdefault(
"LinkNeutralFEClusters",
True)
291 kwargs.setdefault(
"doTCC",
False)
292 kwargs.setdefault(
"useGlobal",
False)
294 useMuonTopoClusters =
False
295 from AthenaConfiguration.Enums
import ProductionStep
298 if inputFlags.Common.ProductionStep
in [ProductionStep.Derivation]
or inputFlags.DQ.Environment ==
"AOD":
299 useMuonTopoClusters =
True
302 PFMuonFlowElementLinkerAlgorithmFactory=CompFactory.PFMuonFlowElementAssoc
304 algName=
"PFMuonFlowElementAssoc"
305 PFMuonFlowElementLinkerAlgorithm=PFMuonFlowElementLinkerAlgorithmFactory(algName)
311 if kwargs[
'neutral_FE_cont_name']:
313 PFMuonFlowElementLinkerAlgorithm.JetEtMissNeutralFlowElementContainer = kwargs[
'neutral_FE_cont_name']
316 if kwargs[
'charged_FE_cont_name']:
317 PFMuonFlowElementLinkerAlgorithm.JetEtMissChargedFlowElementContainer = kwargs[
'charged_FE_cont_name']
319 PFMuonFlowElementLinkerAlgorithm.LinkNeutralFEClusters = kwargs[
'LinkNeutralFEClusters']
320 PFMuonFlowElementLinkerAlgorithm.useMuonTopoClusters = useMuonTopoClusters
329 PFMuonFlowElementLinkerAlgorithm.JetEtMissChargedFlowElementContainer=service_key+
"TrackCaloClustersCharged"
330 PFMuonFlowElementLinkerAlgorithm.JetEtMissNeutralFlowElementContainer=service_key+
"TrackCaloClustersNeutral"
335 PFMuonFlowElementLinkerAlgorithm.MuonContainer_chargedFELinks=service_key+
"Muons.chargedTCCLinks"
336 PFMuonFlowElementLinkerAlgorithm.MuonContainer_neutralFELinks=service_key+
"Muons.neutralTCCLinks"
337 PFMuonFlowElementLinkerAlgorithm.JetETMissNeutralFlowElementContainer_FE_MuonLinks=service_key+
"TrackCaloClustersNeutral.TCC_MuonLinks"
338 PFMuonFlowElementLinkerAlgorithm.JetETMissChargedFlowElements_FE_MuonLinks=service_key+
"TrackCaloClustersCharged.TCC_MuonLinks"
339 PFMuonFlowElementLinkerAlgorithm.FlowElementContainer_ChargedFE_ennergy_matched_muon=
"TrackCaloClustersCharged.TCC_efrac_matched_muon"
341 PFMuonFlowElementLinkerAlgorithm.FlowElementContainer_nMatchedMuons=
"TrackCaloClustersNeutral.TCC_nMatchedMuons"
342 PFMuonFlowElementLinkerAlgorithm.FlowElementContainer_FE_efrac_matched_muon=
"TrackCaloClustersNeutral.TCC_efrac_matched_muon"
344 PFMuonFlowElementLinkerAlgorithm.MuonContainer_muon_efrac_matched_FE=
"Muons.muon_efrac_matched_TCC"
346 PFMuonFlowElementLinkerAlgorithm.MuonContainer_ClusterInfo_deltaR=
"Muons.deltaR_muon_clus_TCCalg"
348 if kwargs[
'useGlobal']:
349 PFMuonFlowElementLinkerAlgorithm.JetEtMissChargedFlowElementContainer=
"GlobalChargedParticleFlowObjects"
350 PFMuonFlowElementLinkerAlgorithm.JetEtMissNeutralFlowElementContainer=
"GlobalNeutralParticleFlowObjects"
352 PFMuonFlowElementLinkerAlgorithm.MuonContainer_chargedFELinks=
"Muons.chargedGlobalFELinks"
353 PFMuonFlowElementLinkerAlgorithm.MuonContainer_neutralFELinks=
"Muons.neutralGlobalFELinks"
355 PFMuonFlowElementLinkerAlgorithm.JetETMissNeutralFlowElementContainer_FE_MuonLinks=
"GlobalNeutralParticleFlowObjects.GlobalFE_MuonLinks"
356 PFMuonFlowElementLinkerAlgorithm.JetETMissChargedFlowElements_FE_MuonLinks=
"GlobalChargedParticleFlowObjects.GlobalFE_MuonLinks"
357 PFMuonFlowElementLinkerAlgorithm.FlowElementContainer_ChargedFE_ennergy_matched_muon=
"GlobalChargedParticleFlowObjects.GlobalFE_efrac_matched_muon"
359 PFMuonFlowElementLinkerAlgorithm.FlowElementContainer_nMatchedMuons=
"GlobalNeutralParticleFlowObjects.GlobalFE_nMatchedMuons"
360 PFMuonFlowElementLinkerAlgorithm.FlowElementContainer_FE_efrac_matched_muon=
"GlobalNeutralParticleFlowObjects.GlobalFE_efrac_matched_muon"
362 PFMuonFlowElementLinkerAlgorithm.MuonContainer_muon_efrac_matched_FE=
"Muons.muon_efrac_matched_GlobalFE"
364 PFMuonFlowElementLinkerAlgorithm.MuonContainer_ClusterInfo_deltaR=
"Muons.deltaR_muon_clus_GlobalFEalg"
366 if kwargs[
'LinkNeutralFEClusters']
and not useMuonTopoClusters:
369 PFMuonFlowElementLinkerAlgorithm.ExtraInputs.add((
'CaloCellContainer', inputFlags.Egamma.Keys.Input.CaloCells))
371 if kwargs[
'LinkNeutralFEClusters']:
375 from AthenaCommon.Logging
import logging
376 msg=logging.getLogger(
"PFCfg.py::getMuonFlowElementAssocAlgorithm")
377 msg.error(
"Neutral FE from AOD configured to be linked with Muon. This link will fail due to missing CaloCells in the AOD")
378 msg.info(
"Terminating job")
382 return PFMuonFlowElementLinkerAlgorithm