Project
Loading...
Searching...
No Matches
testTRDGeometry.cxx
Go to the documentation of this file.
1
// Copyright 2019-2020 CERN and copyright holders of ALICE O2.
2
// See https://alice-o2.web.cern.ch/copyright for details of the copyright holders.
3
// All rights not expressly granted are reserved.
4
//
5
// This software is distributed under the terms of the GNU General Public
6
// License v3 (GPL Version 3), copied verbatim in the file "COPYING".
7
//
8
// In applying this license CERN does not waive the privileges and immunities
9
// granted to it by virtue of its status as an Intergovernmental Organization
10
// or submit itself to any jurisdiction.
11
15
16
#define BOOST_TEST_MODULE Test TRD_Geometry
17
#define BOOST_TEST_MAIN
18
#define BOOST_TEST_DYN_LINK
19
#include <boost/test/unit_test.hpp>
20
#include <cstdlib>
21
#include <fstream>
22
#include <iostream>
23
#include <sstream>
24
#include <string>
25
#include "
TRDBase/Geometry.h
"
26
#include <iostream>
27
28
namespace
o2
29
{
30
namespace
trd
31
{
32
34
//
36
BOOST_AUTO_TEST_CASE
(TRDGeometry_test1)
37
{
38
//arbitrary chosen
39
BOOST_CHECK_CLOSE(
Geometry::instance
()->getRowPos(1, 1, 3), 154.5, 1e-3);
40
BOOST_CHECK_CLOSE(
Geometry::instance
()->getRowSize(1, 1, 3), 7.5, 1e-3);
41
BOOST_CHECK_CLOSE(
Geometry::instance
()->getRow0(1, 1), 177, 1e-3);
42
BOOST_CHECK_CLOSE(
Geometry::instance
()->getRowEnd(1, 1), 57, 1e-3);
43
//start
44
BOOST_CHECK_CLOSE(
Geometry::instance
()->getRowPos(0, 0, 3), 278.5, 1e-3);
45
BOOST_CHECK_CLOSE(
Geometry::instance
()->getRowSize(0, 0, 3), 7.5, 1e-3);
46
BOOST_CHECK_CLOSE(
Geometry::instance
()->getRow0(0, 0), 301, 1e-3);
47
BOOST_CHECK_CLOSE(
Geometry::instance
()->getRowEnd(0, 0), 181, 1e-3);
48
//end of trd.
49
BOOST_CHECK_CLOSE(
Geometry::instance
()->getRowPos(5, 4, 0), -204, 1e-3);
50
BOOST_CHECK_CLOSE(
Geometry::instance
()->getRowSize(5, 4, 3), 9, 1e-3);
51
BOOST_CHECK_CLOSE(
Geometry::instance
()->getRow0(5, 4), -204, 1e-3);
52
BOOST_CHECK_CLOSE(
Geometry::instance
()->getRowEnd(5, 4), -347, 1e-3);
53
}
54
55
}
// namespace trd
56
}
// namespace o2
Geometry.h
o2::trd::Geometry::instance
static Geometry * instance()
Definition
Geometry.h:33
o2::trd::BOOST_AUTO_TEST_CASE
BOOST_AUTO_TEST_CASE(TRDDigit_test)
Definition
testDigit.cxx:48
o2
a couple of static helper functions to create timestamp values for CCDB queries or override obsolete ...
Definition
BitstreamReader.h:24
Detectors
TRD
base
test
testTRDGeometry.cxx
Generated on Tue Feb 25 2025 17:03:12 for Project by
1.9.8