Analysis Software
Documentation for sPHENIX simulation software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
ReferenceGeneratorsTests.cpp
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file ReferenceGeneratorsTests.cpp
1 // This file is part of the Acts project.
2 //
3 // Copyright (C) 2023 CERN for the benefit of the Acts project
4 //
5 // This Source Code Form is subject to the terms of the Mozilla Public
6 // License, v. 2.0. If a copy of the MPL was not distributed with this
7 // file, You can obtain one at http://mozilla.org/MPL/2.0/.
8 
9 #include <boost/test/unit_test.hpp>
10 
18 
19 #include <memory>
20 #include <utility>
21 #include <vector>
22 
23 using namespace Acts::Experimental::detail;
24 
26 
27 auto rBounds = std::make_shared<Acts::RectangleBounds>(10, 20);
28 auto sTransform = Acts::Transform3::Identity();
29 auto pSurface = Acts::Surface::makeShared<Acts::PlaneSurface>(
30  sTransform.pretranslate(Acts::Vector3(20., 20., 100.)), std::move(rBounds));
31 
32 BOOST_AUTO_TEST_SUITE(Detector)
33 
34 BOOST_AUTO_TEST_CASE(CenterReference) {
35  // Simply return the cetner
37  BOOST_CHECK(center.size() == 1u);
38  BOOST_CHECK(center.front().isApprox(Acts::Vector3(20., 20., 100.)));
39 }
40 
41 BOOST_AUTO_TEST_CASE(BinningPositionReference) {
42  // Simply return binning position, we test only the behavior of the generator
43  // not the output
44  auto binningPosition =
46  *pSurface);
47  BOOST_CHECK(binningPosition.size() == 1u);
48 }
49 
50 BOOST_AUTO_TEST_CASE(PolyhedronReference) {
51  // Simply return binning position, we test only the behavior of the generator
52  // not the output
53  auto referencePositions =
55  // 4 corners with center of gravity
56  BOOST_CHECK(referencePositions.size() == 5u);
57 }
58 
59 BOOST_AUTO_TEST_SUITE_END()