28 namespace Experimental {
34 namespace CylindricalDetectorHelper {
49 std::vector<std::shared_ptr<DetectorVolume>>&
volumes,
50 const std::vector<unsigned int>& selectedOnly = {},
66 std::vector<std::shared_ptr<DetectorVolume>>&
volumes,
67 const std::vector<unsigned int>& selectedOnly = {},
83 std::vector<std::shared_ptr<DetectorVolume>>&
volumes,
84 const std::vector<unsigned int>& selectedOnly = {},
99 std::vector<std::shared_ptr<DetectorVolume>>&
volumes,
115 const std::vector<DetectorComponent::PortalContainer>& containers,
116 const std::vector<unsigned int>& selectedOnly = {},
132 const std::vector<DetectorComponent::PortalContainer>& containers,
133 const std::vector<unsigned int>& selectedOnly = {},
149 const std::vector<DetectorComponent::PortalContainer>& containers,
150 const std::vector<unsigned int>& selectedOnly = {},
165 const std::vector<DetectorComponent::PortalContainer>& containers,
178 template <
typename volume_container_t>
185 ACTS_DEBUG(
"Estimate R/z/phi boundaries of " << volumes.size()
189 std::array<std::set<ActsScalar>, 3
u> uniqueBoundaries;
192 for (
const auto&
v : volumes) {
193 if (
v->volumeBounds().type() == VolumeBounds::BoundsType::eCylinder) {
194 const auto& bValues =
v->volumeBounds().values();
196 ActsScalar rMin = bValues[CylinderVolumeBounds::BoundValues::eMinR];
197 ActsScalar rMax = bValues[CylinderVolumeBounds::BoundValues::eMaxR];
198 ActsScalar zCenter =
v->transform(gctx).translation().z();
200 bValues[CylinderVolumeBounds::BoundValues::eHalfLengthZ];
204 bValues[CylinderVolumeBounds::BoundValues::eAveragePhi];
206 bValues[CylinderVolumeBounds::BoundValues::eHalfPhiSector];
210 uniqueBoundaries[0].insert(rMin);
211 uniqueBoundaries[0].insert(rMax);
212 uniqueBoundaries[1].insert(zMin);
213 uniqueBoundaries[1].insert(zMax);
214 uniqueBoundaries[2].insert(phiMin);
215 uniqueBoundaries[2].insert(phiMax);
220 <<
" boundaries in R.");
222 <<
" boundaries in z.");
224 <<
" boundaries in phi.");
226 return {{std::vector<ActsScalar>(uniqueBoundaries[0].begin(),
227 uniqueBoundaries[0].end()),
228 std::vector<ActsScalar>(uniqueBoundaries[1].
begin(),
229 uniqueBoundaries[1].end()),
230 std::vector<ActsScalar>(uniqueBoundaries[2].
begin(),
231 uniqueBoundaries[2].end())}};