diff --git a/Reconstruction/egamma/egammaAlgs/python/EMBremCollectionBuilder.py b/Reconstruction/egamma/egammaAlgs/python/EMBremCollectionBuilder.py index 4732fd0e36283fe2257896d9b9c0289a20248c67..50481a3372a01e8c5841dc2f3dd5fe030436e902 100644 --- a/Reconstruction/egamma/egammaAlgs/python/EMBremCollectionBuilder.py +++ b/Reconstruction/egamma/egammaAlgs/python/EMBremCollectionBuilder.py @@ -1,4 +1,4 @@ -# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration +# Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration __doc__ = """ToolFactory to instantiate egammaBremCollectionBuilder with default configuration""" @@ -73,7 +73,7 @@ class egammaBremCollectionBuilder (egammaAlgsConf.EMBremCollectionBuilder): GSFBuildTRT_ElectronPidTool = ( TrackingCommon.getInDetTRT_ElectronPidTool( name="GSFBuildTRT_ElectronPidTool", - CalculateNNPid=True, + CalculateNNPid=False, MinimumTrackPtForNNPid=0., private=True)) diff --git a/Reconstruction/egamma/egammaAlgs/python/EMGSFCaloExtensionBuilder.py b/Reconstruction/egamma/egammaAlgs/python/EMGSFCaloExtensionBuilder.py index ec3efeba67d6238b800b1b0bd268ef62d0232bde..23359d40c4986c4e5a671663d404e461b2bbdb59 100644 --- a/Reconstruction/egamma/egammaAlgs/python/EMGSFCaloExtensionBuilder.py +++ b/Reconstruction/egamma/egammaAlgs/python/EMGSFCaloExtensionBuilder.py @@ -1,6 +1,7 @@ -# Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration +# Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration -__doc__ = "ToolFactory to instantiate the EMGSFCaloExtensionBuilder with default configuration" +__doc__ = """ToolFactory to instantiate the + EMGSFCaloExtensionBuilder with default configuration""" __author__ = "Christos" from egammaAlgs import egammaAlgsConf diff --git a/Reconstruction/egamma/egammaAlgs/python/EMGSFCaloExtensionBuilderConfig.py b/Reconstruction/egamma/egammaAlgs/python/EMGSFCaloExtensionBuilderConfig.py index ad5fae0a1be62ca7690b97a290e72014254dac15..38b76725cecc46c8f114d40e574c475f2743e56f 100644 --- a/Reconstruction/egamma/egammaAlgs/python/EMGSFCaloExtensionBuilderConfig.py +++ b/Reconstruction/egamma/egammaAlgs/python/EMGSFCaloExtensionBuilderConfig.py @@ -1,15 +1,19 @@ -# Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration +# Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration -__doc__ = "Instantiate the EMGSFCaloExtensionBuilder with default configuration" - -from AthenaCommon.Logging import logging -from AthenaConfiguration.ComponentFactory import CompFactory -from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator from TrackToCalo.TrackToCaloConfig import ParticleCaloExtensionToolCfg -EMGSFCaloExtensionBuilder=CompFactory.EMGSFCaloExtensionBuilder +from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator +from AthenaConfiguration.ComponentFactory import CompFactory +from AthenaCommon.Logging import logging +__doc__ = """ Instantiate the EMGSFCaloExtensionBuilder +with default configuration """ + +EMGSFCaloExtensionBuilder = CompFactory.EMGSFCaloExtensionBuilder -def EMGSFCaloExtensionBuilderCfg(flags, name='EMGSFCaloExtensionBuilder', **kwargs): +def EMGSFCaloExtensionBuilderCfg( + flags, + name='EMGSFCaloExtensionBuilder', + **kwargs): mlog = logging.getLogger(name) mlog.info('Starting configuration') @@ -17,21 +21,25 @@ def EMGSFCaloExtensionBuilderCfg(flags, name='EMGSFCaloExtensionBuilder', **kwar acc = ComponentAccumulator() if "PerigeeCaloExtensionTool" not in kwargs: - perigeeCaloExtrapAcc = ParticleCaloExtensionToolCfg(flags, - name="PerigeeCaloExtensionTool", - ParticleType="electron", - StartFromPerigee=True) + perigeeCaloExtrapAcc = ParticleCaloExtensionToolCfg( + flags, + name="PerigeeCaloExtensionTool", + ParticleType="electron", + StartFromPerigee=True) kwargs["PerigeeCaloExtensionTool"] = perigeeCaloExtrapAcc.popPrivateTools() acc.merge(perigeeCaloExtrapAcc) if "LastCaloExtensionTool" not in kwargs: - lastCaloExtrapAcc = ParticleCaloExtensionToolCfg(flags, - name="LastCaloExtensionTool", - ParticleType="electron") + lastCaloExtrapAcc = ParticleCaloExtensionToolCfg( + flags, + name="LastCaloExtensionTool", + ParticleType="electron") kwargs["LastCaloExtensionTool"] = lastCaloExtrapAcc.popPrivateTools() acc.merge(lastCaloExtrapAcc) - kwargs.setdefault("GFFTrkPartContainerName", flags.Egamma.Keys.Output.GSFTrackParticles) + kwargs.setdefault( + "GFFTrkPartContainerName", + flags.Egamma.Keys.Output.GSFTrackParticles) emgscaloextfAlg = EMGSFCaloExtensionBuilder(name, **kwargs) diff --git a/Reconstruction/egamma/egammaAlgs/python/egammaForwardBuilderConfig.py b/Reconstruction/egamma/egammaAlgs/python/egammaForwardBuilderConfig.py index b8db76eb73b4fd63f89c9109321ee49dbf1f07cc..5ebb0a91a7beef48b232f51cbe5485fe487d878e 100644 --- a/Reconstruction/egamma/egammaAlgs/python/egammaForwardBuilderConfig.py +++ b/Reconstruction/egamma/egammaAlgs/python/egammaForwardBuilderConfig.py @@ -1,14 +1,15 @@ -# Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration +# Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration +from ROOT import egammaPID +from ElectronPhotonSelectorTools.AsgForwardElectronIsEMSelectorsConfig import ( + AsgForwardElectronIsEMSelectorCfg) import cppyy from AthenaCommon.Logging import logging from AthenaConfiguration.ComponentFactory import CompFactory from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator from egammaTools.egammaOQFlagsBuilderConfig import egammaOQFlagsBuilderCfg -EMFourMomBuilder=CompFactory.EMFourMomBuilder -from ElectronPhotonSelectorTools.AsgForwardElectronIsEMSelectorsConfig import AsgForwardElectronIsEMSelectorCfg -egammaForwardBuilder=CompFactory.egammaForwardBuilder -from ROOT import egammaPID +EMFourMomBuilder = CompFactory.EMFourMomBuilder +egammaForwardBuilder = CompFactory.egammaForwardBuilder cppyy.load_library('libElectronPhotonSelectorToolsDict') @@ -21,14 +22,26 @@ def egammaForwardBuilderCfg(flags, name='egammaForwardElectron', **kwargs): acc = ComponentAccumulator() if "forwardelectronIsEMselectors" not in kwargs: - LooseFwdElectronSelector = AsgForwardElectronIsEMSelectorCfg(flags, "LooseForwardElectronSelector", egammaPID.ForwardElectronIDLoose) - MediumFwdElectronSelector = AsgForwardElectronIsEMSelectorCfg(flags, "MediumForwardElectronSelector", egammaPID.ForwardElectronIDMedium) - TightFwdElectronSelector = AsgForwardElectronIsEMSelectorCfg(flags, "TightForwardElectronSelector", egammaPID.ForwardElectronIDTight) + LooseFwdElectronSelector = AsgForwardElectronIsEMSelectorCfg( + flags, + "LooseForwardElectronSelector", + egammaPID.ForwardElectronIDLoose) + MediumFwdElectronSelector = AsgForwardElectronIsEMSelectorCfg( + flags, + "MediumForwardElectronSelector", + egammaPID.ForwardElectronIDMedium) + TightFwdElectronSelector = AsgForwardElectronIsEMSelectorCfg( + flags, + "TightForwardElectronSelector", + egammaPID.ForwardElectronIDTight) - kwargs.setdefault("forwardelectronIsEMselectors", [LooseFwdElectronSelector.popPrivateTools(), - MediumFwdElectronSelector.popPrivateTools(), - TightFwdElectronSelector.popPrivateTools()]) - kwargs.setdefault("forwardelectronIsEMselectorResultNames", ["Loose", "Medium", "Tight"]) + kwargs.setdefault("forwardelectronIsEMselectors", + [LooseFwdElectronSelector.popPrivateTools(), + MediumFwdElectronSelector.popPrivateTools(), + TightFwdElectronSelector.popPrivateTools()]) + kwargs.setdefault( + "forwardelectronIsEMselectorResultNames", + ["Loose", "Medium", "Tight"]) acc.merge(LooseFwdElectronSelector) acc.merge(MediumFwdElectronSelector) @@ -39,10 +52,14 @@ def egammaForwardBuilderCfg(flags, name='egammaForwardElectron', **kwargs): kwargs["ObjectQualityTool"] = egOQ.popPrivateTools() acc.merge(egOQ) - kwargs.setdefault("ElectronOutputName", flags.Egamma.Keys.Output.ForwardElectrons) - kwargs.setdefault("TopoClusterName", flags.Egamma.Keys.Input.ForwardTopoClusters) - kwargs.setdefault("ClusterContainerName", flags.Egamma.Keys.Output.ForwardClusters) - kwargs.setdefault("FourMomBuilderTool", EMFourMomBuilder()) + kwargs.setdefault("ElectronOutputName", + flags.Egamma.Keys.Output.ForwardElectrons) + kwargs.setdefault("TopoClusterName", + flags.Egamma.Keys.Input.ForwardTopoClusters) + kwargs.setdefault("ClusterContainerName", + flags.Egamma.Keys.Output.ForwardClusters) + kwargs.setdefault("FourMomBuilderTool", + EMFourMomBuilder()) fwdAlg = egammaForwardBuilder(name, **kwargs) diff --git a/Reconstruction/egamma/egammaAlgs/python/egammaLargeClusterMakerAlgConfig.py b/Reconstruction/egamma/egammaAlgs/python/egammaLargeClusterMakerAlgConfig.py index 0436e5b6d8a8a13707b79c26836cdcff1919e699..4c16498a582d84fb884c7b45625eea1b992c1a97 100644 --- a/Reconstruction/egamma/egammaAlgs/python/egammaLargeClusterMakerAlgConfig.py +++ b/Reconstruction/egamma/egammaAlgs/python/egammaLargeClusterMakerAlgConfig.py @@ -1,31 +1,38 @@ -# Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration +# Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration -__doc__ = "Configure egammaLargeClusterMaker, which chooses cells to store in the AOD" +__doc__ = """ + Configure egammaLargeClusterMaker, + which chooses cells to store in the AOD""" __author__ = "Jovan Mitrevski" from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator from AthenaConfiguration.ComponentFactory import CompFactory from egammaTools.egammaLargeClusterMakerConfig import egammaLargeClusterMakerCfg from CaloClusterCorrection.CaloSwCorrections import make_CaloSwCorrections -CaloClusterMaker=CompFactory.CaloClusterMaker +CaloClusterMaker = CompFactory.CaloClusterMaker -def egammaLargeClusterMakerAlgCfg(flags, name = "egammaLargeClusterMaker", **kwargs): + +def egammaLargeClusterMakerAlgCfg( + flags, + name="egammaLargeClusterMaker", + **kwargs): acc = ComponentAccumulator - + kwargs.setdefault("SaveUncalibratedSignalState", False) - kwargs.setdefault("ClustersOutputName", flags.Egamma.Keys.Output.EgammaLargeClusters) + kwargs.setdefault("ClustersOutputName", + flags.Egamma.Keys.Output.EgammaLargeClusters) if "ClusterMakerTools" not in kwargs: toolAcc = egammaLargeClusterMakerCfg(flags) - kwargs["ClusterMakerTools"] = [ toolAcc.popPrivateTools() ] + kwargs["ClusterMakerTools"] = [toolAcc.popPrivateTools()] acc.merge(toolAcc) - kwargs.setdefault("ClusterCorrectionTools", make_CaloSwCorrections("ele7_11", - suffix="Nocorr", - version="none", - cells_name=flags.Egamma.Keys.Input.CaloCells)) + kwargs.setdefault("ClusterCorrectionTools", + make_CaloSwCorrections("ele7_11", + suffix="Nocorr", + version="none", + cells_name=flags.Egamma.Keys.Input.CaloCells)) acc.addEventAlgo(CaloClusterMaker(name, **kwargs)) return acc - diff --git a/Reconstruction/egamma/egammaAlgs/python/egammaLargeFWDClusterMakerAlgConfig.py b/Reconstruction/egamma/egammaAlgs/python/egammaLargeFWDClusterMakerAlgConfig.py index 5bfcfc53493f7b9075673557a036786240658044..054435602180a949078b671372ea4141e89b000d 100644 --- a/Reconstruction/egamma/egammaAlgs/python/egammaLargeFWDClusterMakerAlgConfig.py +++ b/Reconstruction/egamma/egammaAlgs/python/egammaLargeFWDClusterMakerAlgConfig.py @@ -1,31 +1,36 @@ -# Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration +# Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration -__doc__ = "Configure egammaLargeFWDClusterMaker, which chooses cells to store in the AOD" +__doc__ = "Configure egammaLargeFWDClusterMaker, which chooses cells to store in the AOD" __author__ = "Jovan Mitrevski" from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator from AthenaConfiguration.ComponentFactory import CompFactory from egammaTools.egammaLargeFWDClusterMakerConfig import egammaLargeFWDClusterMakerCfg from CaloClusterCorrection.CaloSwCorrections import make_CaloSwCorrections -CaloClusterMaker=CompFactory.CaloClusterMaker +CaloClusterMaker = CompFactory.CaloClusterMaker -def egammaLargeFWDClusterMakerAlgCfg(flags, name = "egammaLargeClusterMaker", **kwargs): + +def egammaLargeFWDClusterMakerAlgCfg( + flags, + name="egammaLargeClusterMaker", + **kwargs): acc = ComponentAccumulator - + kwargs.setdefault("SaveUncalibratedSignalState", False) - kwargs.setdefault("ClustersOutputName", flags.Egamma.Keys.Output.EgammaLargeFWDClusters) + kwargs.setdefault("ClustersOutputName", + flags.Egamma.Keys.Output.EgammaLargeFWDClusters) if "ClusterMakerTools" not in kwargs: toolAcc = egammaLargeFWDClusterMakerCfg(flags) - kwargs["ClusterMakerTools"] = [ toolAcc.popPrivateTools() ] + kwargs["ClusterMakerTools"] = [toolAcc.popPrivateTools()] acc.merge(toolAcc) - kwargs.setdefault("ClusterCorrectionTools", make_CaloSwCorrections("FWDele6_6", - suffix="Nocorr", - version="none", - cells_name=flags.Egamma.Keys.Input.CaloCells)) + kwargs.setdefault("ClusterCorrectionTools", + make_CaloSwCorrections("FWDele6_6", + suffix="Nocorr", + version="none", + cells_name=flags.Egamma.Keys.Input.CaloCells)) acc.addEventAlgo(CaloClusterMaker(name, **kwargs)) return acc - diff --git a/Reconstruction/egamma/egammaAlgs/python/egammaRecBuilder.py b/Reconstruction/egamma/egammaAlgs/python/egammaRecBuilder.py index f80be96ec0f9a68067352d6a0934d09eeb428d0c..fd9078a89935e95b3060193dadb190848ed351c8 100644 --- a/Reconstruction/egamma/egammaAlgs/python/egammaRecBuilder.py +++ b/Reconstruction/egamma/egammaAlgs/python/egammaRecBuilder.py @@ -1,6 +1,6 @@ -# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration +# Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration -__doc__ = """ToolFactory to instantiate +__doc__ = """ToolFactory to instantiate egammaRecBuilder with default configuration""" __author__ = "Jovan Mitrevski" diff --git a/Reconstruction/egamma/egammaAlgs/python/egammaRecBuilderConfig.py b/Reconstruction/egamma/egammaAlgs/python/egammaRecBuilderConfig.py index 71d40ce6798b73a9d99626ec08994124d11a5143..f7ab862c60c9cb4a19845079f010f6b4bcadd828 100644 --- a/Reconstruction/egamma/egammaAlgs/python/egammaRecBuilderConfig.py +++ b/Reconstruction/egamma/egammaAlgs/python/egammaRecBuilderConfig.py @@ -1,16 +1,21 @@ -# Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration +# Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration -__doc__ = "Instantiate egammaRecBuilder with default configuration" +__doc__ = """ + Instantiate egammaRecBuilder with default configuration + """ from AthenaCommon.Logging import logging from AthenaConfiguration.ComponentFactory import CompFactory from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator from egammaTools.EMTrackMatchBuilderConfig import EMTrackMatchBuilderCfg from egammaTools.EMConversionBuilderConfig import EMConversionBuilderCfg -egammaRecBuilder=CompFactory.egammaRecBuilder +egammaRecBuilder = CompFactory.egammaRecBuilder -def egammaRecBuilderCfg(flags, name='egammaRecBuilder', **kwargs): +def egammaRecBuilderCfg( + flags, + name='egammaRecBuilder', + **kwargs): mlog = logging.getLogger(name) mlog.debug('Start configuration') @@ -26,8 +31,12 @@ def egammaRecBuilderCfg(flags, name='egammaRecBuilder', **kwargs): kwargs["ConversionBuilderTool"] = emcnv.popPrivateTools() acc.merge(emcnv) - kwargs.setdefault("egammaRecContainer", flags.Egamma.Keys.Internal.EgammaRecs) - kwargs.setdefault("InputTopoClusterContainerName", flags.Egamma.Keys.Internal.EgammaTopoClusters) + kwargs.setdefault( + "egammaRecContainer", + flags.Egamma.Keys.Internal.EgammaRecs) + kwargs.setdefault( + "InputTopoClusterContainerName", + flags.Egamma.Keys.Internal.EgammaTopoClusters) egrecAlg = egammaRecBuilder(name, **kwargs) diff --git a/Reconstruction/egamma/egammaAlgs/python/egammaSelectedTrackCopyConfig.py b/Reconstruction/egamma/egammaAlgs/python/egammaSelectedTrackCopyConfig.py index ddffe1437793a92582179ea3e4aad3880838f23d..a338ede05e859912437663c2ce5d024b3844d0b0 100644 --- a/Reconstruction/egamma/egammaAlgs/python/egammaSelectedTrackCopyConfig.py +++ b/Reconstruction/egamma/egammaAlgs/python/egammaSelectedTrackCopyConfig.py @@ -1,4 +1,4 @@ -# Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration +# Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration __doc__ = "Instantiate egammaSelectedTrackCopy with default configuration" @@ -11,7 +11,10 @@ egammaCaloClusterSelector = CompFactory.egammaCaloClusterSelector egammaSelectedTrackCopy = CompFactory.egammaSelectedTrackCopy -def egammaSelectedTrackCopyCfg(flags, name='egammaSelectedTrackCopy', **kwargs): +def egammaSelectedTrackCopyCfg( + flags, + name='egammaSelectedTrackCopy', + **kwargs): mlog = logging.getLogger(name) mlog.info('Starting configuration') @@ -19,24 +22,28 @@ def egammaSelectedTrackCopyCfg(flags, name='egammaSelectedTrackCopy', **kwargs): acc = ComponentAccumulator() if "egammaCaloClusterSelector" not in kwargs: - egammaCaloClusterGSFSelector = egammaCaloClusterSelector(name='caloClusterGSFSelector', - EMEtCut=2250., - EMEtSplittingFraction = 0.7, - EMFCut=0.5 - ) + egammaCaloClusterGSFSelector = egammaCaloClusterSelector( + name='caloClusterGSFSelector', + EMEtCut=2250., + EMEtSplittingFraction=0.7, + EMFCut=0.5 + ) kwargs["egammaCaloClusterSelector"] = egammaCaloClusterGSFSelector - kwargs.setdefault("egammaCheckEnergyDepositTool", egammaCheckEnergyDepositTool()) + kwargs.setdefault("egammaCheckEnergyDepositTool", + egammaCheckEnergyDepositTool()) if "ExtrapolationTool" not in kwargs: extraptool = EMExtrapolationToolsCfg(flags) kwargs["ExtrapolationTool"] = extraptool.popPrivateTools() acc.merge(extraptool) - kwargs.setdefault("ClusterContainerName", - flags.Egamma.Keys.Internal.EgammaTopoClusters) - kwargs.setdefault("TrackParticleContainerName", - flags.Egamma.Keys.Input.TrackParticles) + kwargs.setdefault( + "ClusterContainerName", + flags.Egamma.Keys.Internal.EgammaTopoClusters) + kwargs.setdefault( + "TrackParticleContainerName", + flags.Egamma.Keys.Input.TrackParticles) egseltrkcpAlg = egammaSelectedTrackCopy(name, **kwargs) diff --git a/Reconstruction/egamma/egammaAlgs/python/egammaSuperClusterBuilder.py b/Reconstruction/egamma/egammaAlgs/python/egammaSuperClusterBuilder.py index 0de10c4dee171458544d367f47491f2925e1c49b..dd260c0b99f185772cd84d32da7f01753ca84aeb 100644 --- a/Reconstruction/egamma/egammaAlgs/python/egammaSuperClusterBuilder.py +++ b/Reconstruction/egamma/egammaAlgs/python/egammaSuperClusterBuilder.py @@ -1,4 +1,4 @@ -# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration +# Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration __doc__ = """ToolFactory to instantiate the two supercluster builders with default configuration""" diff --git a/Reconstruction/egamma/egammaAlgs/python/egammaSuperClusterBuilderConfig.py b/Reconstruction/egamma/egammaAlgs/python/egammaSuperClusterBuilderConfig.py index 0205a247ecdfed330d25480904f6e5477b2da7e0..97b02ddf16770f13f539bcaeb9e2ba9aeb44d804 100644 --- a/Reconstruction/egamma/egammaAlgs/python/egammaSuperClusterBuilderConfig.py +++ b/Reconstruction/egamma/egammaAlgs/python/egammaSuperClusterBuilderConfig.py @@ -1,6 +1,7 @@ -# Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration +# Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration -__doc__ = "Instantiate the two supercluster builders with default configuration" +__doc__ = """Instantiate the two supercluster +builders with default configuration""" from AthenaCommon.Logging import logging from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator @@ -36,9 +37,15 @@ def electronSuperClusterBuilderCfg(flags, name='electronSuperClusterBuilder', ** kwargs["ClusterCorrectionTool"] = egswtool.popPrivateTools() acc.merge(egswtool) - kwargs.setdefault("InputEgammaRecContainerName", flags.Egamma.Keys.Internal.EgammaRecs) - kwargs.setdefault("SuperElectronRecCollectionName", flags.Egamma.Keys.Internal.ElectronSuperRecs) - kwargs.setdefault("egammaCheckEnergyDepositTool", egammaCheckEnergyDepositTool()) + kwargs.setdefault( + "InputEgammaRecContainerName", + flags.Egamma.Keys.Internal.EgammaRecs) + kwargs.setdefault( + "SuperElectronRecCollectionName", + flags.Egamma.Keys.Internal.ElectronSuperRecs) + kwargs.setdefault( + "egammaCheckEnergyDepositTool", + egammaCheckEnergyDepositTool()) kwargs.setdefault("EtThresholdCut", 1000) elscAlg = electronSuperClusterBuilder(name, **kwargs) @@ -47,7 +54,10 @@ def electronSuperClusterBuilderCfg(flags, name='electronSuperClusterBuilder', ** return acc -def photonSuperClusterBuilderCfg(flags, name='photonSuperClusterBuilder', **kwargs): +def photonSuperClusterBuilderCfg( + flags, + name='photonSuperClusterBuilder', + **kwargs): from egammaAlgs.egammaAlgsConf import photonSuperClusterBuilder @@ -71,9 +81,15 @@ def photonSuperClusterBuilderCfg(flags, name='photonSuperClusterBuilder', **kwar kwargs["ClusterCorrectionTool"] = egswtool.popPrivateTools() acc.merge(egswtool) - kwargs.setdefault("InputEgammaRecContainerName", flags.Egamma.Keys.Internal.EgammaRecs) - kwargs.setdefault("SuperPhotonRecCollectionName", flags.Egamma.Keys.Internal.PhotonSuperRecs) - kwargs.setdefault("egammaCheckEnergyDepositTool", egammaCheckEnergyDepositTool()) + kwargs.setdefault( + "InputEgammaRecContainerName", + flags.Egamma.Keys.Internal.EgammaRecs) + kwargs.setdefault( + "SuperPhotonRecCollectionName", + flags.Egamma.Keys.Internal.PhotonSuperRecs) + kwargs.setdefault( + "egammaCheckEnergyDepositTool", + egammaCheckEnergyDepositTool()) phscAlg = photonSuperClusterBuilder(name, **kwargs) diff --git a/Reconstruction/egamma/egammaAlgs/python/egammaTopoClusterCopier.py b/Reconstruction/egamma/egammaAlgs/python/egammaTopoClusterCopier.py index 3b314af0653a123e0cf6cfe7d70850b5d738d486..5451f8b0c09e2b8b77ae5f94c4723337157668a3 100644 --- a/Reconstruction/egamma/egammaAlgs/python/egammaTopoClusterCopier.py +++ b/Reconstruction/egamma/egammaAlgs/python/egammaTopoClusterCopier.py @@ -1,7 +1,8 @@ -# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration +# Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration __doc__ = """ -ToolFactory to instantiate egammaTopoClusterCopier with default configuration""" + ToolFactory to instantiate egammaTopoClusterCopier + with default configuration""" __author__ = "Jovan Mitrevski" from egammaAlgs import egammaAlgsConf @@ -11,8 +12,10 @@ from egammaRec.egammaRecFlags import jobproperties egammaTopoClusterCopier = AlgFactory( egammaAlgsConf.egammaTopoClusterCopier, name='egammaTopoClusterCopier', - InputTopoCollection=jobproperties.egammaRecFlags.inputTopoClusterCollection(), - OutputTopoCollection=jobproperties.egammaRecFlags.egammaTopoClusterCollection(), + InputTopoCollection=( + jobproperties.egammaRecFlags.inputTopoClusterCollection()), + OutputTopoCollection=( + jobproperties.egammaRecFlags.egammaTopoClusterCollection()), OutputTopoCollectionShallow="tmp_" + jobproperties.egammaRecFlags.egammaTopoClusterCollection() ) diff --git a/Reconstruction/egamma/egammaAlgs/python/egammaTopoClusterCopierConfig.py b/Reconstruction/egamma/egammaAlgs/python/egammaTopoClusterCopierConfig.py index 2424f0eeb34459148cc438e5b47b96b666a505b2..a6e1077393605911e3d87b725bb8432a6a481469 100644 --- a/Reconstruction/egamma/egammaAlgs/python/egammaTopoClusterCopierConfig.py +++ b/Reconstruction/egamma/egammaAlgs/python/egammaTopoClusterCopierConfig.py @@ -1,25 +1,34 @@ -# Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration +# Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration __doc__ = "Instantiate egammaTopoClusterCopier with default configuration" from AthenaCommon.Logging import logging from AthenaConfiguration.ComponentFactory import CompFactory from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator -egammaTopoClusterCopier=CompFactory.egammaTopoClusterCopier +egammaTopoClusterCopier = CompFactory.egammaTopoClusterCopier -def egammaTopoClusterCopierCfg(flags, name='egammaTopoClusterCopier', **kwargs): +def egammaTopoClusterCopierCfg( + flags, + name='egammaTopoClusterCopier', + **kwargs): mlog = logging.getLogger(name) mlog.info('Starting configuration') acc = ComponentAccumulator() - kwargs.setdefault("InputTopoCollection", flags.Egamma.Keys.Input.TopoClusters) + kwargs.setdefault( + "InputTopoCollection", + flags.Egamma.Keys.Input.TopoClusters) egtopocluster = flags.Egamma.Keys.Internal.EgammaTopoClusters - kwargs.setdefault("OutputTopoCollection", egtopocluster) - kwargs.setdefault("OutputTopoCollectionShallow", "tmp_"+egtopocluster) + kwargs.setdefault( + "OutputTopoCollection", + egtopocluster) + kwargs.setdefault( + "OutputTopoCollectionShallow", + "tmp_"+egtopocluster) egcopierAlg = egammaTopoClusterCopier(name, **kwargs) diff --git a/Reconstruction/egamma/egammaAlgs/python/egammaTrackSlimmerConfig.py b/Reconstruction/egamma/egammaAlgs/python/egammaTrackSlimmerConfig.py index a7f3ed03db4bedab249f847bf75905615768bafa..0c3192d5bb4b2359769d6cd0968c50f3136fb200 100755 --- a/Reconstruction/egamma/egammaAlgs/python/egammaTrackSlimmerConfig.py +++ b/Reconstruction/egamma/egammaAlgs/python/egammaTrackSlimmerConfig.py @@ -1,12 +1,15 @@ -# Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration +# Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration from AthenaCommon.Logging import logging from AthenaConfiguration.ComponentFactory import CompFactory from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator -egammaTrackSlimmer=CompFactory.egammaTrackSlimmer +egammaTrackSlimmer = CompFactory.egammaTrackSlimmer -def egammaTrackSlimmerCfg(flags, name='egammaTrackSlimmer', **kwargs): +def egammaTrackSlimmerCfg( + flags, + name='egammaTrackSlimmer', + **kwargs): mlog = logging.getLogger(name) mlog.info('Starting configuration') @@ -14,11 +17,16 @@ def egammaTrackSlimmerCfg(flags, name='egammaTrackSlimmer', **kwargs): acc = ComponentAccumulator() kwargs.setdefault("StreamName", 'StreamAOD') - kwargs.setdefault("InputElectronContainerName", flags.Egamma.Keys.Output.Electrons) - kwargs.setdefault("InputPhotonContainerName", flags.Egamma.Keys.Output.Photons) - kwargs.setdefault("TrackParticleContainerName", flags.Egamma.Keys.Output.GSFTrackParticles) - kwargs.setdefault("VertexContainerName", flags.Egamma.Keys.Output.ConversionVertices) - kwargs.setdefault("InDetTrackParticleContainerName", flags.Egamma.Keys.Input.TrackParticles) + kwargs.setdefault("InputElectronContainerName", + flags.Egamma.Keys.Output.Electrons) + kwargs.setdefault("InputPhotonContainerName", + flags.Egamma.Keys.Output.Photons) + kwargs.setdefault("TrackParticleContainerName", + flags.Egamma.Keys.Output.GSFTrackParticles) + kwargs.setdefault("VertexContainerName", + flags.Egamma.Keys.Output.ConversionVertices) + kwargs.setdefault("InDetTrackParticleContainerName", + flags.Egamma.Keys.Input.TrackParticles) egtrkslimmerAlg = egammaTrackSlimmer(name, **kwargs) diff --git a/Reconstruction/egamma/egammaAlgs/python/egammaTruthAssociationConfig.py b/Reconstruction/egamma/egammaAlgs/python/egammaTruthAssociationConfig.py index effa519afea4e57bc2d33ed68aa2f74e21380164..bf82b915619f99ecdfbb61cca6e3cb36d2ce5ce7 100644 --- a/Reconstruction/egamma/egammaAlgs/python/egammaTruthAssociationConfig.py +++ b/Reconstruction/egamma/egammaAlgs/python/egammaTruthAssociationConfig.py @@ -1,12 +1,12 @@ -# Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration +# Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration +from MCTruthClassifier.MCTruthClassifierConfig import MCTruthClassifierCaloTruthMatchCfg __doc__ = "Configure egammaTruthAssociation" from AthenaCommon.Logging import logging from AthenaConfiguration.ComponentFactory import CompFactory from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator -egammaTruthAssociationAlg=CompFactory.egammaTruthAssociationAlg -from MCTruthClassifier.MCTruthClassifierConfig import MCTruthClassifierCaloTruthMatchCfg +egammaTruthAssociationAlg = CompFactory.egammaTruthAssociationAlg def egammaTruthAssociationCfg(flags, name='egammaTruthAssociation', **kwargs): @@ -21,15 +21,32 @@ def egammaTruthAssociationCfg(flags, name='egammaTruthAssociation', **kwargs): kwargs["MCTruthClassifier"] = mctruth.popPrivateTools() acc.merge(mctruth) - kwargs.setdefault("ClusterContainerName", flags.Egamma.Keys.Output.CaloClusters) - kwargs.setdefault("ElectronContainerName", flags.Egamma.Keys.Output.Electrons) - kwargs.setdefault("PhotonContainerName", flags.Egamma.Keys.Output.Photons) - kwargs.setdefault("FwdElectronContainerName", flags.Egamma.Keys.Output.ForwardElectrons) - kwargs.setdefault("TruthEventContainerName", flags.Egamma.Keys.Input.TruthEvents) - kwargs.setdefault("TruthParticleContainerName", flags.Egamma.Keys.Input.TruthParticles) - kwargs.setdefault("EgammaTruthContainerName", flags.Egamma.Keys.Output.TruthParticles) - kwargs.setdefault("MatchForwardElectrons", flags.Egamma.doForwardSeeded) - kwargs.setdefault("SimBarcodeOffset", flags.Sim.SimBarcodeOffset) + kwargs.setdefault( + "ClusterContainerName", + flags.Egamma.Keys.Output.CaloClusters) + kwargs.setdefault( + "ElectronContainerName", + flags.Egamma.Keys.Output.Electrons) + kwargs.setdefault( + "PhotonContainerName", + flags.Egamma.Keys.Output.Photons) + kwargs.setdefault( + "FwdElectronContainerName", + flags.Egamma.Keys.Output.ForwardElectrons) + kwargs.setdefault( + "TruthEventContainerName", + flags.Egamma.Keys.Input.TruthEvents) + kwargs.setdefault( + "TruthParticleContainerName", + flags.Egamma.Keys.Input.TruthParticles) + kwargs.setdefault( + "EgammaTruthContainerName", + flags.Egamma.Keys.Output.TruthParticles) + kwargs.setdefault( + "MatchForwardElectrons", + flags.Egamma.doForwardSeeded) + kwargs.setdefault("SimBarcodeOffset", + flags.Sim.SimBarcodeOffset) egtruthAlg = egammaTruthAssociationAlg(name, **kwargs) diff --git a/Reconstruction/egamma/egammaAlgs/python/topoEgammaBuilderConfig.py b/Reconstruction/egamma/egammaAlgs/python/topoEgammaBuilderConfig.py index 9d6f6725e5e6d48d2fb53a0f1c27ea74a4a796d3..33b14a49f348f32251b64b06b593693db585b3d1 100644 --- a/Reconstruction/egamma/egammaAlgs/python/topoEgammaBuilderConfig.py +++ b/Reconstruction/egamma/egammaAlgs/python/topoEgammaBuilderConfig.py @@ -1,12 +1,15 @@ -# Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration +# Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration -__doc__ = "Instantiate the two supercluster builders with default configuration" +__doc__ = """ + Instantiate the two supercluster + builders with default configuration + """ from AthenaCommon.Logging import logging from AthenaConfiguration.ComponentFactory import CompFactory from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator -topoEgammaBuilder=CompFactory.topoEgammaBuilder -EGammaAmbiguityTool=CompFactory.EGammaAmbiguityTool +topoEgammaBuilder = CompFactory.topoEgammaBuilder +EGammaAmbiguityTool = CompFactory.EGammaAmbiguityTool def topoEgammaBuilderCfg(flags, name='topoEgammaBuilder', **kwargs): @@ -16,11 +19,21 @@ def topoEgammaBuilderCfg(flags, name='topoEgammaBuilder', **kwargs): acc = ComponentAccumulator() - kwargs.setdefault("SuperElectronRecCollectionName", flags.Egamma.Keys.Internal.ElectronSuperRecs) - kwargs.setdefault("SuperPhotonRecCollectionName", flags.Egamma.Keys.Internal.PhotonSuperRecs) - kwargs.setdefault("ElectronOutputName", flags.Egamma.Keys.Output.Electrons) - kwargs.setdefault("PhotonOutputName", flags.Egamma.Keys.Output.Photons) - kwargs.setdefault("AmbiguityTool", EGammaAmbiguityTool()) + kwargs.setdefault( + "SuperElectronRecCollectionName", + flags.Egamma.Keys.Internal.ElectronSuperRecs) + kwargs.setdefault( + "SuperPhotonRecCollectionName", + flags.Egamma.Keys.Internal.PhotonSuperRecs) + kwargs.setdefault( + "ElectronOutputName", + flags.Egamma.Keys.Output.Electrons) + kwargs.setdefault( + "PhotonOutputName", + flags.Egamma.Keys.Output.Photons) + kwargs.setdefault( + "AmbiguityTool", + EGammaAmbiguityTool()) topoegAlg = topoEgammaBuilder(flags, **kwargs)