329 kwargs.setdefault(
"neutral_FE_cont_name",
"")
330 kwargs.setdefault(
"charged_FE_cont_name",
"")
331 kwargs.setdefault(
"LinkNeutralFEClusters",
True)
332 kwargs.setdefault(
"doTCC",
False)
333 kwargs.setdefault(
"useGlobal",
False)
335 useMuonTopoClusters =
False
336 from AthenaConfiguration.Enums
import ProductionStep
339 if inputFlags.Common.ProductionStep
in [ProductionStep.Derivation]
or inputFlags.DQ.Environment ==
"AOD":
340 useMuonTopoClusters =
True
343 PFMuonFlowElementLinkerAlgorithmFactory=CompFactory.PFMuonFlowElementAssoc
345 algName=
"PFMuonFlowElementAssoc"
346 PFMuonFlowElementLinkerAlgorithm=PFMuonFlowElementLinkerAlgorithmFactory(algName)
352 if kwargs[
'neutral_FE_cont_name']:
354 PFMuonFlowElementLinkerAlgorithm.JetEtMissNeutralFlowElementContainer = kwargs[
'neutral_FE_cont_name']
357 if kwargs[
'charged_FE_cont_name']:
358 PFMuonFlowElementLinkerAlgorithm.JetEtMissChargedFlowElementContainer = kwargs[
'charged_FE_cont_name']
360 PFMuonFlowElementLinkerAlgorithm.LinkNeutralFEClusters = kwargs[
'LinkNeutralFEClusters']
361 PFMuonFlowElementLinkerAlgorithm.useMuonTopoClusters = useMuonTopoClusters
370 PFMuonFlowElementLinkerAlgorithm.JetEtMissChargedFlowElementContainer=service_key+
"TrackCaloClustersCharged"
371 PFMuonFlowElementLinkerAlgorithm.JetEtMissNeutralFlowElementContainer=service_key+
"TrackCaloClustersNeutral"
376 PFMuonFlowElementLinkerAlgorithm.MuonContainer_chargedFELinks=service_key+
"Muons.chargedTCCLinks"
377 PFMuonFlowElementLinkerAlgorithm.MuonContainer_neutralFELinks=service_key+
"Muons.neutralTCCLinks"
378 PFMuonFlowElementLinkerAlgorithm.JetETMissNeutralFlowElementContainer_FE_MuonLinks=service_key+
"TrackCaloClustersNeutral.TCC_MuonLinks"
379 PFMuonFlowElementLinkerAlgorithm.JetETMissChargedFlowElements_FE_MuonLinks=service_key+
"TrackCaloClustersCharged.TCC_MuonLinks"
380 PFMuonFlowElementLinkerAlgorithm.FlowElementContainer_ChargedFE_ennergy_matched_muon=
"TrackCaloClustersCharged.TCC_efrac_matched_muon"
382 PFMuonFlowElementLinkerAlgorithm.FlowElementContainer_nMatchedMuons=
"TrackCaloClustersNeutral.TCC_nMatchedMuons"
383 PFMuonFlowElementLinkerAlgorithm.FlowElementContainer_FE_efrac_matched_muon=
"TrackCaloClustersNeutral.TCC_efrac_matched_muon"
385 PFMuonFlowElementLinkerAlgorithm.MuonContainer_muon_efrac_matched_FE=
"Muons.muon_efrac_matched_TCC"
387 PFMuonFlowElementLinkerAlgorithm.MuonContainer_ClusterInfo_deltaR=
"Muons.deltaR_muon_clus_TCCalg"
389 if kwargs[
'useGlobal']:
390 PFMuonFlowElementLinkerAlgorithm.JetEtMissChargedFlowElementContainer=
"GlobalChargedParticleFlowObjects"
391 PFMuonFlowElementLinkerAlgorithm.JetEtMissNeutralFlowElementContainer=
"GlobalNeutralParticleFlowObjects"
393 PFMuonFlowElementLinkerAlgorithm.MuonContainer_chargedFELinks=
"Muons.chargedGlobalFELinks"
394 PFMuonFlowElementLinkerAlgorithm.MuonContainer_neutralFELinks=
"Muons.neutralGlobalFELinks"
396 PFMuonFlowElementLinkerAlgorithm.JetETMissNeutralFlowElementContainer_FE_MuonLinks=
"GlobalNeutralParticleFlowObjects.GlobalFE_MuonLinks"
397 PFMuonFlowElementLinkerAlgorithm.JetETMissChargedFlowElements_FE_MuonLinks=
"GlobalChargedParticleFlowObjects.GlobalFE_MuonLinks"
398 PFMuonFlowElementLinkerAlgorithm.FlowElementContainer_ChargedFE_ennergy_matched_muon=
"GlobalChargedParticleFlowObjects.GlobalFE_efrac_matched_muon"
400 PFMuonFlowElementLinkerAlgorithm.FlowElementContainer_nMatchedMuons=
"GlobalNeutralParticleFlowObjects.GlobalFE_nMatchedMuons"
401 PFMuonFlowElementLinkerAlgorithm.FlowElementContainer_FE_efrac_matched_muon=
"GlobalNeutralParticleFlowObjects.GlobalFE_efrac_matched_muon"
403 PFMuonFlowElementLinkerAlgorithm.MuonContainer_muon_efrac_matched_FE=
"Muons.muon_efrac_matched_GlobalFE"
405 PFMuonFlowElementLinkerAlgorithm.MuonContainer_ClusterInfo_deltaR=
"Muons.deltaR_muon_clus_GlobalFEalg"
407 if kwargs[
'LinkNeutralFEClusters']
and not useMuonTopoClusters:
410 PFMuonFlowElementLinkerAlgorithm.ExtraInputs.add((
'CaloCellContainer', inputFlags.Egamma.Keys.Input.CaloCells))
412 if kwargs[
'LinkNeutralFEClusters']:
416 from AthenaCommon.Logging
import logging
417 msg=logging.getLogger(
"PFCfg.py::getMuonFlowElementAssocAlgorithm")
418 msg.error(
"Neutral FE from AOD configured to be linked with Muon. This link will fail due to missing CaloCells in the AOD")
419 msg.info(
"Terminating job")
423 return PFMuonFlowElementLinkerAlgorithm