Analysis Software
Documentation for sPHENIX simulation software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
PropagationCompareAtlasEigenConstant.cpp
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file PropagationCompareAtlasEigenConstant.cpp
1 // This file is part of the Acts project.
2 //
3 // Copyright (C) 2020 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/data/test_case.hpp>
10 #include <boost/test/unit_test.hpp>
11 
18 
19 #include <limits>
20 #include <utility>
21 
22 #include "PropagationDatasets.hpp"
23 #include "PropagationTests.hpp"
24 
25 namespace {
26 
27 namespace ds = ActsTests::PropagationDatasets;
28 using namespace Acts::UnitLiterals;
29 
31 using AtlasStepper = Acts::AtlasStepper;
32 using AtlasPropagator = Acts::Propagator<AtlasStepper>;
35 
36 // absolute parameter tolerances for position, direction, and absolute momentum
37 constexpr auto epsPos = 1_um;
38 constexpr auto epsDir = 0.125_mrad;
39 constexpr auto epsMom = 1_eV;
40 // relative covariance tolerance
41 constexpr auto epsCov = 0.1;
42 
45 
46 inline std::pair<AtlasPropagator, EigenPropagator> makePropagators(double bz) {
47  auto field = std::make_shared<MagneticField>(Acts::Vector3(0.0, 0.0, bz));
48  return {AtlasPropagator(AtlasStepper(field)),
50 }
51 
52 } // namespace
53 
54 BOOST_AUTO_TEST_SUITE(PropagationCompareAtlasEigenConstant)
55 
57  ds::phi*(ds::thetaWithoutBeam)*ds::absMomentum*
59  phi, theta, p, q, s, bz) {
60  auto [atlasPropagator, eigenPropagator] = makePropagators(bz);
62  atlasPropagator, eigenPropagator, geoCtx, magCtx,
63  makeParametersCurvilinearWithCovariance(phi, theta, p, q), s, epsPos,
64  epsDir, epsMom, epsCov);
65 }
66 
67 BOOST_DATA_TEST_CASE(ToCylinderAlongZ,
70  phi, theta, p, q, s, bz) {
71  auto [atlasPropagator, eigenPropagator] = makePropagators(bz);
73  atlasPropagator, eigenPropagator, geoCtx, magCtx,
75  ZCylinderSurfaceBuilder(), epsPos, epsDir, epsMom, epsCov);
76 }
77 
79  ToDisc,
82  phi, theta, p, q, s, bz) {
83  auto [atlasPropagator, eigenPropagator] = makePropagators(bz);
85  atlasPropagator, eigenPropagator, geoCtx, magCtx,
87  DiscSurfaceBuilder(), epsPos, epsDir, epsMom, epsCov);
88 }
89 
93  phi, theta, p, q, s, bz) {
94  auto [atlasPropagator, eigenPropagator] = makePropagators(bz);
96  atlasPropagator, eigenPropagator, geoCtx, magCtx,
98  PlaneSurfaceBuilder(), epsPos, epsDir, epsMom, epsCov);
99 }
100 
101 BOOST_DATA_TEST_CASE(ToStrawAlongZ,
104  phi, theta, p, q, s, bz) {
105  auto [atlasPropagator, eigenPropagator] = makePropagators(bz);
107  atlasPropagator, eigenPropagator, geoCtx, magCtx,
109  ZStrawSurfaceBuilder(), epsPos, epsDir, epsMom, epsCov);
110 }
111 
112 BOOST_AUTO_TEST_SUITE_END()