diff --git a/ForwardDetectors/AFP/AFP_Reconstruction/AFP_GlobReco/CMakeLists.txt b/ForwardDetectors/AFP/AFP_Reconstruction/AFP_GlobReco/CMakeLists.txt
index cb12fc5af66a31edca6dcb7c7ec4281fff899ffa..aef87be2a58c77f35faa38209d7f41da36925362 100644
--- a/ForwardDetectors/AFP/AFP_Reconstruction/AFP_GlobReco/CMakeLists.txt
+++ b/ForwardDetectors/AFP/AFP_Reconstruction/AFP_GlobReco/CMakeLists.txt
@@ -14,7 +14,7 @@ atlas_add_component( AFP_GlobReco
 
 
 # Install files from the package:
-atlas_install_joboptions( share/*.py )
+atlas_install_python_modules( share/*.py POST_BUILD_CMD ${ATLAS_FLAKE8} )   
 
 atlas_install_runtime( share/*.txt )
 
diff --git a/ForwardDetectors/AFP/AFP_Reconstruction/AFP_GlobReco/share/AFP_GlobReco_joboption.py b/ForwardDetectors/AFP/AFP_Reconstruction/AFP_GlobReco/share/AFP_GlobReco_joboption.py
index 0e495a07b716ca3409f4a7233f0f59457f42c652..65a54c128526c20c8290cc46561dca3dd6a2215e 100644
--- a/ForwardDetectors/AFP/AFP_Reconstruction/AFP_GlobReco/share/AFP_GlobReco_joboption.py
+++ b/ForwardDetectors/AFP/AFP_Reconstruction/AFP_GlobReco/share/AFP_GlobReco_joboption.py
@@ -1,34 +1,42 @@
-# Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
+# Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
 
 #==============================================================
 # Job options file for the AFP_GlobReco package
 #==============================================================
 
 from AthenaConfiguration.ComponentFactory import CompFactory
-
-# side A = 0, side C = 1
-afpProtonRecoToolA = CompFactory.getComp("AFP_ProtonRecoAnalytical")("AFP_ProtonRecoAnalyticalA", parametrizationFileName="param_mad_b1_def.txt", side=0)
-afpProtonRecoToolC = CompFactory.getComp("AFP_ProtonRecoAnalytical")("AFP_ProtonRecoAnalyticalC", parametrizationFileName="param_mad_b2_def.txt", side=1)
-
-protonsToolsList=[afpProtonRecoToolA, afpProtonRecoToolC]
-
-# collect all output names and make a list with unique names for write handle keys; if this goes wrong AFP_GlobRecoTool::initialize() will complain
-outputProtonList=[]
-for protonTool in protonsToolsList:
-        try:
-                # in case the "protonsContainerName" is set
-                contName=getattr(protonTool, "protonsContainerName")
-        except AttributeError:
-                # in case the "protonsContainerName" is not set
-                contName=protonTool.getDefaultProperty("protonsContainerName")
-        if contName not in outputProtonList:
-                outputProtonList.append(contName)
-
-# prepare proton reco tool
-protonRecoTool = CompFactory.getComp("AFP_GlobRecoTool")("AFP_GlobRecoTool", RecoToolsList=protonsToolsList, AFPProtonContainerList=outputProtonList )
-
-# actually setup the track reco
-from AFP_GlobReco.AFP_GlobRecoConf import AFP_GlobReco
-topSequence += AFP_GlobReco("AFP_GlobReco", recoTool = protonRecoTool)
+from TrigEDMConfig.TriggerEDMRun3 import recordable
+
+def AFP_GlobReco_Cfg(kwargs={}):
+	# side A = 0, side C = 1
+	afpProtonRecoToolA = CompFactory.AFP_ProtonRecoAnalytical("AFP_ProtonRecoAnalyticalA", parametrizationFileName="param_mad_b1_def.txt", side=0, **kwargs)
+	afpProtonRecoToolC = CompFactory.AFP_ProtonRecoAnalytical("AFP_ProtonRecoAnalyticalC", parametrizationFileName="param_mad_b2_def.txt", side=1, **kwargs)
+
+	protonsToolsList=[afpProtonRecoToolA, afpProtonRecoToolC]
+
+	# collect all output names and make a list with unique names for write handle keys; if this goes wrong AFP_GlobRecoTool::initialize() will complain
+	outputProtonList=[]
+	for protonTool in protonsToolsList:
+		try:
+			# in case the "protonsContainerName" is set
+			contName=getattr(protonTool, "protonsContainerName")
+		except AttributeError:
+			# in case the "protonsContainerName" is not set
+			contName=protonTool.getDefaultProperty("protonsContainerName")
+		if contName not in outputProtonList:
+			outputProtonList.append(contName)
+
+	# prepare proton reco tool
+	protonRecoTool = CompFactory.AFP_GlobRecoTool("AFP_GlobRecoTool", RecoToolsList=protonsToolsList, AFPProtonContainerList=outputProtonList )
+
+	# actually setup the track reco
+	return CompFactory.AFP_GlobReco("AFP_GlobReco", recoTool = protonRecoTool)
+
+
+def AFP_GlobReco_HLT():
+	
+	AFP_Pr = AFP_GlobReco_Cfg({"AFPTrackContainerKey": "HLT_AFPTrackContainer", "protonsContainerName": recordable("HLT_AFPProtonContainer")})
+	
+	return AFP_Pr
 
 
diff --git a/ForwardDetectors/AFP/AFP_Reconstruction/AFP_LocReco/CMakeLists.txt b/ForwardDetectors/AFP/AFP_Reconstruction/AFP_LocReco/CMakeLists.txt
index 701dac1c6ff378640ac97804343057dabc810477..dbac2d9976598ad02d7af712ca34ee817a05f1eb 100644
--- a/ForwardDetectors/AFP/AFP_Reconstruction/AFP_LocReco/CMakeLists.txt
+++ b/ForwardDetectors/AFP/AFP_Reconstruction/AFP_LocReco/CMakeLists.txt
@@ -16,5 +16,5 @@ atlas_add_component( AFP_LocReco
 
 
 # Install files from the package:
-atlas_install_joboptions( share/*.py )
+atlas_install_python_modules( share/*.py POST_BUILD_CMD ${ATLAS_FLAKE8} )   
 
diff --git a/ForwardDetectors/AFP/AFP_Reconstruction/AFP_LocReco/share/AFP_LocReco_joboption.py b/ForwardDetectors/AFP/AFP_Reconstruction/AFP_LocReco/share/AFP_LocReco_joboption.py
index e2eae904a548e9daae033d57f31e428ca003b9a0..87cefb97634dae1a8b8b4ebe859c7ac981ebef72 100644
--- a/ForwardDetectors/AFP/AFP_Reconstruction/AFP_LocReco/share/AFP_LocReco_joboption.py
+++ b/ForwardDetectors/AFP/AFP_Reconstruction/AFP_LocReco/share/AFP_LocReco_joboption.py
@@ -1,120 +1,128 @@
-# Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
+# Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
 
 #==============================================================
 # Job options file for the AFP_LocReco package
 #==============================================================
 
-from AthenaCommon.GlobalFlags import globalflags
-
-#-- SiD part ------------------------------------------------------------
-
-# convert EventInfo to xAOD::EventInfo
-if( not globalflags.InputFormat.is_bytestream() and ( not objKeyStore.isInInput( "xAOD::EventInfo") ) and ( not hasattr( topSequence, "xAODMaker::EventInfoCnvAlg" ) ) ):
-        from xAODEventInfoCnv.xAODEventInfoCnvAlgDefault import xAODEventInfoCnvAlgDefault
-        xAODEventInfoCnvAlgDefault (sequence = topSequence)
-
-# get geometry tool
-from AthenaConfiguration.ComponentFactory import CompFactory
-afpGeometryTool = CompFactory.getComp("AFP_GeometryTool")("AFP_Geometry_tool")
-
-# prepare clustering tool
 from AthenaConfiguration.ComponentFactory import CompFactory
-clusterNeighbour = CompFactory.getComp("AFPSiClusterBasicNearestNeighbour")("AFPSiClusterBasicNearestNeighbour")
-# it's also possible to get the same clustering tool as in AFPAnalysisToolbox
-# clusterNeighbour = CompFactory.getComp("AFPSiClusterAllNeighbours")("AFPSiClusterAllNeighbours", neighbourhoodType="X")
-
-rowColToLocal = CompFactory.getComp("AFPSiRowColToLocalCSTool")("AFPSiRowColToLocalCSTool", AFP_Geometry=afpGeometryTool)
-
-clusterTool = CompFactory.getComp("AFPSiClusterTool")("AFPSiClusterTool", clusterAlgTool=clusterNeighbour, rowColToLocalCSTool = rowColToLocal)
-
-# actually setup the cluster reco
-from AFP_SiClusterTools.AFP_SiClusterToolsConf import AFPSiCluster
-topSequence += AFPSiCluster("AFPSiCluster", clusterRecoTool = clusterTool)
-
-
-# prepare track reconstruction algorithm tools - one for each station
-kalmanTool0 = CompFactory.getComp("AFPSiDBasicKalmanTool")("AFPSiDBasicKalmanTool0", stationID=0)
-
-# number of layers in each station, size of the vector determines number of stations
-# kalmanTool1.numberOfLayersInStation = 3
-
-# Maximal distance at which cluster can be joined to the track
-# kalmanTool1.maxAllowedDistance = 10
-
-# Minimal number of clusters in track. If there are less clusters track is rejected
-# kalmanTool1.minClustersNumber = 3
-
-kalmanTool1 = CompFactory.getComp("AFPSiDBasicKalmanTool")("AFPSiDBasicKalmanTool1", stationID=1)
-kalmanTool2 = CompFactory.getComp("AFPSiDBasicKalmanTool")("AFPSiDBasicKalmanTool2", stationID=2)
-kalmanTool3 = CompFactory.getComp("AFPSiDBasicKalmanTool")("AFPSiDBasicKalmanTool3", stationID=3)
-
-# it's also possible to have the same track reco tool as in AFPAnalysisToolbox
-# linRegTool0 = CompFactory.getComp("AFPSiDLinRegTool")("AFPSiDLinRegTool0", stationID=0)
-# linRegTool1 = CompFactory.getComp("AFPSiDLinRegTool")("AFPSiDLinRegTool1", stationID=1)
-# linRegTool2 = CompFactory.getComp("AFPSiDLinRegTool")("AFPSiDLinRegTool2", stationID=2)
-# linRegTool3 = CompFactory.getComp("AFPSiDLinRegTool")("AFPSiDLinRegTool3", stationID=3)
-
-kalmanToolsList=[kalmanTool0, kalmanTool1, kalmanTool2, kalmanTool3]
-
-# collect all output names and make a list with unique names for write handle keys; if this goes wrong AFP_SIDLocRecoTool::initialize() will complain
-outputKalmanList=[]
-for kalmanTool in kalmanToolsList:
-        try:
-                # in case the "tracksContainerName" is set
-                contName=getattr(kalmanTool, "tracksContainerName")
-        except AttributeError:
-                # in case the "tracksContainerName" is not set
-                contName=kalmanTool.getDefaultProperty("tracksContainerName")
-        if contName not in outputKalmanList:
-                outputKalmanList.append(contName)
-
-# prepare track reco tool
-trackRecoTool = CompFactory.getComp("AFP_SIDLocRecoTool")("AFP_SIDLocRecoTool", RecoToolsList=kalmanToolsList, AFPTrackContainerList=outputKalmanList )
-
-# actually setup the track reco
-from AFP_LocReco.AFP_LocRecoConf import AFP_SIDLocReco
-topSequence += AFP_SIDLocReco("AFP_SIDLocReco", recoTool = trackRecoTool)
-
-
-#-- TiD part ------------------------------------------------------------
-
-
-# Prepare ToF reconstruction algorithm tools - one for each station
-BarWeight = [1.0, 1.0, 1.0, 1.0] 
-TimeOffset0 = [105707, 105670, 105675, 105638,
-               105834, 105819, 105778, 105754,
-               105900, 105892, 105870, 105820,
-               105953, 105924, 105905, 105877]
-
-basicTool0 = CompFactory.getComp("AFPTDBasicTool")("AFPTDBasicTool0", stationID=0, maxAllowedLength=100, TimeOffset=TimeOffset0, BarWeight=BarWeight)
-
-TimeOffset3 = [105796, 105761, 105742, 105696,
-               105890, 105871, 105839, 105816,
-               105923, 105899, 105862, 105853,
-       	       105953, 105930, 105908, 105879]
-
-basicTool3 = CompFactory.getComp("AFPTDBasicTool")("AFPTDBasicTool3", stationID=3, maxAllowedLength=100, TimeOffset=TimeOffset3, BarWeight=BarWeight)
-basicToolsList=[basicTool0, basicTool3]
-
-# collect all output names and make a list with unique names for write handle keys; if this goes wrong AFP_SIDLocRecoTool::initialize() will complain
-outputBasicList=[]
-for basicTool in basicToolsList:
-        try:
-                # in case the "tracksContainerName" is set
-                contName=getattr(basicTool, "tracksContainerName")
-        except AttributeError:
-                # in case the "tracksContainerName" is not set
-                contName=basicTool.getDefaultProperty("tracksContainerName")
-        if contName not in outputBasicList:
-                outputBasicList.append(contName)
-
-# prepare track reco tool
-ToFtrackRecoTool = CompFactory.getComp("AFP_TDLocRecoTool")("AFP_TDLocRecoTool", RecoToolsList=basicToolsList, AFPToFTrackContainerList=outputBasicList )
-
-# actually setup the ToF track reco
-from AFP_LocReco.AFP_LocRecoConf import AFP_TDLocReco
-topSequence += AFP_TDLocReco("AFP_TDLocReco", recoTool=ToFtrackRecoTool)
-
+from TrigEDMConfig.TriggerEDMRun3 import recordable
+
+def AFP_LocReco_SiD_Cfg(kwargs={}):
+
+	# prepare track reconstruction algorithm tools - one for each station
+	kalmanTool0 = CompFactory.AFPSiDBasicKalmanTool("AFPSiDBasicKalmanTool0", stationID=0, **kwargs)
+
+	# number of layers in each station, size of the vector determines number of stations
+	# kalmanTool1.numberOfLayersInStation = 3
+
+	# Maximal distance at which cluster can be joined to the track
+	# kalmanTool1.maxAllowedDistance = 10
+
+	# Minimal number of clusters in track. If there are less clusters track is rejected
+	# kalmanTool1.minClustersNumber = 3
+
+	kalmanTool1 = CompFactory.AFPSiDBasicKalmanTool("AFPSiDBasicKalmanTool1", stationID=1, **kwargs)
+	kalmanTool2 = CompFactory.AFPSiDBasicKalmanTool("AFPSiDBasicKalmanTool2", stationID=2, **kwargs)
+	kalmanTool3 = CompFactory.AFPSiDBasicKalmanTool("AFPSiDBasicKalmanTool3", stationID=3, **kwargs)
+	
+	# it's also possible to have the same track reco tool as in AFPAnalysisToolbox
+	# linRegTool0 = CompFactory.AFPSiDLinRegTool("AFPSiDLinRegTool0", stationID=0, **kwargs)
+	# linRegTool1 = CompFactory.AFPSiDLinRegTool("AFPSiDLinRegTool1", stationID=1, **kwargs)
+	# linRegTool2 = CompFactory.AFPSiDLinRegTool("AFPSiDLinRegTool2", stationID=2, **kwargs)
+	# linRegTool3 = CompFactory.AFPSiDLinRegTool("AFPSiDLinRegTool3", stationID=3, **kwargs)
+
+	kalmanToolsList=[kalmanTool0, kalmanTool1, kalmanTool2, kalmanTool3]
+
+	# collect all output names and make a list with unique names for write handle keys; if this goes wrong AFP_SIDLocRecoTool::initialize() will complain
+	outputKalmanList=[]
+	for kalmanTool in kalmanToolsList:
+		try:
+			# in case the "tracksContainerName" is set
+			contName=getattr(kalmanTool, "tracksContainerName")
+		except AttributeError:
+			# in case the "tracksContainerName" is not set
+			contName=kalmanTool.getDefaultProperty("tracksContainerName")
+		if contName not in outputKalmanList:
+			outputKalmanList.append(contName)
+
+	# prepare track reco tool
+	trackRecoTool = CompFactory.AFP_SIDLocRecoTool("AFP_SIDLocRecoTool", RecoToolsList=kalmanToolsList, AFPTrackContainerList=outputKalmanList )
+
+	# actually setup the track reco
+	return CompFactory.AFP_SIDLocReco("AFP_SIDLocReco", recoTool = trackRecoTool)
+
+
+def AFP_LocReco_TD_Cfg(kwargs={}):
+
+	# Prepare ToF reconstruction algorithm tools - one for each station
+	BarWeight = [1.0, 1.0, 1.0, 1.0] 
+	TimeOffset0 = [ 105707, 105670, 105675, 105638,
+					105834, 105819, 105778, 105754,
+					105900, 105892, 105870, 105820,
+					105953, 105924, 105905, 105877]
+
+	basicTool0 = CompFactory.AFPTDBasicTool("AFPTDBasicTool0", stationID=0, maxAllowedLength=100, TimeOffset=TimeOffset0, BarWeight=BarWeight, **kwargs)
+
+	TimeOffset3 = [ 105796, 105761, 105742, 105696,
+					105890, 105871, 105839, 105816,
+					105923, 105899, 105862, 105853,
+					105953, 105930, 105908, 105879]
+
+	basicTool3 = CompFactory.AFPTDBasicTool("AFPTDBasicTool3", stationID=3, maxAllowedLength=100, TimeOffset=TimeOffset3, BarWeight=BarWeight, **kwargs)
+	basicToolsList=[basicTool0, basicTool3]
+
+	# collect all output names and make a list with unique names for write handle keys; if this goes wrong AFP_SIDLocRecoTool::initialize() will complain
+	outputBasicList=[]
+	for basicTool in basicToolsList:
+		try:
+			# in case the "tracksContainerName" is set
+			contName=getattr(basicTool, "tracksContainerName")
+		except AttributeError:
+			# in case the "tracksContainerName" is not set
+			contName=basicTool.getDefaultProperty("tracksContainerName")
+		if contName not in outputBasicList:
+			outputBasicList.append(contName)
+
+	# prepare track reco tool
+	ToFtrackRecoTool = CompFactory.AFP_TDLocRecoTool("AFP_TDLocRecoTool", RecoToolsList=basicToolsList, AFPToFTrackContainerList=outputBasicList )
+
+	# actually setup the ToF track reco
+	return CompFactory.AFP_TDLocReco("AFP_TDLocReco", recoTool=ToFtrackRecoTool)
+
+
+def AFP_LocReco_SiD_HLT():
+	
+	AFP_SID = AFP_LocReco_SiD_Cfg({"tracksContainerName": recordable("HLT_AFPTrackContainer"), "AFPSiHitsClusterContainerKey": "HLT_AFPSiHitsClusterContainer"})
+	
+	from AthenaMonitoringKernel.GenericMonitoringTool import GenericMonitoringTool
+	
+	monTool_AFP_SIDLocRecoTool = GenericMonitoringTool("MonTool_AFP_SIDLocRecoTool")
+	monTool_AFP_SIDLocRecoTool.defineHistogram( 'TrkSize', path='EXPERT', type='TH1F', title='AFP tracks size',xbins=50, xmin=0, xmax=100 )
+	AFP_SID.recoTool.MonTool = monTool_AFP_SIDLocRecoTool
+	
+	for i, kalmanTool in enumerate(AFP_SID.recoTool.RecoToolsList):
+		monTool_AFP_BasicKalman = GenericMonitoringTool("MonTool_AFP_"+kalmanTool.name())
+	
+		monTool_AFP_BasicKalman.defineHistogram( 'TrkStationID', path='EXPERT', type='TH1F', title='Track station ID',xbins=4, xmin=0, xmax=4 )
+		monTool_AFP_BasicKalman.defineHistogram( 'TrkXLocal', path='EXPERT', type='TH1F', title='Track xLocal',xbins=100, xmin=-200, xmax=200 )
+		monTool_AFP_BasicKalman.defineHistogram( 'TrkYLocal', path='EXPERT', type='TH1F', title='Track yLocal',xbins=100, xmin=-30, xmax=30 )
+		monTool_AFP_BasicKalman.defineHistogram( 'TrkZLocal', path='EXPERT', type='TH1F', title='Track zLocal',xbins=100, xmin=-500000, xmax=500000 )
+		monTool_AFP_BasicKalman.defineHistogram( 'TrkXSlope', path='EXPERT', type='TH1F', title='Track x slope',xbins=100, xmin=-0.5, xmax=0.5 )
+		monTool_AFP_BasicKalman.defineHistogram( 'TrkYSlope', path='EXPERT', type='TH1F', title='Track y slope',xbins=100, xmin=-0.5, xmax=0.5 )
+		monTool_AFP_BasicKalman.defineHistogram( 'TrkNClusters', path='EXPERT', type='TH1F', title='Track number of clusters',xbins=100, xmin=0, xmax=100 )
+		monTool_AFP_BasicKalman.defineHistogram( 'TrkNHoles', path='EXPERT', type='TH1F', title='Track number of holes',xbins=100, xmin=0, xmax=100 )
+		monTool_AFP_BasicKalman.defineHistogram( 'TrkChi2', path='EXPERT', type='TH1F', title='Track chi2',xbins=50, xmin=0, xmax=10 )
+
+		AFP_SID.recoTool.RecoToolsList[i].MonTool = monTool_AFP_BasicKalman
+			
+	return AFP_SID
+
+def AFP_LocReco_TD_HLT():
+	
+	AFP_TD = AFP_LocReco_TD_Cfg({"tracksContainerName": recordable("HLT_AFPToFTrackContainer")})
+	
+	return AFP_TD
+	
 
 #-- SiAlignDBTester part ------------------------------------------------------------
 # this is a setup for ReadCondHandle (see AFP_DBTools/SiAlignDBTester)
diff --git a/ForwardDetectors/AFP/AFP_Reconstruction/AFP_LocReco/share/AFP_LocReco_joboption_standalone.py b/ForwardDetectors/AFP/AFP_Reconstruction/AFP_LocReco/share/AFP_LocReco_joboption_standalone.py
deleted file mode 100644
index 2c3d5f339897db02e94677a680ba55e8f29ba57b..0000000000000000000000000000000000000000
--- a/ForwardDetectors/AFP/AFP_Reconstruction/AFP_LocReco/share/AFP_LocReco_joboption_standalone.py
+++ /dev/null
@@ -1,90 +0,0 @@
-#==============================================================
-# Job options file for Geant4 Simulations
-# AFP_LocReco 
-#==============================================================
-#import jobOptionValues
-#jobOptionValues=jobOptionValues
-
-#strInputRootCollection = 'AFP_digi_step_100ev_203900_test18_r3.pool.root'
-strInputRootCollection = 'AFP_digi_new.pool.root'
-strOutputRootFile      = 'AFP_locreco.root'
-
-print strInputRootCollection
-print strOutputRootFile
-
-#--------------------------------------------------------------
-# Load POOL support
-include( "AthenaPoolCnvSvc/ReadAthenaPool_jobOptions.py" )
-ServiceMgr.EventSelector.InputCollections = [strInputRootCollection]
-
-#--------------------------------------------------------------
-# Event related parameters
-#theApp.EvtMax = jobOptionValues.iEventCountLocRecCorr
-
-theApp.EvtMax = 63
-
-
-#--------------------------------------------------------------
-# Application: AthenaPoolTest options
-theApp.Dlls   += [ "AFP_TDLocReco" ]
-theApp.TopAlg += [ "AFP_TDLocReco" ]
-
-# AFP_LocReco properties
-from AFP_LocReco.AFP_LocRecoConf import AFP_TDLocReco
-# select between a real data or a simulation mode - Simulation = 0, RealData = 1
-AFP_TDLocReco.DataType   = 0
-# select algo for timing reco
-AFP_TDLocReco.ListAlgoTD = ["TDZVertex"]
-AFP_TDLocReco.AmpThresh = 10.
-
-
-#--------------------------------------------------------------
-# Application: AthenaPoolTest options
-theApp.Dlls   += [ "AFP_SIDLocReco" ]
-theApp.TopAlg += [ "AFP_SIDLocReco" ]
-
-# AFP_LocReco properties
-from AFP_LocReco.AFP_LocRecoConf import AFP_SIDLocReco
-# select between a real data or a simulation mode - Simulation = 0, RealData = 1
-AFP_SIDLocReco.DataType   = 0
-# select algo for timing reco
-AFP_SIDLocReco.ListAlgoSID = ["SIDBasicKalman"]
-AFP_SIDLocReco.AmpThresh = 5000.
-
-#--------------------------------------------------------------
-# Output options
-# LAr Hit 
-# Converters:
-include( "EventAthenaPool/EventAthenaPool_joboptions.py" )
-#include( "AFP_EventAthenaPool/AFP_EventAthenaPool_joboptions.py" )
-
-# ItemList:
-include( "EventAthenaPool/EventAthenaPoolItemList_joboptions.py" )
-#include( "AFP_EventAthenaPool/AFP_EventAthenaPoolItemList_joboptions.py" )
-
-
-print fullItemList
-
-from AthenaPoolCnvSvc.WriteAthenaPool import AthenaPoolOutputStream
-Stream1 = AthenaPoolOutputStream( "Stream1" )
-Stream1.OutputFile = strOutputRootFile
-
-# List of DO's to write out - we don't use fullItemList, just list a
-# few we want
-#Stream1.ItemList   += fullItemList
-Stream1.ItemList+= ["EventInfo#*", "McEventCollection#TruthEvent"] # mc truth (hepmc)
-#Stream1.ItemList+= ["AFP_TDDigiCollection#*"]
-Stream1.ItemList+= ["AFP_TDLocRecoEvCollection#*"]
-#Stream1.ItemList+= ["AFP_SiDigiCollection#*"]
-Stream1.ItemList+= ["AFP_SIDLocRecoEvCollection#*"]
-
-#--------------------------------------------------------------
-# Set output level threshold (2=DEBUG, 3=INFO, 4=WARNING, 5=ERROR, 6=FATAL )
-MessageSvc = Service( "MessageSvc" )
-MessageSvc.OutputLevel = 3
-MessageSvc.defaultLimit = 9999999
-ClassIDSvc = Service( "ClassIDSvc" )
-ClassIDSvc.OutputLevel = 3
-AthenaSealSvc.OutputLevel = 3
-
-#--- End *.py file  -------------------------------------------
diff --git a/ForwardDetectors/AFP/AFP_Reconstruction/AFP_SiClusterTools/CMakeLists.txt b/ForwardDetectors/AFP/AFP_Reconstruction/AFP_SiClusterTools/CMakeLists.txt
index e97b722d61923638c21a42f2e83fc0225c6b100c..4da892163581f9b1c78faa40322ac118b85ca1ed 100644
--- a/ForwardDetectors/AFP/AFP_Reconstruction/AFP_SiClusterTools/CMakeLists.txt
+++ b/ForwardDetectors/AFP/AFP_Reconstruction/AFP_SiClusterTools/CMakeLists.txt
@@ -22,5 +22,5 @@ atlas_add_component( AFP_SiClusterTools
 
 # Install files from the package:
 atlas_install_headers( AFP_SiClusterTools )
-#atlas_install_joboptions( share/*.py )
 
+atlas_install_python_modules( share/*.py POST_BUILD_CMD ${ATLAS_FLAKE8} )   
diff --git a/ForwardDetectors/AFP/AFP_Reconstruction/AFP_SiClusterTools/share/AFP_SiClusterTools_joboption.py b/ForwardDetectors/AFP/AFP_Reconstruction/AFP_SiClusterTools/share/AFP_SiClusterTools_joboption.py
new file mode 100644
index 0000000000000000000000000000000000000000..93e7bdfb5c2c6039d31839418eeab4692c0fe28e
--- /dev/null
+++ b/ForwardDetectors/AFP/AFP_Reconstruction/AFP_SiClusterTools/share/AFP_SiClusterTools_joboption.py
@@ -0,0 +1,38 @@
+# Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
+
+#==============================================================
+# Job options file for the AFP_SiClusterTools package
+#==============================================================
+
+from AthenaConfiguration.ComponentFactory import CompFactory
+from TrigEDMConfig.TriggerEDMRun3 import recordable
+
+def AFP_SiClusterTools_Cfg(kwargs={}):
+	
+	afpGeometryTool = CompFactory.AFP_GeometryTool("AFP_Geometry_tool")
+
+	clusterNeighbour = CompFactory.AFPSiClusterBasicNearestNeighbour("AFPSiClusterBasicNearestNeighbour")
+# 	it's also possible to get the same clustering tool as in AFPAnalysisToolbox
+# 	clusterNeighbour = CompFactory.AFPSiClusterAllNeighbours("AFPSiClusterAllNeighbours", neighbourhoodType="X")
+	
+	rowColToLocal = CompFactory.AFPSiRowColToLocalCSTool("AFPSiRowColToLocalCSTool", AFP_Geometry=afpGeometryTool)
+	
+	clusterTool = CompFactory.AFPSiClusterTool("AFPSiClusterTool", clusterAlgTool=clusterNeighbour, rowColToLocalCSTool = rowColToLocal)
+
+	return CompFactory.AFPSiCluster("AFPSiCluster", clusterRecoTool = clusterTool, **kwargs)
+
+
+def AFP_SiClusterTools_HLT():
+
+	AFP_SiCl = AFP_SiClusterTools_Cfg({"AFPSiHitsClusterContainerKey": recordable("HLT_AFPSiHitsClusterContainer")})
+	
+	from AthenaMonitoringKernel.GenericMonitoringTool import GenericMonitoringTool
+	
+	monTool_AFP_SiClusterTool = GenericMonitoringTool("MonTool_AFP_SiClusterTool")
+	monTool_AFP_SiClusterTool.defineHistogram( 'HitsSize', path='EXPERT', type='TH1F', title='SID hits size',xbins=50, xmin=0, xmax=50 )
+	monTool_AFP_SiClusterTool.defineHistogram( 'ClusterSize', path='EXPERT', type='TH1F', title='SID cluster size',xbins=50, xmin=0, xmax=50 )
+	AFP_SiCl.clusterRecoTool.MonTool = monTool_AFP_SiClusterTool
+	
+	return AFP_SiCl
+
+
diff --git a/ForwardDetectors/AFP/AFP_Reconstruction/AFP_VertexReco/CMakeLists.txt b/ForwardDetectors/AFP/AFP_Reconstruction/AFP_VertexReco/CMakeLists.txt
index 6751d2b1e9e9439e306b160b7587c8f356f24672..88fcfa7baaa4f204237b56734985c4f5ee3fb5cc 100644
--- a/ForwardDetectors/AFP/AFP_Reconstruction/AFP_VertexReco/CMakeLists.txt
+++ b/ForwardDetectors/AFP/AFP_Reconstruction/AFP_VertexReco/CMakeLists.txt
@@ -9,9 +9,9 @@ find_package( ROOT COMPONENTS Core MathCore Hist RIO )
 
 atlas_add_component( AFP_VertexReco
                      src/*.cxx src/components/*.cxx AFP_VertexReco/*.h 
-                     INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} ${CLHEP_INCLUDE_DIRS} ${HEPMC_INCLUDE_DIRS}
-                     LINK_LIBRARIES ${ROOT_LIBRARIES} ${CLHEP_LIBRARIES} ${HEPMC_LIBRARIES} AthContainers AthenaBaseComps AthenaKernel GaudiKernel PathResolver StoreGateLib xAODForward )
+                     INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} ${CLHEP_INCLUDE_DIRS}
+                     LINK_LIBRARIES ${ROOT_LIBRARIES} ${CLHEP_LIBRARIES} AthContainers AthenaBaseComps AthenaKernel GaudiKernel PathResolver StoreGateLib xAODForward )
 
 
 # Install files from the package:
-atlas_install_joboptions( share/*.py )
+atlas_install_python_modules( share/*.py POST_BUILD_CMD ${ATLAS_FLAKE8} )   
diff --git a/ForwardDetectors/AFP/AFP_Reconstruction/AFP_VertexReco/share/AFP_VertexReco_joboption.py b/ForwardDetectors/AFP/AFP_Reconstruction/AFP_VertexReco/share/AFP_VertexReco_joboption.py
index 6ad2e87fc5118b1152a3eb3b4e66518ba09d3b91..2eeeccc8df13ce9e34696e07605373e653ca65af 100644
--- a/ForwardDetectors/AFP/AFP_Reconstruction/AFP_VertexReco/share/AFP_VertexReco_joboption.py
+++ b/ForwardDetectors/AFP/AFP_Reconstruction/AFP_VertexReco/share/AFP_VertexReco_joboption.py
@@ -1,44 +1,48 @@
-# Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
+# Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
 
 #==============================================================
 # Job options file for the AFP_VertexReco package
 #==============================================================
 
 from AthenaConfiguration.ComponentFactory import CompFactory
-
-
-# Prepare Vertex reconstruction algorithm tools 
-
-
-TimeOffsetA = [64,57,30,52]
-TimeSlopeA = [-8.6,-10.4,-9.7,-17.]
-TimeOffsetC = [-4,1,17,7]     
-TimeSlopeC = [9.6,11,11,11]
-TrainEdgesA = [-18.7,-13.2,-8.1,-4.0,-2.5]
-TrainEdgesC = [-18.7,-13.2,-8.1,-4.0,-2.5]
-TimeGlobalOffset = 0
-
-afpVertexRecoTool = CompFactory.getComp("AFP_VertexRecoBasic")("AFP_VertexRecoBasic",TrackDistance=0.5,TimeOffsetA = TimeOffsetA, TimeSlopeA = TimeSlopeA, TimeOffsetC = TimeOffsetC, TimeSlopeC = TimeSlopeC, TimeGlobalOffset = TimeGlobalOffset, TrainEdgesA = TrainEdgesA, TrainEdgesC = TrainEdgesC)
-
-verticesToolsList=[afpVertexRecoTool]
-
-# collect all output names and make a list with unique names for write handle keys; if this goes wrong AFP_VertexRecoTool::initialize() will complain
-outputVertexList=[]
-for vertexTool in verticesToolsList:
-        try:
-                # in case the "verticesContainerName" is set
-                contName=getattr(vertexTool, "verticesContainerName")
-        except AttributeError:
-                # in case the "verticesContainerName" is not set
-                contName=vertexTool.getDefaultProperty("verticesContainerName")
-        if contName not in outputVertexList:
-                outputVertexList.append(contName)
-
-# prepare vertex reco tool
-vertexRecoTool = CompFactory.getComp("AFP_VertexRecoTool")("AFP_VertexRecoTool", RecoToolsList=verticesToolsList, AFPVertexContainerList=outputVertexList )
-
-# actually setup the vertex reco
-from AFP_VertexReco.AFP_VertexRecoConf import AFP_VertexReco
-topSequence += AFP_VertexReco("AFP_VertexReco", recoTool = vertexRecoTool)
-
-
+from TrigEDMConfig.TriggerEDMRun3 import recordable
+
+# Prepare Vertex reconstruction algorithm tools
+def AFP_VertexReco_Cfg(kwargs={}):
+
+	TimeOffsetA = [64,57,30,52]
+	TimeSlopeA = [-8.6,-10.4,-9.7,-17.]
+	TimeOffsetC = [-4,1,17,7]     
+	TimeSlopeC = [9.6,11,11,11]
+	TrainEdgesA = [-18.7,-13.2,-8.1,-4.0,-2.5]
+	TrainEdgesC = [-18.7,-13.2,-8.1,-4.0,-2.5]
+	TimeGlobalOffset = 0
+
+	afpVertexRecoTool = CompFactory.AFP_VertexRecoBasic("AFP_VertexRecoBasic",TrackDistance=0.5,TimeOffsetA = TimeOffsetA, TimeSlopeA = TimeSlopeA, TimeOffsetC = TimeOffsetC, TimeSlopeC = TimeSlopeC, TimeGlobalOffset = TimeGlobalOffset, TrainEdgesA = TrainEdgesA, TrainEdgesC = TrainEdgesC, **kwargs)
+
+	verticesToolsList=[afpVertexRecoTool]
+
+	# collect all output names and make a list with unique names for write handle keys; if this goes wrong AFP_VertexRecoTool::initialize() will complain
+	outputVertexList=[]
+	for vertexTool in verticesToolsList:
+		try:
+			# in case the "verticesContainerName" is set
+			contName=getattr(vertexTool, "verticesContainerName")
+		except AttributeError:
+			# in case the "verticesContainerName" is not set
+			contName=vertexTool.getDefaultProperty("verticesContainerName")
+		if contName not in outputVertexList:
+			outputVertexList.append(contName)
+
+	# prepare vertex reco tool
+	vertexRecoTool = CompFactory.AFP_VertexRecoTool("AFP_VertexRecoTool", RecoToolsList=verticesToolsList, AFPVertexContainerList=outputVertexList )
+
+	# actually setup the vertex reco
+	return CompFactory.AFP_VertexReco("AFP_VertexReco", recoTool = vertexRecoTool)
+
+
+def AFP_VertexReco_HLT():
+	
+	AFP_Vtx = AFP_VertexReco_Cfg({"AFPToFTrackContainerKey": "HLT_AFPToFTrackContainer", "AFPProtonContainerKey": "HLT_AFPProtonContainer", "verticesContainerName": recordable("HLT_AFPVertexContainer")})
+	
+	return AFP_Vtx
diff --git a/ForwardDetectors/ForwardRec/share/ForwardRec_jobOptions.py b/ForwardDetectors/ForwardRec/share/ForwardRec_jobOptions.py
index 17746fd8061b5aa6da914a623825ca586eeb0bf7..0bc296f66acb09708894b13844e247af4deade84 100644
--- a/ForwardDetectors/ForwardRec/share/ForwardRec_jobOptions.py
+++ b/ForwardDetectors/ForwardRec/share/ForwardRec_jobOptions.py
@@ -41,17 +41,29 @@ if rec.doAlfa() and rec.doESD():
     include("ALFA_CLinkAlg/ALFA_CLinkAlg_joboption.py")        
 
 if rec.doAFP() and rec.doESD():
+  
   # Real-data reconstruction:
   if DetFlags.readRDOBS.AFP_on():
     from AFP_ByteStream2RawCnv.AFP_ByteStream2RawCnvConf import AFP_RawDataProvider
     topSequence+=AFP_RawDataProvider()
-    
+
     from AFP_Raw2Digi.AFP_Raw2DigiConf import AFP_Raw2Digi
     topSequence+=AFP_Raw2Digi()
-
+  
+  #cluster reconstruction
+  from AFP_SiClusterTools.AFP_SiClusterTools_joboption import AFP_SiClusterTools_Cfg
+  topSequence+=AFP_SiClusterTools_Cfg()
+  
   # tracks reconstruction
-  include("AFP_LocReco/AFP_LocReco_joboption.py")
+  from AFP_LocReco.AFP_LocReco_joboption import AFP_LocReco_SiD_Cfg, AFP_LocReco_TD_Cfg
+  topSequence+=AFP_LocReco_SiD_Cfg()
+  topSequence+=AFP_LocReco_TD_Cfg()
+   
   # protons reconstruction
-  include("AFP_GlobReco/AFP_GlobReco_joboption.py")
+  from AFP_GlobReco.AFP_GlobReco_joboption import AFP_GlobReco_Cfg
+  topSequence+=AFP_GlobReco_Cfg()
+  
   # vertex reconstruction
-  include("AFP_VertexReco/AFP_VertexReco_joboption.py")
+  from AFP_VertexReco.AFP_VertexReco_joboption import AFP_VertexReco_Cfg
+  topSequence+=AFP_VertexReco_Cfg()
+  
\ No newline at end of file
diff --git a/Trigger/TriggerCommon/TrigEDMConfig/python/TriggerEDMRun3.py b/Trigger/TriggerCommon/TrigEDMConfig/python/TriggerEDMRun3.py
index 814897d3f0f8d957e3c419df675de1be16e8b8ee..20786f6d39a99c1eb3e02130b6c861deb007f69d 100644
--- a/Trigger/TriggerCommon/TrigEDMConfig/python/TriggerEDMRun3.py
+++ b/Trigger/TriggerCommon/TrigEDMConfig/python/TriggerEDMRun3.py
@@ -871,8 +871,16 @@ TriggerHLTListRun3 = [
     ('xAOD::TrigCompositeContainer#HLT_vtx_z', 'BS ESD AODFULL', 'MinBias' ,'inViews:ZVertFinderRecoViews'),
     ('xAOD::TrigCompositeAuxContainer#HLT_vtx_zAux.zfinder_vtx_z.zfinder_vtx_weight.zfinder_tool', 'BS ESD AODFULL', 'MinBias'),
 
+    ('xAOD::AFPSiHitsClusterContainer#HLT_AFPSiHitsClusterContainer', 'BS ESD AODFULL', 'MinBias'),
+    ('xAOD::AFPSiHitsClusterAuxContainer#HLT_AFPSiHitsClusterContainerAux.', 'BS ESD AODFULL', 'MinBias'),
     ('xAOD::AFPTrackContainer#HLT_AFPTrackContainer', 'BS ESD AODFULL', 'MinBias'),
     ('xAOD::AFPTrackAuxContainer#HLT_AFPTrackContainerAux.', 'BS ESD AODFULL', 'MinBias'),
+    ('xAOD::AFPToFTrackContainer#HLT_AFPToFTrackContainer', 'BS ESD AODFULL', 'MinBias'),
+    ('xAOD::AFPToFTrackAuxContainer#HLT_AFPToFTrackContainerAux.', 'BS ESD AODFULL', 'MinBias'),
+    ('xAOD::AFPProtonContainer#HLT_AFPProtonContainer', 'BS ESD AODFULL', 'MinBias'),
+    ('xAOD::AFPProtonAuxContainer#HLT_AFPProtonContainerAux.', 'BS ESD AODFULL', 'MinBias'),
+    ('xAOD::AFPVertexContainer#HLT_AFPVertexContainer', 'BS ESD AODFULL', 'MinBias'),
+    ('xAOD::AFPVertexAuxContainer#HLT_AFPVertexContainerAux.', 'BS ESD AODFULL', 'MinBias'),
 
     # Cosmic
     ('xAOD::TrackParticleContainer#HLT_IDTrack_Cosmic_FTF',                 'BS ESD AODFULL', 'Cosmic'),
diff --git a/Trigger/TriggerCommon/TriggerMenuMT/python/HLT/MinBias/AFPMenuSequence.py b/Trigger/TriggerCommon/TriggerMenuMT/python/HLT/MinBias/AFPMenuSequence.py
index 162deca6804ba8d078f367c198726321c0c47d29..7237f108da8de44009ac429dbbfb83ce257156cb 100644
--- a/Trigger/TriggerCommon/TriggerMenuMT/python/HLT/MinBias/AFPMenuSequence.py
+++ b/Trigger/TriggerCommon/TriggerMenuMT/python/HLT/MinBias/AFPMenuSequence.py
@@ -1,120 +1,53 @@
 # 
-#  Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration 
+#  Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration 
 #
-
 from AthenaConfiguration.AllConfigFlags import ConfigFlags 
 from TriggerMenuMT.HLT.Menu.MenuComponents import MenuSequence
 from AthenaCommon.CFElements import parOR, seqAND
 from AthenaConfiguration.ComponentAccumulator import conf2toConfigurable
+from AthenaConfiguration.ComponentFactory import CompFactory
 from DecisionHandling.DecisionHandlingConf import InputMakerForRoI, ViewCreatorInitialROITool
-from TrigEDMConfig.TriggerEDMRun3 import recordable
 from TriggerMenuMT.HLT.Menu.MenuComponents import RecoFragmentsPool
 
+
 def AFPTrkRecoBaseSequence(ConfigFlags):
 
     # Create inputs using input maker
     AFPInputMaker = InputMakerForRoI("IM_AFPTrackingFS")
     AFPInputMaker.RoITool = ViewCreatorInitialROITool()
     AFPInputMaker.RoIs = "AFPRoIs"
-
-
-    from AFP_ByteStream2RawCnv.AFP_ByteStream2RawCnvConf import AFP_RawDataProvider
-    AFP_Raw = AFP_RawDataProvider()
-
-    from AFP_Raw2Digi.AFP_Raw2DigiConf import AFP_Raw2Digi
-    AFP_R2D = AFP_Raw2Digi()
     
-    # SiD part
-    # setup clustering tool
-    from AthenaConfiguration.ComponentFactory import CompFactory
-    clusterNeighbour = CompFactory.getComp("AFPSiClusterBasicNearestNeighbour")("AFPSiClusterBasicNearestNeighbour")
-    rowColToLocal = CompFactory.getComp("AFPSiRowColToLocalCSTool")("AFPSiRowColToLocalCSTool")
-    clusterTool = CompFactory.getComp("AFPSiClusterTool")("AFPSiClusterTool", clusterAlgTool=clusterNeighbour, rowColToLocalCSTool = rowColToLocal)
-    from AFP_SiClusterTools.AFP_SiClusterToolsConf import AFPSiCluster
-    AFP_SiCl = AFPSiCluster("AFPSiCluster", clusterRecoTool = clusterTool)
-    
-    # setup track reconstruction algorithm tools
-    kalmanTool0 = CompFactory.getComp("AFPSiDBasicKalmanTool")("AFPSiDBasicKalmanTool0", stationID=0, tracksContainerName = recordable("HLT_AFPTrackContainer"))
-    kalmanTool1 = CompFactory.getComp("AFPSiDBasicKalmanTool")("AFPSiDBasicKalmanTool1", stationID=1, tracksContainerName = recordable("HLT_AFPTrackContainer"))
-    kalmanTool2 = CompFactory.getComp("AFPSiDBasicKalmanTool")("AFPSiDBasicKalmanTool2", stationID=2, tracksContainerName = recordable("HLT_AFPTrackContainer"))
-    kalmanTool3 = CompFactory.getComp("AFPSiDBasicKalmanTool")("AFPSiDBasicKalmanTool3", stationID=3, tracksContainerName = recordable("HLT_AFPTrackContainer"))
-    kalmanToolsList=[kalmanTool0, kalmanTool1, kalmanTool2, kalmanTool3]
-    # collect all output names and make a list with unique names for write handle keys; if this goes wrong AFP_SIDLocRecoTool::initialize() will complain
-    outputKalmanList=[]
-    for kalmanTool in kalmanToolsList:
-        try:
-            # in case the "tracksContainerName" is set
-            contName=getattr(kalmanTool, "tracksContainerName")
-        except AttributeError:
-            # in case the "tracksContainerName" is not set
-            contName=kalmanTool.getDefaultProperty("tracksContainerName")
-        if contName not in outputKalmanList:
-            outputKalmanList.append(contName)
-    trackRecoTool = CompFactory.getComp("AFP_SIDLocRecoTool")("AFP_SIDLocRecoTool", RecoToolsList=kalmanToolsList, AFPTrackContainerList=outputKalmanList )
-    from AFP_LocReco.AFP_LocRecoConf import AFP_SIDLocReco
-    AFP_SID = AFP_SIDLocReco("AFP_SIDLocReco", recoTool = trackRecoTool)
+    from AthenaCommon.GlobalFlags import globalflags
+
+    if globalflags.InputFormat.is_bytestream():
+        # bytestream convertor
+        AFP_Raw=CompFactory.AFP_RawDataProvider("AFP_RawDataProvider")
+
+        # digitalization
+        AFP_R2D=CompFactory.AFP_Raw2Digi("AFP_Raw2Digi")
+  
+    #cluster reconstruction
+    from AFP_SiClusterTools.AFP_SiClusterTools_joboption import AFP_SiClusterTools_HLT
+    AFP_SiCl=AFP_SiClusterTools_HLT()
+  
+    # tracks reconstruction
+    from AFP_LocReco.AFP_LocReco_joboption import AFP_LocReco_SiD_HLT, AFP_LocReco_TD_HLT
+    AFP_SID=AFP_LocReco_SiD_HLT()
+    AFP_TD=AFP_LocReco_TD_HLT()
+   
+    # protons reconstruction
+    from AFP_GlobReco.AFP_GlobReco_joboption import AFP_GlobReco_HLT
+    AFP_Pr=AFP_GlobReco_HLT()
+  
+    # vertex reconstruction
+    from AFP_VertexReco.AFP_VertexReco_joboption import AFP_VertexReco_HLT
+    AFP_Vtx=AFP_VertexReco_HLT()
+  
+    if globalflags.InputFormat.is_bytestream():
+        AFPRecoSeq = parOR("AFPRecoSeq", [AFP_Raw, AFP_R2D, AFP_SiCl, AFP_SID, AFP_TD, AFP_Pr, AFP_Vtx])    
+    else:
+        AFPRecoSeq = parOR("AFPRecoSeq", [AFP_SiCl, AFP_SID, AFP_TD, AFP_Pr, AFP_Vtx]) 
     
-    
-    from AthenaMonitoringKernel.GenericMonitoringTool import GenericMonitoringTool
-    
-    monTool_AFP_SiClusterTool = GenericMonitoringTool("MonTool_AFP_SiClusterTool")
-    monTool_AFP_SiClusterTool.defineHistogram( 'HitsSize', path='EXPERT', type='TH1F', title='SID hits size',xbins=50, xmin=0, xmax=50 )
-    monTool_AFP_SiClusterTool.defineHistogram( 'ClusterSize', path='EXPERT', type='TH1F', title='SID cluster size',xbins=50, xmin=0, xmax=50 )
-    AFP_SiCl.clusterRecoTool.MonTool = monTool_AFP_SiClusterTool
-    
-    
-    monTool_AFP_SIDLocRecoTool = GenericMonitoringTool("MonTool_AFP_SIDLocRecoTool")
-    monTool_AFP_SIDLocRecoTool.defineHistogram( 'TrkSize', path='EXPERT', type='TH1F', title='AFP tracks size',xbins=50, xmin=0, xmax=100 )
-    AFP_SID.recoTool.MonTool = monTool_AFP_SIDLocRecoTool
-    
-    for i, kalmanTool in enumerate(kalmanToolsList):
-        monTool_AFP_BasicKalman = GenericMonitoringTool("MonTool_AFP_"+kalmanTool.name())
-    
-        monTool_AFP_BasicKalman.defineHistogram( 'TrkStationID', path='EXPERT', type='TH1F', title='Track station ID',xbins=4, xmin=0, xmax=4 )
-        monTool_AFP_BasicKalman.defineHistogram( 'TrkXLocal', path='EXPERT', type='TH1F', title='Track xLocal',xbins=100, xmin=-200, xmax=200 )
-        monTool_AFP_BasicKalman.defineHistogram( 'TrkYLocal', path='EXPERT', type='TH1F', title='Track yLocal',xbins=100, xmin=-30, xmax=30 )
-        monTool_AFP_BasicKalman.defineHistogram( 'TrkZLocal', path='EXPERT', type='TH1F', title='Track zLocal',xbins=100, xmin=-500000, xmax=500000 )
-        monTool_AFP_BasicKalman.defineHistogram( 'TrkXSlope', path='EXPERT', type='TH1F', title='Track x slope',xbins=100, xmin=-0.5, xmax=0.5 )
-        monTool_AFP_BasicKalman.defineHistogram( 'TrkYSlope', path='EXPERT', type='TH1F', title='Track y slope',xbins=100, xmin=-0.5, xmax=0.5 )
-        monTool_AFP_BasicKalman.defineHistogram( 'TrkNClusters', path='EXPERT', type='TH1F', title='Track number of clusters',xbins=100, xmin=0, xmax=100 )
-        monTool_AFP_BasicKalman.defineHistogram( 'TrkNHoles', path='EXPERT', type='TH1F', title='Track number of holes',xbins=100, xmin=0, xmax=100 )
-        monTool_AFP_BasicKalman.defineHistogram( 'TrkChi2', path='EXPERT', type='TH1F', title='Track chi2',xbins=50, xmin=0, xmax=10 )
-
-        AFP_SID.recoTool.RecoToolsList[i].MonTool = monTool_AFP_BasicKalman
-    
-    
-    # TID part
-    BarWeight = [1.0, 1.0, 1.0, 1.0] 
-    TimeOffset0 = [105707, 105670, 105675, 105638,
-                   105834, 105819, 105778, 105754,
-                   105900, 105892, 105870, 105820,
-                   105726, 105720, 105714, 105717]
-    basicTool0 = CompFactory.getComp("AFPTDBasicTool")("AFPTDBasicTool0", stationID=0, maxAllowedLength=100, TimeOffset=TimeOffset0, BarWeight=BarWeight)
-    TimeOffset3 = [105796, 105761, 105742, 105696,
-                   105890, 105871, 105839, 105816,
-                   105923, 105899, 105862, 105853,
-                   105707, 105711, 105714, 105713]
-    basicTool3 = CompFactory.getComp("AFPTDBasicTool")("AFPTDBasicTool3", stationID=3, maxAllowedLength=100, TimeOffset=TimeOffset3, BarWeight=BarWeight)
-    basicToolsList=[basicTool0, basicTool3]
-    # collect all output names and make a list with unique names for write handle keys; if this goes wrong AFP_SIDLocRecoTool::initialize() will complain
-    outputBasicList=[]
-    for basicTool in basicToolsList:
-        try:
-            # in case the "tracksContainerName" is set
-            contName=getattr(basicTool, "tracksContainerName")
-        except AttributeError:
-            # in case the "tracksContainerName" is not set
-            contName=basicTool.getDefaultProperty("tracksContainerName")
-        if contName not in outputBasicList:
-            outputBasicList.append(contName)
-    ToFtrackRecoTool = CompFactory.getComp("AFP_TDLocRecoTool")("AFP_TDLocRecoTool", RecoToolsList=basicToolsList, AFPToFTrackContainerList=outputBasicList )
-    from AFP_LocReco.AFP_LocRecoConf import AFP_TDLocReco
-    AFP_TD = AFP_TDLocReco("AFP_TDLocReco", recoTool=ToFtrackRecoTool)
-
-    # AFP_Proton part to be added here
-
-    AFPRecoSeq = parOR("AFPRecoSeq", [AFP_Raw, AFP_R2D, AFP_SiCl, AFP_SID, AFP_TD])    
-
     return (AFPRecoSeq, AFPInputMaker)