25 std::vector<std::shared_ptr<Acts::Surface>>
28 unsigned int splits) {
30 std::vector<std::shared_ptr<Acts::Surface>> cSupport;
33 cSupport.push_back(Surface::makeShared<CylinderSurface>(
34 transform, std::make_shared<CylinderBounds>(bounds)));
46 ActsScalar planeZ = transform.translation().z();
49 std::make_shared<Acts::RectangleBounds>(planeHalfX, halfZ);
51 for (
unsigned int iphi = 0; iphi < splits; ++iphi) {
65 planeRotation.col(0) = planeAxisX;
66 planeRotation.col(1) = planeAxisY;
67 planeRotation.col(2) = planeAxisZ;
73 Surface::makeShared<PlaneSurface>(
sTransform, sRectangle));
80 std::vector<std::shared_ptr<Acts::Surface>>
83 unsigned int splits) {
85 std::vector<std::shared_ptr<Acts::Surface>> dSupport;
88 dSupport.push_back(Surface::makeShared<DiscSurface>(
89 transform, std::make_shared<RadialBounds>(bounds)));
107 std::make_shared<Acts::TrapezoidBounds>(hXminY, hXmaxY, hY);
108 Vector3 zAxis = transform.rotation().col(2);
109 ActsScalar zPosition = transform.translation().z();
111 for (
unsigned int iphi = 0; iphi < splits; ++iphi) {
115 Translation3(hR * std::cos(phi), hR * std::sin(phi), zPosition) *
119 Surface::makeShared<PlaneSurface>(
sTransform, sTrapezoid));
126 std::vector<std::shared_ptr<Surface>>& layerSurfaces,
127 std::vector<size_t>& assignToAll,
const Extent& layerExtent,
128 Surface::SurfaceType layerRepresentation,
129 const std::array<ActsScalar, 5u>& layerSupportValues,
130 std::optional<Transform3> layerTransform,
unsigned int supportSplits) {
132 if (layerRepresentation == Surface::SurfaceType::Cylinder or
133 layerRepresentation == Surface::SurfaceType::Disc) {
136 throw std::runtime_error(
137 "SupportHelper::addSupport(...) - z or phi are not constrained.");
146 bool sectoral =
false;
147 bool concentric =
false;
149 if (layerTransform.has_value() and
150 layerTransform.value().isApprox(Transform3::Identity())) {
164 auto [doff, demin, demax, dphimin, dphimax] = layerSupportValues;
167 minPhi -= std::abs(demin);
168 maxPhi += std::abs(demax);
174 if (layerRepresentation == Surface::SurfaceType::Cylinder) {
175 ActsScalar layerR = doff < 0 ? minR + doff : maxR + doff;
176 minZ -= std::abs(demin);
177 maxZ += std::abs(demax);
185 halfZ = std::max(std::abs(minZ), std::abs(maxZ));
187 sTransform.pretranslate(
Vector3(0., 0., midZ));
190 sTransform, {layerR, halfZ, halfPhi, avgPhi, 0., 0.}, supportSplits);
193 if (supportSplits == 1
u and cSupport.size() == 1
u) {
194 assignToAll.push_back(layerSurfaces.size());
197 layerSurfaces.insert(layerSurfaces.end(), cSupport.begin(),
202 ActsScalar layerZ = doff < 0 ? minZ + doff : maxZ + doff;
203 minR -= std::abs(demin);
204 maxR += std::abs(demax);
206 sTransform.pretranslate(
Vector3(0., 0., layerZ));
208 sTransform, {
minR,
maxR, halfPhi, avgPhi}, supportSplits);
211 if (supportSplits == 1
u and dSupport.size() == 1
u) {
212 assignToAll.push_back(layerSurfaces.size());
215 layerSurfaces.insert(layerSurfaces.end(), dSupport.begin(),
219 throw std::invalid_argument(
220 "SupportHelper: currently only cylindrical/disc support building "