44 using namespace UnitLiterals;
47 double rotationAngle = 90_degree;
48 Vector3D xPos(
cos(rotationAngle), 0., sin(rotationAngle));
50 Vector3D zPos(-sin(rotationAngle), 0.,
cos(rotationAngle));
61 surfaceMaterial = std::make_shared<HomogeneousSurfaceMaterial>(matProp);
66 using namespace UnitLiterals;
70 std::vector<Vector3D> translations;
71 translations.push_back({-2_m, 0., 0.});
72 translations.push_back({-1_m, 0., 0.});
73 translations.push_back({1_m -
eps, 0., 0.});
74 translations.push_back({1_m +
eps, 0., 0.});
75 translations.push_back({2_m -
eps, 0., 0.});
76 translations.push_back({2_m +
eps, 0., 0.});
79 std::array<std::shared_ptr<const Surface>, 6> surfaces;
81 for (i = 0; i < translations.size(); i++) {
83 trafo.translation() = translations[i];
85 auto detElement = std::make_unique<const DetectorElementStub>(
88 surfaces[i] = detElement->surface().getSharedPtr();
94 std::array<LayerPtr, 6> layers;
95 for (i = 0; i < 6; i++) {
97 trafo.translation() = translations[i];
99 std::unique_ptr<SurfaceArray> surArray(
new SurfaceArray(surfaces[i]));
104 auto mutableSurface =
const_cast<Surface*
>(surfaces[i].get());
110 trafoVol1.translation() =
Vector3D(-1.5_m, 0., 0.);
113 std::make_shared<const CuboidVolumeBounds>(1.5_m, 0.5_m, 0.5_m);
120 layVec.push_back(layers[0]);
121 layVec.push_back(layers[1]);
122 std::unique_ptr<const LayerArray> layArr1(layArrCreator.
layerArray(
128 std::move(layArr1),
nullptr, {},
"Volume 1");
132 trafoVol2.translation() =
Vector3D(1.5_m, 0., 0.);
135 for (i = 2; i < 6; i++)
136 layVec.push_back(layers[i]);
137 std::unique_ptr<const LayerArray> layArr2(
143 std::move(layArr2),
nullptr, {},
"Volume 2");
146 trackVolume2->glueTrackingVolume(
150 trackVolume1->glueTrackingVolume(
156 trafoWorld.translation() =
Vector3D(0., 0., 0.);
159 std::make_shared<const CuboidVolumeBounds>(3._m, 0.5_m, 0.5_m);
161 std::vector<std::pair<TrackingVolumePtr, Vector3D>> tapVec;
163 tapVec.push_back(std::make_pair(trackVolume1,
Vector3D(-1.5_m, 0., 0.)));
164 tapVec.push_back(std::make_pair(trackVolume2,
Vector3D(1.5_m, 0., 0.)));
166 std::vector<float> binBoundaries = {-3._m, 0., 3._m};
169 std::unique_ptr<const BinUtility> bu(
new BinUtility(binData));
171 std::shared_ptr<const TrackingVolumeArray> trVolArr(
178 return std::shared_ptr<TrackingGeometry>(
183 std::shared_ptr<const RectangleBounds>
rBounds =
nullptr;