27 double surfaceRstagger,
double surfaceZoverlap,
double layerEnvelope,
28 double volumeEnvelope,
double innerVolumeR,
double outerVolumeR,
31 auto sfnPosition =
Vector3(0., 0., -3 * surfaceHalfLengthZ - surfaceZoverlap);
33 auto sfcTransform = Transform3::Identity();
34 auto sfpPosition =
Vector3(0., 0., 3 * surfaceHalfLengthZ - surfaceZoverlap);
37 auto sfnBounds = std::make_shared<CylinderBounds>(
38 surfaceR - 0.5 * surfaceRstagger, surfaceHalfLengthZ);
39 auto sfn = Surface::makeShared<CylinderSurface>(sfnTransform, sfnBounds);
40 auto sfcBounds = std::make_shared<CylinderBounds>(
41 surfaceR + 0.5 * surfaceRstagger, surfaceHalfLengthZ);
42 auto sfc = Surface::makeShared<CylinderSurface>(sfcTransform, sfcBounds);
43 auto sfpBounds = std::make_shared<CylinderBounds>(
44 surfaceR - 0.5 * surfaceRstagger, surfaceHalfLengthZ);
45 auto sfp = Surface::makeShared<CylinderSurface>(sfpTransform, sfpBounds);
50 double bUmin = sfnPosition.z() - surfaceHalfLengthZ;
51 double bUmax = sfpPosition.z() + surfaceHalfLengthZ;
53 std::vector<std::shared_ptr<const Surface>> surfaces_only = {{sfn, sfc, sfp}};
54 std::vector<const Surface*> surfaces_only_raw = {
55 {sfn.get(), sfc.get(), sfp.get()}};
57 detail::Axis<detail::AxisType::Equidistant, detail::AxisBoundaryType::Bound>
58 axis(bUmin, bUmax, surfaces_only.size());
59 auto g2l = [](
const Vector3& glob) {
60 return std::array<double, 1>({{glob.z()}});
62 auto l2g = [](
const std::array<double, 1>&
loc) {
65 auto sl = std::make_unique<SurfaceArray::SurfaceGridLookup<decltype(axis)>>(
67 sl->fill(gctx, surfaces_only_raw);
68 auto bArray = std::make_unique<SurfaceArray>(
std::move(sl), surfaces_only);
71 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>(
80 innerVolumeR, outerVolumeR, bUmax + volumeEnvelope);
94 double hVolumeHalflength,
97 using VAP = std::pair<TrackingVolumePtr, Vector3>;
101 auto hVolumeBounds = std::make_shared<const CylinderVolumeBounds>(
102 0., hVolumeR, hVolumeHalflength);
104 auto vUtility = std::make_unique<const BinUtility>(volumes.size(), 0.,
106 std::shared_ptr<const TrackingVolumeArray> vArray =
107 std::make_shared<const BinnedArrayXD<TrackingVolumePtr>>(