ATLAS Offline Software
ITkPixelGeoModelConfig.py
Go to the documentation of this file.
1 # Copyright (C) 2002-2023 CERN for the benefit of the ATLAS collaboration
2 
3 def ITkPixelGeoModelCfg(flags,setGeometryAlignable=False,setAlignmentFolderName="/Indet/Align"):
4  from AtlasGeoModel.GeoModelConfig import GeoModelCfg
5  acc = GeoModelCfg(flags)
6  geoModelSvc = acc.getPrimary()
7 
8  from AthenaConfiguration.ComponentFactory import CompFactory
9  ITkPixelDetectorTool = CompFactory.ITk.PixelDetectorTool()
10  # ITkPixelDetectorTool.useDynamicAlignFolders = flags.GeoModel.Align.Dynamic
11  ITkPixelDetectorTool.Alignable = setGeometryAlignable # make this a flag? Set true as soon as decided on folder structure
12  ITkPixelDetectorTool.AlignmentFolderName = setAlignmentFolderName
13  ITkPixelDetectorTool.DetectorName = "ITkPixel"
14  if flags.ITk.Geometry.PixelLocal:
15  # Setting this filename triggers reading from local file rather than DB
16  ITkPixelDetectorTool.GmxFilename = flags.ITk.Geometry.PixelFilename
17  if flags.ITk.Geometry.PixelClobOutputName:
18  ITkPixelDetectorTool.ClobOutputName = flags.ITk.Geometry.PixelClobOutputName
19  geoModelSvc.DetectorTools += [ ITkPixelDetectorTool ]
20  return acc
21 
22 
23 def ITkPixelAlignmentCfg(flags,setGeometryAlignable=False,setAlignmentFolderName="/Indet/Align"):
24  if flags.GeoModel.Align.LegacyConditionsAccess: # revert to old style CondHandle in case of simulation
25  from IOVDbSvc.IOVDbSvcConfig import addFoldersSplitOnline
26  return addFoldersSplitOnline(flags, "INDET", "/Indet/Onl/Align", setAlignmentFolderName)
27  else:
28  from PixelConditionsAlgorithms.ITkPixelConditionsConfig import ITkPixelAlignCondAlgCfg
29  return ITkPixelAlignCondAlgCfg(flags,setAlignmentFolderName=setAlignmentFolderName)
30 
31 
32 def ITkPixelSimulationGeometryCfg(flags,setGeometryAlignable=False,setAlignmentFolderName="/Indet/Align"):
33  # main GeoModel config
34  acc = ITkPixelGeoModelCfg(flags,setGeometryAlignable=setGeometryAlignable,setAlignmentFolderName=setAlignmentFolderName)
35  acc.merge(ITkPixelAlignmentCfg(flags,setGeometryAlignable=setGeometryAlignable,setAlignmentFolderName=setAlignmentFolderName))
36  return acc
37 
38 
39 def ITkPixelReadoutGeometryCfg(flags,setGeometryAlignable=False,setAlignmentFolderName="/Indet/Align"):
40  # main GeoModel config
41  acc = ITkPixelGeoModelCfg(flags,setGeometryAlignable=setGeometryAlignable,setAlignmentFolderName=setAlignmentFolderName)
42  acc.merge(ITkPixelAlignmentCfg(flags,setGeometryAlignable=setGeometryAlignable,setAlignmentFolderName=setAlignmentFolderName))
43  from PixelConditionsAlgorithms.ITkPixelConditionsConfig import ITkPixelDetectorElementCondAlgCfg
44  acc.merge(ITkPixelDetectorElementCondAlgCfg(flags,setAlignmentFolderName=setAlignmentFolderName))
45  return acc
ITkPixelGeoModelConfig.ITkPixelGeoModelCfg
def ITkPixelGeoModelCfg(flags, setGeometryAlignable=False, setAlignmentFolderName="/Indet/Align")
Definition: ITkPixelGeoModelConfig.py:3
ITkPixelGeoModelConfig.ITkPixelSimulationGeometryCfg
def ITkPixelSimulationGeometryCfg(flags, setGeometryAlignable=False, setAlignmentFolderName="/Indet/Align")
Definition: ITkPixelGeoModelConfig.py:32
ITkPixelConditionsConfig.ITkPixelAlignCondAlgCfg
def ITkPixelAlignCondAlgCfg(flags, name="ITkPixelAlignCondAlg", setAlignmentFolderName="/Indet/Align", **kwargs)
Definition: ITkPixelConditionsConfig.py:53
python.IOVDbSvcConfig.addFoldersSplitOnline
def addFoldersSplitOnline(flags, detDb, onlineFolders, offlineFolders, className=None, extensible=False, addMCString='_OFL', splitMC=False, tag=None, forceDb=None, modifiers='')
Definition: IOVDbSvcConfig.py:153
ITkPixelGeoModelConfig.ITkPixelReadoutGeometryCfg
def ITkPixelReadoutGeometryCfg(flags, setGeometryAlignable=False, setAlignmentFolderName="/Indet/Align")
Definition: ITkPixelGeoModelConfig.py:39
ITkPixelConditionsConfig.ITkPixelDetectorElementCondAlgCfg
def ITkPixelDetectorElementCondAlgCfg(flags, name="ITkPixelDetectorElementCondAlg", setAlignmentFolderName="/Indet/Align", **kwargs)
Definition: ITkPixelConditionsConfig.py:142
ITkPixelGeoModelConfig.ITkPixelAlignmentCfg
def ITkPixelAlignmentCfg(flags, setGeometryAlignable=False, setAlignmentFolderName="/Indet/Align")
Definition: ITkPixelGeoModelConfig.py:23
python.GeoModelConfig.GeoModelCfg
def GeoModelCfg(flags)
Definition: GeoModelConfig.py:16