9 #include <boost/test/data/test_case.hpp>
10 #include <boost/test/unit_test.hpp>
21 #include "TGeoManager.h"
22 #include "TGeoMaterial.h"
23 #include "TGeoMatrix.h"
24 #include "TGeoMedium.h"
26 #include "TGeoVolume.h"
30 namespace tt = boost::test_tools;
38 ViewConfig
red({200, 0, 0});
39 ViewConfig
green({0, 200, 0});
40 ViewConfig
blue({0, 0, 200});
53 new TGeoManager(
"trd1",
"poza9");
54 TGeoMaterial *mat =
new TGeoMaterial(
"Al", 26.98, 13, 2.7);
55 TGeoMedium *med =
new TGeoMedium(
"MED", 1, mat);
56 TGeoVolume *top = gGeoManager->MakeBox(
"TOP", med, 100, 100, 100);
57 gGeoManager->SetTopVolume(top);
58 TGeoVolume *vol = gGeoManager->MakeTrd1(
"Trd1", med, hxmin, hxmax, t, hy);
59 gGeoManager->CloseGeometry();
62 std::vector<std::string>
allowedAxes = {
"XZ*",
"xZ*",
"xz*",
"Xz*"};
65 for (
const auto &axes : allowedAxes) {
67 *gGeoIdentity, axes, 1);
68 BOOST_CHECK_NE(
plane,
nullptr);
72 BOOST_CHECK_NE(bounds,
nullptr);
90 objVis, center, center + 1.2 * (hXminY + hXmaxY) * rotation.col(0), 4.,
93 objVis, center, center + 1.2 * hY * rotation.col(1), 4., 2.5,
green);
95 objVis, center, center + 2 * rotation.col(2), 4., 2.5,
blue);
99 std::vector<std::string> notAllowed = {
"XY*",
"YZ*",
"ZX*",
"ZY*"};
100 for (
const auto &naxis : notAllowed) {
102 *gGeoIdentity, naxis, 1),
103 std::invalid_argument);
105 objVis.
write(
"TGeoConversion_TGeoTrd1_PlaneSurface");