Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 09:28:00

0001 // This file is part of the Acts project.
0002 //
0003 // Copyright (C) 2023 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 http://mozilla.org/MPL/2.0/.
0008 
0009 #pragma once
0010 
0011 #include "Acts/MagneticField/MagneticFieldContext.hpp"
0012 #include "Acts/MagneticField/MagneticFieldProvider.hpp"
0013 #include "Acts/Utilities/Any.hpp"
0014 #include "Acts/Utilities/Result.hpp"
0015 #include "Acts/Vertexing/VertexingOptions.hpp"
0016 
0017 #include <vector>
0018 
0019 namespace Acts {
0020 
0021 class Vertex;
0022 struct InputTrack;
0023 struct VertexingOptions;
0024 
0025 /// Common interface for both vertex finders and vertex seed finders
0026 class IVertexFinder {
0027  public:
0028   /// Type-erased wrapper for concrete state objects
0029   using State = Acts::AnyBase<128>;
0030 
0031   /// The main finder method that will return a set of found vertex candidates
0032   /// @param trackVector The input track collection
0033   /// @param vertexingOptions The vertexing options
0034   /// @param state The state object (needs to be created via @c makeState)
0035   /// @return The found vertex candidates
0036   virtual Result<std::vector<Vertex>> find(
0037       const std::vector<InputTrack>& trackVector,
0038       const VertexingOptions& vertexingOptions, State& state) const = 0;
0039 
0040   /// Function to create a state object for this concrete vertex finder
0041   /// @param mctx The magnetic field context
0042   /// @return The state object
0043   virtual State makeState(const MagneticFieldContext& mctx) const = 0;
0044 
0045   /// For vertex finders that have an internal state of active tracks, this
0046   /// method instructs them to mark used tracks for removal
0047   /// @param anyState The state object
0048   /// @param removedTracks The tracks to be removed
0049   virtual void setTracksToRemove(
0050       State& anyState, const std::vector<InputTrack>& removedTracks) const = 0;
0051 
0052   /// Virtual destructor
0053   virtual ~IVertexFinder() = default;
0054 };
0055 }  // namespace Acts