Skip to content
Snippets Groups Projects
Commit 95579576 authored by Alexandru Bercuci's avatar Alexandru Bercuci
Browse files

mark unsuccessful vertex fit with out of scope values

parent 52a6f06a
No related branches found
No related tags found
1 merge request!1939Reco QA - primary vertex
......@@ -65,8 +65,8 @@ void CbmKFPrimaryVertexFinder::Fit(CbmKFVertexInterface& vtx)
C[5] = (t.dz / 2 / 3.5) * (t.dz / 2 / 3.5);
}
int fitIterSuccess = 0; // no. of successful calculations of the vertex position out of requested MaxIter.
//* Iteratively fit vertex - number of iterations fixed at MaxIter
for (Int_t iteration = 0; iteration < MaxIter; ++iteration) {
//* Store vertex from previous iteration
......@@ -194,15 +194,21 @@ void CbmKFPrimaryVertexFinder::Fit(CbmKFVertexInterface& vtx)
C[3] -= K[2][0] * CHt[0][0] + K[2][1] * CHt[0][1];
C[4] -= K[2][0] * CHt[1][0] + K[2][1] * CHt[1][1];
C[5] -= K[2][0] * CHt[2][0] + K[2][1] * CHt[2][1];
} //* itr
} //* itr
if (vtx.GetRefNTracks()) fitIterSuccess++; // mark success of this iteration for vertex calculation
} //* finished iterations
//* Copy state vector to output (covariance matrix was used directly )
vtx.GetRefX() = r[0];
vtx.GetRefY() = r[1];
vtx.GetRefZ() = r[2];
if (fitIterSuccess) { // store successful PV calculation. May include also a reference to MaxIter (AB 17.10.2024)
vtx.GetRefX() = r[0];
vtx.GetRefY() = r[1];
vtx.GetRefZ() = r[2];
}
else {
vtx.GetRefX() = -999;
vtx.GetRefY() = -999;
vtx.GetRefZ() = -999;
}
}
int CbmKFPrimaryVertexFinder::GetUsedTracks(std::vector<uint32_t>& idx) const
......
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