diff --git a/InnerDetector/InDetEventCnv/SCT_RawDataByteStreamCnv/CMakeLists.txt b/InnerDetector/InDetEventCnv/SCT_RawDataByteStreamCnv/CMakeLists.txt
index 41b0bb70eef37880c044b3a8e3c07aba11c52886..3a86119ce94235adc83dcb3ff09b3a3f08c71a91 100644
--- a/InnerDetector/InDetEventCnv/SCT_RawDataByteStreamCnv/CMakeLists.txt
+++ b/InnerDetector/InDetEventCnv/SCT_RawDataByteStreamCnv/CMakeLists.txt
@@ -35,6 +35,15 @@ atlas_add_component( SCT_RawDataByteStreamCnv
                      INCLUDE_DIRS ${TDAQ-COMMON_INCLUDE_DIRS}
                      LINK_LIBRARIES ${TDAQ-COMMON_LIBRARIES} ByteStreamCnvSvcBaseLib ByteStreamData ByteStreamData_test GaudiKernel InDetRawData InDetByteStreamErrors AthenaBaseComps StoreGateLib SGtests Identifier EventInfo xAODEventInfo InDetIdentifier InDetReadoutGeometry SCT_CablingLib TrigSteeringEvent)
 
+# Run tests:
+atlas_add_test( TestSCTDecode
+                SCRIPT athena.py --threads=5 SCT_RawDataByteStreamCnv/testSCTDecode.py
+                PROPERTIES TIMEOUT 600
+                ENVIRONMENT THREADS=5 )
+atlas_add_test( TestSCTEncode
+                SCRIPT athena.py SCT_RawDataByteStreamCnv/testSCTEncode.py
+                PROPERTIES TIMEOUT 300 )
+
 # Install files from the package:
 atlas_install_headers( SCT_RawDataByteStreamCnv )
