CbmRoot
CbmTrackMatchNew.h
Go to the documentation of this file.
1 
9 #ifndef CBMTRACKMATCHNEW_H_
10 #define CBMTRACKMATCHNEW_H_
11 
12 #include <Rtypes.h> // for THashConsistencyHolder, ClassDef
13 #include <RtypesCore.h> // for Int_t, Double_t
14 
15 #include <string> // for string
16 
17 #include "CbmMatch.h" // for CbmMatch
18 
19 class CbmTrackMatchNew : public CbmMatch {
20 public:
25 
29  virtual ~CbmTrackMatchNew();
30 
31  /* Accessors */
32  Int_t GetNofTrueHits() const { return fNofTrueHits; }
33  Int_t GetNofWrongHits() const { return fNofWrongHits; }
34  Int_t GetNofHits() const { return fNofTrueHits + fNofWrongHits; }
35  Double_t GetTrueOverAllHitsRatio() const {
36  Double_t all = GetNofHits();
37  return (all == 0) ? 0. : (fNofTrueHits / all);
38  }
39  Double_t GetWrongOverAllHitsRatio() const {
40  Double_t all = GetNofHits();
41  return (all == 0) ? 0. : (fNofWrongHits / all);
42  }
43 
44  /* Modifiers */
45  void SetNofTrueHits(Int_t nofTrueHits) { fNofTrueHits = nofTrueHits; }
46  void SetNofWrongHits(Int_t nofWrongHits) { fNofWrongHits = nofWrongHits; }
47 
52  virtual std::string ToString() const;
53 
54 private:
55  Int_t fNofTrueHits; // Number of true hits in reconstructed track
56  Int_t fNofWrongHits; // Number of wrong hits in reconstructed track
57 
59 };
60 
61 #endif /* CBMTRACKMATCHNEW_H_ */
CbmMatch
Definition: CbmMatch.h:22
CbmTrackMatchNew::GetNofWrongHits
Int_t GetNofWrongHits() const
Definition: CbmTrackMatchNew.h:33
CbmTrackMatchNew::GetTrueOverAllHitsRatio
Double_t GetTrueOverAllHitsRatio() const
Definition: CbmTrackMatchNew.h:35
CbmTrackMatchNew::ToString
virtual std::string ToString() const
Return string representation of the object.
Definition: CbmTrackMatchNew.cxx:23
CbmTrackMatchNew::ClassDef
ClassDef(CbmTrackMatchNew, 1)
CbmTrackMatchNew::fNofTrueHits
Int_t fNofTrueHits
Definition: CbmTrackMatchNew.h:55
CbmTrackMatchNew::SetNofTrueHits
void SetNofTrueHits(Int_t nofTrueHits)
Definition: CbmTrackMatchNew.h:45
CbmMatch.h
CbmTrackMatchNew::GetWrongOverAllHitsRatio
Double_t GetWrongOverAllHitsRatio() const
Definition: CbmTrackMatchNew.h:39
CbmTrackMatchNew::CbmTrackMatchNew
CbmTrackMatchNew()
Default constructor.
Definition: CbmTrackMatchNew.cxx:18
CbmTrackMatchNew::SetNofWrongHits
void SetNofWrongHits(Int_t nofWrongHits)
Definition: CbmTrackMatchNew.h:46
CbmTrackMatchNew::~CbmTrackMatchNew
virtual ~CbmTrackMatchNew()
Destructor.
Definition: CbmTrackMatchNew.cxx:21
CbmTrackMatchNew::GetNofHits
Int_t GetNofHits() const
Definition: CbmTrackMatchNew.h:34
CbmTrackMatchNew::GetNofTrueHits
Int_t GetNofTrueHits() const
Definition: CbmTrackMatchNew.h:32
CbmTrackMatchNew
Definition: CbmTrackMatchNew.h:19
CbmTrackMatchNew::fNofWrongHits
Int_t fNofWrongHits
Definition: CbmTrackMatchNew.h:56