Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-10-15 08:04:21

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 "Acts/MagneticField/MagneticFieldContext.hpp"
0012 #include "Acts/Vertexing/IVertexFinder.hpp"
0013 #include "Acts/Vertexing/TrackAtVertex.hpp"
0014 #include "Acts/Vertexing/Vertex.hpp"
0015 #include "Acts/Vertexing/VertexingOptions.hpp"
0016 #include "ActsExamples/EventData/SimVertex.hpp"
0017 
0018 namespace ActsExamples {
0019 
0020 class TruthVertexSeeder final : public Acts::IVertexFinder {
0021  public:
0022   struct Config {
0023     bool useXY = false;
0024     bool useTime = false;
0025     std::size_t simultaneousSeeds = 1;
0026   };
0027 
0028   struct State {
0029     std::vector<SimVertex> truthVertices;
0030 
0031     std::size_t nextVertexIndex = 0;
0032   };
0033 
0034   explicit TruthVertexSeeder(const Config& cfg);
0035 
0036   Acts::Result<std::vector<Acts::Vertex>> find(
0037       const std::vector<Acts::InputTrack>& trackVector,
0038       const Acts::VertexingOptions& vertexingOptions,
0039       IVertexFinder::State& state) const final;
0040 
0041   IVertexFinder::State makeState(
0042       const Acts::MagneticFieldContext& mctx) const final;
0043 
0044   void setTracksToRemove(
0045       IVertexFinder::State& anyState,
0046       const std::vector<Acts::InputTrack>& removedTracks) const final;
0047 
0048  private:
0049   Config m_cfg;
0050 };
0051 
0052 }  // namespace ActsExamples