Back to home page

EIC code displayed by LXR

 
 

    


Warning, file /include/Acts/TrackFinding/GbtsConnector.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 // Consider to moving to detail subdirectory
0013 #include <fstream>
0014 #include <iostream>
0015 #include <map>
0016 #include <vector>
0017 
0018 namespace Acts {
0019 
0020 struct GbtsConnection {
0021  public:
0022   GbtsConnection(unsigned int s, unsigned int d);
0023 
0024   unsigned int m_src, m_dst;
0025   std::vector<int> m_binTable;
0026 };
0027 
0028 class GbtsConnector {
0029  public:
0030   struct LayerGroup {
0031     LayerGroup(unsigned int l1Key,
0032                const std::vector<const Acts::GbtsConnection *> &v)
0033         : m_dst(l1Key), m_sources(v) {}
0034 
0035     unsigned int m_dst;  // the target layer of the group
0036     std::vector<const Acts::GbtsConnection *>
0037         m_sources;  // the source layers of the group
0038   };
0039 
0040   GbtsConnector(std::ifstream &inFile);
0041 
0042   ~GbtsConnector();
0043 
0044   float m_etaBin{};
0045 
0046   std::map<int, std::vector<struct LayerGroup>> m_layerGroups;
0047   std::map<int, std::vector<Acts::GbtsConnection *>> m_connMap;
0048   // TODO: change to std::map<int, std::vector<Acts::GbtsConnection> >
0049   // m_connMap; or   std::map<int,
0050   // std::vector<std::unique_ptr<Acts::GbtsConnection>> > m_connMap;
0051 };
0052 
0053 }  // namespace Acts