EIC Software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
LayerArrayCreator.hpp
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file LayerArrayCreator.hpp
1 // This file is part of the Acts project.
2 //
3 // Copyright (C) 2016-2018 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 
15 
16 #include <algorithm>
17 
18 namespace Acts {
19 
20 class Surface;
21 class Layer;
22 
32 
34  public:
36  struct Config {};
37 
41  LayerArrayCreator(const Config& /*cfg*/,
42  std::unique_ptr<const Logger> logger =
43  getDefaultLogger("LayerArrayCreator", Logging::INFO))
44  : m_logger(std::move(logger)) {}
45 
47  ~LayerArrayCreator() override = default;
48 
59  std::unique_ptr<const LayerArray> layerArray(
60  const GeometryContext& gctx, const LayerVector& layersInput, double min,
61  double max, BinningType bType = arbitrary,
62  BinningValue bValue = binX) const override;
63 
65  void setLogger(std::unique_ptr<const Logger> logger) {
66  m_logger = std::move(logger);
67  }
68 
69  private:
71  const Logger& logger() const { return *m_logger; }
72 
74  std::unique_ptr<const Logger> m_logger = nullptr;
75 
83  std::shared_ptr<Surface> createNavigationSurface(const GeometryContext& gctx,
84  const Layer& layer,
85  BinningValue bValue,
86  double offset) const;
87 };
88 
89 } // namespace Acts