File indexing completed on 2025-07-11 07:50:06
0001
0002
0003
0004
0005
0006
0007
0008
0009 #include "Acts/Detector/detail/ProtoMaterialHelper.hpp"
0010
0011 #include "Acts/Geometry/Extent.hpp"
0012 #include "Acts/Material/ProtoSurfaceMaterial.hpp"
0013 #include "Acts/Surfaces/Surface.hpp"
0014
0015 std::vector<Acts::DirectedProtoAxis>
0016 Acts::Experimental::detail::ProtoMaterialHelper::attachProtoMaterial(
0017 const GeometryContext& gctx, Surface& surface,
0018 const std::vector<DirectedProtoAxis>& bDescription) {
0019
0020 std::vector<DirectedProtoAxis> fbDescription;
0021
0022 Extent sExtent = surface.polyhedronRepresentation(gctx, 1).extent();
0023 for (const auto& dpAxis : bDescription) {
0024 DirectedProtoAxis fAxis(dpAxis);
0025
0026 if (fAxis.isAutorange()) {
0027 auto range = sExtent.range(dpAxis.getAxisDirection());
0028 fAxis.setRange(range.min(), range.max());
0029 }
0030 fbDescription.emplace_back(fAxis);
0031 }
0032
0033 auto protoMaterial =
0034 std::make_shared<ProtoGridSurfaceMaterial>(fbDescription);
0035 surface.assignSurfaceMaterial(protoMaterial);
0036
0037 return fbDescription;
0038 }