17#define BOOST_TEST_MODULE Test TPC O2TPCTricubic class
18#define BOOST_TEST_MAIN
19#define BOOST_TEST_DYN_LINK
20#include <boost/test/unit_test.hpp>
32static constexpr DataT TOLERANCE = 0.15;
33static constexpr DataT ABSTOLERANCE = 0.003;
34static constexpr unsigned short NR = 65;
35static constexpr unsigned short NZ = 65;
36static constexpr unsigned short NPHI = 90;
40 const ParamSpaceCharge
params{NR, NZ, NPHI};
59 for (
int iz = 0; iz < NZ; ++iz) {
60 for (
int ir = 0;
ir < NR; ++
ir) {
61 for (
int iphi = 0; iphi < NPHI; ++iphi) {
62 const DataT z = zSpacing * iz + zmin;
63 const DataT r = rSpacing *
ir + rmin;
64 const DataT phi = phiSpacing * iphi + phimin;
73 const float nFacLoop = 1.4;
74 const int nrPointsLoop = NR * nFacLoop;
75 const int nzPointsLoop = NZ * nFacLoop;
76 const int nphiPointsLoop = NPHI * nFacLoop;
81 for (
int iR = -2; iR < nrPointsLoop + 2; ++iR) {
82 const DataT r = rmin + iR * rSpacingLoop;
83 for (
int iZ = 0; iZ < nzPointsLoop; ++iZ) {
84 const DataT z = zmin + iZ * zSpacingLoop;
85 for (
int iPhi = -2; iPhi < nphiPointsLoop + 2; ++iPhi) {
86 DataT phi = phimin + iPhi * phiSpacingLoop;
87 const DataT interpolatedSparse = interpolator(
z,
r, phi);
91 const int facTol = ((iR < nFacLoop) || (iZ < nFacLoop) || (iR >= nrPointsLoop - 1 - nFacLoop) || (iZ >= nzPointsLoop - 1 - nFacLoop)) ? 10 : 1;
92 if (std::abs(trueValue) < 0.1) {
93 BOOST_CHECK_SMALL(trueValue - interpolatedSparse, facTol * ABSTOLERANCE);
95 BOOST_CHECK_CLOSE(interpolatedSparse, trueValue, facTol * TOLERANCE);
This class provides a simple method to store values on a large 3-Dim grid with ROOT io functionality.
This file provides all necesseray classes which are used during the calcution of the distortions and ...
Definition of TriCubic class.
DataT evalPotential(DataT z, DataT r, DataT phi) const
GLenum const GLfloat * params
GLdouble GLdouble GLdouble z
BOOST_AUTO_TEST_CASE(ClusterHardware_test1)
a couple of static helper functions to create timestamp values for CCDB queries or override obsolete ...
static constexpr DataT getGridSpacingR(const unsigned int nR)
static constexpr DataT getGridSpacingZ(const unsigned int nZ)
static constexpr DataT getGridSpacingPhi(const unsigned int nPhi)
o2::InteractionRecord ir(0, 0)