Verified Commit 08367be9 authored by Tadej Novak's avatar Tadej Novak
Browse files

Cleanup detector geometry config for ID/ITk

parent bc58cb9b
......@@ -18,6 +18,10 @@ def createGeoModelConfigFlags():
gcf.addFlag("GeoModel.Align.Dynamic",
lambda prevFlags : prevFlags.Common.ProductionStep != ProductionStep.Simulation and not prevFlags.Input.isMC)
gcf.addFlag("GeoModel.Align.LegacyConditionsAccess",
lambda prevFlags : prevFlags.Common.Project == "AthSimulation" or prevFlags.Common.ProductionStep == ProductionStep.Simulation)
# Mainly for G4 which still loads alignment on initialize
gcf.addFlag("GeoModel.StripGeoType",
lambda prevFlags : DetDescrInfo(prevFlags.GeoModel.AtlasVersion)['Common']['StripGeoType'])
......
......@@ -55,29 +55,29 @@ def TPCnvTest(infile, keys, useGeoModelSvc=False, useIOVDbSvc=False, doPixel=Fal
EventCnvSuperTool = None
if useGeoModelSvc:
if ConfigFlags.Detector.GeometryPixel:
from PixelGeoModel.PixelGeoModelConfig import PixelGeometryCfg
acc.merge(PixelGeometryCfg(ConfigFlags))
useGeoModelSvc = True
from PixelGeoModel.PixelGeoModelConfig import PixelReadoutGeometryCfg
acc.merge(PixelReadoutGeometryCfg(ConfigFlags))
if ConfigFlags.Detector.GeometrySCT:
from SCT_GeoModel.SCT_GeoModelConfig import SCT_GeometryCfg
acc.merge(SCT_GeometryCfg(ConfigFlags))
useGeoModelSvc = True
from SCT_GeoModel.SCT_GeoModelConfig import SCT_ReadoutGeometryCfg
acc.merge(SCT_ReadoutGeometryCfg(ConfigFlags))
if ConfigFlags.Detector.GeometryTRT:
from TRT_GeoModel.TRT_GeoModelConfig import TRT_GeometryCfg
acc.merge(TRT_GeometryCfg(ConfigFlags))
useGeoModelSvc = True
if ConfigFlags.Detector.GeometryITkPixel:
from PixelGeoModelXml.ITkPixelGeoModelConfig import ITkPixelReadoutGeometryCfg
acc.merge(ITkPixelReadoutGeometryCfg(ConfigFlags))
if ConfigFlags.Detector.GeometryITkStrip:
from StripGeoModelXml.ITkStripGeoModelConfig import ITkStripReadoutGeometryCfg
acc.merge(ITkStripReadoutGeometryCfg(ConfigFlags))
if ConfigFlags.Detector.GeometryLAr:
from LArGeoAlgsNV.LArGMConfig import LArGMCfg
acc.merge(LArGMCfg(ConfigFlags))
useGeoModelSvc = True
if ConfigFlags.Detector.GeometryTile:
from TileGeoModel.TileGMConfig import TileGMCfg
acc.merge(TileGMCfg(ConfigFlags))
useGeoModelSvc = True
if ConfigFlags.Detector.GeometryMuon:
from MuonConfig.MuonGeometryConfig import MuonGeoModelCfg
acc.merge(MuonGeoModelCfg(ConfigFlags))
useGeoModelSvc = True
#acc.merge(ForDetGeometryCfg(ConfigFlags))
from AtlasGeoModel.GeoModelConfig import GeoModelCfg
acc.merge(GeoModelCfg(ConfigFlags))
......
......@@ -3,15 +3,23 @@
#
from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator
from AthenaConfiguration.Enums import ProductionStep
def AtlasGeometryCfg (flags):
acc = ComponentAccumulator()
from BeamPipeGeoModel.BeamPipeGMConfig import BeamPipeGeometryCfg
acc.merge(BeamPipeGeometryCfg(flags))
from PixelGeoModel.PixelGeoModelConfig import PixelGeometryCfg
acc.merge(PixelGeometryCfg(flags))
from SCT_GeoModel.SCT_GeoModelConfig import SCT_GeometryCfg
acc.merge(SCT_GeometryCfg(flags))
if flags.Common.ProductionStep == ProductionStep.Simulation:
from PixelGeoModel.PixelGeoModelConfig import PixelSimulationGeometryCfg
acc.merge(PixelSimulationGeometryCfg(flags))
from SCT_GeoModel.SCT_GeoModelConfig import SCT_SimulationGeometryCfg
acc.merge(SCT_SimulationGeometryCfg(flags))
else:
from PixelGeoModel.PixelGeoModelConfig import PixelReadoutGeometryCfg
acc.merge(PixelReadoutGeometryCfg(flags))
from SCT_GeoModel.SCT_GeoModelConfig import SCT_ReadoutGeometryCfg
acc.merge(SCT_ReadoutGeometryCfg(flags))
from TRT_GeoModel.TRT_GeoModelConfig import TRT_GeometryCfg
acc.merge(TRT_GeometryCfg(flags))
from InDetServMatGeoModel.InDetServMatGeoModelConfig import InDetServiceMaterialCfg
......
# 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 AthenaConfiguration.ComponentAccumulator import ComponentAccumulator
from AthenaConfiguration.ComponentFactory import CompFactory
......@@ -59,18 +59,6 @@ if __name__ == "__main__":
# To run on data do e.g.
# ConfigFlags.Input.Files = ["../q431/myESD.pool.root"]
# Just enable ID for the moment.
ConfigFlags.Detector.GeometryBpipe = True
ConfigFlags.Detector.GeometryMDT = True
ConfigFlags.Detector.GeometryTGC = True
ConfigFlags.Detector.GeometryCSC = True
ConfigFlags.Detector.GeometryRPC = True
ConfigFlags.Detector.GeometryTile = True
ConfigFlags.Detector.GeometryLAr = True
ConfigFlags.Detector.GeometryPixel = True
ConfigFlags.Detector.GeometrySCT = True
ConfigFlags.Detector.GeometryTRT = True
# This should run serially for the moment.
ConfigFlags.Concurrency.NumThreads = 1
ConfigFlags.Concurrency.NumConcurrentEvents = 1
......@@ -82,29 +70,41 @@ if __name__ == "__main__":
cfg = MainServicesCfg(ConfigFlags)
cfg.merge(PoolReadCfg(ConfigFlags))
from AtlasGeoModel.GeoModelConfig import GeoModelCfg
cfg.merge(GeoModelCfg(ConfigFlags))
if ConfigFlags.Detector.GeometryBpipe:
from BeamPipeGeoModel.BeamPipeGMConfig import BeamPipeGeometryCfg
cfg.merge(BeamPipeGeometryCfg(ConfigFlags))
if ConfigFlags.Detector.GeometryPixel:
from PixelGeoModel.PixelGeoModelConfig import PixelReadoutGeometryCfg
cfg.merge(PixelReadoutGeometryCfg(ConfigFlags))
from MuonConfig.MuonGeometryConfig import MuonGeoModelCfg
cfg.merge(MuonGeoModelCfg(ConfigFlags))
if ConfigFlags.Detector.GeometrySCT:
from SCT_GeoModel.SCT_GeoModelConfig import SCT_ReadoutGeometryCfg
cfg.merge(SCT_ReadoutGeometryCfg(ConfigFlags))
from LArGeoAlgsNV.LArGMConfig import LArGMCfg
cfg.merge(LArGMCfg(ConfigFlags))
if ConfigFlags.Detector.GeometryTRT:
from TRT_GeoModel.TRT_GeoModelConfig import TRT_GeometryCfg
cfg.merge(TRT_GeometryCfg(ConfigFlags))
from TileGeoModel.TileGMConfig import TileGMCfg
cfg.merge(TileGMCfg(ConfigFlags))
if ConfigFlags.Detector.GeometryITkPixel:
from PixelGeoModelXml.ITkPixelGeoModelConfig import ITkPixelReadoutGeometryCfg
cfg.merge(ITkPixelReadoutGeometryCfg(ConfigFlags))
from BeamPipeGeoModel.BeamPipeGMConfig import BeamPipeGeometryCfg
cfg.merge(BeamPipeGeometryCfg(ConfigFlags))
if ConfigFlags.Detector.GeometryITkStrip:
from StripGeoModelXml.ITkStripGeoModelConfig import ITkStripReadoutGeometryCfg
cfg.merge(ITkStripReadoutGeometryCfg(ConfigFlags))
from PixelGeoModel.PixelGeoModelConfig import PixelGeometryCfg
cfg.merge(PixelGeometryCfg(ConfigFlags))
if ConfigFlags.Detector.GeometryLAr:
from LArGeoAlgsNV.LArGMConfig import LArGMCfg
cfg.merge(LArGMCfg(ConfigFlags))
from SCT_GeoModel.SCT_GeoModelConfig import SCT_GeometryCfg
cfg.merge(SCT_GeometryCfg(ConfigFlags))
if ConfigFlags.Detector.GeometryTile:
from TileGeoModel.TileGMConfig import TileGMCfg
cfg.merge(TileGMCfg(ConfigFlags))
from TRT_GeoModel.TRT_GeoModelConfig import TRT_GeometryCfg
cfg.merge(TRT_GeometryCfg(ConfigFlags))
if ConfigFlags.Detector.GeometryMuon:
from MuonConfig.MuonGeometryConfig import MuonGeoModelCfg
cfg.merge(MuonGeoModelCfg(ConfigFlags))
from TrkConfig.AtlasTrackingGeometrySvcConfig import TrackingGeometrySvcCfg
cfg.merge(TrackingGeometrySvcCfg(ConfigFlags))
......
......@@ -4,7 +4,6 @@ Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
"""
from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator
from AthenaConfiguration.ComponentFactory import CompFactory
from AthenaConfiguration.Enums import ProductionStep
from IOVDbSvc.IOVDbSvcConfig import addFolders, addFoldersSplitOnline
def ITkPixelConfigCondAlgCfg(flags, name="ITkPixelConfigCondAlg", **kwargs):
......@@ -21,10 +20,7 @@ def ITkPixelAlignCondAlgCfg(flags, name="ITkPixelAlignCondAlg", **kwargs):
if flags.GeoModel.Align.Dynamic:
raise RuntimeError("Dynamic alignment not supported for ITk yet")
else:
if flags.Common.Project != "AthSimulation" and (flags.Common.ProductionStep != ProductionStep.Simulation or flags.Overlay.DataOverlay):
acc.merge(addFoldersSplitOnline(flags, "INDET", "/Indet/Onl/Align", "/Indet/Align", className="AlignableTransformContainer"))
else:
acc.merge(addFoldersSplitOnline(flags, "INDET", "/Indet/Onl/Align", "/Indet/Align"))
acc.merge(addFoldersSplitOnline(flags, "INDET", "/Indet/Onl/Align", "/Indet/Align", className="AlignableTransformContainer"))
kwargs.setdefault("DetManagerName", "ITkPixel")
kwargs.setdefault("UseDynamicAlignFolders", flags.GeoModel.Align.Dynamic)
......
......@@ -4,7 +4,6 @@ Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
"""
from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator
from AthenaConfiguration.ComponentFactory import CompFactory
from AthenaConfiguration.Enums import ProductionStep
from IOVDbSvc.IOVDbSvcConfig import addFolders,addFoldersSplitOnline
def PixelConfigCondAlgCfg(flags, name="PixelConfigCondAlg", **kwargs):
......@@ -305,10 +304,7 @@ def PixelAlignCondAlgCfg(flags, name="PixelAlignCondAlg", **kwargs):
acc.merge(addFoldersSplitOnline(flags,"INDET","/Indet/Onl/AlignL2/PIX","/Indet/AlignL2/PIX",className="CondAttrListCollection"))
acc.merge(addFoldersSplitOnline(flags,"INDET","/Indet/Onl/AlignL3","/Indet/AlignL3",className="AlignableTransformContainer"))
else:
if flags.Common.ProductionStep != ProductionStep.Simulation or flags.Overlay.DataOverlay:
acc.merge(addFoldersSplitOnline(flags,"INDET","/Indet/Onl/Align","/Indet/Align",className="AlignableTransformContainer"))
else:
acc.merge(addFoldersSplitOnline(flags,"INDET","/Indet/Onl/Align","/Indet/Align"))
acc.merge(addFoldersSplitOnline(flags,"INDET","/Indet/Onl/Align","/Indet/Align",className="AlignableTransformContainer"))
acc.merge(addFoldersSplitOnline(flags,"INDET","/Indet/Onl/IBLDist","/Indet/IBLDist",className="CondAttrListCollection"))
......
......@@ -78,6 +78,9 @@ atlas_add_test( TestTdaqEnabled
PROPERTIES TIMEOUT 600
ENVIRONMENT THREADS=5 )
atlas_add_test( TestAlignNewConf
SCRIPT python -m SCT_ConditionsAlgorithms.SCT_AlignCondAlgConfig
PROPERTIES TIMEOUT 600 )
atlas_add_test( TestCalibChipReadNewConf
SCRIPT python -m SCT_ConditionsAlgorithms.SCT_ReadCalibChipDataTestAlgConfig
PROPERTIES TIMEOUT 600 )
......
"""Define method to configure and test SCT_AlignCondAlg
Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
"""
from AthenaConfiguration.ComponentFactory import CompFactory
from IOVDbSvc.IOVDbSvcConfig import addFoldersSplitOnline
from SCT_GeoModel.SCT_GeoModelConfig import SCT_GeoModelCfg
from StripGeoModelXml.ITkStripGeoModelConfig import ITkStripGeoModelCfg
def SCT_AlignCondAlgCfg(flags, name="SCT_AlignCondAlg", **kwargs):
"""Return a configured SCT_AlignCondAlg"""
acc = SCT_GeoModelCfg(flags)
if flags.GeoModel.Align.Dynamic:
acc.merge(addFoldersSplitOnline(flags, "INDET", "/Indet/Onl/AlignL1/ID", "/Indet/AlignL1/ID", className="CondAttrListCollection"))
acc.merge(addFoldersSplitOnline(flags, "INDET", "/Indet/Onl/AlignL2/SCT", "/Indet/AlignL2/SCT", className="CondAttrListCollection"))
acc.merge(addFoldersSplitOnline(flags, "INDET", "/Indet/Onl/AlignL3", "/Indet/AlignL3", className="AlignableTransformContainer"))
else:
acc.merge(addFoldersSplitOnline(flags, "INDET", "/Indet/Onl/Align", "/Indet/Align", className="AlignableTransformContainer"))
kwargs.setdefault("UseDynamicAlignFolders", flags.GeoModel.Align.Dynamic)
sctAlignCondAlg = CompFactory.SCT_AlignCondAlg(name, **kwargs)
acc.addCondAlgo(sctAlignCondAlg)
return acc
def ITkStripAlignCondAlgCfg(flags, name="ITkStripAlignCondAlg", **kwargs):
"""Return a configured SCT_AlignCondAlg for ITk"""
acc = ITkStripGeoModelCfg(flags)
if flags.GeoModel.Align.Dynamic:
raise RuntimeError("Dynamic alignment not supported for ITk yet")
else:
acc.merge(addFoldersSplitOnline(flags, "INDET", "/Indet/Onl/Align", "/Indet/Align", className="AlignableTransformContainer"))
kwargs.setdefault("DetManagerName", "ITkStrip")
kwargs.setdefault("WriteKey", "ITkStripAlignmentStore")
kwargs.setdefault("UseDynamicAlignFolders", flags.GeoModel.Align.Dynamic)
sctAlignCondAlg = CompFactory.SCT_AlignCondAlg(name, **kwargs)
acc.addCondAlgo(sctAlignCondAlg)
return acc
if __name__=="__main__":
from AthenaCommon.Logging import log
from AthenaCommon.Constants import INFO
log.setLevel(INFO)
from AthenaCommon.Configurable import Configurable
Configurable.configurableRun3Behavior=1
from AthenaConfiguration.AllConfigFlags import ConfigFlags
ConfigFlags.Input.isMC = False
ConfigFlags.Input.Files = ["./myESD.pool.root"]
ConfigFlags.Input.ProjectName = "data17_13TeV" # q431 input
ConfigFlags.Input.RunNumber = 330470 # q431 input
ConfigFlags.IOVDb.GlobalTag = "CONDBR2-BLKPA-2018-03" # q431 setup
ConfigFlags.GeoModel.AtlasVersion = "ATLAS-R2-2016-01-00-01" # q431 setup
ConfigFlags.Detector.GeometrySCT = True
ConfigFlags.lock()
from AthenaConfiguration.MainServicesConfig import MainServicesCfg
cfg = MainServicesCfg(ConfigFlags)
from AthenaPoolCnvSvc.PoolReadConfig import PoolReadCfg
cfg.merge(PoolReadCfg(ConfigFlags))
algkwargs = {}
algkwargs["OutputLevel"] = INFO
cfg.merge(SCT_AlignCondAlgCfg(ConfigFlags, **algkwargs))
cfg.run(maxEvents=25)
# Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
from AthenaConfiguration.ComponentFactory import CompFactory
SCT_DetectorElementCondAlg = CompFactory.SCT_DetectorElementCondAlg
def SCT_DetectorElementCondAlgCfg(flags, name='SCT_DetectorElementCondAlg', **kwargs):
def merge_lists(a, b):
a.extend([item for item in b if item not in a])
return a
alg = SCT_DetectorElementCondAlg(name, **kwargs)
alg._descriptors['MuonManagerKey'].semantics.merge = merge_lists
alg._descriptors['TRT_DetEltContKey'].semantics.merge = merge_lists
alg._descriptors['PixelAlignmentStore'].semantics.merge = merge_lists
from SCT_ConditionsAlgorithms.SCT_AlignCondAlgConfig import SCT_AlignCondAlgCfg
acc = SCT_AlignCondAlgCfg(flags)
acc.addCondAlgo(alg)
return acc
def ITkStripDetectorElementCondAlgCfg(flags, name='ITkStripDetectorElementCondAlg', **kwargs):
kwargs.setdefault('DetManagerName', 'ITkStrip')
kwargs.setdefault('ReadKey', 'ITkStripAlignmentStore')
kwargs.setdefault('WriteKey', 'ITkStripDetectorElementCollection')
alg = SCT_DetectorElementCondAlg(name, **kwargs)
from SCT_ConditionsAlgorithms.SCT_AlignCondAlgConfig import ITkStripAlignCondAlgCfg
acc = ITkStripAlignCondAlgCfg(flags)
acc.addCondAlgo(alg)
return acc
......@@ -5,7 +5,7 @@ Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
from AthenaConfiguration.ComponentFactory import CompFactory
SiLorentzAngleTool=CompFactory.SiLorentzAngleTool
StripSiLorentzAngleCondAlg=CompFactory.SCTSiLorentzAngleCondAlg
from StripGeoModelXml.ITkStripGeoModelConfig import ITkStripGeometryCfg
from StripGeoModelXml.ITkStripGeoModelConfig import ITkStripReadoutGeometryCfg
from SCT_ConditionsTools.SCT_SiliconConditionsConfig import SCT_SiliconConditionsCfg
from MagFieldServices.MagFieldServicesConfig import MagneticFieldSvcCfg
......@@ -21,7 +21,7 @@ def ITkStripLorentzAngleCfg(flags, name="ITkStripSiLorentzAngleCondAlg",
acc = MagneticFieldSvcCfg(flags)
# For SCT_ID and SCT_DetectorElementCollection used
# in SCTSiLorentzAngleCondAlg and SiLorentzAngleTool
acc.merge(ITkStripGeometryCfg(flags))
acc.merge(ITkStripReadoutGeometryCfg(flags))
# set up SCTSiLorentzAngleCondAlg
algkwargs = {}
algkwargs["UseMagFieldCache"] = kwargs.get("UseMagFieldCache", True)
......
"""Define methods to configure SCTLorentzAngleTool
Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
"""
from AthenaConfiguration.ComponentFactory import CompFactory
SiLorentzAngleTool=CompFactory.SiLorentzAngleTool
SCTSiLorentzAngleCondAlg=CompFactory.SCTSiLorentzAngleCondAlg
from SCT_ConditionsTools.SCT_SiliconConditionsConfig import SCT_SiliconConditionsCfg
from SCT_GeoModel.SCT_GeoModelConfig import SCT_GeometryCfg
from SCT_GeoModel.SCT_GeoModelConfig import SCT_ReadoutGeometryCfg
from MagFieldServices.MagFieldServicesConfig import MagneticFieldSvcCfg
def SCT_LorentzAngleCfg(flags, name="SCTSiLorentzAngleCondAlg",
......@@ -20,7 +20,7 @@ def SCT_LorentzAngleCfg(flags, name="SCTSiLorentzAngleCondAlg",
acc = MagneticFieldSvcCfg(flags)
# For SCT_ID and SCT_DetectorElementCollection used
# in SCTSiLorentzAngleCondAlg and SiLorentzAngleTool
acc.merge(SCT_GeometryCfg(flags))
acc.merge(SCT_ReadoutGeometryCfg(flags))
# set up SCTSiLorentzAngleCondAlg
algkwargs = {}
algkwargs["UseMagFieldCache"] = kwargs.get("UseMagFieldCache", True)
......
......@@ -5,7 +5,7 @@ Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator
from AthenaConfiguration.ComponentFactory import CompFactory
from SCT_ConditionsTools.SCT_SiliconConditionsConfig import SCT_SiliconConditionsCfg
from StripGeoModelXml.ITkStripGeoModelConfig import ITkStripGeometryCfg
from StripGeoModelXml.ITkStripGeoModelConfig import ITkStripReadoutGeometryCfg
SiPropertiesTool=CompFactory.SiPropertiesTool
ITkStripSiPropertiesCondAlg=CompFactory.SCTSiPropertiesCondAlg
......@@ -28,7 +28,7 @@ def ITkStripSiPropertiesCfg(flags, name="ITkStripSiPropertiesCondAlg", **kwargs)
# used in SCTSiPropertiesCondAlg and SiPropertiesTool
#Specify correct DetElCollection for ITkStrip
algkwargs["SCTDetEleCollKey"] = "ITkStripDetectorElementCollection"
acc.merge(ITkStripGeometryCfg(flags))
acc.merge(ITkStripReadoutGeometryCfg(flags))
alg = ITkStripSiPropertiesCondAlg(name, **algkwargs)
acc.addCondAlgo(alg)
......
"""Define methods to configure SCT SiProperties
Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
"""
from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator
from AthenaConfiguration.ComponentFactory import CompFactory
from SCT_ConditionsTools.SCT_SiliconConditionsConfig import SCT_SiliconConditionsCfg
from SCT_GeoModel.SCT_GeoModelConfig import SCT_GeometryCfg
from SCT_GeoModel.SCT_GeoModelConfig import SCT_ReadoutGeometryCfg
SiPropertiesTool=CompFactory.SiPropertiesTool
SCTSiPropertiesCondAlg=CompFactory.SCTSiPropertiesCondAlg
......@@ -26,7 +26,7 @@ def SCT_SiPropertiesCfg(flags, name="SCTSiPropertiesCondAlg", **kwargs):
algkwargs["SiConditionsTool"] = acc.popToolsAndMerge(SCT_SiliconConditionsCfg(flags, **kwargs))
# For SCT_ID and SCT_DetectorElementCollection
# used in SCTSiPropertiesCondAlg and SiPropertiesTool
acc.merge(SCT_GeometryCfg(flags))
acc.merge(SCT_ReadoutGeometryCfg(flags))
alg = SCTSiPropertiesCondAlg(name, **algkwargs)
acc.addCondAlgo(alg)
......
......@@ -366,11 +366,11 @@ if __name__ == "__main__":
from AthenaPoolCnvSvc.PoolReadConfig import PoolReadCfg
top_acc.merge(PoolReadCfg(flags))
from PixelGeoModel.PixelGeoModelConfig import PixelGeometryCfg
top_acc.merge( PixelGeometryCfg(flags) )
from PixelGeoModel.PixelGeoModelConfig import PixelReadoutGeometryCfg
top_acc.merge( PixelReadoutGeometryCfg(flags) )
from SCT_GeoModel.SCT_GeoModelConfig import SCT_GeometryCfg
top_acc.merge(SCT_GeometryCfg(flags))
from SCT_GeoModel.SCT_GeoModelConfig import SCT_ReadoutGeometryCfg
top_acc.merge(SCT_ReadoutGeometryCfg(flags))
from TRT_GeoModel.TRT_GeoModelConfig import TRT_GeometryCfg
top_acc.merge(TRT_GeometryCfg( flags ))
......
# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
# Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator
from InDetConfig.TrackRecoConfig import BCM_ZeroSuppressionCfg, PixelClusterizationCfg, \
......@@ -16,10 +16,10 @@ def InDetClusterizationAlgorithmsCfg(flags, **kwargs) :
top_acc.merge(PoolReadCfg(flags))
### obtain pixel and SCT geometry
from PixelGeoModel.PixelGeoModelConfig import PixelGeometryCfg
from SCT_GeoModel.SCT_GeoModelConfig import SCT_GeometryCfg
top_acc.merge( PixelGeometryCfg(flags) )
top_acc.merge( SCT_GeometryCfg(flags) )
from PixelGeoModel.PixelGeoModelConfig import PixelReadoutGeometryCfg
from SCT_GeoModel.SCT_GeoModelConfig import SCT_ReadoutGeometryCfg
top_acc.merge( PixelReadoutGeometryCfg(flags) )
top_acc.merge( SCT_ReadoutGeometryCfg(flags) )
#redoPatternRecoAndTracking = kwargs.pop('redoPatternRecoAndTracking')
......
......@@ -181,10 +181,8 @@ def ITkStripConfigurationConditionsToolCfg(flags, name="ITkStripConfigurationCon
cond_kwargs["dbInstance"] = "ITkStrip"
cond_kwargs["SCT_ConfigurationCondAlgName"] = "ITkStripConfigurationCondAlg"
result = ComponentAccumulator()
from StripGeoModelXml.ITkStripGeoModelConfig import ITkStripGeometryCfg
result.merge(ITkStripGeometryCfg(flags))
from StripGeoModelXml.ITkStripGeoModelConfig import ITkStripReadoutGeometryCfg
result = ITkStripReadoutGeometryCfg(flags)
if 'ChannelFolderDB' not in cond_kwargs:
result.merge(addFoldersSplitOnline(flags,
......@@ -265,10 +263,8 @@ def ITkStripConfigurationCondAlgCfg(flags, name="ITkStripConfigurationCondAlg",
def ITkStripReadCalibDataToolCfg(flags, name="ITkStripReadCalibDataTool", cond_kwargs={}, **kwargs):
result = ComponentAccumulator()
from StripGeoModelXml.ITkStripGeoModelConfig import ITkStripGeometryCfg
result.merge( ITkStripGeometryCfg(flags))
from StripGeoModelXml.ITkStripGeoModelConfig import ITkStripReadoutGeometryCfg
result = ITkStripReadoutGeometryCfg(flags)
cond_kwargs.setdefault("NoiseFolder","/ITkStrip/DAQ/Calibration/NoiseOccupancyDefects")
cond_kwargs.setdefault("GainFolder","/ITkStrip/DAQ/Calibration/NPtGainDefects")
......@@ -299,10 +295,8 @@ def ITkStripReadCalibDataToolCfg(flags, name="ITkStripReadCalibDataTool", cond_k
def ITkStripFlaggedConditionToolCfg(flags, name="ITkStripFlaggedConditionTool", **kwargs):
result = ComponentAccumulator()
from StripGeoModelXml.ITkStripGeoModelConfig import ITkStripGeometryCfg
result.merge( ITkStripGeometryCfg(flags))
from StripGeoModelXml.ITkStripGeoModelConfig import ITkStripReadoutGeometryCfg
result = ITkStripReadoutGeometryCfg(flags)
tool = CompFactory.SCT_FlaggedConditionTool(name, **kwargs)
result.setPrivateTools(tool)
......@@ -316,10 +310,8 @@ def ITkStripMonitorConditionsToolCfg(flags, name="ITkStripMonitorConditionsTool"
kwargs.setdefault("CondKey", "ITkStripMonitorCondData")
result = ComponentAccumulator()
from StripGeoModelXml.ITkStripGeoModelConfig import ITkStripGeometryCfg
result.merge( ITkStripGeometryCfg(flags))
from StripGeoModelXml.ITkStripGeoModelConfig import ITkStripReadoutGeometryCfg
result = ITkStripReadoutGeometryCfg(flags)
if "FolderDb" not in cond_kwargs:
cond_kwargs["FolderDb"] = cond_kwargs["Folder"]
......
......@@ -4,11 +4,9 @@ from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator
from AthenaConfiguration.ComponentFactory import CompFactory
def ITkSiElementPropertiesTableCondAlgCfg(flags, name="ITkSiElementPropertiesTableCondAlg", **kwargs):
acc = ComponentAccumulator()
# For strip DetectorElementCollection used
from StripGeoModelXml.ITkStripGeoModelConfig import ITkStripGeometryCfg
acc.merge(ITkStripGeometryCfg(flags))
from StripGeoModelXml.ITkStripGeoModelConfig import ITkStripReadoutGeometryCfg
acc = ITkStripReadoutGeometryCfg(flags)
kwargs.setdefault("ReadKey", "ITkStripDetectorElementCollection")
kwargs.setdefault("WriteKey", "ITkStripElementPropertiesTable")
......@@ -33,14 +31,13 @@ def ITkSiSpacePointMakerToolCfg(flags, name="ITkSiSpacePointMakerTool", **kwargs
return acc
def ITkSiTrackerSpacePointFinderCfg(flags, name = "ITkSiTrackerSpacePointFinder", **kwargs):
acc = ComponentAccumulator()
#
# SiTrackerSpacePointFinder algorithm
#
# For strip DetectorElementCollection used
from StripGeoModelXml.ITkStripGeoModelConfig import ITkStripGeometryCfg
acc.merge(ITkStripGeometryCfg(flags))
from StripGeoModelXml.ITkStripGeoModelConfig import ITkStripReadoutGeometryCfg
acc = ITkStripReadoutGeometryCfg(flags)
ITkSiSpacePointMakerTool = acc.popToolsAndMerge(ITkSiSpacePointMakerToolCfg(flags))
......@@ -72,12 +69,12 @@ def ITkPRD_MultiTruthMakerSiCfg(flags, name="ITkPRD_MultiTruthMakerSi", **kwargs
# For pixel + strip DetectorElementCollection used
if flags.Detector.GeometryITkPixel:
from PixelGeoModelXml.ITkPixelGeoModelConfig import ITkPixelGeometryCfg
acc.merge(ITkPixelGeometryCfg(flags))
from PixelGeoModelXml.ITkPixelGeoModelConfig import ITkPixelReadoutGeometryCfg
acc.merge(ITkPixelReadoutGeometryCfg(flags))
if flags.Detector.GeometryITkStrip:
from StripGeoModelXml.ITkStripGeoModelConfig import ITkStripGeometryCfg
acc.merge(ITkStripGeometryCfg(flags))
from StripGeoModelXml.ITkStripGeoModelConfig import ITkStripReadoutGeometryCfg
acc.merge(ITkStripReadoutGeometryCfg(flags))
if flags.ITk.doTruth:
kwargs.setdefault("PixelClusterContainerName", 'ITkPixelClusters')
......@@ -111,12 +108,12 @@ def ITkPRD_MultiTruthMakerSiPUCfg(flags, name="ITkPRD_MultiTruthMakerSiPU", **kw
# For pixel + strip DetectorElementCollection used
if flags.Detector.GeometryITkPixel:
from PixelGeoModelXml.ITkPixelGeoModelConfig import ITkPixelGeometryCfg
acc.merge(ITkPixelGeometryCfg(flags))
from PixelGeoModelXml.ITkPixelGeoModelConfig import ITkPixelReadoutGeometryCfg
acc.merge(ITkPixelReadoutGeometryCfg(flags))
if flags.Detector.GeometryITkStrip:
from StripGeoModelXml.ITkStripGeoModelConfig import ITkStripGeometryCfg
acc.merge(ITkStripGeometryCfg(flags))
from StripGeoModelXml.ITkStripGeoModelConfig import ITkStripReadoutGeometryCfg
acc.merge(ITkStripReadoutGeometryCfg(flags))
if flags.ITk.doTruth:
kwargs.setdefault("PixelClusterContainerName", 'ITkPixelPUClusters')
......
......@@ -75,10 +75,8 @@ def ITkStripClusterizationPUCfg(flags, name="ITkStripClusterizationPU", **kwargs
##------------------------------------------------------------------------------
def ITkPixelGangedAmbiguitiesFinderCfg(flags, **kwargs) :
acc = ComponentAccumulator()