3 from AtlasGeoModel.GeoModelConfig
import GeoModelCfg
4 from AthenaConfiguration.ComponentFactory
import CompFactory
5 from AthenaConfiguration.Enums
import LHCPeriod, ProductionStep
6 from IOVDbSvc.IOVDbSvcConfig
import addFolders
11 tool = CompFactory.LArDetectorToolNV(ApplyAlignments=flags.LAr.doAlign, EnableMBTS=flags.Detector.GeometryMBTS)
12 if flags.Common.ProductionStep != ProductionStep.Simulation
and flags.Common.ProductionStep != ProductionStep.FastChain:
13 tool.GeometryConfig =
"RECO"
15 result.getPrimary().DetectorTools += [ tool ]
20 if not flags.GeoModel.Align.LegacyConditionsAccess:
21 result.merge(
addFolders(flags,
"/LAR/Align",
"LAR_OFL",className=
"DetCondKeyTrans"))
22 result.merge(
addFolders(flags,
"/LAR/LArCellPositionShift",
"LAR_OFL",className=
"CaloRec::CaloCellPositionShift"))
24 result.merge(
addFolders(flags,
"/LAR/Align",
"LAR_OFL"))
25 result.merge(
addFolders(flags,
"/LAR/LArCellPositionShift",
"LAR_OFL"))
27 result.merge(
addFolders(flags,
"/LAR/Align",
"LAR_ONL",className=
"DetCondKeyTrans"))
28 result.merge(
addFolders(flags,
"/LAR/LArCellPositionShift",
"LAR_ONL",className=
"CaloRec::CaloCellPositionShift"))
30 if not flags.GeoModel.Align.LegacyConditionsAccess:
31 result.addCondAlgo(CompFactory.LArAlignCondAlg())
32 result.addCondAlgo(CompFactory.CaloAlignCondAlg())
33 AthReadAlg_ExtraInputs =
set()
34 caloCellsInInput =
"CaloCellContainer" in [i.split(
'#')[0]
for i
in flags.Input.TypedCollections]
38 from SGComps.AddressRemappingConfig
import AddressRemappingCfg
41 caloCellKeys = [i.split(
'#')[1]
for i
in flags.Input.TypedCollections
if "CaloCellContainer"==i.split(
'#')[0] ]
42 for key
in caloCellKeys:
46 AthReadAlg_ExtraInputs.add((
'CaloDetDescrManager',
'ConditionStore+CaloDetDescrManager'))
47 if (flags.GeoModel.Run >= LHCPeriod.Run3
and flags.Detector.GeometryTile)
or sCellsInInput:
49 from TileGeoModel.TileGMConfig
import TileGMCfg
51 result.addCondAlgo(CompFactory.CaloSuperCellAlignCondAlg())
52 AthReadAlg_ExtraInputs.add((
'CaloSuperCellDetDescrManager',
'ConditionStore+CaloSuperCellDetDescrManager'))
56 for key
in caloCellKeys:
57 AthReadAlg=CompFactory.AthReadAlg
58 AthReadAlg_CaloCellCont = AthReadAlg (f
'AthReadAlg_{key}',
59 Key = f
'CaloCellContainer/{key}',
61 ExtraInputs = AthReadAlg_ExtraInputs)
62 result.addCondAlgo(AthReadAlg_CaloCellCont)
65 if not flags.GeoModel.Align.LegacyConditionsAccess:
66 result.addCondAlgo(CompFactory.CaloAlignCondAlg(LArAlignmentStore=
"",CaloCellPositionShiftFolder=
""))
67 if flags.GeoModel.Run >= LHCPeriod.Run3
and flags.Detector.GeometryTile
and flags.Common.ProductionStep != ProductionStep.Overlay:
69 from TileGeoModel.TileGMConfig
import TileGMCfg
71 result.addCondAlgo(CompFactory.CaloSuperCellAlignCondAlg())
75 if __name__ ==
"__main__":
76 from AthenaConfiguration.AllConfigFlags
import initConfigFlags
77 from AthenaConfiguration.TestDefaults
import defaultTestFiles, defaultGeometryTags
80 flags.Input.Files = defaultTestFiles.RAW_RUN2
81 flags.GeoModel.AtlasVersion = defaultGeometryTags.RUN2
85 f=
open(
'LArGMCfg.pkl',
'wb')