305 kwargs.setdefault(
"neutral_FE_cont_name",
"")
306 kwargs.setdefault(
"charged_FE_cont_name",
"")
307 kwargs.setdefault(
"LinkNeutralFEClusters",
True)
308 kwargs.setdefault(
"doTCC",
False)
309 kwargs.setdefault(
"useGlobal",
False)
311 useMuonTopoClusters =
False
312 from AthenaConfiguration.Enums
import ProductionStep
315 if inputFlags.Common.ProductionStep
in [ProductionStep.Derivation]
or inputFlags.DQ.Environment ==
"AOD":
316 useMuonTopoClusters =
True
319 PFMuonFlowElementLinkerAlgorithmFactory=CompFactory.PFMuonFlowElementAssoc
321 algName=
"PFMuonFlowElementAssoc"
322 PFMuonFlowElementLinkerAlgorithm=PFMuonFlowElementLinkerAlgorithmFactory(algName)
328 if kwargs[
'neutral_FE_cont_name']:
330 PFMuonFlowElementLinkerAlgorithm.JetEtMissNeutralFlowElementContainer = kwargs[
'neutral_FE_cont_name']
333 if kwargs[
'charged_FE_cont_name']:
334 PFMuonFlowElementLinkerAlgorithm.JetEtMissChargedFlowElementContainer = kwargs[
'charged_FE_cont_name']
336 PFMuonFlowElementLinkerAlgorithm.LinkNeutralFEClusters = kwargs[
'LinkNeutralFEClusters']
337 PFMuonFlowElementLinkerAlgorithm.useMuonTopoClusters = useMuonTopoClusters
346 PFMuonFlowElementLinkerAlgorithm.JetEtMissChargedFlowElementContainer=service_key+
"TrackCaloClustersCharged"
347 PFMuonFlowElementLinkerAlgorithm.JetEtMissNeutralFlowElementContainer=service_key+
"TrackCaloClustersNeutral"
352 PFMuonFlowElementLinkerAlgorithm.MuonContainer_chargedFELinks=service_key+
"Muons.chargedTCCLinks"
353 PFMuonFlowElementLinkerAlgorithm.MuonContainer_neutralFELinks=service_key+
"Muons.neutralTCCLinks"
354 PFMuonFlowElementLinkerAlgorithm.JetETMissNeutralFlowElementContainer_FE_MuonLinks=service_key+
"TrackCaloClustersNeutral.TCC_MuonLinks"
355 PFMuonFlowElementLinkerAlgorithm.JetETMissChargedFlowElements_FE_MuonLinks=service_key+
"TrackCaloClustersCharged.TCC_MuonLinks"
356 PFMuonFlowElementLinkerAlgorithm.FlowElementContainer_ChargedFE_ennergy_matched_muon=
"TrackCaloClustersCharged.TCC_efrac_matched_muon"
358 PFMuonFlowElementLinkerAlgorithm.FlowElementContainer_nMatchedMuons=
"TrackCaloClustersNeutral.TCC_nMatchedMuons"
359 PFMuonFlowElementLinkerAlgorithm.FlowElementContainer_FE_efrac_matched_muon=
"TrackCaloClustersNeutral.TCC_efrac_matched_muon"
361 PFMuonFlowElementLinkerAlgorithm.MuonContainer_muon_efrac_matched_FE=
"Muons.muon_efrac_matched_TCC"
363 PFMuonFlowElementLinkerAlgorithm.MuonContainer_ClusterInfo_deltaR=
"Muons.deltaR_muon_clus_TCCalg"
365 if kwargs[
'useGlobal']:
366 PFMuonFlowElementLinkerAlgorithm.JetEtMissChargedFlowElementContainer=
"GlobalChargedParticleFlowObjects"
367 PFMuonFlowElementLinkerAlgorithm.JetEtMissNeutralFlowElementContainer=
"GlobalNeutralParticleFlowObjects"
369 PFMuonFlowElementLinkerAlgorithm.MuonContainer_chargedFELinks=
"Muons.chargedGlobalFELinks"
370 PFMuonFlowElementLinkerAlgorithm.MuonContainer_neutralFELinks=
"Muons.neutralGlobalFELinks"
372 PFMuonFlowElementLinkerAlgorithm.JetETMissNeutralFlowElementContainer_FE_MuonLinks=
"GlobalNeutralParticleFlowObjects.GlobalFE_MuonLinks"
373 PFMuonFlowElementLinkerAlgorithm.JetETMissChargedFlowElements_FE_MuonLinks=
"GlobalChargedParticleFlowObjects.GlobalFE_MuonLinks"
374 PFMuonFlowElementLinkerAlgorithm.FlowElementContainer_ChargedFE_ennergy_matched_muon=
"GlobalChargedParticleFlowObjects.GlobalFE_efrac_matched_muon"
376 PFMuonFlowElementLinkerAlgorithm.FlowElementContainer_nMatchedMuons=
"GlobalNeutralParticleFlowObjects.GlobalFE_nMatchedMuons"
377 PFMuonFlowElementLinkerAlgorithm.FlowElementContainer_FE_efrac_matched_muon=
"GlobalNeutralParticleFlowObjects.GlobalFE_efrac_matched_muon"
379 PFMuonFlowElementLinkerAlgorithm.MuonContainer_muon_efrac_matched_FE=
"Muons.muon_efrac_matched_GlobalFE"
381 PFMuonFlowElementLinkerAlgorithm.MuonContainer_ClusterInfo_deltaR=
"Muons.deltaR_muon_clus_GlobalFEalg"
383 if kwargs[
'LinkNeutralFEClusters']
and not useMuonTopoClusters:
386 PFMuonFlowElementLinkerAlgorithm.ExtraInputs.add((
'CaloCellContainer', inputFlags.Egamma.Keys.Input.CaloCells))
388 if kwargs[
'LinkNeutralFEClusters']:
392 from AthenaCommon.Logging
import logging
393 msg=logging.getLogger(
"PFCfg.py::getMuonFlowElementAssocAlgorithm")
394 msg.error(
"Neutral FE from AOD configured to be linked with Muon. This link will fail due to missing CaloCells in the AOD")
395 msg.info(
"Terminating job")
399 return PFMuonFlowElementLinkerAlgorithm