Skip to content

Commit 648018b

Browse files
committed
Fix in accounting cached V0
1 parent cbce528 commit 648018b

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

Detectors/Vertexing/src/SVertexer.cxx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@ void SVertexer::process(const gsl::span<const PVertex>& vertices, // primary v
169169
// check cos of pointing angle
170170
float dz = v0pos[2] - pv.getZ(), cosPointingAngle = (prodXY + dz * pV0[2]) / std::sqrt((dx * dx + dy * dy + dz * dz) * p2V0);
171171
if (cosPointingAngle < mMinCosPointingAngle) {
172-
if (ambiguousV0) {
172+
if (!ambiguousV0) {
173173
continue; // no need to check this pair wrt other vertices
174174
}
175175
cosPointingAngle = mMinCosPointingAngle - 1e-6;
@@ -203,6 +203,7 @@ void SVertexer::process(const gsl::span<const PVertex>& vertices, // primary v
203203
if (cosPointingAngle > v0.getCosPA()) { // reassign
204204
v0.setCosPA(cosPointingAngle);
205205
v0.setVertexID(iv);
206+
v0sIdx.push_back(*resPair);
206207
pvrefs.changeEntriesBy(1);
207208
}
208209
}

0 commit comments

Comments
 (0)