File indexing completed on 2025-10-24 08:20:53
0001
0002
0003
0004
0005
0006
0007
0008
0009 #include <boost/test/unit_test.hpp>
0010
0011 #include "Acts/Surfaces/PlaneSurface.hpp"
0012 #include "Acts/Surfaces/RectangleBounds.hpp"
0013 #include "Acts/Surfaces/Surface.hpp"
0014 #include "ActsPlugins/GeoModel/GeoModelDetectorElement.hpp"
0015
0016 #include <GeoModelKernel/GeoBox.h>
0017 #include <GeoModelKernel/GeoFullPhysVol.h>
0018 #include <GeoModelKernel/GeoLogVol.h>
0019 #include <GeoModelKernel/GeoMaterial.h>
0020
0021 using namespace Acts;
0022 using namespace ActsPlugins;
0023
0024 namespace ActsTests {
0025
0026 BOOST_AUTO_TEST_SUITE(GeoModelSuite)
0027
0028 BOOST_AUTO_TEST_CASE(GeoModelDetectorElementConstruction) {
0029 auto material = make_intrusive<GeoMaterial>("Material", 1.0);
0030
0031
0032
0033 auto boxXY = make_intrusive<GeoBox>(100, 200, 2);
0034 auto logXY = make_intrusive<GeoLogVol>("LogVolumeXY", boxXY, material);
0035 auto fphysXY = make_intrusive<GeoFullPhysVol>(logXY);
0036 auto rBounds = std::make_shared<RectangleBounds>(100, 200);
0037
0038 PVConstLink physXY{fphysXY};
0039 auto elementXY = GeoModelDetectorElement::createDetectorElement<PlaneSurface>(
0040 physXY, rBounds, Transform3::Identity(), 2.0);
0041
0042 const Surface& surface = elementXY->surface();
0043 BOOST_CHECK(surface.type() == Surface::SurfaceType::Plane);
0044 }
0045
0046 BOOST_AUTO_TEST_SUITE_END()
0047
0048 }