45 using namespace UnitLiterals;
48 double rotationAngle = 90_degree;
49 Vector3 xPos(cos(rotationAngle), 0., sin(rotationAngle));
51 Vector3 zPos(-sin(rotationAngle), 0., cos(rotationAngle));
62 surfaceMaterial = std::make_shared<HomogeneousSurfaceMaterial>(matProp);
67 using namespace UnitLiterals;
71 std::vector<Vector3> translations;
72 translations.push_back({-2_m, 0., 0.});
73 translations.push_back({-1_m, 0., 0.});
74 translations.push_back({1_m -
eps, 0., 0.});
75 translations.push_back({1_m +
eps, 0., 0.});
76 translations.push_back({2_m -
eps, 0., 0.});
77 translations.push_back({2_m +
eps, 0., 0.});
79 std::vector<double> rotAngle;
80 rotAngle.push_back(0.);
81 rotAngle.push_back(0.);
82 rotAngle.push_back(0.026);
83 rotAngle.push_back(-0.026);
84 rotAngle.push_back(0.026);
85 rotAngle.push_back(-0.026);
88 std::array<std::shared_ptr<const Surface>, 6> surfaces;
89 for (
unsigned int i = 0;
i < translations.size();
i++) {
91 double angle = rotAngle[
i];
92 Vector3 xPos(cos(angle), sin(angle), 0.);
93 Vector3 yPos(-sin(angle), cos(angle), 0.);
95 rotation_strip.col(0) = xPos;
96 rotation_strip.col(1) = yPos;
97 rotation_strip.col(2) = zPos;
100 trafo.translation() = translations[
i];
103 auto detElement = std::make_unique<const DetectorElementStub>(
106 surfaces[
i] = detElement->surface().getSharedPtr();
112 std::array<LayerPtr, 6> layers{};
113 for (
unsigned int i = 0;
i < 6;
i++) {
115 trafo.translation() = translations[
i];
117 std::unique_ptr<SurfaceArray> surArray(
new SurfaceArray(surfaces[
i]));
122 auto mutableSurface =
const_cast<Surface*
>(surfaces[
i].get());
128 trafoVol1.translation() =
Vector3(-1.5_m, 0., 0.);
131 std::make_shared<const CuboidVolumeBounds>(1.5_m, 0.5_m, 0.5_m);
138 layVec.push_back(layers[0]);
139 layVec.push_back(layers[1]);
140 std::unique_ptr<const LayerArray> layArr1(layArrCreator.
layerArray(
146 std::move(layArr1),
nullptr, {},
"Volume 1");
150 trafoVol2.translation() =
Vector3(1.5_m, 0., 0.);
153 for (
unsigned int i = 2;
i < 6;
i++) {
154 layVec.push_back(layers[
i]);
156 std::unique_ptr<const LayerArray> layArr2(
162 std::move(layArr2),
nullptr, {},
"Volume 2");
165 trackVolume2->glueTrackingVolume(
169 trackVolume1->glueTrackingVolume(
174 Transform3 trafoWorld(Transform3::Identity());
175 trafoWorld.translation() =
Vector3(0., 0., 0.);
178 std::make_shared<const CuboidVolumeBounds>(3._m, 0.5_m, 0.5_m);
180 std::vector<std::pair<TrackingVolumePtr, Vector3>> tapVec;
182 tapVec.push_back(std::make_pair(trackVolume1,
Vector3(-1.5_m, 0., 0.)));
183 tapVec.push_back(std::make_pair(trackVolume2,
Vector3(1.5_m, 0., 0.)));
185 std::vector<float> binBoundaries = {-3._m, 0., 3._m};
188 std::unique_ptr<const BinUtility> bu(
new BinUtility(binData));
190 std::shared_ptr<const TrackingVolumeArray> trVolArr(
197 return std::shared_ptr<TrackingGeometry>(
202 std::shared_ptr<const RectangleBounds>
rBounds =
nullptr;