Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 09:11:04

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 #pragma once
0010 
0011 #include <map>
0012 #include <unordered_map>
0013 #include <utility>
0014 #include <vector>
0015 
0016 namespace Acts::detail {
0017 
0018 /// Cluster tracks based on shared hits.
0019 ///
0020 /// In this algorithm we will loop through all the tracks by decreasing number
0021 /// of measurements. Cluster are created when a new track is encountered that
0022 /// doesn't share hits with the leading track of a previous cluster (with the
0023 /// leading track defined as the track that lead to the cluster creation). If a
0024 /// track shares hits with the leading track of a cluster, it is added to that
0025 /// cluster. If a track shares hits with multiple clusters, it is associated to
0026 /// the cluster with the leading track with the most hits.
0027 ///
0028 /// @param trackMap : Multimap storing pair of track ID and vector of measurement ID. The keys are the number of measurement and are just there to facilitate the ordering.
0029 /// @return an unordered map representing the clusters, the keys the ID of the primary track of each cluster and the store a vector of track IDs.
0030 std::unordered_map<std::size_t, std::vector<std::size_t>>
0031 clusterDuplicateTracks(
0032     const std::multimap<int, std::pair<std::size_t, std::vector<std::size_t>>>&
0033         trackMap);
0034 
0035 }  // namespace Acts::detail