def SCT_GeometryCfg(flags): from AtlasGeoModel.GeoModelConfig import GeoModelCfg acc = GeoModelCfg(flags) geoModelSvc = acc.getPrimary() GeometryDBSvc = CompFactory.GeometryDBSvc acc.addService(GeometryDBSvc("InDetGeometryDBSvc")) SCT_DetectorTool = CompFactory.SCT_DetectorTool sctDetectorTool = SCT_DetectorTool() sctDetectorTool.useDynamicAlignFolders = flags.GeoModel.Align.Dynamic sctDetectorTool.Alignable = True # make this a flag? sctDetectorTool.DetectorName = "SCT" geoModelSvc.DetectorTools += [sctDetectorTool] 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: if (not flags.Detector.SimulateSCT) or flags.Detector.OverlaySCT: acc.merge( addFoldersSplitOnline(flags, "INDET", "/Indet/Onl/Align", "/Indet/Align", className="AlignableTransformContainer")) else: acc.merge( addFoldersSplitOnline(flags, "INDET", "/Indet/Onl/Align", "/Indet/Align")) if flags.Common.Project != "AthSimulation": # Protection for AthSimulation builds if (not flags.Detector.SimulateSCT) or flags.Detector.OverlaySCT: SCT_AlignCondAlg = CompFactory.SCT_AlignCondAlg sctAlignCondAlg = SCT_AlignCondAlg( name="SCT_AlignCondAlg", UseDynamicAlignFolders=flags.GeoModel.Align.Dynamic) acc.addCondAlgo(sctAlignCondAlg) SCT_DetectorElementCondAlg = CompFactory.SCT_DetectorElementCondAlg sctDetectorElementCondAlg = SCT_DetectorElementCondAlg( name="SCT_DetectorElementCondAlg") acc.addCondAlgo(sctDetectorElementCondAlg) return acc
def TRT_GeometryCfg( flags ): from AtlasGeoModel.GeoModelConfig import GeoModelCfg acc = GeoModelCfg( flags ) geoModelSvc=acc.getPrimary() GeometryDBSvc=CompFactory.GeometryDBSvc acc.addService(GeometryDBSvc("InDetGeometryDBSvc")) TRT_DetectorTool=CompFactory.TRT_DetectorTool trtDetectorTool = TRT_DetectorTool() trtDetectorTool.useDynamicAlignFolders = flags.GeoModel.Align.Dynamic geoModelSvc.DetectorTools += [ trtDetectorTool ] acc.addService(geoModelSvc) # Inner Detector alignment acc.merge(addFoldersSplitOnline(flags,"TRT","/TRT/Onl/Calib/DX","/TRT/Calib/DX")) if flags.Detector.SimulateTRT: # revert to old style CondHandle in case of simulation # Dead/Noisy Straw Lists acc.merge(addFoldersSplitOnline(flags, "TRT","/TRT/Onl/Cond/Status","/TRT/Cond/Status")) acc.merge(addFoldersSplitOnline(flags, "TRT","/TRT/Onl/Cond/StatusPermanent","/TRT/Cond/StatusPermanent")) # Argon straw list acc.merge(addFoldersSplitOnline(flags, "TRT","/TRT/Onl/Cond/StatusHT","/TRT/Cond/StatusHT")) else: # Dead/Noisy Straw Lists acc.merge(addFoldersSplitOnline(flags, "TRT","/TRT/Onl/Cond/Status","/TRT/Cond/Status",className='TRTCond::StrawStatusMultChanContainer')) acc.merge(addFoldersSplitOnline(flags, "TRT","/TRT/Onl/Cond/StatusPermanent","/TRT/Cond/StatusPermanent",className='TRTCond::StrawStatusMultChanContainer')) # Argon straw list acc.merge(addFoldersSplitOnline(flags, "TRT","/TRT/Onl/Cond/StatusHT","/TRT/Cond/StatusHT",className='TRTCond::StrawStatusMultChanContainer')) # TRT Condition Algorithm TRTAlignCondAlg=CompFactory.TRTAlignCondAlg TRTAlignCondAlg = TRTAlignCondAlg(name = "TRTAlignCondAlg", UseDynamicFolders = flags.GeoModel.Align.Dynamic) if flags.GeoModel.Align.Dynamic: acc.merge(addFoldersSplitOnline(flags,"TRT","/TRT/Onl/AlignL1/TRT","/TRT/AlignL1/TRT",className="CondAttrListCollection")) acc.merge(addFoldersSplitOnline(flags,"TRT","/TRT/Onl/AlignL2","/TRT/AlignL2",className="AlignableTransformContainer")) TRTAlignCondAlg.ReadKeyDynamicGlobal = "/TRT/AlignL1/TRT" TRTAlignCondAlg.ReadKeyDynamicRegular = "/TRT/AlignL2" else: if (not flags.Detector.SimulateTRT) or flags.Detector.OverlayTRT: acc.merge(addFoldersSplitOnline(flags,"TRT","/TRT/Onl/Align","/TRT/Align",className="AlignableTransformContainer")) else: acc.merge(addFoldersSplitOnline(flags,"TRT","/TRT/Onl/Align","/TRT/Align")) if flags.Common.Project != "AthSimulation": # Protection for AthSimulation builds if (not flags.Detector.SimulateTRT) or flags.Detector.OverlayTRT: acc.addCondAlgo(TRTAlignCondAlg) return acc