Skip to content

Commit 1c8fa05

Browse files
committed
SVertexer: fix in selection of vertex 1st track to check
1 parent 5556466 commit 1c8fa05

1 file changed

Lines changed: 11 additions & 3 deletions

File tree

Detectors/Vertexing/src/SVertexer.cxx

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,11 @@ void SVertexer::process(const o2::globaltracking::RecoContainer& recoData) // ac
4747
#endif
4848
for (int itp = 0; itp < ntrP; itp++) {
4949
auto& seedP = mTracksPool[POS][itp];
50-
for (int itn = mVtxFirstTrack[NEG][seedP.vBracket.getMin()]; itn < ntrN; itn++) { // start from the 1st negative track of lowest-ID vertex of positive
50+
int firstN = mVtxFirstTrack[NEG][seedP.vBracket.getMin()];
51+
if (firstN < 0) {
52+
continue;
53+
}
54+
for (int itn = firstN; itn < ntrN; itn++) { // start from the 1st negative track of lowest-ID vertex of positive
5155
auto& seedN = mTracksPool[NEG][itn];
5256
if (seedN.vBracket > seedP.vBracket) { // all vertices compatible with seedN are in future wrt that of seedP
5357
break;
@@ -69,7 +73,7 @@ void SVertexer::process(const o2::globaltracking::RecoContainer& recoData) // ac
6973
mCascadesTmp[i].clear();
7074
}
7175
#endif
72-
LOG(INFO) << "DONE : " << mV0sTmp[0].size() << " " << mCascadesTmp[0].size();
76+
LOG(DEBUG) << "DONE : " << mV0sTmp[0].size() << " " << mCascadesTmp[0].size();
7377
}
7478

7579
//__________________________________________________________________
@@ -339,7 +343,11 @@ int SVertexer::checkCascades(float rv0, std::array<float, 3> pV0, float p2V0, in
339343
const auto& pv = mPVertices[v0.getVertexID()];
340344
int nCascIni = mCascadesTmp[ithread].size();
341345
// start from the 1st track compatible with V0's primary vertex
342-
for (unsigned it = mVtxFirstTrack[posneg][v0.getVertexID()]; it < tracks.size(); it++) {
346+
int firstTr = mVtxFirstTrack[posneg][v0.getVertexID()], nTr = tracks.size();
347+
if (firstTr < 0) {
348+
firstTr = nTr;
349+
}
350+
for (int it = firstTr; it < nTr; it++) {
343351
if (it == avoidTrackID) {
344352
continue; // skip the track used by V0
345353
}

0 commit comments

Comments
 (0)