27 const std::string&
name) {
30 Vector3D(0., 0., -3 * surfaceHalfLengthZ - surfaceZoverlap);
32 std::make_shared<const Transform3D>(
Translation3D(sfnPosition));
33 auto sfcTransform =
nullptr;
34 auto sfpPosition =
Vector3D(0., 0., 3 * surfaceHalfLengthZ - surfaceZoverlap);
36 std::make_shared<const Transform3D>(
Translation3D(sfpPosition));
38 auto sfnBounds = std::make_shared<CylinderBounds>(
40 auto sfn = Surface::makeShared<CylinderSurface>(sfnTransform, sfnBounds);
41 auto sfcBounds = std::make_shared<CylinderBounds>(
43 auto sfc = Surface::makeShared<CylinderSurface>(sfcTransform, sfcBounds);
44 auto sfpBounds = std::make_shared<CylinderBounds>(
46 auto sfp = Surface::makeShared<CylinderSurface>(sfpTransform, sfpBounds);
54 std::vector<std::shared_ptr<const Surface>> surfaces_only = {{sfn, sfc, sfp}};
55 std::vector<const Surface*> surfaces_only_raw = {
56 {sfn.get(), sfc.get(), sfp.get()}};
58 detail::Axis<detail::AxisType::Equidistant, detail::AxisBoundaryType::Bound>
59 axis(bUmin, bUmax, surfaces_only.size());
60 auto g2l = [](
const Vector3D& glob) {
61 return std::array<double, 1>({{glob.z()}});
63 auto l2g = [](
const std::array<double, 1>& loc) {
66 auto sl = std::make_unique<SurfaceArray::SurfaceGridLookup<decltype(axis)>>(
67 g2l, l2g, std::make_tuple(axis));
68 sl->fill(gctx, surfaces_only_raw);
69 auto bArray = std::make_unique<SurfaceArray>(std::move(sl), surfaces_only);
72 auto layer0bounds = std::make_shared<const CylinderBounds>(surfaceR, bUmax);
74 surfaceRstagger + 2 * layerEnvelope);
75 std::unique_ptr<const LayerArray> layerArray =
76 std::make_unique<const BinnedArrayXD<LayerPtr>>(layer0);
79 auto volumeBounds = std::make_shared<const CylinderVolumeBounds>(
83 nullptr, volumeBounds,
nullptr, 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));