Skip to content

Commit

Permalink
fix for TOF calib
Browse files Browse the repository at this point in the history
  • Loading branch information
noferini authored and shahor02 committed Dec 17, 2023
1 parent 7ffcf31 commit 7fe5ab6
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Detectors/GlobalTracking/src/MatchTOF.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -1353,7 +1353,7 @@ int MatchTOF::findFITIndex(int bc, const gsl::span<const o2::ft0::RecPoints>& FI
}

int index = -1;
int distMax = 0;
int distMax = 10;
bool bestQuality = false; // prioritize FT0 BC with good quality (FT0-AC + vertex) to remove umbiguity in Pb-Pb (not a strict cut because inefficient in pp)
const int distThr = 8;

Expand All @@ -1369,8 +1369,8 @@ int MatchTOF::findFITIndex(int bc, const gsl::span<const o2::ft0::RecPoints>& FI
int bct0 = (ir.orbit - firstOrbit) * o2::constants::lhc::LHCMaxBunches + ir.bc;
int dist = bc - bct0;

bool worseDistance = dist < 0 || dist > distThr || dist < distMax;
if (worseDistance && (!quality || bestQuality)) { // discard if BC is later than the one selected, but is has a better quality
bool worseDistance = dist < 0 || dist > distThr || dist > distMax;
if (worseDistance) { // discard if BC is not in the proper range or it is worse than the one already found
continue;
}

Expand Down

0 comments on commit 7fe5ab6

Please sign in to comment.