CbmRoot
Loading...
Searching...
No Matches
compareTrdPoint.h
Go to the documentation of this file.
1/* Copyright (C) 2020 GSI Helmholtzzentrum fuer Schwerionenforschung, Darmstadt
2 SPDX-License-Identifier: GPL-3.0-only
3 Authors: Florian Uhlig [committer] */
4
5#ifndef COMPARETRDPOINT_H
6#define COMPARETRDPOINT_H 1
7
9#include "gtest/gtest.h"
10
11void compareTrdPointDataMembers(CbmTrdPoint& test, int32_t trackID, int32_t detID, TVector3 posin, TVector3 momin,
12 TVector3 posout, TVector3 momout, double tof, double length, double eLoss,
13 int32_t eventid)
14{
15
16 FairMCPoint test1 = static_cast<FairMCPoint>(test);
17 compareFairMCPointDataMembers(test1, trackID, detID, posin, momin, tof, length, eLoss, eventid);
18
19 int32_t retValInt {-222};
20 double retValDouble {-222.};
21
22 retValInt = test.GetModuleAddress();
23 EXPECT_EQ(detID, retValInt);
24
25 retValDouble = test.GetXIn();
26 EXPECT_EQ(posin.X(), retValDouble);
27
28 retValDouble = test.GetXOut();
29 EXPECT_EQ(posout.X(), retValDouble);
30
31 retValDouble = test.GetPxIn();
32 EXPECT_EQ(momin.Px(), retValDouble);
33
34 retValDouble = test.GetPxOut();
35 EXPECT_EQ(momout.Px(), retValDouble);
36
37 retValDouble = test.GetYIn();
38 EXPECT_EQ(posin.Y(), retValDouble);
39
40 retValDouble = test.GetYOut();
41 EXPECT_EQ(posout.Y(), retValDouble);
42
43 retValDouble = test.GetPyIn();
44 EXPECT_EQ(momin.Py(), retValDouble);
45
46 retValDouble = test.GetPyOut();
47 EXPECT_EQ(momout.Py(), retValDouble);
48
49 retValDouble = test.GetZIn();
50 EXPECT_EQ(posin.Z(), retValDouble);
51
52 retValDouble = test.GetZOut();
53 EXPECT_EQ(posout.Z(), retValDouble);
54
55 retValDouble = test.GetPzIn();
56 EXPECT_EQ(momin.Pz(), retValDouble);
57
58 retValDouble = test.GetPzOut();
59 EXPECT_EQ(momout.Pz(), retValDouble);
60}
61
62#endif // COMPARETRDDIGI_H
double GetPzOut() const
Definition CbmTrdPoint.h:73
double GetPxIn() const
Definition CbmTrdPoint.h:74
double GetPzIn() const
Definition CbmTrdPoint.h:76
double GetYOut() const
Definition CbmTrdPoint.h:69
double GetXIn() const
Definition CbmTrdPoint.h:65
double GetZIn() const
Definition CbmTrdPoint.h:67
double GetPxOut() const
Definition CbmTrdPoint.h:71
int32_t GetModuleAddress() const
Definition CbmTrdPoint.h:78
double GetPyOut() const
Definition CbmTrdPoint.h:72
double GetXOut() const
Definition CbmTrdPoint.h:68
double GetPyIn() const
Definition CbmTrdPoint.h:75
double GetYIn() const
Definition CbmTrdPoint.h:66
double GetZOut() const
Definition CbmTrdPoint.h:70
void compareFairMCPointDataMembers(FairMCPoint &test, int32_t trackID, int32_t detID, TVector3 pos, TVector3 mom, double tof, double length, double eloss, int32_t eventid)
void compareTrdPointDataMembers(CbmTrdPoint &test, int32_t trackID, int32_t detID, TVector3 posin, TVector3 momin, TVector3 posout, TVector3 momout, double tof, double length, double eLoss, int32_t eventid)