-
+atlas_install_joboptions( share/*.py )
diff --git a/InnerDetector/InDetEventCnv/SCT_RawDataByteStreamCnv/share/testSCTDecode.py b/InnerDetector/InDetEventCnv/SCT_RawDataByteStreamCnv/share/testSCTDecode.py
new file mode 100644
index 0000000000000000000000000000000000000000..b03413cd52d54d2c49608a9bd49a2a986eccbb31
--- /dev/null
+++ b/InnerDetector/InDetEventCnv/SCT_RawDataByteStreamCnv/share/testSCTDecode.py
@@ -0,0 +1,166 @@
+###############################################################
+#
+# Job options file to test SCT decoding
+#
+#==============================================================
+
+#--------------------------------------------------------------
+# Standard includes
+#--------------------------------------------------------------
+import AthenaCommon.AtlasUnixStandardJob
+
+#--------------------------------------------------------------
+# Thread-specific setup
+#--------------------------------------------------------------
+from AthenaCommon.ConcurrencyFlags import jobproperties
+if jobproperties.ConcurrencyFlags.NumThreads() > 0:
+    from AthenaCommon.AlgScheduler import AlgScheduler
+    AlgScheduler.CheckDependencies( True )
+    AlgScheduler.ShowControlFlow( True )
+    AlgScheduler.ShowDataDependencies( True )
+
+#--------------------------------------------------------------
+# use auditors
+#--------------------------------------------------------------
+from AthenaCommon.AppMgr import ServiceMgr
+from GaudiSvc.GaudiSvcConf import AuditorSvc
+ServiceMgr += AuditorSvc()
+theAuditorSvc = ServiceMgr.AuditorSvc
+theAuditorSvc.Auditors  += [ "ChronoAuditor"]
+theAuditorSvc.Auditors  += [ "MemStatAuditor" ]
+theApp.AuditAlgorithms=True
+
+#--------------------------------------------------------------
+# Load Geometry
+#--------------------------------------------------------------
+from AthenaCommon.GlobalFlags import globalflags
+globalflags.DetDescrVersion="ATLAS-R2-2016-01-00-01"
+globalflags.DetGeo="atlas"
+globalflags.InputFormat="bytestream"
+globalflags.DataSource="data"
+print globalflags
+
+#--------------------------------------------------------------
+# Set Detector setup
+#--------------------------------------------------------------
+# --- switch on InnerDetector
+from AthenaCommon.DetFlags import DetFlags
+DetFlags.detdescr.SCT_setOn()
+DetFlags.ID_setOn()
+DetFlags.Calo_setOff()
+DetFlags.Muon_setOff()
+DetFlags.Truth_setOff()
+DetFlags.LVL1_setOff()
+DetFlags.SCT_setOn()
+DetFlags.TRT_setOff()
+
+# ---- switch parts of ID off/on as follows
+#switch off tasks
+DetFlags.pileup.all_setOff()
+DetFlags.simulate.all_setOff()
+DetFlags.makeRIO.all_setOff()
+DetFlags.makeRIO.SCT_setOn()
+DetFlags.writeBS.all_setOff()
+DetFlags.readRDOBS.all_setOff()
+DetFlags.readRDOBS.SCT_setOn()
+DetFlags.readRIOBS.all_setOff()
+DetFlags.readRIOPool.all_setOff()
+DetFlags.writeRIOPool.all_setOff()
+
+DetFlags.Print()
+
+import AtlasGeoModel.SetGeometryVersion
+import AtlasGeoModel.GeoModelInit
+import MagFieldServices.SetupField
+
+#--------------------------------------------------------------
+# Load IOVDbSvc
+#--------------------------------------------------------------
+IOVDbSvc = Service("IOVDbSvc")
+from IOVDbSvc.CondDB import conddb
+conddb.dbdata="CONDBR2"
+IOVDbSvc.GlobalTag="CONDBR2-BLKPA-2018-03"
+IOVDbSvc.OutputLevel = WARNING
+
+# Set input byte stream file (from q431 test)
+inputBSFiles = ["/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/Tier0ChainTests/data17_13TeV.00330470.physics_Main.daq.RAW._lb0310._SFO-1._0001.data"]
+include("ByteStreamCnvSvc/BSEventStorageEventSelector_jobOptions.py")
+ServiceMgr.ByteStreamInputSvc.FullFileName = inputBSFiles
+from AthenaCommon.AthenaCommonFlags  import athenaCommonFlags
+athenaCommonFlags.FilesInput = inputBSFiles
+
+# Set up event info cnv alg
+from AthenaCommon.AlgSequence import AlgSequence
+topSequence = AlgSequence()
+from xAODEventInfoCnv.xAODEventInfoCnvConf import xAODMaker__EventInfoCnvAlg
+topSequence += xAODMaker__EventInfoCnvAlg()
+
+# Set up byte stream converters (SCTRawDataProvider, SCTRawDataProviderTool, SCT_RodDecoder, SCTEventFlagWriter)
+include("InDetRecExample/InDetReadBS_jobOptions.py")
+topSequence.InDetSCTRawDataProvider.OutputLevel = DEBUG
+topSequence.InDetSCTRawDataProvider.ProviderTool.Decoder.OutputLevel = INFO
+topSequence.InDetSCTEventFlagWriter.OutputLevel = DEBUG
+
+# Set up SCT clsutering
+from SiLorentzAngleSvc.SCTLorentzAngleToolSetup import SCTLorentzAngleToolSetup
+from SiLorentzAngleSvc.PixelLorentzAngleToolSetup import PixelLorentzAngleToolSetup
+sctLorentzAngleToolSetup = SCTLorentzAngleToolSetup()
+from SiClusterizationTool.SiClusterizationToolConf import InDet__ClusterMakerTool
+InDetClusterMakerTool = InDet__ClusterMakerTool(name = "InDetClusterMakerTool",
+                                                PixelCalibSvc        = None,
+                                                UsePixelCalibCondDB  = False,
+                                                PixelLorentzAngleTool = None,
+                                                SCTLorentzAngleTool = sctLorentzAngleToolSetup.SCTLorentzAngleTool)
+from SiClusterizationTool.SiClusterizationToolConf import InDet__SCT_ClusteringTool
+InDetSCT_ClusteringTool = InDet__SCT_ClusteringTool(name = "InDetSCT_ClusteringTool",
+                                                    OutputLevel = DEBUG,
+                                                    globalPosAlg = InDetClusterMakerTool,
+                                                    timeBins = "01X")
+from InDetPrepRawDataFormation.InDetPrepRawDataFormationConf import InDet__SCT_Clusterization
+InDetSCT_Clusterization = InDet__SCT_Clusterization(name = "InDetSCT_Clusterization",
+                                                    OutputLevel = DEBUG,
+                                                    clusteringTool = InDetSCT_ClusteringTool,
+                                                    DataObjectName = "SCT_RDOs",
+                                                    ClustersName = "SCT_Clusters",
+                                                    maxFiredStrips = 384)
+topSequence += InDetSCT_Clusterization
+
+# Set up SCT AxAOD converters
+from InDetPrepRawDataToxAOD.InDetPrepRawDataToxAODConf import SCT_RawDataToxAOD
+xAOD_SCT_RawDataToxAOD = SCT_RawDataToxAOD(name = "SCTxAOD_SCT_RawDataToxAOD",
+                                           OutputLevel = DEBUG)
+topSequence += xAOD_SCT_RawDataToxAOD
+from InDetPrepRawDataToxAOD.InDetPrepRawDataToxAODConf import SCT_PrepDataToxAOD
+xAOD_SCT_PrepDataToxAOD = SCT_PrepDataToxAOD(name = "SCTxAOD_SCT_PrepDataToxAOD",
+                                             OutputLevel = DEBUG,
+                                             UseTruthInfo = False,
+                                             WriteSDOs = False)
+topSequence += xAOD_SCT_PrepDataToxAOD
+
+# Set up SCT_ConditionsSummaryTestAlg with SCT_FlaggedConditionTool
+from SCT_ConditionsTools.SCT_FlaggedConditionToolSetup import SCT_FlaggedConditionToolSetup
+sct_FlaggedConditionToolSetup = SCT_FlaggedConditionToolSetup()
+sct_FlaggedConditionToolSetup.setup()
+from SCT_ConditionsTools.SCT_ConditionsSummaryToolSetup import SCT_ConditionsSummaryToolSetup
+sct_ConditionsSummaryToolSetup = SCT_ConditionsSummaryToolSetup()
+sct_ConditionsSummaryToolSetup.setup()
+SCT_ConditionsSummaryTool = sct_ConditionsSummaryToolSetup.getTool()
+SCT_ConditionsSummaryTool.ConditionsTools=[sct_FlaggedConditionToolSetup.getTool().getFullName()]
+from SCT_ConditionsAlgorithms.SCT_ConditionsAlgorithmsConf import SCT_ConditionsSummaryTestAlg
+topSequence += SCT_ConditionsSummaryTestAlg(SCT_ConditionsSummaryTool=SCT_ConditionsSummaryTool)
+
+# Print algorithms
+print topSequence
+
+# SCT conditions setup
+from SCT_ConditionsTools.SCT_ConfigurationConditionsToolSetup import SCT_ConfigurationConditionsToolSetup
+sct_ConfigurationConditionsToolSetup = SCT_ConfigurationConditionsToolSetup()
+sct_ConfigurationConditionsToolSetup.setup()
+
+# Set the number of events to be processed
+theApp.EvtMax = 20
+
+#--------------------------------------------------------------
+# Set output lvl (VERBOSE, DEBUG, INFO, WARNING, ERROR, FATAL)
+#--------------------------------------------------------------
+ServiceMgr.MessageSvc.OutputLevel = INFO
diff --git a/InnerDetector/InDetEventCnv/SCT_RawDataByteStreamCnv/share/testSCTEncode.py b/InnerDetector/InDetEventCnv/SCT_RawDataByteStreamCnv/share/testSCTEncode.py
new file mode 100644
index 0000000000000000000000000000000000000000..916cf37f2e1df6725a47ae55eb7395fa311549d9
--- /dev/null
+++ b/InnerDetector/InDetEventCnv/SCT_RawDataByteStreamCnv/share/testSCTEncode.py
@@ -0,0 +1,124 @@
+###############################################################
+#
+# Job options file to test SCT encoding
+#
+#==============================================================
+
+#--------------------------------------------------------------
+# Standard includes
+#--------------------------------------------------------------
+import AthenaCommon.AtlasUnixStandardJob
+
+#--------------------------------------------------------------
+# Thread-specific setup
+#--------------------------------------------------------------
+from AthenaCommon.ConcurrencyFlags import jobproperties
+if jobproperties.ConcurrencyFlags.NumThreads() > 0:
+    from AthenaCommon.AlgScheduler import AlgScheduler
+    AlgScheduler.CheckDependencies( True )
+    AlgScheduler.ShowControlFlow( True )
+    AlgScheduler.ShowDataDependencies( True )
+
+#--------------------------------------------------------------
+# use auditors
+#--------------------------------------------------------------
+from AthenaCommon.AppMgr import ServiceMgr
+from GaudiSvc.GaudiSvcConf import AuditorSvc
+ServiceMgr += AuditorSvc()
+theAuditorSvc = ServiceMgr.AuditorSvc
+theAuditorSvc.Auditors  += [ "ChronoAuditor"]
+theAuditorSvc.Auditors  += [ "MemStatAuditor" ]
+theApp.AuditAlgorithms=True
+
+#--------------------------------------------------------------
+# Load Geometry
+#--------------------------------------------------------------
+from AthenaCommon.GlobalFlags import globalflags
+globalflags.DetDescrVersion="ATLAS-R2-2015-03-01-00"
+globalflags.DetGeo="atlas"
+globalflags.InputFormat="pool"
+globalflags.DataSource="geant4"
+print globalflags
+
+#--------------------------------------------------------------
+# Set Detector setup
+#--------------------------------------------------------------
+# --- switch on InnerDetector
+from AthenaCommon.DetFlags import DetFlags
+DetFlags.detdescr.SCT_setOn()
+DetFlags.ID_setOn()
+DetFlags.Calo_setOff()
+DetFlags.Muon_setOff()
+DetFlags.Truth_setOff()
+DetFlags.LVL1_setOff()
+DetFlags.SCT_setOn()
+DetFlags.TRT_setOff()
+
+# ---- switch parts of ID off/on as follows
+#switch off tasks
+DetFlags.pileup.all_setOff()
+DetFlags.simulate.all_setOff()
+DetFlags.makeRIO.all_setOff()
+DetFlags.writeBS.all_setOff()
+DetFlags.writeBS.SCT_setOn()
+DetFlags.readRDOBS.all_setOff()
+DetFlags.readRIOBS.all_setOff()
+DetFlags.readRIOPool.all_setOff()
+DetFlags.readRDOPool.all_setOff()
+DetFlags.readRDOPool.SCT_setOn()
+DetFlags.writeRIOPool.all_setOff()
+
+DetFlags.Print()
+
+import AtlasGeoModel.SetGeometryVersion
+import AtlasGeoModel.GeoModelInit
+# import MagFieldServices.SetupField
+
+#--------------------------------------------------------------
+# Load IOVDbSvc
+#--------------------------------------------------------------
+IOVDbSvc = Service("IOVDbSvc")
+from IOVDbSvc.CondDB import conddb
+conddb.dbdata="OFLP200"
+IOVDbSvc.GlobalTag="OFLCOND-RUN12-SDR-31"
+IOVDbSvc.OutputLevel = WARNING
+
+from AthenaCommon.AlgSequence import AthSequencer
+condSeq = AthSequencer("AthCondSeq")
+condAlgName = "SCT_CablingCondAlgFromCoraCool"
+if not hasattr(condSeq, condAlgName):
+    from AthenaCommon.CfgGetter import getAlgorithm
+    SCT_CablingCondAlgFromCoraCool = getAlgorithm(condAlgName)
+    condSeq += SCT_CablingCondAlgFromCoraCool
+
+# Set input byte stream file (from RecExCommon/myTopOptions.py)
+inputRDOFiles = ["/afs/cern.ch/atlas/project/rig/referencefiles/RTTinputFiles/MC15_13TeV/valid1.110401.PowhegPythia_P2012_ttbar_nonallhad.recon.RDO.e3099_s2578_r6699_10evt.pool.root"]
+
+# Set up POOL file reading
+import AthenaPoolCnvSvc.ReadAthenaPool
+ServiceMgr.EventSelector.InputCollections = inputRDOFiles
+
+# Set up event info cnv alg
+from AthenaCommon.AlgSequence import AlgSequence
+topSequence = AlgSequence()
+from xAODEventInfoCnv.xAODEventInfoCnvConf import xAODMaker__EventInfoCnvAlg
+topSequence += xAODMaker__EventInfoCnvAlg()
+
+# Set up byte stream writing
+include("ByteStreamCnvSvc/RDP_ByteStream_jobOptions.py")
+
+from ByteStreamCnvSvc import WriteByteStream
+StreamBSFileOutput = WriteByteStream.getStream("EventStorage","StreamBSFileOutput")
+StreamBSFileOutput.ItemList += [ "SCT_RDO_Container#SCT_RDOs" ]
+
+# Print algorithms
+print topSequence
+
+# Set the number of events to be processed
+theApp.EvtMax = 10
+
+#--------------------------------------------------------------
+# Set output lvl (VERBOSE, DEBUG, INFO, WARNING, ERROR, FATAL)
+#--------------------------------------------------------------
+ServiceMgr.MessageSvc.OutputLevel = DEBUG
+ServiceMgr.MessageSvc.Format = "% F%40W%S%7W%R%T %0W%M"
diff --git a/InnerDetector/InDetRecTools/SiClusterizationTool/src/ClusterMakerTool.cxx b/InnerDetector/InDetRecTools/SiClusterizationTool/src/ClusterMakerTool.cxx
index bdd77ef758af1e67f99a9a5ef4d11689a1077330..b383a7af8663d5158b6bc631d59a2816453cfa20 100755
--- a/InnerDetector/InDetRecTools/SiClusterizationTool/src/ClusterMakerTool.cxx
+++ b/InnerDetector/InDetRecTools/SiClusterizationTool/src/ClusterMakerTool.cxx
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
 */
 
 //***************************************************************************
@@ -87,8 +87,16 @@ StatusCode  ClusterMakerTool::initialize(){
      }
    }
 
-   ATH_CHECK(m_pixelLorentzAngleTool.retrieve());
-   ATH_CHECK(m_sctLorentzAngleTool.retrieve());
+   if (not m_pixelLorentzAngleTool.empty()) {
+     ATH_CHECK(m_pixelLorentzAngleTool.retrieve());
+   } else {
+     m_pixelLorentzAngleTool.disable();
+   }
+   if (not m_sctLorentzAngleTool.empty()) {
+     ATH_CHECK(m_sctLorentzAngleTool.retrieve());
+   } else {
+     m_sctLorentzAngleTool.disable();
+   }
 
    ATH_CHECK(m_clusterErrorKey.initialize());