Analysis Software
Documentation for sPHENIX simulation 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 
9 #pragma once
10 
16 
17 #include <functional>
18 #include <memory>
19 #include <vector>
20 
21 namespace Acts {
22 
23 class TrackingVolume;
24 class TrackingGeometry;
25 class IMaterialDecorator;
26 
37  public:
40  struct Config {
42  std::vector<std::function<std::shared_ptr<TrackingVolume>(
43  const GeometryContext& gctx, const TrackingVolumePtr&,
44  const VolumeBoundsPtr&)>>
46 
48  std::shared_ptr<const ITrackingVolumeHelper> trackingVolumeHelper = nullptr;
49 
51  std::shared_ptr<const IMaterialDecorator> materialDecorator = nullptr;
52 
54  std::shared_ptr<const GeometryIdentifierHook> geometryIdentifierHook =
55  std::make_shared<GeometryIdentifierHook>();
56  };
57 
62  TrackingGeometryBuilder(const Config& cgbConfig,
63  std::unique_ptr<const Logger> logger =
64  getDefaultLogger("TrackingGeometryBuilder",
65  Logging::INFO));
66 
68  ~TrackingGeometryBuilder() override = default;
69 
75  std::unique_ptr<const TrackingGeometry> trackingGeometry(
76  const GeometryContext& gctx) const final;
77 
81  void setConfiguration(const Config& cgbConfig);
82 
85  const Config& getConfiguration() const;
86 
89  void setLogger(std::unique_ptr<const Logger> newLogger);
90 
91  private:
94 
96  const Logger& logger() const { return *m_logger; }
97 
99  std::unique_ptr<const Logger> m_logger;
100 };
101 
102 } // namespace Acts