File indexing completed on 2025-01-19 09:23:17
0001
0002
0003
0004
0005
0006
0007
0008
0009 #pragma once
0010
0011 #include "Acts/Detector/DetectorComponents.hpp"
0012 #include "Acts/Detector/ProtoBinning.hpp"
0013 #include "Acts/Detector/interface/IDetectorComponentBuilder.hpp"
0014 #include "Acts/Geometry/GeometryContext.hpp"
0015 #include "Acts/Utilities/Logger.hpp"
0016
0017 #include <memory>
0018 #include <string>
0019
0020 namespace Acts::Experimental {
0021 class IExternalStructureBuilder;
0022 class IInternalStructureBuilder;
0023 class IGeometryIdGenerator;
0024
0025
0026
0027
0028
0029
0030
0031
0032
0033 class DetectorVolumeBuilder : public IDetectorComponentBuilder {
0034 public:
0035
0036 struct Config {
0037
0038 std::string name = "unnamed";
0039
0040 std::shared_ptr<const IExternalStructureBuilder> externalsBuilder = nullptr;
0041
0042 std::shared_ptr<const IInternalStructureBuilder> internalsBuilder = nullptr;
0043
0044 std::shared_ptr<const IGeometryIdGenerator> geoIdGenerator = nullptr;
0045
0046 std::map<unsigned int, BinningDescription> portalMaterialBinning = {};
0047
0048 bool addInternalsToRoot = false;
0049
0050 std::string auxiliary = "";
0051 };
0052
0053
0054
0055
0056
0057 DetectorVolumeBuilder(const Config& cfg,
0058 std::unique_ptr<const Logger> mlogger =
0059 getDefaultLogger("DetectorVolumeBuilder",
0060 Logging::INFO));
0061
0062
0063
0064
0065
0066
0067
0068 DetectorComponent construct(const GeometryContext& gctx) const final;
0069
0070 private:
0071
0072 Config m_cfg;
0073
0074
0075 const Logger& logger() const { return *m_logger; }
0076
0077
0078 std::unique_ptr<const Logger> m_logger;
0079 };
0080
0081 }