EIC Software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
TrackParametersDatasets.hpp
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file TrackParametersDatasets.hpp
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 #pragma once
10 
11 #include <boost/test/data/test_case.hpp>
12 
17 #include "Acts/Utilities/Units.hpp"
18 
19 #include <cmath>
20 #include <vector>
21 
22 namespace {
23 
24 namespace bdata = boost::unit_test::data;
25 using namespace Acts;
26 
27 // reference surfaces
28 // this includes only those surfaces that can take unbounded local positions as
29 // inputs, i.e. no angles or strictly positive radii.
30 const auto surfaces = bdata::make(std::vector<std::shared_ptr<const Surface>>{
31  Surface::makeShared<CylinderSurface>(
32  Transform3D::Identity(), 10 /* radius */, 100 /* half-length z */),
33  // TODO perigee roundtrip local->global->local does not seem to work
34  // Surface::makeShared<PerigeeSurface>(Vector3D(0, 0, -1.5)),
35  Surface::makeShared<PlaneSurface>(Vector3D::Zero(), Vector3D::UnitX()),
36  Surface::makeShared<PlaneSurface>(Vector3D::Zero(), Vector3D::UnitY()),
37  Surface::makeShared<PlaneSurface>(Vector3D::Zero(), Vector3D::UnitZ()),
38 });
39 // positions
40 const auto posAngle = bdata::xrange(-M_PI, M_PI, 0.25);
41 const auto posPositiveNonzero = bdata::xrange(0.25, 1.0, 0.25);
42 const auto posPositive = bdata::make(0.0) + posPositiveNonzero;
43 const auto posSymmetric = bdata::xrange(-1.0, 1.0, 0.25);
44 // time
45 const auto ts = bdata::make(1.0);
46 // direction angles
47 const auto phis = bdata::make({0.0, M_PI, -M_PI, M_PI_2, -M_PI_2});
48 const auto thetasNoForwardBackward = bdata::xrange(M_PI_4, M_PI, M_PI_4);
49 const auto thetas = bdata::make({0.0, M_PI}) + thetasNoForwardBackward;
50 // absolute momenta
51 const auto ps = bdata::make({1.0, 10.0});
52 // charges
53 const auto qsNonZero = bdata::make({-UnitConstants::e, UnitConstants::e});
54 const auto qsAny = bdata::make({
55  -2 * UnitConstants::e,
56  -1 * UnitConstants::e,
57  0 * UnitConstants::e,
58  1 * UnitConstants::e,
59  2 * UnitConstants::e,
60 });
61 
62 } // namespace