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