ECCE @ EIC Software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
TrackingGeometryBuilder.hpp
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file TrackingGeometryBuilder.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 
10 // TrackingGeometryBuilder.h, Acts project
12 
13 #pragma once
14 #include <functional>
15 #include <memory>
16 #include <vector>
23 
24 namespace Acts {
25 
26 class TrackingGeometry;
27 class IMaterialDecorator;
28 
42  public:
45  struct Config {
47  std::vector<std::function<std::shared_ptr<TrackingVolume>(
48  const GeometryContext& gctx, const TrackingVolumePtr&,
49  const VolumeBoundsPtr&)>>
51 
53  std::shared_ptr<const ITrackingVolumeHelper> trackingVolumeHelper = nullptr;
54 
56  std::shared_ptr<const IMaterialDecorator> materialDecorator = nullptr;
57  };
58 
63  TrackingGeometryBuilder(const Config& cgbConfig,
64  std::unique_ptr<const Logger> logger =
65  getDefaultLogger("TrackingGeometryBuilder",
66  Logging::INFO));
67 
69  ~TrackingGeometryBuilder() override = default;
70 
76  std::unique_ptr<const TrackingGeometry> trackingGeometry(
77  const GeometryContext& gctx) const final;
78 
82  void setConfiguration(const Config& cgbConfig);
83 
86  Config getConfiguration() const;
87 
90  void setLogger(std::unique_ptr<const Logger> newLogger);
91 
92  private:
95 
97  const Logger& logger() const { return *m_logger; }
98 
100  std::unique_ptr<const Logger> m_logger;
101 };
102 
105  return m_cfg;
106 }
107 
108 } // namespace Acts