diff --git a/Tracking/TrkEvent/VxJetVertex/VxJetVertex/VxClusteringTable.h b/Tracking/TrkEvent/VxJetVertex/VxJetVertex/VxClusteringTable.h
index cf36816cf50123f8c6917875f7b6b3ba2a73e408..ffff1e7551f551822a507880f0078aed6d0fafa5 100644
--- a/Tracking/TrkEvent/VxJetVertex/VxJetVertex/VxClusteringTable.h
+++ b/Tracking/TrkEvent/VxJetVertex/VxJetVertex/VxClusteringTable.h
@@ -10,10 +10,14 @@
               Christian Weiser (University of Freiburg)
     e-mails:  giacinto.piacquadio@physik.uni-freiburg.de)
               christian.weiser@cern.ch
-    changes: new!
 
    (c) Atlas Collaboration 2007
 
+   (1) November 6, 2016
+       adding support for differentiating between pair of probabilities with PV or without      
+       Giacinto Piacquadio (Stony Brook University)
+       giacinto.piacquadio@stonybrook.edu
+
    This class stores the information about the compatiblity of the vertices fitted 
    on the Jet Axis among themselves and with the Primary Vertex.
 
@@ -33,6 +37,7 @@
 #include "VxJetVertex/PairOfVxVertexOnJetAxis.h"
 #include <map>
  
+
 namespace Trk {
 
   class VxVertexOnJetAxis;
@@ -71,7 +76,13 @@ namespace Trk {
     const std::map<float,PairOfVxVertexOnJetAxis> & 
       getCompatibilityPairOfVertices(void) const;
     
-
+  /**
+   * Get pair of vertices with highest compatibility, removing cases with primary
+   */
+ 
+    PairOfVxVertexOnJetAxis getMostCompatibleVerticesExcludingPrimary(float & probability) const;
+    
+ 
 
   /** 
    * Output Method for MsgStream, to be overloaded by child classes 
diff --git a/Tracking/TrkEvent/VxJetVertex/src/VxClusteringTable.cxx b/Tracking/TrkEvent/VxJetVertex/src/VxClusteringTable.cxx
index 969d77bb6c81c1b753fb27c05aa66db6a8cbb80d..5a6421dc6e30481e5fd3dd32d4eb219e9b3a7f15 100644
--- a/Tracking/TrkEvent/VxJetVertex/src/VxClusteringTable.cxx
+++ b/Tracking/TrkEvent/VxJetVertex/src/VxClusteringTable.cxx
@@ -40,12 +40,12 @@ namespace Trk {
   }
   
   MsgStream& VxClusteringTable::dump(MsgStream& sl) const {
-    sl << "Trk::VxClusteringTable:" << endreq;
+    sl << "Trk::VxClusteringTable:" << endmsg;
     if (m_compatibilityPairOfVertices.size()==0) {
-      sl << "No couple of vertices contained in the table " << endreq;
+      sl << "No couple of vertices contained in the table " << endmsg;
     } else {
-      sl << "Numbers of compatibilities store: " << m_compatibilityPairOfVertices.size() << endreq;;
-      sl << "Highest probability: " << m_compatibilityPairOfVertices.rbegin()->first << endreq;;
+      sl << "Numbers of compatibilities store: " << m_compatibilityPairOfVertices.size() << endmsg;;
+      sl << "Highest probability: " << m_compatibilityPairOfVertices.rbegin()->first << endmsg;;
       
       std::map<float,PairOfVxVertexOnJetAxis>::const_iterator CompBegin=m_compatibilityPairOfVertices.begin();
       std::map<float,PairOfVxVertexOnJetAxis>::const_iterator CompEnd=m_compatibilityPairOfVertices.end();
@@ -55,7 +55,7 @@ namespace Trk {
 	
 	sl << " Compatibility between track n " << (*CompIter).second.first->getNumVertex() << 
 	  " and " << (*CompIter).second.second->getNumVertex() << " is " << (*CompIter).first << 
-	  endreq;
+	  endmsg;
 	
       }   
       
@@ -127,4 +127,40 @@ namespace Trk {
     
   }
 
+  PairOfVxVertexOnJetAxis VxClusteringTable::getMostCompatibleVerticesExcludingPrimary(float & probability) const 
+  {
+    
+    std::map<float,PairOfVxVertexOnJetAxis>::const_reverse_iterator revIteratorEnd=m_compatibilityPairOfVertices.rbegin();
+    std::map<float,PairOfVxVertexOnJetAxis>::const_reverse_iterator revIterator=revIteratorEnd;
+    std::map<float,PairOfVxVertexOnJetAxis>::const_reverse_iterator pairHighest=revIteratorEnd;
+    
+    bool found(false);
+    for ( ; revIterator!=m_compatibilityPairOfVertices.rend() ; revIterator++)
+    {
+      
+      const PairOfVxVertexOnJetAxis & myVxVertex=(*revIterator).second;
+      VxVertexOnJetAxis* firstVertex=myVxVertex.first;
+      VxVertexOnJetAxis* secondVertex=myVxVertex.second;
+      
+      if (firstVertex->getNumVertex()==-10 || secondVertex->getNumVertex()==-10)
+      {
+        continue;
+      }
+      
+      found=true;
+      pairHighest=revIterator;
+      break;
+    }
+    
+ 
+    if (!found)
+    {
+      probability=0;
+      return PairOfVxVertexOnJetAxis();
+    }
+ 
+    probability=(*pairHighest).first;
+    return (*pairHighest).second;
+  }
+ 
 }//end namespace