Skip to content
Snippets Groups Projects

KalmanVertexUpdator performance tuning for use in AMVF

All threads resolved!
1 file
+ 7
8
Compare changes
  • Side-by-side
  • Inline
@@ -55,12 +55,11 @@ namespace Trk{
{
//getting tracks at vertex
std::vector<Trk::VxTrackAtVertex>* tracksAtVertex( &vtx.vxTrackAtVertex() );
int tr_size = tracksAtVertex->size();
std::vector<Trk::VxTrackAtVertex> & tracksAtVertex = vtx.vxTrackAtVertex();
//in case one wants to remove the track, one should be sure that this track
//is already fitted to the vertex and the number of tracks at vertex is not 0
if( sign < 0 && tr_size == 0 )
if( sign < 0 && tracksAtVertex.size() == 0 )
{
msg(MSG::ERROR) << "No tracks fitted to this vertex yet: can not remove any" << endmsg;
msg(MSG::ERROR) << "The copy of initial VxCandidate returned" << endmsg;
@@ -68,9 +67,9 @@ namespace Trk{
}
//trying to find requested track
auto righttrack = std::find(tracksAtVertex->begin(), tracksAtVertex->end(), trk);
auto righttrack = std::find(tracksAtVertex.begin(), tracksAtVertex.end(), trk);
if (righttrack == tracksAtVertex->end())
if (righttrack == tracksAtVertex.end())
{
ATH_MSG_VERBOSE ("The track requested for removal or adding is not found in the vector of tracks");
if (sign<0) {
@@ -79,8 +78,8 @@ namespace Trk{
return &vtx;
}
tracksAtVertex->push_back( trk ); // tracksAtVertex stores the objects themselves in xAOD EDM and not pointers to them - this simply calls the copy constructor
righttrack = tracksAtVertex->end()-1; // vector::end() returns an iterator referring to the "past-the-end" element and thus does not point to any element!
tracksAtVertex.push_back( trk ); // tracksAtVertex stores the objects themselves in xAOD EDM and not pointers to them - this simply calls the copy constructor
righttrack = tracksAtVertex.end()-1; // vector::end() returns an iterator referring to the "past-the-end" element and thus does not point to any element!
ATH_MSG_VERBOSE ("Updating vertex with new track which is still not attached to vertex. Adding it before updating...");
}
@@ -116,7 +115,7 @@ namespace Trk{
if( sign < 0 )
{
tracksAtVertex->erase( righttrack );
tracksAtVertex.erase( righttrack );
}
return &vtx;
Loading