Back to home page

EIC code displayed by LXR

 
 

    


Warning, file /include/Acts/Seeding/SeedFinderGbts.hpp was not indexed or was modified since last indexation (in which case cross-reference links may be missing, inaccurate or erroneous).

0001 // This file is part of the Acts project.
0002 //
0003 // Copyright (C) 2021 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 // TODO: update to C++17 style
0012 
0013 #include "Acts/EventData/SpacePointData.hpp"
0014 #include "Acts/Seeding/InternalSeed.hpp"
0015 #include "Acts/Seeding/InternalSpacePoint.hpp"
0016 #include "Acts/Seeding/SeedFinderConfig.hpp"
0017 #include "Acts/Seeding/SeedFinderGbtsConfig.hpp"
0018 #include "Acts/TrackFinding/RoiDescriptor.hpp"
0019 #include "Acts/Utilities/KDTree.hpp"
0020 
0021 #include <array>
0022 #include <iostream>
0023 #include <list>
0024 #include <map>
0025 #include <memory>
0026 #include <set>
0027 #include <string>
0028 #include <utility>
0029 #include <vector>
0030 
0031 namespace Acts {
0032 
0033 template <typename external_spacepoint_t>
0034 struct GbtsTrigTracklet {
0035  public:
0036   GbtsTrigTracklet(std::vector<const GbtsSP<external_spacepoint_t> *> &vSP,
0037                    std::vector<TrigInDetTriplet<external_spacepoint_t>> &tbuf)
0038       : m_track(vSP), m_seeds(tbuf) {}
0039 
0040   std::vector<const GbtsSP<external_spacepoint_t> *> m_track;
0041   std::vector<TrigInDetTriplet<external_spacepoint_t>> m_seeds;
0042 };
0043 
0044 template <typename external_spacepoint_t>
0045 class SeedFinderGbts {
0046  public:
0047   static constexpr std::size_t NDims = 3;
0048 
0049   using seed_t = Seed<external_spacepoint_t>;
0050   //   using internal_sp_t = InternalSpacePoint<external_spacepoint_t>;
0051   //   using tree_t = KDTree<NDims, internal_sp_t *, ActsScalar, std::array, 4>;
0052 
0053   // constructors
0054   SeedFinderGbts(const SeedFinderGbtsConfig<external_spacepoint_t> &config,
0055                  const GbtsGeometry<external_spacepoint_t> &gbtsgeo);
0056 
0057   ~SeedFinderGbts();  //!!! is it dangerous not to use default? got def in ipp
0058   SeedFinderGbts() = default;
0059   SeedFinderGbts(const SeedFinderGbts<external_spacepoint_t> &) = delete;
0060   SeedFinderGbts<external_spacepoint_t> &operator=(
0061       const SeedFinderGbts<external_spacepoint_t> &) = delete;
0062 
0063   void loadSpacePoints(
0064       const std::vector<GbtsSP<external_spacepoint_t>> &gbtsSPvect);
0065 
0066   // inner
0067   template <typename output_container_t>
0068   void createSeeds(
0069       const Acts::RoiDescriptor & /*roi*/,
0070       const Acts::GbtsGeometry<external_spacepoint_t> & /*gbtsgeo*/,
0071       output_container_t & /*out_cont*/);
0072   // outer
0073   std::vector<seed_t> createSeeds(
0074       const Acts::RoiDescriptor & /*roi*/,
0075       const Acts::GbtsGeometry<external_spacepoint_t> & /*gbtsgeo*/);
0076 
0077  private:
0078   enum Dim { DimPhi = 0, DimR = 1, DimZ = 2 };
0079 
0080   // config object
0081   SeedFinderGbtsConfig<external_spacepoint_t> m_config;
0082 
0083   void runGbts_TrackFinder(
0084       std::vector<GbtsTrigTracklet<external_spacepoint_t>> &vTracks,
0085       const Acts::RoiDescriptor &roi,
0086       const Acts::GbtsGeometry<external_spacepoint_t> &gbtsgeo);
0087 
0088   // needs to be member of class so can accessed by all member functions
0089   GbtsDataStorage<external_spacepoint_t> *m_storage;
0090 
0091   // for create seeds:
0092   std::vector<TrigInDetTriplet<external_spacepoint_t>> m_triplets;
0093 };
0094 
0095 }  // namespace Acts
0096 
0097 #include "Acts/Seeding/SeedFinderGbts.ipp"