File indexing completed on 2025-01-18 09:13:03
0001
0002
0003
0004
0005
0006
0007
0008
0009 #pragma once
0010
0011 #include "Acts/Geometry/TrackingGeometry.hpp"
0012 #include "Acts/Geometry/TrackingVolume.hpp"
0013 #include "Acts/Tests/CommonHelpers/CylindricalTrackingGeometry.hpp"
0014 #include "Acts/Visualization/GeometryView3D.hpp"
0015 #include "Acts/Visualization/IVisualization3D.hpp"
0016
0017 #include <fstream>
0018 #include <sstream>
0019 #include <string>
0020
0021 namespace Acts::TrackingGeometryView3DTest {
0022
0023 GeometryContext tgContext = GeometryContext();
0024
0025 Test::CylindricalTrackingGeometry cGeometry(tgContext);
0026 auto tGeometry = cGeometry();
0027
0028
0029
0030
0031
0032
0033
0034
0035
0036 static inline std::string run(IVisualization3D& helper, bool triangulate,
0037 const std::string& tag) {
0038 std::stringstream cStream;
0039
0040 ViewConfig viewSensitive = {.color = {0, 180, 240},
0041 .quarterSegments = 72,
0042 .triangulate = triangulate};
0043 ViewConfig viewPassive = {.color = {240, 280, 0},
0044 .quarterSegments = 72,
0045 .triangulate = triangulate};
0046 ViewConfig viewVolume = {.color = {220, 220, 0},
0047 .quarterSegments = 72,
0048 .triangulate = triangulate};
0049 ViewConfig viewContainer = {.color = {220, 220, 0},
0050 .quarterSegments = 72,
0051 .triangulate = triangulate};
0052 ViewConfig viewGrid = {.color = {220, 0, 0},
0053 .offset = 3.,
0054 .quarterSegments = 8,
0055 .triangulate = triangulate};
0056
0057 const Acts::TrackingVolume& tgVolume = *(tGeometry->highestTrackingVolume());
0058
0059 GeometryView3D::drawTrackingVolume(helper, tgVolume, tgContext, viewContainer,
0060 viewVolume, viewPassive, viewSensitive,
0061 viewGrid, true, tag);
0062
0063 GeometryView3D::drawTrackingVolume(helper, tgVolume, tgContext, viewContainer,
0064 viewVolume, viewPassive, viewSensitive,
0065 viewGrid, false);
0066 helper.write(cStream);
0067
0068 return cStream.str();
0069 }
0070
0071 }