Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-11-17 09:41:37

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 "ActsExamples/EventData/SpacePoint.hpp"
0012 
0013 #include <array>
0014 #include <optional>
0015 #include <span>
0016 
0017 namespace ActsExamples {
0018 
0019 /// Which space points of a candidate track are used to seed it, i.e. which ones
0020 /// make up the seed or feed the track parameter estimate.
0021 enum class SeedSpacePointSelection {
0022   /// The first three space points, in the order they are given.
0023   FirstThree,
0024   /// The three innermost layers.
0025   InnermostTriplet,
0026   /// The innermost, the middle and the outermost layer.
0027   SpreadTriplet,
0028   /// Every space point. Not a triplet, so it is up to the caller to take the
0029   /// candidates as they are.
0030   All,
0031 };
0032 
0033 /// Pick the three space points that seed a candidate track. The triplet
0034 /// selections go by layer, not by space point, and skip candidates closer than
0035 /// @p minTransverseDistance to any already picked one. The distance is
0036 /// transverse rather than radial because that is what keeps the track parameter
0037 /// estimation well defined.
0038 ///
0039 /// @param spacePoints is the event space point container
0040 /// @param candidates are the candidate space points, in track order
0041 ///        (innermost first); they are not sorted internally
0042 /// @param selection picks which of them are used
0043 /// @param minTransverseDistance is the minimum transverse distance between the
0044 ///        selected space points. It does not apply to
0045 ///        @c SeedSpacePointSelection::FirstThree, which takes the candidates as
0046 ///        given.
0047 /// @return the three selected space points, or nothing if the selection cannot
0048 ///         be made, which includes @c SeedSpacePointSelection::All
0049 std::optional<std::array<SpacePointIndex, 3>> selectSeedSpacePoints(
0050     const SpacePointContainer& spacePoints,
0051     std::span<const SpacePointIndex> candidates,
0052     SeedSpacePointSelection selection, double minTransverseDistance);
0053 
0054 }  // namespace ActsExamples