def FastClusterMakerTool(name="FastClusterMakerTool", **kwargs):
    from Digitization.DigitizationFlags import digitizationFlags
    #FIXME: at some point we should move away from being dependent on the experimentalDigi flags.
    if 'doFastSCT_Digi' in digitizationFlags.experimentalDigi(
    ) and not 'doFastPixelDigi' in digitizationFlags.experimentalDigi():
        kwargs.setdefault("UsePixelCalibCondDB", False)
        kwargs.setdefault("PixelCalibSvc", "")
        kwargs.setdefault("PixelOfflineCalibSvc", "")
    else:
        from AthenaCommon.Include import include
        include("PixelConditionsServices/PixelDCSSvc_jobOptions.py")
        include.block("PixelConditionsServices/PixelDCSSvc_jobOptions.py")
        from AthenaCommon.AppMgr import ToolSvc
        if not hasattr(ToolSvc, "PixelRecoDbTool"):
            from PixelConditionsTools.PixelConditionsToolsConf import PixelRecoDbTool
            ToolSvc += PixelRecoDbTool()
        ToolSvc.PixelRecoDbTool.InputSource = 1

        # setup PixelCalibDbTool in ToolSvc
        if not hasattr(ToolSvc, "PixelCalibDbTool"):
            from PixelConditionsTools.PixelConditionsToolsConf import PixelCalibDbTool
            ToolSvc += PixelCalibDbTool()

        from IOVDbSvc.CondDB import conddb
        if not conddb.folderRequested('/PIXEL/PixCalib'):
            conddb.addFolder("PIXEL_OFL", "/PIXEL/PixCalib")
        if not conddb.folderRequested('/PIXEL/ReadoutSpeed'):
            conddb.addFolder("PIXEL_OFL", "/PIXEL/ReadoutSpeed")
        from AthenaCommon.AppMgr import ServiceMgr
        if not hasattr(ServiceMgr, "PixelCalibSvc"):
            from PixelConditionsServices.PixelConditionsServicesConf import PixelCalibSvc
            InDetPixelCalibSvc = PixelCalibSvc()
            ServiceMgr += InDetPixelCalibSvc
        if not hasattr(ServiceMgr, "PixelSiPropertiesSvc"):
            from SiLorentzAngleSvc.LorentzAngleSvcSetup import lorentzAngleSvc
            from SiPropertiesSvc.SiPropertiesSvcConf import SiPropertiesSvc
            PixelSiPropertiesSvc = SiPropertiesSvc(
                name="PixelSiPropertiesSvc",
                DetectorName="Pixel",
                SiConditionsServices=lorentzAngleSvc.pixelSiliconConditionsSvc)
            ServiceMgr += PixelSiPropertiesSvc
        if not hasattr(ServiceMgr, "PixelOfflineCalibSvc"):
            from PixelConditionsServices.PixelConditionsServicesConf import PixelOfflineCalibSvc
            ServiceMgr += PixelOfflineCalibSvc()
            ServiceMgr.PixelOfflineCalibSvc.HDCFromCOOL = False

    from AthenaCommon import CfgMgr
    return CfgMgr.InDet__ClusterMakerTool(name, **kwargs)
Example #2
0
# make sure ToolSvc is there...
if not "ToolSvc"         in theApp.ExtSvc and \
   not "ToolSvc/ToolSvc" in theApp.ExtSvc:
    theApp.ExtSvc += [ "ToolSvc/ToolSvc"]
    pass

from IOVDbSvc.CondDB import conddb


from PixelConditionsTools.PixelConditionsToolsConf import PixelRecoDbTool
ToolSvc += PixelRecoDbTool()
ToolSvc.PixelRecoDbTool.InputSource = 1

from PixelConditionsTools.PixelConditionsToolsConf import PixelCalibDbTool
ToolSvc += PixelCalibDbTool()

if not conddb.folderRequested('/PIXEL/PixCalib'):
  conddb.addFolder("PIXEL_OFL","/PIXEL/PixCalib")
if not conddb.folderRequested('/PIXEL/ReadoutSpeed'):
  conddb.addFolder("PIXEL_OFL","/PIXEL/ReadoutSpeed")
from PixelConditionsServices.PixelConditionsServicesConf import PixelCalibSvc
InDetPixelCalibSvc = PixelCalibSvc()
ServiceMgr += InDetPixelCalibSvc



from FastSiDigitization.FastSiDigitizationConf import PixelFastDigitization

# now add config class to algsequence()
from AthenaCommon.AlgSequence import AlgSequence