12 double phiMin,
double phiMax,
const std::vector<double>& phiRefs,
13 double phiTolerance) {
19 if (phiMin != -
M_PI or phiMax !=
M_PI) {
20 phiSegments.push_back(phiMin);
21 for (
unsigned int iq = 1; iq < 4; ++iq) {
22 if (phiMin < quarters[iq] and phiMax > quarters[iq]) {
23 phiSegments.push_back(quarters[iq]);
26 phiSegments.push_back(phiMax);
28 phiSegments = quarters;
31 if (not phiRefs.empty()) {
32 for (
const auto& phiRef : phiRefs) {
34 auto match = std::find_if(
35 phiSegments.begin(), phiSegments.end(), [&](
double phiSeg) {
36 return std::abs(phiSeg - phiRef) < phiTolerance;
38 if (match == phiSegments.end()) {
39 phiSegments.push_back(phiRef);
42 std::sort(phiSegments.begin(), phiSegments.end());
48 double innerRx,
double innerRy,
double outerRx,
double outerRy,
49 double avgPhi,
double halfPhi,
unsigned int lseg) {
52 std::vector<Vector2D> rvertices;
53 std::vector<Vector2D> ivertices;
54 std::vector<Vector2D> overtices;
56 bool innerExists = (innerRx > 0. and innerRy > 0.);
61 avgPhi - halfPhi, avgPhi + halfPhi, {avgPhi});
64 for (
unsigned int iseg = 0; iseg < phiSegs.size() - 1; ++iseg) {
65 int addon = (iseg == phiSegs.size() - 2 and not
closed) ? 1 : 0;
67 createSegment<Vector2D, Transform2D>(ivertices, {innerRx, innerRy},
68 phiSegs[iseg], phiSegs[iseg + 1],
71 createSegment<Vector2D, Transform2D>(overtices, {outerRx, outerRy},
72 phiSegs[iseg], phiSegs[iseg + 1], lseg,
77 if (not innerExists) {
80 rvertices.push_back(
Vector2D(0., 0.));
82 rvertices.insert(rvertices.end(), overtices.begin(), overtices.end());
83 }
else if (not closed) {
84 rvertices.insert(rvertices.end(), overtices.begin(), overtices.end());
85 rvertices.insert(rvertices.end(), ivertices.rbegin(), ivertices.rend());
87 rvertices.insert(rvertices.end(), overtices.begin(), overtices.end());
88 rvertices.insert(rvertices.end(), ivertices.begin(), ivertices.end());
94 double innerR,
double outerR,
double avgPhi,
double halfPhi,
101 const std::vector<Acts::Vector3D>& vertices,
double tolerance) {
103 if (vertices.size() < 4) {
107 auto hyperPlane = Eigen::Hyperplane<double, 3>::Through(
108 vertices[0], vertices[1], vertices[2]);
109 for (
size_t ip = 3;
ip < vertices.size(); ++
ip) {
110 if (hyperPlane.absDistance(vertices[
ip]) >
tolerance) {