Analysis Software
Documentation for sPHENIX simulation software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
FasTrackConnector.hpp
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file FasTrackConnector.hpp
1 // This file is part of the Acts project.
2 //
3 // Copyright (C) 2021 CERN for the benefit of the Acts project
4 //
5 // This Source Code Form is subject to the terms of the Mozilla Public
6 // License, v. 2.0. If a copy of the MPL was not distributed with this
7 // file, You can obtain one at http://mozilla.org/MPL/2.0/.
8 
9 #pragma once
10 
11 // TODO: update to C++17 style
12 // Consider to moving to detail subdirectory
13 #include <fstream>
14 #include <iostream>
15 #include <map>
16 #include <vector>
17 
18 namespace Acts {
19 
21  public:
22  FasTrackConnection(unsigned int s, unsigned int d);
23 
24  unsigned int m_src, m_dst;
25  std::vector<int> m_binTable;
26 };
27 
29  public:
30  struct LayerGroup {
31  LayerGroup(unsigned int l1Key,
32  const std::vector<const Acts::FasTrackConnection *> &v)
33  : m_dst(l1Key), m_sources(v) {}
34 
35  unsigned int m_dst; // the target layer of the group
36  std::vector<const Acts::FasTrackConnection *>
37  m_sources; // the source layers of the group
38  };
39 
40  FasTrackConnector(std::ifstream &inFile);
41 
43 
44  float m_etaBin{};
45 
46  std::map<int, std::vector<struct LayerGroup>> m_layerGroups;
47  std::map<int, std::vector<Acts::FasTrackConnection *>> m_connMap;
48  // TODO: change to std::map<int, std::vector<Acts::FasTrackConnection> >
49  // m_connMap; or std::map<int,
50  // std::vector<std::unique_ptr<Acts::FasTrackConnection>> > m_connMap;
51 };
52 
53 } // namespace Acts