Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 09:12:35

0001 // This file is part of the ACTS project.
0002 //
0003 // Copyright (C) 2016 CERN for the benefit of the ACTS project
0004 //
0005 // This Source Code Form is subject to the terms of the Mozilla Public
0006 // License, v. 2.0. If a copy of the MPL was not distributed with this
0007 // file, You can obtain one at https://mozilla.org/MPL/2.0/.
0008 
0009 #pragma once
0010 
0011 #include <boost/test/data/test_case.hpp>
0012 
0013 #include "Acts/Definitions/Units.hpp"
0014 #include "Acts/Surfaces/CurvilinearSurface.hpp"
0015 #include "Acts/Surfaces/CylinderSurface.hpp"
0016 #include "Acts/Surfaces/DiscSurface.hpp"
0017 #include "Acts/Surfaces/PerigeeSurface.hpp"
0018 #include "Acts/Surfaces/PlaneSurface.hpp"
0019 #include "Acts/Surfaces/RegularSurface.hpp"
0020 
0021 #include <cmath>
0022 #include <numbers>
0023 #include <vector>
0024 
0025 namespace {
0026 
0027 namespace bdata = boost::unit_test::data;
0028 using namespace Acts;
0029 
0030 // reference surfaces
0031 // this includes only those surfaces that can take unbounded local positions as
0032 // inputs, i.e. no angles or strictly positive radii.
0033 const auto surfaces =
0034     bdata::make(std::vector<std::shared_ptr<const RegularSurface>>{
0035         Surface::makeShared<CylinderSurface>(
0036             Transform3::Identity(), 10 /* radius */, 100 /* half-length z */),
0037         // TODO perigee roundtrip local->global->local does not seem to work
0038         // Surface::makeShared<PerigeeSurface>(Vector3(0, 0, -1.5)),
0039         CurvilinearSurface(Vector3::Zero(), Vector3::UnitX()).planeSurface(),
0040         CurvilinearSurface(Vector3::Zero(), Vector3::UnitY()).planeSurface(),
0041         CurvilinearSurface(Vector3::Zero(), Vector3::UnitZ()).planeSurface(),
0042     });
0043 // positions
0044 const auto posAngle = bdata::xrange(-std::numbers::pi, std::numbers::pi, 0.5);
0045 const auto posPositiveNonzero = bdata::xrange(0.25, 1.0, 0.25);
0046 const auto posPositive = bdata::make(0.0) + posPositiveNonzero;
0047 const auto posSymmetric = bdata::xrange(-1.0, 1.0, 0.50);
0048 // time
0049 const auto ts = bdata::make(1.0);
0050 // direction angles
0051 const auto phis = bdata::make({0., std::numbers::pi, -std::numbers::pi,
0052                                std::numbers::pi / 2., -std::numbers::pi / 2.});
0053 const auto thetasNoForwardBackward = bdata::xrange(
0054     std::numbers::pi / 4., std::numbers::pi, std::numbers::pi / 4.);
0055 const auto thetas =
0056     bdata::make({0., std::numbers::pi}) + thetasNoForwardBackward;
0057 // absolute momenta
0058 const auto ps = bdata::make({1.0, 10.0});
0059 // charges
0060 const auto qsNonZero = bdata::make({-UnitConstants::e, UnitConstants::e});
0061 const auto qsAny = bdata::make({
0062     -2 * UnitConstants::e,
0063     -1 * UnitConstants::e,
0064     0 * UnitConstants::e,
0065     1 * UnitConstants::e,
0066     2 * UnitConstants::e,
0067 });
0068 
0069 }  // namespace