CbmRoot
compareFairMCPoint.h
Go to the documentation of this file.
1 #ifndef COMPAREFAIRMCPOINT_H
2 #define COMPAREFAIRMCPOINT_H 1
3 
4 #include <FairMCPoint.h>
5 
6 #include <TVector3.h>
7 
8 void compareFairMCPointDataMembers(FairMCPoint& test,
9  Int_t trackID,
10  Int_t detID,
11  TVector3 pos,
12  TVector3 mom,
13  Double_t tof,
14  Double_t length,
15  Double_t eloss,
16  Int_t eventid) {
17  Int_t retValInt {-222};
18  Double_t retValDouble {-222.};
19 
20  retValInt = test.GetDetectorID();
21  EXPECT_EQ(detID, retValInt);
22 
23  retValInt = test.GetEventID();
24  EXPECT_EQ(eventid, retValInt);
25 
26  retValInt = test.GetTrackID();
27  EXPECT_EQ(trackID, retValInt);
28 
29  retValDouble = test.GetPx();
30  EXPECT_FLOAT_EQ(mom.Px(), retValDouble);
31 
32  retValDouble = test.GetPy();
33  EXPECT_FLOAT_EQ(mom.Py(), retValDouble);
34 
35  retValDouble = test.GetPz();
36  EXPECT_FLOAT_EQ(mom.Pz(), retValDouble);
37 
38  retValDouble = test.GetX();
39  EXPECT_FLOAT_EQ(pos.X(), retValDouble);
40 
41  retValDouble = test.GetY();
42  EXPECT_FLOAT_EQ(pos.Y(), retValDouble);
43 
44  retValDouble = test.GetZ();
45  EXPECT_FLOAT_EQ(pos.Z(), retValDouble);
46 
47  retValDouble = test.GetTime();
48  EXPECT_FLOAT_EQ(tof, retValDouble);
49 
50  retValDouble = test.GetLength();
51  EXPECT_FLOAT_EQ(length, retValDouble);
52 
53  retValDouble = test.GetEnergyLoss();
54  EXPECT_FLOAT_EQ(eloss, retValDouble);
55 }
56 
57 #endif // COMPAREPSDDIGI_H
pos
TVector3 pos
Definition: CbmMvdSensorDigiToHitTask.cxx:60
compareFairMCPointDataMembers
void compareFairMCPointDataMembers(FairMCPoint &test, Int_t trackID, Int_t detID, TVector3 pos, TVector3 mom, Double_t tof, Double_t length, Double_t eloss, Int_t eventid)
Definition: compareFairMCPoint.h:8