File indexing completed on 2025-01-18 09:10:53
0001
0002
0003
0004
0005
0006
0007
0008
0009 #pragma once
0010
0011 #include "Acts/Geometry/GeometryContext.hpp"
0012 #include "Acts/Geometry/GeometryIdentifier.hpp"
0013 #include "Acts/Geometry/ITrackingGeometryBuilder.hpp"
0014 #include "Acts/Geometry/ITrackingVolumeHelper.hpp"
0015 #include "Acts/Utilities/Logger.hpp"
0016
0017 #include <functional>
0018 #include <memory>
0019 #include <vector>
0020
0021 namespace Acts {
0022
0023 class TrackingVolume;
0024 class TrackingGeometry;
0025 class IMaterialDecorator;
0026
0027
0028
0029
0030
0031
0032
0033
0034
0035
0036 class TrackingGeometryBuilder : public ITrackingGeometryBuilder {
0037 public:
0038
0039
0040 struct Config {
0041
0042 std::vector<std::function<std::shared_ptr<TrackingVolume>(
0043 const GeometryContext& gctx, const TrackingVolumePtr&,
0044 const std::shared_ptr<const VolumeBounds>&)>>
0045 trackingVolumeBuilders;
0046
0047
0048 std::shared_ptr<const ITrackingVolumeHelper> trackingVolumeHelper = nullptr;
0049
0050
0051 std::shared_ptr<const IMaterialDecorator> materialDecorator = nullptr;
0052
0053
0054 std::shared_ptr<const GeometryIdentifierHook> geometryIdentifierHook =
0055 std::make_shared<GeometryIdentifierHook>();
0056 };
0057
0058
0059
0060
0061
0062 TrackingGeometryBuilder(const Config& cgbConfig,
0063 std::unique_ptr<const Logger> logger =
0064 getDefaultLogger("TrackingGeometryBuilder",
0065 Logging::INFO));
0066
0067
0068 ~TrackingGeometryBuilder() override = default;
0069
0070
0071
0072
0073
0074
0075 std::unique_ptr<const TrackingGeometry> trackingGeometry(
0076 const GeometryContext& gctx) const final;
0077
0078
0079
0080
0081 void setConfiguration(const Config& cgbConfig);
0082
0083
0084
0085 const Config& getConfiguration() const;
0086
0087
0088
0089 void setLogger(std::unique_ptr<const Logger> newLogger);
0090
0091 private:
0092
0093 Config m_cfg;
0094
0095
0096 const Logger& logger() const { return *m_logger; }
0097
0098
0099 std::unique_ptr<const Logger> m_logger;
0100 };
0101
0102 }