27 const std::string&
name) {
30 Vector3D(0., 0., -3 * surfaceHalfLengthZ - surfaceZoverlap);
32 auto sfcTransform = Transform3D::Identity();
33 auto sfpPosition =
Vector3D(0., 0., 3 * surfaceHalfLengthZ - surfaceZoverlap);
36 auto sfnBounds = std::make_shared<CylinderBounds>(
38 auto sfn = Surface::makeShared<CylinderSurface>(sfnTransform, sfnBounds);
39 auto sfcBounds = std::make_shared<CylinderBounds>(
41 auto sfc = Surface::makeShared<CylinderSurface>(sfcTransform, sfcBounds);
42 auto sfpBounds = std::make_shared<CylinderBounds>(
44 auto sfp = Surface::makeShared<CylinderSurface>(sfpTransform, sfpBounds);
52 std::vector<std::shared_ptr<const Surface>> surfaces_only = {{sfn, sfc, sfp}};
53 std::vector<const Surface*> surfaces_only_raw = {
54 {sfn.get(), sfc.get(), sfp.get()}};
56 detail::Axis<detail::AxisType::Equidistant, detail::AxisBoundaryType::Bound>
57 axis(bUmin, bUmax, surfaces_only.size());
58 auto g2l = [](
const Vector3D& glob) {
59 return std::array<double, 1>({{glob.z()}});
61 auto l2g = [](
const std::array<double, 1>& loc) {
64 auto sl = std::make_unique<SurfaceArray::SurfaceGridLookup<decltype(axis)>>(
65 g2l, l2g, std::make_tuple(axis));
66 sl->fill(gctx, surfaces_only_raw);
67 auto bArray = std::make_unique<SurfaceArray>(std::move(sl), surfaces_only);
70 auto layer0bounds = std::make_shared<const CylinderBounds>(surfaceR, bUmax);
73 surfaceRstagger + 2 * layerEnvelope);
74 std::unique_ptr<const LayerArray> layerArray =
75 std::make_unique<const BinnedArrayXD<LayerPtr>>(layer0);
78 auto volumeBounds = std::make_shared<const CylinderVolumeBounds>(
83 std::move(layerArray),
nullptr, {},
name);
93 double hVolumeHalflength,
94 const std::string&
name) {
96 using VAP = std::pair<TrackingVolumePtr, Vector3D>;
97 std::vector<VAP> volumes = {{
iVolume, iVolume->binningPosition(gctx,
binR)},
100 auto hVolumeBounds = std::make_shared<const CylinderVolumeBounds>(
101 0., hVolumeR, hVolumeHalflength);
103 auto vUtility = std::make_unique<const BinUtility>(volumes.size(), 0.,
105 std::shared_ptr<const TrackingVolumeArray> vArray =
106 std::make_shared<const BinnedArrayXD<TrackingVolumePtr>>(
107 volumes, std::move(vUtility));