Analysis Software
Documentation for
sPHENIX
simulation software
Home page
Related Pages
Modules
Namespaces
Classes
Files
Examples
External Links
File List
File Members
Analysis Software
Deprecated List
Modules
Namespaces
Classes
Files
File List
acts
blob
sPHENIX
Alignment
CI
cmake
Core
docs
Examples
Fatras
Plugins
Tests
Benchmarks
CommonHelpers
DownstreamProject
DownstreamProjectNodeps
IntegrationTests
UnitTests
Alignment
Benchmarks
Core
Examples
Fatras
Plugins
ActSVG
Cuda
DD4hep
EDM4hep
ExaTrkX
FpeMonitoring
Geant4
Json
AlgebraJsonConverterTests.cpp
DetectorJsonConverterTests.cpp
DetectorVolumeJsonConverterTests.cpp
EqualityHelpers.hpp
ExtentJsonConverterTests.cpp
GeometryHierarchyMapJsonConverterTests.cpp
MaterialMapJsonConverterTests.cpp
PortalJsonConverterTests.cpp
ProtoDetectorJsonConverterTests.cpp
SurfaceBoundsJsonConverterTests.cpp
SurfaceJsonConverterTests.cpp
UtilitiesJsonConverterTests.cpp
VolumeBoundsJsonConverterTests.cpp
Podio
Sycl
TGeo
acts-fatras
analysis
analysis_tpc_prototype
coresoftware
Doxygen_Assist
g4exampledetector
GenFit
JETSCAPE
KFParticle
macros
online_distribution
OnlMon
prototype
pythia6
rcdaq
RDBC
tutorials
doxygen_mainpage.h
File Members
Examples
External Links
•
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Groups
Pages
ExtentJsonConverterTests.cpp
Go to the documentation of this file.
Or view
the newest version in sPHENIX GitHub for file ExtentJsonConverterTests.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
11
#include "
Acts/Definitions/Algebra.hpp
"
12
#include "
Acts/Geometry/Extent.hpp
"
13
#include "
Acts/Plugins/Json/ExtentJsonConverter.hpp
"
14
#include "
Acts/Tests/CommonHelpers/FloatComparisons.hpp
"
15
#include "
Acts/Utilities/BinningType.hpp
"
16
17
#include <nlohmann/json.hpp>
18
19
using namespace
Acts;
20
21
BOOST_AUTO_TEST_SUITE(ExtentJsonConverter)
22
23
BOOST_AUTO_TEST_CASE
(ExtentRoundtripTests) {
24
Extent
e
;
25
e.
set
(
binR
, 0, 200);
26
e.
set
(
binZ
, -50, 50);
27
28
nlohmann::json
j
;
29
j[
"extent"
] =
e
;
30
31
Extent
eIn = j[
"extent"
];
32
33
CHECK_CLOSE_ABS
(eIn.
min
(
binR
), e.
min
(
binR
), 10e-5);
34
CHECK_CLOSE_ABS
(eIn.
max
(
binR
), e.
max
(
binR
), 10e-5);
35
CHECK_CLOSE_ABS
(eIn.
min
(
binZ
), e.
min
(
binZ
), 10e-5);
36
CHECK_CLOSE_ABS
(eIn.
max
(
binZ
), e.
max
(
binZ
), 10e-5);
37
}
38
39
BOOST_AUTO_TEST_SUITE_END()
acts
blob
sPHENIX
Tests
UnitTests
Plugins
Json
ExtentJsonConverterTests.cpp
Built by
Jin Huang
. updated:
Sat Feb 17 2024 22:17:46
using
1.8.2 with
sPHENIX GitHub integration