3 from AtlasGeoModel.GeoModelConfig
import GeoModelCfg
4 from AthenaConfiguration.ComponentFactory
import CompFactory
5 from AthenaConfiguration.Enums
import LHCPeriod, ProductionStep, Project
6 from IOVDbSvc.IOVDbSvcConfig
import addFolders
11 activateCondAlgs = flags.Common.Project
is not Project.AthSimulation
12 tool = CompFactory.LArDetectorToolNV(ApplyAlignments=flags.LAr.doAlign, EnableMBTS=flags.Detector.GeometryMBTS)
13 if flags.Common.ProductionStep != ProductionStep.Simulation
and flags.Common.ProductionStep != ProductionStep.FastChain:
14 tool.GeometryConfig =
"RECO"
16 result.getPrimary().DetectorTools += [ tool ]
22 result.merge(
addFolders(flags,
"/LAR/Align",
"LAR_OFL",className=
"DetCondKeyTrans"))
23 result.merge(
addFolders(flags,
"/LAR/LArCellPositionShift",
"LAR_OFL",className=
"CaloRec::CaloCellPositionShift"))
25 result.merge(
addFolders(flags,
"/LAR/Align",
"LAR_OFL"))
26 result.merge(
addFolders(flags,
"/LAR/LArCellPositionShift",
"LAR_OFL"))
28 result.merge(
addFolders(flags,
"/LAR/Align",
"LAR_ONL",className=
"DetCondKeyTrans"))
29 result.merge(
addFolders(flags,
"/LAR/LArCellPositionShift",
"LAR_ONL",className=
"CaloRec::CaloCellPositionShift"))
32 result.addCondAlgo(CompFactory.LArAlignCondAlg())
33 result.addCondAlgo(CompFactory.CaloAlignCondAlg())
34 AthReadAlg_ExtraInputs =
set()
35 caloCellsInInput =
"CaloCellContainer" in [i.split(
'#')[0]
for i
in flags.Input.TypedCollections]
39 from SGComps.AddressRemappingConfig
import AddressRemappingCfg
42 caloCellKeys = [i.split(
'#')[1]
for i
in flags.Input.TypedCollections
if "CaloCellContainer"==i.split(
'#')[0] ]
43 for key
in caloCellKeys:
47 AthReadAlg_ExtraInputs.add((
'CaloDetDescrManager',
'ConditionStore+CaloDetDescrManager'))
48 if (flags.GeoModel.Run >= LHCPeriod.Run3
and flags.Detector.GeometryTile)
or sCellsInInput:
50 from TileGeoModel.TileGMConfig
import TileGMCfg
52 result.addCondAlgo(CompFactory.CaloSuperCellAlignCondAlg())
53 AthReadAlg_ExtraInputs.add((
'CaloSuperCellDetDescrManager',
'ConditionStore+CaloSuperCellDetDescrManager'))
57 for key
in caloCellKeys:
58 AthReadAlg=CompFactory.AthReadAlg
59 AthReadAlg_CaloCellCont = AthReadAlg (f
'AthReadAlg_{key}',
60 Key = f
'CaloCellContainer/{key}',
62 ExtraInputs = AthReadAlg_ExtraInputs)
63 result.addCondAlgo(AthReadAlg_CaloCellCont)
67 result.addCondAlgo(CompFactory.CaloAlignCondAlg(LArAlignmentStore=
"",CaloCellPositionShiftFolder=
""))
68 if flags.GeoModel.Run >= LHCPeriod.Run3
and flags.Detector.GeometryTile
and flags.Common.ProductionStep != ProductionStep.Overlay:
70 from TileGeoModel.TileGMConfig
import TileGMCfg
72 result.addCondAlgo(CompFactory.CaloSuperCellAlignCondAlg())
76 if __name__ ==
"__main__":
77 from AthenaConfiguration.AllConfigFlags
import initConfigFlags
78 from AthenaConfiguration.TestDefaults
import defaultTestFiles, defaultGeometryTags
81 flags.Input.Files = defaultTestFiles.RAW_RUN2
82 flags.GeoModel.AtlasVersion = defaultGeometryTags.RUN2
86 f=
open(
'LArGMCfg.pkl',
'wb')