Analysis Software
Documentation for sPHENIX simulation software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
DetectorNavigatorTests.cpp
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file DetectorNavigatorTests.cpp
1 // This file is part of the Acts project.
2 //
3 // Copyright (C) 2022 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 
30 
31 #include <algorithm>
32 #include <array>
33 #include <memory>
34 #include <tuple>
35 #include <utility>
36 #include <vector>
37 
38 using namespace Acts::UnitLiterals;
39 
40 namespace Acts {
41 class Surface;
42 } // namespace Acts
43 
46 
47 BOOST_AUTO_TEST_SUITE(Experimental)
48 
49 BOOST_AUTO_TEST_CASE(DetectorNavigator) {
52  "Inner Volume", Acts::Transform3::Identity(),
53  std::make_unique<Acts::CuboidVolumeBounds>(3, 3, 3),
54  std::vector<std::shared_ptr<Acts::Surface>>(),
55  std::vector<std::shared_ptr<Acts::Experimental::DetectorVolume>>(),
58 
61  "Detector Volume", Acts::Transform3::Identity(),
62  std::make_unique<Acts::CuboidVolumeBounds>(10, 10, 10),
63  std::vector<std::shared_ptr<Acts::Surface>>(),
64  std::vector<std::shared_ptr<Acts::Experimental::DetectorVolume>>(
65  {innerVolume}),
68 
70  "Detector", {detectorVolume}, Acts::Experimental::tryRootVolumes());
71 
72  using ActionListType = Acts::ActionList<>;
73  using AbortListType = Acts::AbortList<>;
74 
75  auto bField = std::make_shared<Acts::ConstantBField>(
77 
79  navCfg.detector = detector.get();
80 
83  navCfg, Acts::getDefaultLogger("DetectorNavigator",
87  auto propagator = Acts::Propagator<Acts::EigenStepper<>,
91 
92  // define start parameters
93  Acts::Vector4 pos(0, 0, -5, 0);
94  Acts::Vector3 mom(0, 0, 10);
95  Acts::CurvilinearTrackParameters start(pos, mom, +1_e / mom.norm(),
96  std::nullopt,
98  // propagate to the cylinder surface
99  propagator.propagate(start, options);
100 }
101 
102 BOOST_AUTO_TEST_SUITE_END()