File indexing completed on 2025-01-18 09:10:52
0001
0002
0003
0004
0005
0006
0007
0008
0009 #pragma once
0010
0011 #include "Acts/Geometry/GeometryContext.hpp"
0012 #include "Acts/Geometry/ILayerBuilder.hpp"
0013 #include "Acts/Utilities/Logger.hpp"
0014
0015 #include <memory>
0016 #include <string>
0017 #include <vector>
0018
0019 namespace Acts {
0020
0021 class ISurfaceMaterial;
0022
0023
0024
0025
0026
0027
0028
0029 class PassiveLayerBuilder : public ILayerBuilder {
0030 public:
0031
0032
0033
0034 struct Config {
0035
0036 std::string layerIdentification;
0037
0038 std::vector<double> centralLayerRadii;
0039 std::vector<double> centralLayerHalflengthZ;
0040 std::vector<double> centralLayerThickness;
0041 std::vector<std::shared_ptr<const ISurfaceMaterial>>
0042 centralLayerMaterial;
0043
0044
0045 std::vector<double> posnegLayerPositionZ;
0046 std::vector<double> posnegLayerRmin;
0047 std::vector<double> posnegLayerRmax;
0048 std::vector<double> posnegLayerThickness;
0049 std::vector<std::shared_ptr<const ISurfaceMaterial>>
0050 posnegLayerMaterial;
0051 };
0052
0053
0054
0055
0056
0057 PassiveLayerBuilder(const Config& plConfig,
0058 std::unique_ptr<const Logger> logger = getDefaultLogger(
0059 "PassiveLayerBuilder", Logging::INFO));
0060
0061
0062 ~PassiveLayerBuilder() override = default;
0063
0064
0065
0066
0067
0068
0069
0070 const LayerVector negativeLayers(const GeometryContext& gctx) const override;
0071
0072
0073
0074
0075
0076
0077
0078 const LayerVector centralLayers(const GeometryContext& gctx) const override;
0079
0080
0081
0082
0083
0084
0085
0086 const LayerVector positiveLayers(const GeometryContext& gctx) const override;
0087
0088
0089
0090 const std::string& identification() const override {
0091 return m_cfg.layerIdentification;
0092 }
0093
0094
0095
0096
0097
0098 void setConfiguration(const Config& plConfig);
0099
0100
0101 Config getConfiguration() const;
0102
0103
0104
0105
0106 void setLogger(std::unique_ptr<const Logger> newLogger);
0107
0108 protected:
0109 Config m_cfg;
0110
0111 private:
0112
0113
0114
0115
0116
0117
0118
0119 const LayerVector endcapLayers(const GeometryContext& gctx, int side) const;
0120
0121 const Logger& logger() const { return *m_logger; }
0122
0123
0124 std::unique_ptr<const Logger> m_logger;
0125 };
0126
0127 inline PassiveLayerBuilder::Config PassiveLayerBuilder::getConfiguration()
0128 const {
0129 return m_cfg;
0130 }
0131
0132 }