9 #include <boost/test/data/test_case.hpp>
10 #include <boost/test/unit_test.hpp>
39 using namespace UnitLiterals;
43 BOOST_AUTO_TEST_SUITE(Geometry)
51 std::vector<std::shared_ptr<Surface>> layerSurfacePtrs;
54 auto hTransform = Transform3::Identity();
55 layerSurfacePtrs.push_back(
56 Surface::makeShared<CylinderSurface>(hTransform, 15., 800.));
59 std::vector<ActsScalar> pLayerRadii = {32., 72., 116., 172.};
60 std::vector<std::pair<int, int>> pLayerBinning = {
61 {16, 14}, {32, 14}, {52, 14}, {78, 14}};
62 std::vector<ActsScalar> pModuleTiltPhi = {0.145, 0.145, 0.145, 0.145};
63 std::vector<ActsScalar> pModuleHalfX = {8.4, 8.4, 8.4, 8.4};
64 std::vector<ActsScalar> pModuleHalfY = {36., 36., 36., 36.};
65 std::vector<ActsScalar> pModuleThickness = {0.15, 0.15, 0.15, 0.15};
68 for (
size_t ilp = 0; ilp < pLayerRadii.size(); ++ilp) {
70 detectorStore, pModuleHalfX[ilp], pModuleHalfY[ilp],
71 pModuleThickness[ilp], pModuleTiltPhi[ilp], pLayerRadii[ilp], 2_mm,
72 5_mm, pLayerBinning[ilp]);
75 for (
auto& sf : layerSurfaces) {
82 std::vector<ActsScalar> discZ = {-700., -600., 600., 700.};
83 std::vector<ActsScalar> discRadii = {60., 60., 60., 60.};
84 std::vector<int> discModules = {22, 22, 22, 22};
86 std::vector<ActsScalar> dModuleHalfXMinY = {6.4, 6.4, 6.4, 6.4};
87 std::vector<ActsScalar> dModuleHalfXMaxY = {12.4, 12.4, 12.4, 12.4};
88 std::vector<ActsScalar> dModuleHalfY = {36., 36., 36., 36.};
89 std::vector<ActsScalar> dModuleTilt = {0.075, 0.075, 0.075, 0.075};
90 std::vector<ActsScalar> dModuleThickness = {0.15, 0.15, 0.15, 0.15};
92 for (
size_t ilp = 0; ilp < discZ.size(); ++ilp) {
93 std::vector<const Surface*> layerSurfaces = ctGeometry.
surfacesRing(
94 detectorStore, dModuleHalfXMinY[ilp], dModuleHalfXMaxY[ilp],
95 dModuleHalfY[ilp], dModuleThickness[ilp], dModuleTilt[ilp],
96 discRadii[ilp], discZ[ilp], 2., discModules[ilp]);
97 for (
auto& sf : layerSurfaces) {
105 beamPipeContainer.
name =
"odd-beam-pipe";
108 beamPipe.
name =
"odd-beam-pipe-l";
111 Acts::Surface::SurfaceType::Cylinder};
117 pixelContainer.
name =
"odd-pixel";
118 pixelContainer.extent.set(
Acts::binR, 18., 200);
121 pixelNec.
name =
"odd-pixel-nec";
125 pixNecD1.
name =
"odd-pixel-nec-d1";
128 pixNecD0.
name =
"odd-pixel-nec-d0";
131 {pixNecD1, pixNecD0},
134 for (
auto& cv : pixelNec.
container.value().constituentVolumes) {
140 pixelBarrel.
name =
"odd-pixel-barrel";
144 pixBarrelL0.
name =
"odd-pixel-barrel-l0";
148 Acts::Surface::SurfaceType::Cylinder};
150 pixBarrelL1.
name =
"odd-pixel-barrel-l1";
154 Acts::Surface::SurfaceType::Cylinder};
156 pixBarrelL2.
name =
"odd-pixel-barrel-l2";
160 Acts::Surface::SurfaceType::Cylinder};
162 pixBarrelL3.
name =
"odd-pixel-barrel-l3";
166 Acts::Surface::SurfaceType::Cylinder};
169 {pixBarrelL0, pixBarrelL1, pixBarrelL2, pixBarrelL3},
174 pixelPec.
name =
"odd-pixel-pec";
178 pixPecD0.
name =
"odd-pixel-pec-d0";
181 pixPecD1.
name =
"odd-pixel-pec-d1";
185 {pixPecD0, pixPecD1},
188 for (
auto& cv : pixelPec.container.value().constituentVolumes) {
194 {pixelNec, pixelBarrel, pixelPec},
196 {-1000., -580., 580., 1000.})}};
199 detectorContainer.
name =
"odd-detector";
200 detectorContainer.extent.set(
Acts::binR, 0., 200);
202 {beamPipeContainer, pixelContainer},
206 detector.name =
"odd";
207 detector.worldVolume = detectorContainer;
212 auto surfaceArrayCreator = std::make_shared<const Acts::SurfaceArrayCreator>(
218 auto layerCreator = std::make_shared<Acts::LayerCreator>(
222 auto layerArrayCreator = std::make_shared<const Acts::LayerArrayCreator>(
226 auto tVolumeArrayCreator =
227 std::make_shared<const Acts::TrackingVolumeArrayCreator>(
233 cvhConfig.trackingVolumeArrayCreator = tVolumeArrayCreator;
234 auto cylinderVolumeHelper =
235 std::make_shared<const Acts::CylinderVolumeHelper>(
241 kdtgConfig.trackingVolumeHelper = cylinderVolumeHelper;
243 kdtgConfig.surfaces = layerSurfacePtrs;
246 kdtgConfig.protoDetector =
detector;
253 auto trackingGeometry = kdtTrackingGeometryBuilder.trackingGeometry(tContext);
257 BOOST_AUTO_TEST_SUITE_END()