From 113b6697fabce1c965c3764cbbb51972fe6ef7e5 Mon Sep 17 00:00:00 2001 From: Nick Barlow <nick.barlow@cern.ch> Date: Fri, 26 Jun 2015 17:34:32 +0200 Subject: [PATCH] changes for AthSimulation releases (SCT_GeoModel-00-12-07) * Changes obo John Chapman to reduce dependencies, for use in AthSimulation releases * Tag as SCT_GeoModel-00-12-07 --- .../SCT_GeoModel/cmt/requirements | 7 ++--- .../SCT_GeoModel/python/SCT_GeoModelConfig.py | 27 +++++++++++++++++++ .../python/SCT_GeoModelConfigDb.py | 6 +++++ 3 files changed, 35 insertions(+), 5 deletions(-) create mode 100644 InnerDetector/InDetDetDescr/SCT_GeoModel/python/SCT_GeoModelConfig.py create mode 100644 InnerDetector/InDetDetDescr/SCT_GeoModel/python/SCT_GeoModelConfigDb.py diff --git a/InnerDetector/InDetDetDescr/SCT_GeoModel/cmt/requirements b/InnerDetector/InDetDetDescr/SCT_GeoModel/cmt/requirements index 2fbedf2f81a..f35cd290570 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 00000000000..5aedb9071ba --- /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 00000000000..50323757e0f --- /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") -- GitLab