2 from AthenaConfiguration.ComponentAccumulator
import ComponentAccumulator
3 from AthenaConfiguration.ComponentFactory
import CompFactory
4 from AthenaConfiguration.Enums
import Format
8 def PFFullCfg(inputFlags,runTauReco=False,**kwargs):
12 StoreGateSvc=CompFactory.StoreGateSvc
16 from SGComps.AddressRemappingConfig
import InputRenameCfg
17 result.merge(
InputRenameCfg(
"xAOD::CaloClusterContainer",
"CaloCalTopoClusters",
""))
20 from MagFieldServices.MagFieldServicesConfig
import AtlasFieldCacheCondAlgCfg
24 from CaloRec.CaloTopoClusterConfig
import CaloTopoClusterCfg
27 from CaloTools.CaloNoiseCondAlgConfig
import CaloNoiseCondAlgCfg
32 from TrackToCalo.CaloExtensionBuilderAlgCfg
import CaloExtensionBuilderAlgCfg
39 from OutputStreamAthenaPool.OutputStreamConfig
import addToAOD, addToESD
42 toESDAndAOD = [
"xAOD::TrackParticleContainer#InDetTrackParticles",
"xAOD::TrackParticleAuxContainer#InDetTrackParticlesAux."]
43 toESDAndAOD += [
"xAOD::ElectronContainer#Electrons",
"xAOD::ElectronAuxContainer#ElectronsAux."]
44 toESDAndAOD += [
"xAOD::PhotonContainer#Photons",
"xAOD::PhotonAuxContainer#PhotonsAux."]
45 toESDAndAOD += [
"xAOD::MuonContainer#Muons",
"xAOD::MuonAuxContainer#MuonsAux."]
49 toESDAndAOD += [
"xAOD::TauJetContainer#TauJets",
"xAOD::TauJetAuxContainer#TauJetsAux."]
51 result.merge(
addToESD(inputFlags, toESDAndAOD))
52 result.merge(
addToAOD(inputFlags, toESDAndAOD))
54 result.merge(
PFCfg(inputFlags))
64 PFLeptonSelectorFactory=CompFactory.PFLeptonSelector
65 PFLeptonSelector = PFLeptonSelectorFactory(
"PFLeptonSelector")
66 PFLeptonSelector.selectElectrons=
False
67 PFLeptonSelector.selectMuons=
False
68 result.addEventAlgo(PFLeptonSelector)
70 from eflowRec.PFCfg
import PFTrackSelectorAlgCfg
73 if inputFlags.Input.Format
is Format.POOL
and "StreamRDO" not in inputFlags.Input.ProcessingTags:
77 from eflowRec.PFCfg
import getOfflinePFAlgorithm
80 from eflowRec.PFCfg
import getChargedFlowElementCreatorAlgorithm,getNeutralFlowElementCreatorAlgorithm,getLCNeutralFlowElementCreatorAlgorithm
86 if not inputFlags.PF.EOverPMode:
87 if inputFlags.PF.useElPhotLinks:
88 from eflowRec.PFCfg
import getEGamFlowElementAssocAlgorithm
91 if inputFlags.PF.useMuLinks
and inputFlags.Detector.GeometryMuon:
92 from eflowRec.PFCfg
import getMuonFlowElementAssocAlgorithm
95 from OutputStreamAthenaPool.OutputStreamConfig
import addToAOD, addToESD
97 if(inputFlags.PF.EOverPMode):
98 toESDAndAOD = [
"xAOD::FlowElementContainer#EOverPChargedParticleFlowObjects",
"xAOD::FlowElementAuxContainer#EOverPChargedParticleFlowObjectsAux."]
99 toESDAndAOD += [
"xAOD::FlowElementContainer#EOverPNeutralParticleFlowObjects",
"xAOD::FlowElementAuxContainer#EOverPNeutralParticleFlowObjectsAux."]
101 toESDAndAOD = [
"xAOD::FlowElementContainer#JetETMissChargedParticleFlowObjects",
"xAOD::FlowElementAuxContainer#JetETMissChargedParticleFlowObjectsAux."]
102 toESDAndAOD += [
"xAOD::FlowElementContainer#JetETMissNeutralParticleFlowObjects",
"xAOD::FlowElementAuxContainer#JetETMissNeutralParticleFlowObjectsAux.-FEShowerSubtractedClusterLink"]
103 toESDAndAOD += [
"xAOD::FlowElementContainer#JetETMissLCNeutralParticleFlowObjects",
"xAOD::ShallowAuxContainer#JetETMissLCNeutralParticleFlowObjectsAux."]
105 if inputFlags.PF.addCPData:
108 toESDAndAOD += [
"xAOD::CaloClusterContainer#PFCaloCluster",
"xAOD::CaloClusterAuxContainer#PFCaloClusterAux."]
111 PFClusterWidthDecorator = CompFactory.PFClusterWidthDecorator()
112 result.addEventAlgo(PFClusterWidthDecorator)
114 from TrigGepPerf.KeepCellsConfig
import KeepCellsCfg
116 toESDAndAOD += [
"CaloCellContainer#AllCalo"]
118 result.merge(
addToESD(inputFlags, toESDAndAOD))
119 result.merge(
addToAOD(inputFlags, toESDAndAOD))
124 if "StreamESD" not in inputFlags.Input.ProcessingTags:
125 from ThinningUtils.ThinNegativeEnergyNeutralPFOCfg
import ThinNegativeEnergyNeutralPFOCfg
135 from eflowRec.PFCfg
import getTauFlowElementAssocAlgorithm
143 from AthenaConfiguration.AllConfigFlags
import initConfigFlags
146 from AthenaConfiguration.TestDefaults
import defaultTestFiles, defaultConditionsTags
147 flags.Input.Files = defaultTestFiles.ESD_RUN3_MC
148 flags.IOVDb.GlobalTag = defaultConditionsTags.RUN3_MC
149 flags.Output.doWriteAOD=
True
150 flags.Output.AODFileName=
"output_AOD.root"
155 from AthenaConfiguration.MainServicesConfig
import MainServicesCfg
158 from AthenaPoolCnvSvc.PoolReadConfig
import PoolReadCfg
162 from eflowRec.PFRun3Remaps
import ListRemaps
165 for mapping
in list_remaps:
170 if __name__==
"__main__":