9 #include <boost/test/unit_test.hpp>
29 BOOST_AUTO_TEST_SUITE(ActSvg)
35 std::shared_ptr<const Acts::LayerCreator> lCreator(
nullptr);
38 if (lCreator ==
nullptr) {
41 std::make_shared<const Acts::SurfaceArrayCreator>();
42 lCreator = std::make_shared<const Acts::LayerCreator>(lCreatorCfg);
48 unsigned int nSegments,
50 bool useTrapezoids =
false) {
53 std::vector<std::shared_ptr<const Acts::Surface>> moduleSurfaces;
57 moduleSurfaces.reserve(nSegments * nRings);
59 if (not useTrapezoids) {
60 for (
unsigned int ir = 0; ir < nRings; ++ir) {
61 std::shared_ptr<const Acts::RadialBounds>
rBounds =
nullptr;
62 rBounds = std::make_shared<Acts::RadialBounds>(
63 rInner + ir * rStep - 0.025 * rInner,
64 rInner + (ir + 1
u) * rStep + 0.025 * rInner, 0.55 * phiStep, 0.);
65 for (
unsigned int is = 0; is < nSegments; ++is) {
67 auto placement = Acts::Transform3::Identity();
74 Acts::Surface::makeShared<Acts::DiscSurface>(placement,
rBounds);
75 moduleSurfaces.push_back(dModule);
79 for (
unsigned int ir = 0; ir < nRings; ++ir) {
85 1.15 * (rInner + ir * rStep) * M_PI / nSegments;
87 1.15 * (rInner + (ir + 1) * rStep) * M_PI / nSegments;
89 std::shared_ptr<const Acts::TrapezoidBounds> tBounds =
90 std::make_shared<const Acts::TrapezoidBounds>(xHalfMin, xHalfMax,
92 for (
unsigned int is = 0; is < nSegments; ++is) {
95 Acts::Vector3 center(radius * std::cos(cphi), radius * std::sin(cphi),
96 (is % 2) * 2 + (ir % 2) * 5);
102 rotation.col(0) = localX;
103 rotation.col(1) = localY;
104 rotation.col(2) = localZ;
108 Acts::Surface::makeShared<Acts::PlaneSurface>(placement, tBounds);
109 moduleSurfaces.push_back(dModule);
114 return lCreator->discLayer(tgContext, moduleSurfaces, nRings, nSegments);
122 discLayerStyle.
fillColor = {51, 153, 255};
125 discLayerStyle.
highlights = {
"mouseover",
"mouseout"};
133 auto discLayer = generateDiscLayer(100, 250, 32
u, 4
u);
136 lOptions.
name =
"disc_layer_sectors";
141 auto discLayerSheets =
144 for (
const auto&
s : discLayerSheets) {
152 discLayerStyle.
fillColor = {51, 153, 255};
155 discLayerStyle.
highlights = {
"mouseover",
"mouseout"};
163 auto discLayer = generateDiscLayer(100, 250, 32
u, 4
u,
true);
166 lOptions.
name =
"disc_layer_trapezoid";
171 auto discLayerSheets =
174 for (
const auto&
s : discLayerSheets) {
182 cylinderLayerStyle.
fillColor = {51, 153, 255};
185 cylinderLayerStyle.
highlights = {
"mouseover",
"mouseout"};
196 if (pixelVolume !=
nullptr and pixelVolume->confinedLayers() !=
nullptr) {
197 auto layers = pixelVolume->confinedLayers()->arrayObjects();
199 for (
const auto&
layer : layers) {
200 if (
layer->surfaceArray() !=
nullptr) {
204 {{geoID, cylinderLayerStyle}});
209 for (
const auto&
s : layerSheets) {
219 BOOST_AUTO_TEST_SUITE_END()