17 #include "DD4hep/Detector.h"
19 #include <boost/algorithm/string.hpp>
23 std::unique_ptr<const Logger> logger)
24 : m_cfg(), m_logger(std::move(logger)) {
35 std::vector<std::shared_ptr<Acts::TrackingVolume>>
37 if (m_cfg.centralVolumes.empty()) {
38 ACTS_VERBOSE(
"[L] No layers handed over for central volume!");
43 "[L] Received layers for central volume -> creating "
44 "cylindrical layers");
49 double rMin, rMax,
dz;
52 for (
auto& detElement : m_cfg.centralVolumes) {
55 convertTransform(&(detElement.nominal().worldTransformation()));
57 TGeoShape* geoShape = detElement.placement().ptr()->GetVolume()->GetShape();
59 if (geoShape !=
nullptr) {
60 TGeoTubeSeg* tube =
dynamic_cast<TGeoTubeSeg*
>(geoShape);
63 "[L] Cylinder layer has wrong shape - needs to be TGeoTubeSeg!");
71 throw std::logic_error(
72 std::string(
"Volume DetElement: ") + detElement.name() +
73 std::string(
" has not a shape "
74 "added to its extension. Please check your detector "
80 dd4hep::Material ddmaterial = detElement.volume().material();
81 if (!boost::iequals(ddmaterial.name(),
"vacuum")) {
84 ddmaterial.A(), ddmaterial.Z(),
88 transform, std::make_shared<const CylinderVolumeBounds>(cvBounds),
89 std::make_shared<const HomogeneousVolumeMaterial>(volumeMaterial)));
92 transform, std::make_shared<const CylinderVolumeBounds>(cvBounds)));
98 std::shared_ptr<const Acts::Transform3D>
101 const Double_t* rotation = tGeoTrans->GetRotationMatrix();
102 const Double_t* translation = tGeoTrans->GetTranslation();
109 translation[1] * units::_cm,
110 translation[2] * units::_cm)));