From a7186923ca173fad0c38464c6661c3759a89a40a Mon Sep 17 00:00:00 2001 From: Tamas Vami Date: Wed, 28 Aug 2024 18:23:51 -0700 Subject: [PATCH] Dont try to put hits on the same layer --- Ecal/src/Ecal/EcalVetoProcessor.cxx | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/Ecal/src/Ecal/EcalVetoProcessor.cxx b/Ecal/src/Ecal/EcalVetoProcessor.cxx index 2534d860c..6ef9dc4d0 100644 --- a/Ecal/src/Ecal/EcalVetoProcessor.cxx +++ b/Ecal/src/Ecal/EcalVetoProcessor.cxx @@ -1015,17 +1015,12 @@ void EcalVetoProcessor::produce(framework::Event &event) { hitsInRegion[0] = iHit; // Find all hits within 2 cells of the primary hit: for (int jHit = 0; jHit < trackingHitList.size(); jHit++) { - // TAV: I think this could be done in a more efficient way, - // but I'll leave it to some future development - if (jHit == iHit) continue; + // Dont try to put hits on the same layer to the lin-reg track + if (trackingHitList[iHit].pos(2) == trackingHitList[jHit].pos(2)) + continue; float dstToHit = (trackingHitList[iHit].pos - trackingHitList[jHit].pos).Mag(); if (dstToHit <= 2 * cellWidth) { - std::cout << " ------------------" << std::endl; - std::cout << iHit << "-th iHit has Z = " << trackingHitList[iHit].pos(2) - << std::endl; - std::cout << jHit << "-th jHit has Z = " << trackingHitList[jHit].pos(2) - << std::endl; hitsInRegion[nHitsInRegion] = jHit; nHitsInRegion++; }