Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-12-16 09:23:02

0001 // This file is part of the ACTS project.
0002 //
0003 // Copyright (C) 2016 CERN for the benefit of the ACTS project
0004 //
0005 // This Source Code Form is subject to the terms of the Mozilla Public
0006 // License, v. 2.0. If a copy of the MPL was not distributed with this
0007 // file, You can obtain one at https://mozilla.org/MPL/2.0/.
0008 
0009 #include "Acts/AmbiguityResolution/ScoreBasedAmbiguityResolution.hpp"
0010 
0011 bool Acts::ScoreBasedAmbiguityResolution::etaBasedCuts(
0012     const DetectorConfig& detector, const TrackFeatures& trackFeatures,
0013     const double& eta) const {
0014   const auto& etaBins = detector.etaBins;
0015 
0016   auto it = std::ranges::upper_bound(etaBins, eta);
0017   if (it == etaBins.begin() || it == etaBins.end()) {
0018     return false;  // eta out of range
0019   }
0020   std::size_t etaBin = std::distance(etaBins.begin(), it) - 1;
0021   return (trackFeatures.nHits < detector.minHitsPerEta[etaBin] ||
0022           trackFeatures.nHoles > detector.maxHolesPerEta[etaBin] ||
0023           trackFeatures.nOutliers > detector.maxOutliersPerEta[etaBin] ||
0024           trackFeatures.nSharedHits > detector.maxSharedHitsPerEta[etaBin]);
0025 }