From 7de09d6228e8a723d25c1f0563b65a70601de60e Mon Sep 17 00:00:00 2001
From: Atlas-Software Librarian <Atlas-Software.Librarian@cern.ch>
Date: Fri, 8 Apr 2016 17:52:41 +0200
Subject: [PATCH] 'CMakeLists.txt' (MuonSegmentMatchingTools-01-00-11)

	* fixed bug due to Coverity defects
	* tagging MuonSegmentMatchingTools-01-00-11
---
 .../MuonSegmentMatchingTools/CMakeLists.txt   | 37 +++++++++++++++++++
 .../src/MuonSegmentMatchingTool.cxx           | 12 ++----
 2 files changed, 41 insertions(+), 8 deletions(-)
 create mode 100644 MuonSpectrometer/MuonReconstruction/MuonSegmentMakers/MuonSegmentMakerTools/MuonSegmentMatchingTools/CMakeLists.txt

diff --git a/MuonSpectrometer/MuonReconstruction/MuonSegmentMakers/MuonSegmentMakerTools/MuonSegmentMatchingTools/CMakeLists.txt b/MuonSpectrometer/MuonReconstruction/MuonSegmentMakers/MuonSegmentMakerTools/MuonSegmentMatchingTools/CMakeLists.txt
new file mode 100644
index 00000000000..bd1760290d3
--- /dev/null
+++ b/MuonSpectrometer/MuonReconstruction/MuonSegmentMakers/MuonSegmentMakerTools/MuonSegmentMatchingTools/CMakeLists.txt
@@ -0,0 +1,37 @@
+################################################################################
+# Package: MuonSegmentMatchingTools
+################################################################################
+
+# Declare the package name:
+atlas_subdir( MuonSegmentMatchingTools )
+
+# Declare the package's dependencies:
+atlas_depends_on_subdirs( PRIVATE
+                          Control/AthenaBaseComps
+                          DetectorDescription/GeoPrimitives
+                          GaudiKernel
+                          MagneticField/MagFieldInterfaces
+                          MuonSpectrometer/MuonDetDescr/MuonReadoutGeometry
+                          MuonSpectrometer/MuonIdHelpers
+                          MuonSpectrometer/MuonReconstruction/MuonRecEvent/MuonRIO_OnTrack
+                          MuonSpectrometer/MuonReconstruction/MuonRecEvent/MuonSegment
+                          MuonSpectrometer/MuonReconstruction/MuonRecTools/MuonRecHelperTools
+                          MuonSpectrometer/MuonReconstruction/MuonSegmentMakers/MuonSegmentMakerTools/MuonSegmentMakerToolInterfaces
+                          Tracking/TrkDetDescr/TrkDetDescrUtils
+                          Tracking/TrkDetDescr/TrkGeometry
+                          Tracking/TrkEvent/TrkEventPrimitives
+                          Tracking/TrkEvent/TrkParameters
+                          Tracking/TrkEvent/TrkTrack
+                          Tracking/TrkExtrapolation/TrkExInterfaces
+                          Tracking/TrkTools/TrkToolInterfaces )
+
+# External dependencies:
+find_package( Eigen )
+
+# Component(s) in the package:
+atlas_add_component( MuonSegmentMatchingTools
+                     src/*.cxx
+                     src/components/*.cxx
+                     INCLUDE_DIRS ${EIGEN_INCLUDE_DIRS}
+                     LINK_LIBRARIES ${EIGEN_LIBRARIES} AthenaBaseComps GeoPrimitives GaudiKernel MagFieldInterfaces MuonReadoutGeometry MuonIdHelpersLib MuonRIO_OnTrack MuonSegment MuonRecHelperToolsLib TrkDetDescrUtils TrkGeometry TrkEventPrimitives TrkParameters TrkTrack TrkExInterfaces TrkToolInterfaces )
+
diff --git a/MuonSpectrometer/MuonReconstruction/MuonSegmentMakers/MuonSegmentMakerTools/MuonSegmentMatchingTools/src/MuonSegmentMatchingTool.cxx b/MuonSpectrometer/MuonReconstruction/MuonSegmentMakers/MuonSegmentMakerTools/MuonSegmentMatchingTools/src/MuonSegmentMatchingTool.cxx
index 4b0ee9e6759..e7fcce49523 100644
--- a/MuonSpectrometer/MuonReconstruction/MuonSegmentMakers/MuonSegmentMakerTools/MuonSegmentMatchingTools/src/MuonSegmentMatchingTool.cxx
+++ b/MuonSpectrometer/MuonReconstruction/MuonSegmentMakers/MuonSegmentMakerTools/MuonSegmentMatchingTools/src/MuonSegmentMatchingTool.cxx
@@ -648,8 +648,7 @@ namespace Muon {
       }
     }
     // Endcap inner to middle station 
-    else if ( station_a == MuonStationIndex::EI &&
-	      (station_b == MuonStationIndex::EM) ) {
+    else if ( (station_a == MuonStationIndex::EI||station_a == MuonStationIndex::BI) && station_b == MuonStationIndex::EM ) {
       if( result.phiSector_a%2==0){
 	if ( result.deltaTheta > m_matchingeiem_sphisec ) {
 	  return false;
@@ -1101,14 +1100,11 @@ namespace Muon {
     if( useTightCuts ) drCut *= 2;
     else               drCut *= 4;
 
-    /*
-    //can't be true currently
-    if( (stIndex1 == MuonStationIndex::EM && stIndex2 == MuonStationIndex::BI) || (stIndex1 == MuonStationIndex::BI && stIndex2 == MuonStationInde)){
+    if( (stIndex1 == MuonStationIndex::EM && stIndex2 == MuonStationIndex::BI) || (stIndex1 == MuonStationIndex::BI && stIndex2 == MuonStationIndex::EM) ){
       drCut += 3*m_drExtrapAlignmentOffset;
     }else{
-    */
-    drCut += m_drExtrapAlignmentOffset;
-    
+      drCut += m_drExtrapAlignmentOffset;
+    }
 
     double dthetaCut = m_dthetaExtrapRMS + 1.5e3*rhoInv;
     if( useTightCuts ) dthetaCut *= 2;
-- 
GitLab