Analysis Software
Documentation for sPHENIX simulation software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
BinFinder.hpp
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file BinFinder.hpp
1 // This file is part of the Acts project.
2 //
3 // Copyright (C) 2023 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 
13 
14 #include <vector>
15 
16 #include <boost/container/small_vector.hpp>
17 
18 namespace Acts {
19 
25 template <typename external_spacepoint_t>
26 class BinFinder {
27  public:
29  BinFinder() = delete;
30 
31  BinFinder(const std::vector<std::pair<int, int>>& zBinNeighbors,
32  int numPhiNeighbors);
33 
39  boost::container::small_vector<size_t, 9> findBins(
40  size_t phiBin, size_t zBin,
41  const SpacePointGrid<external_spacepoint_t>* binnedSP) const;
42 
43  private:
44  // This vector is provided by the user and is supposed to be a constant for
45  // all events. No point in making a copy
49 };
50 } // namespace Acts