Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-08-26 08:20:22

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 };
0029 
0030 /// Pick the three space points that seed a candidate track. The triplet
0031 /// selections go by layer, not by space point.
0032 ///
0033 /// @param spacePoints is the event space point container
0034 /// @param candidates are the candidate space points, in track order
0035 ///        (innermost first); they are not sorted internally
0036 /// @param selection picks which of them are used
0037 /// @return the three selected space points, or nothing if the selection cannot
0038 ///         be made
0039 std::optional<std::array<SpacePointIndex, 3>> selectSeedSpacePoints(
0040     const SpacePointContainer& spacePoints,
0041     std::span<const SpacePointIndex> candidates,
0042     SeedSpacePointSelection selection);
0043 
0044 }  // namespace ActsExamples