CbmRoot
compareTrdHit.h
Go to the documentation of this file.
1 #ifndef COMPARETRDHIT_H
2 #define COMPARETRDHIT_H 1
3 
4 #include "comparePixelHit.h"
5 
6 
8  HitType type,
9  Double_t z,
10  Double_t dz,
11  Int_t refid,
12  Int_t address,
13  CbmMatch* match,
14  Double_t time,
15  Double_t errortime,
16  Double_t x,
17  Double_t dx,
18  Double_t y,
19  Double_t dy,
20  Double_t dxy,
21  UChar_t define,
22  Double_t eloss) {
23 
24  CbmPixelHit phit = static_cast<CbmPixelHit>(test);
26  type,
27  z,
28  dz,
29  refid,
30  address,
31  match,
32  time,
33  errortime,
34  x,
35  dx,
36  y,
37  dy,
38  dxy);
39 
40  Int_t retValInt {-222};
41  Double_t retValDouble {-222.};
42 
43  retValDouble = test.GetELoss();
44  EXPECT_FLOAT_EQ(eloss, retValDouble);
45 
46  // Extract the first 4 bits from the integer
47  // and compare it to the functions
48  retValInt = test.GetClassType();
49  EXPECT_EQ((define & 1) >> 0, retValInt);
50 
51  retValInt = test.GetMaxType();
52  EXPECT_EQ((define & 2) >> 1, retValInt);
53 
54  retValInt = test.IsRowCross();
55  EXPECT_EQ((define & 4) >> 2, retValInt);
56 
57  retValInt = test.HasOverFlow();
58  EXPECT_EQ((define & 8) >> 3, retValInt);
59 }
60 
61 #endif // COMPARETRDHIT_H
CbmTrdHit::GetClassType
Bool_t GetClassType() const
Definition: CbmTrdHit.h:80
CbmMatch
Definition: CbmMatch.h:22
comparePixelHit.h
CbmTrdHit::GetELoss
Double_t GetELoss() const
Definition: CbmTrdHit.h:79
CbmTrdHit
data class for a reconstructed Energy-4D measurement in the TRD
Definition: CbmTrdHit.h:35
CbmTrdHit::GetMaxType
Bool_t GetMaxType() const
Definition: CbmTrdHit.h:81
CbmTrdHit::IsRowCross
Bool_t IsRowCross() const
Definition: CbmTrdHit.h:83
comparePixelHitDataMembers
void comparePixelHitDataMembers(CbmPixelHit &test, HitType type, Double_t z, Double_t dz, Int_t refid, Int_t address, CbmMatch *match, Double_t time, Double_t errortime, Double_t x, Double_t dx, Double_t y, Double_t dy, Double_t dxy)
Definition: comparePixelHit.h:9
HitType
HitType
Definition: CbmHit.h:16
compareTrdHitDataMembers
void compareTrdHitDataMembers(CbmTrdHit &test, HitType type, Double_t z, Double_t dz, Int_t refid, Int_t address, CbmMatch *match, Double_t time, Double_t errortime, Double_t x, Double_t dx, Double_t y, Double_t dy, Double_t dxy, UChar_t define, Double_t eloss)
Definition: compareTrdHit.h:7
CbmTrdHit::HasOverFlow
Bool_t HasOverFlow() const
Definition: CbmTrdHit.h:82
x
Double_t x
Definition: CbmMvdSensorDigiToHitTask.cxx:68
y
Double_t y
Definition: CbmMvdSensorDigiToHitTask.cxx:68
CbmPixelHit
Definition: CbmPixelHit.h:21