9 #include <boost/test/data/test_case.hpp>
10 #include <boost/test/unit_test.hpp>
32 #include "TGeoManager.h"
33 #include "TGeoMaterial.h"
34 #include "TGeoMatrix.h"
35 #include "TGeoMedium.h"
37 #include "TGeoVolume.h"
41 namespace tt = boost::test_tools;
49 ViewConfig
red({200, 0, 0});
50 ViewConfig
green({0, 200, 0});
51 ViewConfig
blue({0, 0, 200});
64 new TGeoManager(
"trd1",
"poza9");
65 TGeoMaterial *mat =
new TGeoMaterial(
"Al", 26.98, 13, 2.7);
66 TGeoMedium *med =
new TGeoMedium(
"MED", 1, mat);
67 TGeoVolume *top = gGeoManager->MakeBox(
"TOP", med, 100, 100, 100);
68 gGeoManager->SetTopVolume(top);
69 TGeoVolume *vol = gGeoManager->MakeTrd1(
"Trd1", med, hxmin, hxmax, ht, hy);
70 gGeoManager->CloseGeometry();
73 std::vector<std::string>
allowedAxes = {
"XZ*",
"xZ*",
"xz*",
"Xz*"};
76 for (
const auto &axes : allowedAxes) {
78 *vol->GetShape(), *gGeoIdentity, axes, 1);
79 BOOST_CHECK_NE(
plane,
nullptr);
84 BOOST_CHECK_NE(
bounds,
nullptr);
96 const Vector3 offset{(-5.5 + (itrd++) * 2.5) * hxmax, 0., 0.};
101 objVis, center, center + 1.2 * (hXminY + hXmaxY) * rotation.col(0), 4.,
104 objVis, center, center + 1.2 * hY * rotation.col(1), 4., 2.5,
green);
106 objVis, center, center + 2 * rotation.col(2), 4., 2.5,
blue);
110 std::vector<std::string> notAllowed = {
"XY*",
"YZ*",
"ZX*",
"ZY*"};
111 for (
const auto &naxis : notAllowed) {
113 *gGeoIdentity, naxis, 1),
114 std::invalid_argument);
116 objVis.
write(
"TGeoConversion_TGeoTrd1_PlaneSurface");