def ITkStripGeometryCfg(flags): from AtlasGeoModel.GeoModelConfig import GeoModelCfg acc = GeoModelCfg(flags) geoModelSvc = acc.getPrimary() GeometryDBSvc = CompFactory.GeometryDBSvc acc.addService(GeometryDBSvc("ITkGeometryDBSvc")) StripDetectorTool = CompFactory.StripDetectorTool ITkStripDetectorTool = StripDetectorTool() #ITkStripDetectorTool.useDynamicAlignFolders = flags.GeoModel.Align.Dynamic ITkStripDetectorTool.Alignable = False # make this a flag? Set true as soon as decided on folder structure ITkStripDetectorTool.DetectorName = "ITkStrip" geoModelSvc.DetectorTools += [ITkStripDetectorTool] """ # All this stuff probably needs revisting - comment for now... 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.SimulateITkStrip) or flags.Detector.OverlayITkStrip: 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 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 InDetServiceMaterialCfg(flags): from AtlasGeoModel.GeoModelConfig import GeoModelCfg acc = GeoModelCfg(flags) geoModelSvc = acc.getPrimary() GeometryDBSvc = CompFactory.GeometryDBSvc acc.addService(GeometryDBSvc("InDetGeometryDBSvc")) InDetServMatTool = CompFactory.InDetServMatTool servMatTool = InDetServMatTool() geoModelSvc.DetectorTools += [servMatTool] acc.addService(geoModelSvc) return acc
def ForDetGeometryCfg(ConfigFlags): from AtlasGeoModel.GeoModelConfig import GeoModelCfg acc = GeoModelCfg(ConfigFlags) geoModelSvc = acc.getPrimary() GeometryDBSvc = CompFactory.GeometryDBSvc acc.addService(GeometryDBSvc("InDetGeometryDBSvc")) # LUCID if ConfigFlags.Detector.GeometryLucid: LUCID_DetectorTool = CompFactory.LUCID_DetectorTool geoModelSvc.DetectorTools += [LUCID_DetectorTool()] # ALFA if ConfigFlags.Detector.GeometryALFA: #from ALFA_GeoModel.ALFA_GeoModelConf import ALFA_DetectorTool ALFA_DetectorTool = CompFactory.ALFA_DetectorTool theALFA_DetectorTool = ALFA_DetectorTool(name="ALFA_DetectorTool") theALFA_DetectorTool.MetrologyType = 3 theALFA_DetectorTool.B7L1U_MDGeometryType = 2 theALFA_DetectorTool.B7L1U_ODGeometryType = 2 theALFA_DetectorTool.B7L1L_MDGeometryType = 2 theALFA_DetectorTool.B7L1L_ODGeometryType = 2 theALFA_DetectorTool.A7L1U_MDGeometryType = 2 theALFA_DetectorTool.A7L1U_ODGeometryType = 2 theALFA_DetectorTool.A7L1L_MDGeometryType = 2 theALFA_DetectorTool.A7L1L_ODGeometryType = 2 theALFA_DetectorTool.A7R1U_MDGeometryType = 2 theALFA_DetectorTool.A7R1U_ODGeometryType = 2 theALFA_DetectorTool.A7R1L_MDGeometryType = 2 theALFA_DetectorTool.A7R1L_ODGeometryType = 2 theALFA_DetectorTool.B7R1U_MDGeometryType = 2 theALFA_DetectorTool.B7R1U_ODGeometryType = 2 theALFA_DetectorTool.B7R1L_MDGeometryType = 2 theALFA_DetectorTool.B7R1L_ODGeometryType = 2 geoModelSvc.DetectorTools += [theALFA_DetectorTool] acc.merge( addFoldersSplitOnline(ConfigFlags, 'FWD', '/FWD/Onl/ALFA/position_calibration', '/FWD/ALFA/position_calibration')) # ForwardRegion if ConfigFlags.Detector.GeometryFwdRegion: ForwardRegionGeoModelTool = CompFactory.ForwardRegionGeoModelTool geoModelSvc.DetectorTools += [ForwardRegionGeoModelTool()] # ZDC if ConfigFlags.Detector.GeometryZDC: ZDC_DetTool = CompFactory.ZDC_DetTool geoModelSvc.DetectorTools += [ZDC_DetTool()] # AFP if ConfigFlags.Detector.GeometryAFP: AFP_GeoModelTool = CompFactory.AFP_GeoModelTool geoModelSvc.DetectorTools += [AFP_GeoModelTool()] acc.addService(geoModelSvc) 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