From 5db14dafe1f55b8fb1eabb30ea108dfa972aad35 Mon Sep 17 00:00:00 2001
From: Stewart Martin-Haugh <smh@cern.ch>
Date: Mon, 8 May 2017 11:54:30 +0200
Subject: [PATCH] Fix FTF configuration and test

---
 .../python/TrigFastTrackFinderMT_Config.py             |  2 +-
 .../TrigFastTrackFinder/src/TrigFastTrackFinderMT.cxx  |  6 ++++++
 .../ViewAlgsTest/share/BasicMTTrackingTrigger.py       |  7 ++++---
 .../ViewAlgsTest/share/ID_RawDataMT_Trigger.py         | 10 ++++++++++
 4 files changed, 21 insertions(+), 4 deletions(-)

diff --git a/Trigger/TrigAlgorithms/TrigFastTrackFinder/python/TrigFastTrackFinderMT_Config.py b/Trigger/TrigAlgorithms/TrigFastTrackFinder/python/TrigFastTrackFinderMT_Config.py
index c56fd908024..8aa2809f764 100644
--- a/Trigger/TrigAlgorithms/TrigFastTrackFinder/python/TrigFastTrackFinderMT_Config.py
+++ b/Trigger/TrigAlgorithms/TrigFastTrackFinder/python/TrigFastTrackFinderMT_Config.py
@@ -82,7 +82,7 @@ class TrigFastTrackFinderMTBase(TrigFastTrackFinderMT):
                                                                    DisableDistortions = False,
                                                                    applyNNcorrection = False,
                                                                    NNIBLcorrection = False,
-                                                                   SplitClusterAmbiguityMap = InDetKeys.SplitClusterAmbiguityMap(),
+                                                                   SplitClusterAmbiguityMap = "",
                                                                    RunningTIDE_Ambi = False,
                                                                    ErrorStrategy = 2,
                                                                    PositionStrategy = 1 
