File indexing completed on 2025-09-13 08:28:01
0001
0002
0003
0004
0005
0006
0007
0008
0009 #pragma once
0010
0011 #include "Acts/Definitions/Algebra.hpp"
0012 #include "Acts/Geometry/IConfinedTrackingVolumeBuilder.hpp"
0013 #include "Acts/Geometry/TrackingVolume.hpp"
0014 #include "Acts/Surfaces/Surface.hpp"
0015 #include "Acts/Utilities/Logger.hpp"
0016
0017 #include <memory>
0018 #include <string>
0019 #include <vector>
0020
0021 #include "DD4hep/DetElement.h"
0022
0023 class TrackingVolume;
0024 namespace Acts {
0025 class Logger;
0026 }
0027
0028 using MutableTrackingVolumePtr = std::shared_ptr<TrackingVolume>;
0029 using MutableTrackingVolumeVector = std::vector<MutableTrackingVolumePtr>;
0030
0031 class TGeoMatrix;
0032
0033 namespace Acts {
0034
0035
0036
0037
0038
0039
0040
0041
0042
0043 class DD4hepVolumeBuilder : public IConfinedTrackingVolumeBuilder {
0044 public:
0045
0046
0047 struct Config {
0048
0049 std::string configurationName = "undefined";
0050
0051 std::vector<dd4hep::DetElement> centralVolumes;
0052 };
0053
0054
0055
0056
0057 DD4hepVolumeBuilder(const Acts::DD4hepVolumeBuilder::Config& config,
0058 std::unique_ptr<const Logger> logger);
0059
0060
0061 ~DD4hepVolumeBuilder() override;
0062
0063
0064
0065
0066 MutableTrackingVolumeVector centralVolumes() const final;
0067
0068
0069
0070 const std::string& identification() const final;
0071
0072
0073
0074 void setConfiguration(const Config& config);
0075
0076
0077
0078 Config getConfiguration() const;
0079
0080
0081
0082 void setLogger(std::unique_ptr<const Logger> logger);
0083
0084 private:
0085
0086 Config m_cfg;
0087
0088
0089 std::unique_ptr<const Logger> m_logger;
0090
0091
0092
0093 const Logger& logger() const { return *m_logger; }
0094
0095
0096
0097
0098
0099
0100 Acts::Transform3 convertTransform(const TGeoMatrix* tGeoTrans) const;
0101 };
0102
0103 inline const std::string& DD4hepVolumeBuilder::identification() const {
0104 return m_cfg.configurationName;
0105 }
0106
0107 inline DD4hepVolumeBuilder::Config DD4hepVolumeBuilder::getConfiguration()
0108 const {
0109 return m_cfg;
0110 }
0111
0112 }