CbmRoot
Loading...
Searching...
No Matches
CbmTrackMatchNew.h
Go to the documentation of this file.
1/* Copyright (C) 2013-2020 GSI/JINR-LIT, Darmstadt/Dubna
2 SPDX-License-Identifier: GPL-3.0-only
3 Authors: Andrey Lebedev [committer], Florian Uhlig */
4
13#ifndef CBMTRACKMATCHNEW_H_
14#define CBMTRACKMATCHNEW_H_
15
16#include "CbmMatch.h" // for CbmMatch
17
18#include <Rtypes.h> // for THashConsistencyHolder, ClassDef
19
20#include <cstdint>
21#include <string> // for string
22
23class CbmTrackMatchNew : public CbmMatch {
24public:
29
33 virtual ~CbmTrackMatchNew();
34
35 /* Accessors */
36 int32_t GetNofTrueHits() const { return fNofTrueHits; }
37 int32_t GetNofWrongHits() const { return fNofWrongHits; }
38 int32_t GetNofHits() const { return fNofTrueHits + fNofWrongHits; }
40 {
41 double all = GetNofHits();
42 return (all == 0) ? 0. : (fNofTrueHits / all);
43 }
45 {
46 double all = GetNofHits();
47 return (all == 0) ? 0. : (fNofWrongHits / all);
48 }
49
50 /* Modifiers */
51 void SetNofTrueHits(int32_t nofTrueHits) { fNofTrueHits = nofTrueHits; }
52 void SetNofWrongHits(int32_t nofWrongHits) { fNofWrongHits = nofWrongHits; }
53
58 virtual std::string ToString() const;
59
60private:
61 int32_t fNofTrueHits; // Number of true hits in reconstructed track
62 int32_t fNofWrongHits; // Number of wrong hits in reconstructed track
63
65};
66
67#endif /* CBMTRACKMATCHNEW_H_ */
virtual ~CbmTrackMatchNew()
Destructor.
ClassDef(CbmTrackMatchNew, 1)
CbmTrackMatchNew()
Default constructor.
void SetNofWrongHits(int32_t nofWrongHits)
double GetTrueOverAllHitsRatio() const
int32_t GetNofWrongHits() const
virtual std::string ToString() const
Return string representation of the object.
double GetWrongOverAllHitsRatio() const
void SetNofTrueHits(int32_t nofTrueHits)
int32_t GetNofHits() const
int32_t GetNofTrueHits() const