diff --git a/Ecal/src/Ecal/EcalVetoProcessor.cxx b/Ecal/src/Ecal/EcalVetoProcessor.cxx index fddd3f8aa..e06ee8fbd 100644 --- a/Ecal/src/Ecal/EcalVetoProcessor.cxx +++ b/Ecal/src/Ecal/EcalVetoProcessor.cxx @@ -1018,7 +1018,6 @@ void EcalVetoProcessor::produce(framework::Event &event) { if (trackingHitList.size() < 3) break; hitNums[1] = jHit; for (int kHit = jHit + 1; kHit < nHitsInRegion; kHit++) { - unsigned int numZeros = 0; hitNums[2] = kHit; for (int hInd = 0; hInd < 3; hInd++) { // hmean = geometric mean, subtract off from hits to improve SVD @@ -1030,18 +1029,17 @@ void EcalVetoProcessor::produce(framework::Event &event) { } for (int hInd = 0; hInd < 3; hInd++) { for (int lInd = 0; lInd < 3; lInd++) { - auto matrixValue = + hdt(hInd, lInd) = trackingHitList[hitNums[hInd]].pos(lInd) - hmean(lInd); - hdt(hInd, lInd) = matrixValue; - if (matrixValue == 0) numZeros++; } } // Perform "linreg" on selected points // Calculate the determinant of the matrix - double determinant = hdt(0,0)*(hdt(1,1)*hdt(2,2)-hdt(1,2)*hdt(2,1)) - -hdt(0,1)*(hdt(1,0)*hdt(2,2)-hdt(1,2)*hdt(2,0)) - +hdt(0,2)*(hdt(1,0)*hdt(2,1)-hdt(1,1)*hdt(2,0)); + double determinant = + hdt(0, 0) * (hdt(1, 1) * hdt(2, 2) - hdt(1, 2) * hdt(2, 1)) - + hdt(0, 1) * (hdt(1, 0) * hdt(2, 2) - hdt(1, 2) * hdt(2, 0)) + + hdt(0, 2) * (hdt(1, 0) * hdt(2, 1) - hdt(1, 1) * hdt(2, 0)); // Exit early if the matrix is singular (i.e. det = 0) if (determinant == 0) continue; // Perform matrix decomposition with SVD @@ -1091,8 +1089,8 @@ void EcalVetoProcessor::produce(framework::Event &event) { trackLen++; } } - } // end loop on hits in the region - } // end 2nd loop on hits in the region + } // end loop on hits in the region + } // end 2nd loop on hits in the region // Ordinarily, additional hits in line w/ track would be added here. // However, this doesn't affect the results of the simple veto. Exclude all @@ -1104,7 +1102,7 @@ void EcalVetoProcessor::produce(framework::Event &event) { } iHit--; } - } // end loop on all hits + } // end loop on all hits ldmx_log(debug) << " MIP tracking completed; found " << nStraightTracks_ << " straight tracks and " << nLinregTracks_