31 m_bounds(other.m_bounds) {}
34 std::shared_ptr<const Transform3D> htrans,
double radius,
double halfz,
35 double halfphi,
double avphi)
37 m_bounds(std::make_shared<const
CylinderBounds>(radius, halfz, halfphi,
41 std::shared_ptr<const CylinderBounds> cbounds,
43 :
Surface(detelement), m_bounds(std::move(cbounds)) {
49 std::shared_ptr<const Transform3D> htrans,
50 const std::shared_ptr<const CylinderBounds>& cbounds)
51 :
Surface(std::move(htrans)), m_bounds(cbounds) {
52 throw_assert(cbounds,
"CylinderBounds must not be nullptr");
72 return Vector3D(sfCenter.x() + R * cos(phi), sfCenter.y() + R * sin(phi),
87 Vector3D measY = rotSymmetryAxis(gctx);
91 Vector3D measX(measY.cross(measDepth).normalized());
93 mFrame.col(0) = measX;
94 mFrame.col(1) = measY;
95 mFrame.col(2) = measDepth;
131 Vector3D loc3Dframe(inverseTrans * position);
134 radius =
perp(loc3Dframe);
142 return "Acts::CylinderSurface";
148 Vector3D localNormal(cos(phi), sin(phi), 0.);
160 return sfTransform.linear() * pos3D.normalized();
167 double cosAlpha = normalT.dot(direction);
168 return std::fabs(1. / cosAlpha);
172 return (*m_bounds.get());
178 std::vector<Vector3D> vertices;
179 std::vector<Polyhedron::FaceType> faces;
180 std::vector<Polyhedron::FaceType> triangularMesh;
183 bool fullCylinder = bounds().coversFullAzimuth();
189 auto phiSegs = fullCylinder
192 avgPhi - halfPhi, avgPhi + halfPhi, {avgPhi});
195 std::vector<int> sides = {-1, 1};
196 for (
auto& side : sides) {
197 for (
size_t iseg = 0; iseg < phiSegs.size() - 1; ++iseg) {
198 int addon = (iseg == phiSegs.size() - 2 and not fullCylinder) ? 1 : 0;
203 phiSegs[iseg], phiSegs[iseg + 1], lseg, addon,
210 return Polyhedron(vertices, facesMesh.first, facesMesh.second);