diff --git a/Trigger/TrigAlgorithms/TrigFastTrackFinder/src/TrigFastTrackFinderMT.cxx b/Trigger/TrigAlgorithms/TrigFastTrackFinder/src/TrigFastTrackFinderMT.cxx
index 45c30076aa1..3a391a8be66 100644
--- a/Trigger/TrigAlgorithms/TrigFastTrackFinder/src/TrigFastTrackFinderMT.cxx
+++ b/Trigger/TrigAlgorithms/TrigFastTrackFinder/src/TrigFastTrackFinderMT.cxx
@@ -154,6 +154,8 @@ TrigFastTrackFinderMT::TrigFastTrackFinderMT(const std::string& name, ISvcLocato
   declareProperty("TracksName", 
                   m_outputTracksKey = std::string("TrigFastTrackFinder_Tracks"),
                   "TrackCollection name");
+
+  declareProperty("RoIs", m_roiCollectionKey = std::string("OutputRoIs"), "RoIs to read in");
  
   declareProperty( "UseBeamSpot",           m_useBeamSpot = true);
   declareProperty( "FreeClustersCut"   ,m_nfreeCut      );
@@ -263,6 +265,8 @@ TrigFastTrackFinderMT::~TrigFastTrackFinderMT() {}
 
 
 StatusCode TrigFastTrackFinderMT::initialize() {
+  ATH_CHECK( m_roiCollectionKey.initialize() );
+  ATH_CHECK( m_outputTracksKey.initialize() );
   HLT::ErrorCode code = hltInitialize();
   if (code != HLT::OK) {
     return StatusCode::FAILURE;
@@ -462,6 +466,7 @@ StatusCode TrigFastTrackFinderMT::execute() {
   internalRoI.manageConstituents(false);//Don't try to delete RoIs at the end
   m_currentStage = 1;
   m_countTotalRoI++;
+  m_tcs.roiDescriptor = &internalRoI;
 
   m_outputTracksKey = m_attachedFeatureName;
   SG::WriteHandle<TrackCollection> outputTracks(m_outputTracksKey);
@@ -476,6 +481,7 @@ HLT::ErrorCode TrigFastTrackFinderMT::hltExecute(const HLT::TriggerElement* /*in
     HLT::TriggerElement* outputTE) {
   const IRoiDescriptor* internalRoI;
   HLT::ErrorCode ec = getRoI(outputTE, internalRoI);
+  m_tcs.roiDescriptor = internalRoI;
   if(ec != HLT::OK) {
     return ec;
   }
diff --git a/Trigger/TrigSteer/ViewAlgsTest/share/BasicMTTrackingTrigger.py b/Trigger/TrigSteer/ViewAlgsTest/share/BasicMTTrackingTrigger.py
index 935188b9ad1..031e5daacea 100644
--- a/Trigger/TrigSteer/ViewAlgsTest/share/BasicMTTrackingTrigger.py
+++ b/Trigger/TrigSteer/ViewAlgsTest/share/BasicMTTrackingTrigger.py
@@ -21,6 +21,7 @@ from AthenaCommon.AppMgr import ServiceMgr as svcMgr
 from AthenaCommon.AlgScheduler import AlgScheduler
 AlgScheduler.CheckDependencies( True )
 AlgScheduler.OutputLevel( VERBOSE )
+AlgScheduler.ShowDataDependencies( True )
 
 ## get a handle on the ServiceManager
 from AthenaCommon.AlgSequence import AlgSequence
@@ -219,8 +220,8 @@ InDetSiTrackerSpacePointFinder = InDet__SiTrackerSpacePointFinder(name
                                                                   SiSpacePointMakerTool  = InDetSiSpacePointMakerTool,
                                                                   PixelsClustersName     = InDetKeys.PixelClusters(),
                                                                   SCT_ClustersName       = InDetKeys.SCT_Clusters(),
-                                                                  SpacePointsPixelName   = 'PixelTrigSpacePoints',
-                                                                  SpacePointsSCTName     = 'SCT_TrigSpacePoints',
+                                                                  SpacePointsPixelName   = InDetKeys.PixelSpacePoints(),
+                                                                  SpacePointsSCTName     = InDetKeys.SCT_SpacePoints(),
                                                                   SpacePointsOverlapName = InDetKeys.OverlapSpacePoints(),
                                                                   ProcessPixels          = DetFlags.haveRIO.pixel_on(),
                                                                   ProcessSCTs            = DetFlags.haveRIO.SCT_on(),
@@ -231,7 +232,7 @@ topSequence += InDetSiTrackerSpacePointFinder
 from TrigFastTrackFinder.TrigFastTrackFinderMT_Config import TrigFastTrackFinderMT_eGamma
 theFTFMT = TrigFastTrackFinderMT_eGamma()
 
-#topSequence += theFTFMT
+topSequence += theFTFMT
 log.info(theFTFMT)
 
 #probably initialized only in trigger=True?
diff --git a/Trigger/TrigSteer/ViewAlgsTest/share/ID_RawDataMT_Trigger.py b/Trigger/TrigSteer/ViewAlgsTest/share/ID_RawDataMT_Trigger.py
index e619151d1c8..17dfa8533b0 100644
--- a/Trigger/TrigSteer/ViewAlgsTest/share/ID_RawDataMT_Trigger.py
+++ b/Trigger/TrigSteer/ViewAlgsTest/share/ID_RawDataMT_Trigger.py
@@ -12,6 +12,7 @@ globalflags.DatabaseInstance.set_Value_and_Lock('CONDBR2')
 
 from AthenaCommon.AlgScheduler import AlgScheduler
 AlgScheduler.OutputLevel( INFO )
+AlgScheduler.CheckDependencies( True )
 AlgScheduler.ShowControlFlow( True )
 AlgScheduler.ShowDataDependencies( True )
  
@@ -56,6 +57,15 @@ from AtlasGeoModel import GeoModelInit
 from AthenaCommon.AlgSequence import AlgSequence 
 topSequence = AlgSequence()
 
+from AthenaCommon.AlgSequence import AthSequencer
+condSeq = AthSequencer("AthCondSeq")
+
+if not hasattr( topSequence, "xAODMaker::EventInfoCnvAlg" ) :
+    from xAODEventInfoCnv.xAODEventInfoCreator import xAODMaker__EventInfoCnvAlg
+    condSeq+=xAODMaker__EventInfoCnvAlg()
+    pass
+
+
 include( "ByteStreamCnvSvc/BSEventStorageEventSelector_jobOptions.py" )
 inputfile="root://eosatlas//eos/atlas/atlascerngroupdisk/trig-daq/validation/test_data/data16_13TeV.00309640.physics_EnhancedBias.merge.RAW/data16_13TeV.00309640.physics_EnhancedBias.merge.RAW._lb0628._SFO-1._0001.1"
 svcMgr.ByteStreamInputSvc.FullFileName=[inputfile,]
-- 
GitLab