2424#include " ActsTests/CommonHelpers/CylindricalTrackingGeometry.hpp"
2525
2626#include < fstream>
27+ #include < numbers>
2728
2829#include < nlohmann/json.hpp>
2930
@@ -58,8 +59,8 @@ BOOST_AUTO_TEST_CASE(RegularCylinderIndexGridNavigationPolicyToJson) {
5859 }
5960
6061 // Create the phi-z axes and grids
61- Axis<AxisType::Equidistant, AxisBoundaryType::Closed> axisPhi (-M_PI, M_PI,
62- 36 );
62+ Axis<AxisType::Equidistant, AxisBoundaryType::Closed> axisPhi (
63+ -std::numbers::pi, std::numbers::pi, 36 );
6364 Axis<AxisType::Equidistant, AxisBoundaryType::Bound> axisZ (-400 ., 400 ., 30 );
6465 Grid gridPhiZ (Type<std::vector<std::size_t >>, std::move (axisPhi),
6566 std::move (axisZ));
@@ -104,16 +105,16 @@ BOOST_AUTO_TEST_CASE(RegularDiscIndexGridNavigationPolicyToJson) {
104105 auto boundsOr = std::make_shared<TrapezoidBounds>(1.2 , 2.3 , 2.2 );
105106
106107 for (std::size_t is = 0 ; is < 12 ; ++is) {
107- double phiIr = -M_PI + is * (M_PI / 6.0 );
108- AngleAxis3 rotationIr (phiIr - 0.5 * M_PI , Vector3::UnitZ ());
108+ double phiIr = -std::numbers::pi + is * (std::numbers::pi / 6.0 );
109+ AngleAxis3 rotationIr (phiIr - 0.5 * std::numbers::pi , Vector3::UnitZ ());
109110 Transform3 transformIr (rotationIr);
110111 transformIr.translation () =
111112 Vector3 (rIr * std::cos (phiIr), rIr * std::sin (phiIr), 0 .);
112113 tVolume.addSurface (
113114 Surface::makeShared<PlaneSurface>(transformIr, boundsIr));
114115
115- double phiOr = -M_PI + (is + 1 ) * (M_PI / 6.0 );
116- AngleAxis3 rotationOr (phiOr - 0.5 * M_PI , Vector3::UnitZ ());
116+ double phiOr = -std::numbers::pi + (is + 1 ) * (std::numbers::pi / 6.0 );
117+ AngleAxis3 rotationOr (phiOr - 0.5 * std::numbers::pi , Vector3::UnitZ ());
117118 Transform3 transformOr (rotationOr);
118119 transformOr.translation () =
119120 Vector3 (rOr * std::cos (phiOr), rOr * std::sin (phiOr), 0 .);
@@ -123,8 +124,8 @@ BOOST_AUTO_TEST_CASE(RegularDiscIndexGridNavigationPolicyToJson) {
123124
124125 // Create the r-phi axes and grids
125126 Axis<AxisType::Equidistant, AxisBoundaryType::Bound> axisR (0.6 , 8.6 , 8 );
126- Axis<AxisType::Equidistant, AxisBoundaryType::Closed> axisPhi (-M_PI, M_PI,
127- 36 );
127+ Axis<AxisType::Equidistant, AxisBoundaryType::Closed> axisPhi (
128+ -std::numbers::pi, std::numbers::pi, 36 );
128129 Grid gridRPhi (Type<std::vector<std::size_t >>, std::move (axisR),
129130 std::move (axisPhi));
130131
@@ -165,8 +166,8 @@ BOOST_AUTO_TEST_CASE(RegularRingIndexGridNavigationPolicyToJson) {
165166 " RingVolume" );
166167 // Fill with a few disc surfaces
167168 for (std::size_t is = 0 ; is < 16 ; ++is) {
168- double phi = -M_PI + is * (M_PI / 8.0 );
169- AngleAxis3 rotation (phi - 0.5 * M_PI , Vector3::UnitZ ());
169+ double phi = -std::numbers::pi + is * (std::numbers::pi / 8.0 );
170+ AngleAxis3 rotation (phi - 0.5 * std::numbers::pi , Vector3::UnitZ ());
170171 Transform3 transform (rotation);
171172 transform.translation () =
172173 Vector3 (10 * std::cos (phi), 10 * std::sin (phi), 0 .);
@@ -175,7 +176,8 @@ BOOST_AUTO_TEST_CASE(RegularRingIndexGridNavigationPolicyToJson) {
175176 }
176177
177178 // Create the r-z axes and grids
178- Axis<AxisType::Equidistant, AxisBoundaryType::Closed> axisPhi (-M_PI, M_PI, 8 );
179+ Axis<AxisType::Equidistant, AxisBoundaryType::Closed> axisPhi (
180+ -std::numbers::pi, std::numbers::pi, 8 );
179181 Grid gridPhi (Type<std::vector<std::size_t >>, std::move (axisPhi));
180182
181183 IndexGrid<decltype (gridPhi)> indexedGridPhi (std::move (gridPhi),
0 commit comments