ECCE @ EIC Software
Reference for
ECCE @ EIC
simulation and reconstruction software on GitHub
Home page
Related Pages
Modules
Namespaces
Classes
Files
External Links
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Groups
Pages
ParametersTestHelper.hpp
Go to the documentation of this file.
Or view
the newest version in sPHENIX GitHub for file ParametersTestHelper.hpp
1
// This file is part of the Acts project.
2
//
3
// Copyright (C) 2017-2019 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/unit_test.hpp>
12
13
#include "
Acts/Tests/CommonHelpers/FloatComparisons.hpp
"
14
#include "
Acts/Utilities/Definitions.hpp
"
15
16
namespace
Acts {
17
namespace
Test {
18
19
template
<
typename
Parameter>
20
void
consistencyCheck
(
const
Parameter& pars,
const
Vector3D
&
position
,
21
const
Vector3D
&
momentum
,
double
charge
,
double
time
,
22
std::array<double, eBoundParametersSize>
values
) {
23
// check parameter vector
24
CHECK_CLOSE_ABS
(pars.parameters()[
eLOC_0
], values[0],
s_onSurfaceTolerance
);
25
CHECK_CLOSE_ABS
(pars.parameters()[
eLOC_1
], values[1],
s_onSurfaceTolerance
);
26
CHECK_CLOSE_REL
(pars.parameters()[
ePHI
], values[2], 1
e
-6);
27
CHECK_CLOSE_REL
(pars.parameters()[
eTHETA
], values[3], 1
e
-6);
28
CHECK_CLOSE_REL
(pars.parameters()[
eQOP
], values[4], 1
e
-6);
29
CHECK_CLOSE_ABS
(pars.parameters()[
eT
], values[5], 1
e
-6);
30
// check global parameters
31
CHECK_CLOSE_REL
(pars.position(),
position
, 1
e
-6);
32
CHECK_CLOSE_REL
(pars.momentum(),
momentum
, 1
e
-6);
33
BOOST_CHECK_EQUAL(pars.charge(),
charge
);
34
CHECK_CLOSE_REL
(pars.time(),
time
, 1
e
-6);
35
}
36
}
// namespace Test
37
}
// namespace Acts
acts
blob
master
Tests
UnitTests
Core
EventData
ParametersTestHelper.hpp
Built by
Jin Huang
. updated:
Wed Jun 29 2022 17:24:25
using
1.8.2 with
ECCE GitHub integration