Project
Loading...
Searching...
No Matches
testTPCSimulation.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 TPC Simulation
17#define BOOST_TEST_MAIN
18#define BOOST_TEST_DYN_LINK
19#include <boost/test/unit_test.hpp>
20#include "TPCSimulation/Point.h"
21#include "MathUtils/Cartesian.h"
22
23template <typename T>
25
26namespace o2
27{
28namespace tpc
29{
30
34{
35 Point testpoint(2.f, 3.f, 4.f, 5.f, 6, 7, 8);
36 BOOST_CHECK_CLOSE(testpoint.GetX(), 2., 1E-12);
37 BOOST_CHECK_CLOSE(testpoint.GetY(), 3., 1E-12);
38 BOOST_CHECK_CLOSE(testpoint.GetZ(), 4., 1E-12);
39 BOOST_CHECK_CLOSE(testpoint.GetTime(), 5., 1E-12);
40 BOOST_CHECK_CLOSE(testpoint.GetEnergyLoss(), 6, 1E-12);
41 BOOST_CHECK_CLOSE(testpoint.GetTrackID(), 7., 1E-12);
42 BOOST_CHECK_CLOSE(testpoint.GetDetectorID(), 8., 1E-12);
43}
44
45} // namespace tpc
46} // namespace o2
Class for TPC Point.
int GetTrackID() const
Definition BaseHits.h:30
V GetEnergyLoss() const
Definition BaseHits.h:103
E GetTime() const
Definition BaseHits.h:71
T GetZ() const
Definition BaseHits.h:66
T GetY() const
Definition BaseHits.h:65
T GetX() const
Definition BaseHits.h:64
short GetDetectorID() const
Definition BaseHits.h:73
BOOST_AUTO_TEST_CASE(ClusterHardware_test1)
a couple of static helper functions to create timestamp values for CCDB queries or override obsolete ...