Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-11-28 09:18:30

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/EventData/SeedContainer2.hpp"
0012 #include "Acts/Seeding/GbtsDataStorage.hpp"
0013 #include "Acts/Seeding/GbtsGeometry.hpp"
0014 #include "Acts/Seeding/SeedFinderGbtsConfig.hpp"
0015 #include "Acts/TrackFinding/RoiDescriptor.hpp"
0016 #include "Acts/Utilities/Logger.hpp"
0017 
0018 #include <memory>
0019 #include <string>
0020 #include <vector>
0021 
0022 namespace Acts::Experimental {
0023 
0024 // defined the tuple template used to carry the spacepoint components
0025 using SPContainerComponentsType =
0026     std::tuple<SpacePointContainer2, SpacePointColumnProxy<int, true>,
0027                SpacePointColumnProxy<float, true>>;
0028 
0029 class SeedFinderGbts {
0030  public:
0031   SeedFinderGbts(const SeedFinderGbtsConfig config, const GbtsGeometry* gbtsGeo,
0032                  const std::vector<TrigInDetSiLayer>* layerGeometry,
0033                  std::unique_ptr<const Acts::Logger> logger =
0034                      Acts::getDefaultLogger("Finder",
0035                                             Acts::Logging::Level::INFO));
0036 
0037   using GNN_Node = GbtsNode;
0038   using GNN_DataStorage = GbtsDataStorage;
0039   using GNN_Edge = GbtsEdge;
0040 
0041   SeedContainer2 CreateSeeds(
0042       const RoiDescriptor& roi,
0043       const SPContainerComponentsType& SpContainerComponents, int max_layers);
0044 
0045   std::vector<std::vector<SeedFinderGbts::GNN_Node>> CreateNodes(
0046       const auto& container, int MaxLayers);
0047 
0048   std::pair<int, int> buildTheGraph(
0049       const RoiDescriptor& roi, const std::unique_ptr<GNN_DataStorage>& storage,
0050       std::vector<GNN_Edge>& edgeStorage) const;
0051 
0052   int runCCA(int nEdges, std::vector<GNN_Edge>& edgeStorage) const;
0053 
0054  private:
0055   SeedFinderGbtsConfig m_config;
0056 
0057   const GbtsGeometry* m_geo;
0058 
0059   std::unique_ptr<GNN_DataStorage> m_storage = nullptr;
0060 
0061   const std::vector<TrigInDetSiLayer>* m_layerGeometry;
0062 
0063   std::unique_ptr<const Acts::Logger> m_logger =
0064       Acts::getDefaultLogger("Finder", Acts::Logging::Level::INFO);
0065 
0066   const Acts::Logger& logger() const { return *m_logger; }
0067 };
0068 
0069 }  // namespace Acts::Experimental