11TEST(_GTestCbmTrdHit, CheckDefaultConstructor)
16 compareTrdHitDataMembers(test,
kTRDHIT, 0., 0., -1, -1,
nullptr, -1., -1., 0., 0., 0., 0., 0., 0, -1.);
20 compareTrdHitDataMembers(*test1,
kTRDHIT, 0., 0., -1, -1,
nullptr, -1., -1., 0., 0., 0., 0., 0., 0, -1.);
23TEST(_GTestCbmTrdHit, CheckStandardConstructor)
25 int32_t address {12345};
26 TVector3
pos {-3., 5.777, 123.765};
27 TVector3 error {0.77, 0.88, 0.99};
35 compareTrdHitDataMembers(test,
kTRDHIT,
pos.Z(), error.Z(), refId, address,
nullptr, 0., 0.,
pos.X(), error.X(),
36 pos.Y(), error.Y(), dxy, 0, eloss);
41 compareTrdHitDataMembers(*test1,
kTRDHIT,
pos.Z(), error.Z(), refId, address,
nullptr, 0., 0.,
pos.X(), error.X(),
42 pos.Y(), error.Y(), dxy, 0, eloss);
45TEST(_GTestCbmTrdHit, CheckStandardConstructorWithTime)
47 int32_t address {12345};
48 TVector3
pos {-3., 5.777, 123.765};
49 TVector3 error {0.77, 0.88, 0.99};
54 double timeError {1.34};
56 CbmTrdHit test(address,
pos, error, dxy, refId, eloss, time, timeError);
58 compareTrdHitDataMembers(test,
kTRDHIT,
pos.Z(), error.Z(), refId, address,
nullptr, time, timeError,
pos.X(),
59 error.X(),
pos.Y(), error.Y(), dxy, 0, eloss);
64 compareTrdHitDataMembers(*test1,
kTRDHIT,
pos.Z(), error.Z(), refId, address,
nullptr, time, timeError,
pos.X(),
65 error.X(),
pos.Y(), error.Y(), dxy, 0, eloss);
68TEST(_GTestCbmTrdHit, CheckSetBits)
73 compareTrdHitDataMembers(test,
kTRDHIT, 0., 0., -1, -1,
nullptr, -1., -1., 0., 0., 0., 0., 0., 0, -1.);
76 compareTrdHitDataMembers(test,
kTRDHIT, 0., 0., -1, -1,
nullptr, -1., -1., 0., 0., 0., 0., 0., 2, -1.);
79 compareTrdHitDataMembers(test,
kTRDHIT, 0., 0., -1, -1,
nullptr, -1., -1., 0., 0., 0., 0., 0., 3, -1.);
82 compareTrdHitDataMembers(test,
kTRDHIT, 0., 0., -1, -1,
nullptr, -1., -1., 0., 0., 0., 0., 0., 1, -1.);
85 compareTrdHitDataMembers(test,
kTRDHIT, 0., 0., -1, -1,
nullptr, -1., -1., 0., 0., 0., 0., 0., 5, -1.);
88 compareTrdHitDataMembers(test,
kTRDHIT, 0., 0., -1, -1,
nullptr, -1., -1., 0., 0., 0., 0., 0., 4, -1.);
91 compareTrdHitDataMembers(test,
kTRDHIT, 0., 0., -1, -1,
nullptr, -1., -1., 0., 0., 0., 0., 0., 12, -1.);
94 compareTrdHitDataMembers(test,
kTRDHIT, 0., 0., -1, -1,
nullptr, -1., -1., 0., 0., 0., 0., 0., 8, -1.);
97 compareTrdHitDataMembers(test,
kTRDHIT, 0., 0., -1, -1,
nullptr, -1., -1., 0., 0., 0., 0., 0., 0, -1.);
100TEST(_GTestCbmTrdHit, CheckSetEloss)
105 compareTrdHitDataMembers(test,
kTRDHIT, 0., 0., -1, -1,
nullptr, -1., -1., 0., 0., 0., 0., 0., 0, -1.);
108 compareTrdHitDataMembers(test,
kTRDHIT, 0., 0., -1, -1,
nullptr, -1., -1., 0., 0., 0., 0., 0., 0, 134.56);
111TEST(_GTestCbmTrdHit, CheckToString)
113 int32_t address {12345};
114 TVector3
pos {-3., 5.777, 123.765};
115 TVector3 error {0.77, 0.88, 0.99};
120 double timeError {1.34};
122 CbmTrdHit test(address,
pos, error, dxy, refId, eloss, time, timeError);
124 compareTrdHitDataMembers(test,
kTRDHIT,
pos.Z(), error.Z(), refId, address,
nullptr, time, timeError,
pos.X(),
125 error.X(),
pos.Y(), error.Y(), dxy, 0, eloss);
128 EXPECT_STREQ(
"CbmPixelHit: address=12345 pos=(-3,5.777,123.765) "
129 "err=(0.77,0.88,0.99) dxy=1.2 refId=6\nCbmTrdHit1D: "
130 "time[ns]=456+-1.34 eloss=123 RC=n Ovf=n\n",
void compareTrdHitDataMembers(CbmTrdHit &test, HitType type, double z, double dz, int32_t refid, int32_t address, CbmMatch *match, double time, double errortime, double x, double dx, double y, double dy, double dxy, uint8_t define, double eloss)