Skip to content

Commit

Permalink
add EPSILON definition
Browse files Browse the repository at this point in the history
  • Loading branch information
veprbl authored Aug 26, 2024
1 parent 1a0c37e commit cdeaf5b
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/algorithms/tracking/IterativeVertexFinder.cc
Original file line number Diff line number Diff line change
Expand Up @@ -240,8 +240,9 @@ std::unique_ptr<edm4eic::VertexCollection> eicrecon::IterativeVertexFinder::prod
const auto& traj = trk.getTrajectory();
const auto& trkPars = traj.getTrackParameters();
for (const auto par : trkPars) {
constexpr double acts_to_edm4eic = edm4eic::unit::mm / Acts::UnitConstants::mm;
if(fabs(par.getLoc().a - loc_a * acts_to_edm4eic) < 1.e-4 && fabs(par.getLoc().b - loc_b * acts_to_edm4eic) < 1.e-4) {
const double EPSILON = 1.0e-4; // mm
if (fabs((par.getLoc().a / edm4eic::unit::mm) - (loc_a / Acts::UnitConstants::mm)) < EPSILON
&& fabs((par.getLoc().b / edm4eic::unit::mm) - (loc_b / Acts::UnitConstants::mm)) < EPSILON) {
m_log->trace("From ReconParticles, track local position [Loc a, Loc b] = {} mm, {} mm", par.getLoc().a / edm4eic::unit::mm, par.getLoc().b / edm4eic::unit::mm);
eicvertex.addToAssociatedParticles(part);
} // endif
Expand Down

0 comments on commit cdeaf5b

Please sign in to comment.