Skip to content
Snippets Groups Projects
Commit 400abb4b authored by Giacinto Piacquadio's avatar Giacinto Piacquadio Committed by Graeme Stewart
Browse files

add functionality, fix endreq (VxJetVertex-00-04-09)

	* Move to branch. Tag as VxJetVertex-00-04-09

2016-11-11 Giacinto Piacquadio <giacinto.piacquadio@stonybrook.edu>
	* Bug fix in new method

2016-11-06 Giacinto Piacquadio <giacinto.piacquadio@stonybrook.edu>
	* Add functionality to VxClusteringTable


Former-commit-id: 1cfd3170
parent af3d80f8
No related merge requests found
......@@ -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
......
......@@ -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
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment