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