Back to home page

EIC code displayed by LXR

 
 

    


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

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   };
0026 
0027   struct State {
0028     std::vector<SimVertex> truthVertices;
0029 
0030     std::size_t nextVertexIndex = 0;
0031   };
0032 
0033   explicit TruthVertexSeeder(const Config& cfg);
0034 
0035   Acts::Result<std::vector<Acts::Vertex>> find(
0036       const std::vector<Acts::InputTrack>& trackVector,
0037       const Acts::VertexingOptions& vertexingOptions,
0038       IVertexFinder::State& state) const final;
0039 
0040   IVertexFinder::State makeState(
0041       const Acts::MagneticFieldContext& mctx) const final;
0042 
0043   void setTracksToRemove(
0044       IVertexFinder::State& anyState,
0045       const std::vector<Acts::InputTrack>& removedTracks) const final;
0046 
0047  private:
0048   Config m_cfg;
0049 };
0050 
0051 }  // namespace ActsExamples