diff --git a/InnerDetector/InDetDetDescr/SCT_GeoModel/cmt/requirements b/InnerDetector/InDetDetDescr/SCT_GeoModel/cmt/requirements index 2fbedf2f81a03d83da8db2c0af02a5455f55d355..f35cd290570a5f0ed6ba628026085838e17a0dc6 100755 --- a/InnerDetector/InDetDetDescr/SCT_GeoModel/cmt/requirements +++ b/InnerDetector/InDetDetDescr/SCT_GeoModel/cmt/requirements @@ -25,8 +25,5 @@ use InDetCondServices InDetCondServices-* InnerDetector/InDetConditions use GeoModelInterfaces GeoModelInterfaces-* DetectorDescription/GeoModel public - -apply_pattern dual_use_library files=*.cxx - - - +apply_pattern declare_python_modules files="*.py" +apply_pattern dual_use_library files=*.cxx diff --git a/InnerDetector/InDetDetDescr/SCT_GeoModel/python/SCT_GeoModelConfig.py b/InnerDetector/InDetDetDescr/SCT_GeoModel/python/SCT_GeoModelConfig.py new file mode 100644 index 0000000000000000000000000000000000000000..5aedb9071ba490330965eb734f0233890b8b350f --- /dev/null +++ b/InnerDetector/InDetDetDescr/SCT_GeoModel/python/SCT_GeoModelConfig.py @@ -0,0 +1,27 @@ +# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + +from AthenaCommon import CfgMgr + +def getSCT_DetectorTool(name="SCT_DetectorTool", **kwargs): + kwargs.setdefault("DetectorName", "SCT"); + kwargs.setdefault("InitialLayout", False); + kwargs.setdefault("Alignable", True); + kwargs.setdefault("RDBAccessSvc", "RDBAccessSvc"); + kwargs.setdefault("GeometryDBSvc", "InDetGeometryDBSvc"); + kwargs.setdefault("GeoModelSvc", "GeoModelSvc"); + from AthenaCommon.DetFlags import DetFlags + if DetFlags.digitize.SCT_on() or DetFlags.haveRDO.SCT_on() or DetFlags.haveRIO.SCT_on(): + # SCTLorentzAngleSvc needed for digi and reco + from AthenaCommon.AppMgr import ServiceMgr + if not hasattr(ServiceMgr,'SCTLorentzAngleSvc'): + from SiLorentzAngleSvc.SiLorentzAngleSvcConf import SiLorentzAngleSvc + SCTLorentzAngleSvc = SiLorentzAngleSvc(name = "SCTLorentzAngleSvc", + SiConditionsServices = None, + UseMagFieldSvc = False, + DetectorName = "SCT") + ServiceMgr+=SCTLorentzAngleSvc + kwargs.setdefault("LorentzAngleSvc", "SCTLorentzAngleSvc"); + else: + # SCTLorentzAngleSvc not needed for simulation + kwargs.setdefault("LorentzAngleSvc", ""); + return CfgMgr.SCT_DetectorTool(name, **kwargs) diff --git a/InnerDetector/InDetDetDescr/SCT_GeoModel/python/SCT_GeoModelConfigDb.py b/InnerDetector/InDetDetDescr/SCT_GeoModel/python/SCT_GeoModelConfigDb.py new file mode 100644 index 0000000000000000000000000000000000000000..50323757e0fe65bdc32d018ed6f3afae944bf12e --- /dev/null +++ b/InnerDetector/InDetDetDescr/SCT_GeoModel/python/SCT_GeoModelConfigDb.py @@ -0,0 +1,6 @@ +# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + +from AthenaCommon.CfgGetter import addAlgorithm,addTool +# add tools and algorithms to the ConfiguredFactory, see: +# https://twiki.cern.ch/twiki/bin/viewauth/AtlasComputing/ConfiguredFactory +addTool("SCT_GeoModel.SCT_GeoModelConfig.getSCT_DetectorTool","SCT_DetectorTool")