Skip to content

Commit

Permalink
Dont try to put hits on the same layer
Browse files Browse the repository at this point in the history
  • Loading branch information
tvami committed Aug 29, 2024
1 parent 4be1610 commit a718692
Showing 1 changed file with 3 additions and 8 deletions.
11 changes: 3 additions & 8 deletions Ecal/src/Ecal/EcalVetoProcessor.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -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++;
}
Expand Down

0 comments on commit a718692

Please sign in to comment.