24 struct SurfaceArrayCreatorFixture;
58 return std::floor((x -
min) / w);
63 return std::distance(std::begin(
binEdges),
it) - 1;
116 std::vector<std::shared_ptr<const Surface>> surfaces,
size_t binsPhi,
117 size_t binsZ, std::optional<ProtoLayer> protoLayerOpt = std::nullopt,
139 std::vector<std::shared_ptr<const Surface>> surfaces,
141 std::optional<ProtoLayer> protoLayerOpt = std::nullopt,
162 std::vector<std::shared_ptr<const Surface>> surfaces,
size_t binsR,
163 size_t binsPhi, std::optional<ProtoLayer> protoLayerOpt = std::nullopt,
190 std::optional<ProtoLayer> protoLayerOpt = std::nullopt,
215 std::vector<std::shared_ptr<const Surface>> surfaces,
size_t bins1,
217 std::optional<ProtoLayer> protoLayerOpt = std::nullopt,
229 using namespace UnitLiterals;
238 auto proj1 = pos1.head<2>(), proj2 = pos2.head<2>();
242 auto cos_dPhi_n2 = proj1.dot(proj2);
243 auto sin_dPhi_n2 = proj1.x() * proj2.y() - proj2.x() * proj1.y();
246 auto dPhi = std::atan2(sin_dPhi_n2, cos_dPhi_n2);
277 const std::vector<const Surface*>& surfaces,
278 const std::function<
bool(
const Surface*,
const Surface*)>& equal)
const;
281 const std::vector<const Surface*>& surfaces,
306 const std::vector<const Surface*>& surfaces,
332 const std::vector<const Surface*>& surfaces,
335 size_t nBins = 0)
const;
350 typename F1,
typename F2>
351 static std::unique_ptr<SurfaceArray::ISurfaceGridLookup>
355 std::unique_ptr<ISGL> ptr;
361 detail::Axis<detail::AxisType::Equidistant, bdtA> axisA(pAxisA.
min, pAxisA.
max, pAxisA.
nBins);
362 detail::Axis<detail::AxisType::Equidistant, bdtB> axisB(pAxisB.
min, pAxisB.
max, pAxisB.
nBins);
365 ptr = std::unique_ptr<ISGL>(
static_cast<ISGL*
>(
366 new SGL(globalToLocal, localToGlobal, std::make_tuple(axisA, axisB), {pAxisA.
bValue, pAxisB.
bValue})));
370 detail::Axis<detail::AxisType::Equidistant, bdtA> axisA(pAxisA.
min, pAxisA.
max, pAxisA.
nBins);
371 detail::Axis<detail::AxisType::Variable, bdtB> axisB(pAxisB.
binEdges);
374 ptr = std::unique_ptr<ISGL>(
static_cast<ISGL*
>(
375 new SGL(globalToLocal, localToGlobal, std::make_tuple(axisA, axisB), {pAxisA.
bValue, pAxisB.
bValue})));
379 detail::Axis<detail::AxisType::Variable, bdtA> axisA(pAxisA.
binEdges);
380 detail::Axis<detail::AxisType::Equidistant, bdtB> axisB(pAxisB.
min, pAxisB.
max, pAxisB.
nBins);
383 ptr = std::unique_ptr<ISGL>(
static_cast<ISGL*
>(
384 new SGL(globalToLocal, localToGlobal, std::make_tuple(axisA, axisB), {pAxisA.
bValue, pAxisB.
bValue})));
388 detail::Axis<detail::AxisType::Variable, bdtA> axisA(pAxisA.
binEdges);
389 detail::Axis<detail::AxisType::Variable, bdtB> axisB(pAxisB.
binEdges);
392 ptr = std::unique_ptr<ISGL>(
static_cast<ISGL*
>(
393 new SGL(globalToLocal, localToGlobal, std::make_tuple(axisA, axisB), {pAxisA.
bValue, pAxisB.
bValue})));
422 const std::vector<const Surface*>& surfaces)
const {
424 "Complete binning by filling closest neighbour surfaces into "
430 <<
" (includes under/overflow)");
441 const std::vector<Acts::Vector2D>& locVertices)
const;