19 std::array<Acts::Vector3, 2u> cylEndpointsZ(
38 auto bVal = node.
binning.front();
45 [&](
const auto&
a,
const auto&
b) {
46 return (
a->transform.translation() - nodeCenter).dot(nodeSortAxis) <
47 (
b->transform.translation() - nodeCenter).dot(nodeSortAxis);
49 }
else if (bVal ==
binR and node.
boundsType == VolumeBounds::eCylinder) {
51 [](
const auto&
a,
const auto&
b) {
52 return 0.5 * (
a->boundaryValues[0] +
a->boundaryValues[1]) <
53 0.5 * (
b->boundaryValues[0] +
b->boundaryValues[1]);
73 if (node.
boundsType == VolumeBounds::eCylinder) {
82 std::vector<std::unique_ptr<Blueprint::Node>> gaps;
85 auto bVal = node.
binning.front();
91 child->boundaryValues[0] = cInnerR;
92 child->boundaryValues[1] = cOuterR;
95 auto [negC, posC] = cylEndpointsZ(node);
97 unsigned int igap = 0;
99 auto [neg,
pos] = cylEndpointsZ(*
child);
104 auto gapTransform = Transform3::Identity();
105 gapTransform.rotate(node.
transform.rotation());
106 gapTransform.translate(0.5 * (neg + negC));
107 auto gap = std::make_unique<Blueprint::Node>(
108 gapName, gapTransform, VolumeBounds::eCylinder,
109 std::vector<ActsScalar>{cInnerR, cOuterR, 0.5 * gapSpan});
121 auto gapTransform = Transform3::Identity();
122 gapTransform.rotate(node.
transform.rotation());
123 gapTransform.translate(0.5 * (negC + posC));
124 auto gap = std::make_unique<Blueprint::Node>(
125 gapName, gapTransform, VolumeBounds::eCylinder,
126 std::vector<ActsScalar>{cInnerR, cOuterR, 0.5 * gapSpan});
130 }
else if (bVal ==
binR) {
132 if (adjustToParent) {
136 child->boundaryValues[2] = cHalfZ;
140 unsigned int igap = 0;
145 auto gap = std::make_unique<Blueprint::Node>(
147 VolumeBounds::eCylinder,
148 std::vector<ActsScalar>{lastR, iR, cHalfZ});
153 lastR =
child->boundaryValues[1];
157 auto gap = std::make_unique<Blueprint::Node>(
159 VolumeBounds::eCylinder,
160 std::vector<ActsScalar>{lastR, cOuterR, cHalfZ});
164 throw std::runtime_error(
165 "BlueprintHelper: gap filling not implemented for "
166 "cylinder and this binning type.");
170 for (
auto&
gap : gaps) {
182 throw std::runtime_error(
183 "BlueprintHelper: gap filling not implemented for "
184 "this boundary type");