BmnRoot 26.10.0-19-g6979a6c6
Software framework of the BM@N experiment
Loading...
Searching...
No Matches
CbmTrackMatch.h
Go to the documentation of this file.
1/** CbmStsTrackMatch.h
2 *@author V.Friese <v.friese@gsi.de>
3 *@since 07.05.2009
4 **
5 ** Data structure describing the matching of a reconstructed track
6 ** with a Monte Carlo track on the base of corresponding hits/points.
7 ** This requires matching of hits to MC points.
8 **/
9
10#ifndef CBMTRACKMATCH_H
11#define CBMTRACKMATCH_H 1
12
13#include "TObject.h"
14
15class CbmTrackMatch : public TObject
16{
17
18 public:
19 /** Default constructor **/
21
22 /** Standard constructor
23 *@param mcTrackID Index of matched MCTrack
24 *@param nTrue Number of true hits (belonging to matched MCTrack)
25 *@param nWrong Number of wrong Hits (from other MCTracks)
26 *@param nFake Number of fake hits (not belonging to any MCTrack)
27 *@param nTracks Number of MCTracks with common hits
28 **/
29 CbmTrackMatch(Int_t mcTrackID, Int_t nTrue, Int_t nWrong, Int_t nFake, Int_t nTracks);
30
31 /** Destructor **/
32 virtual ~CbmTrackMatch();
33
34 /** Index of matched MC track **/
35 Int_t GetMCTrackId() const { return fMCTrackId; };
36
37 /** Number of true hits on track (from matched MC track) **/
38 Int_t GetNofTrueHits() const { return fNofTrueHits; };
39
40 /** Number of wrong hits on track (from other MC tracks) **/
41 Int_t GetNofWrongHits() const { return fNofWrongHits; };
42
43 /** Number of fake hits on track (from no MC track) **/
44 Int_t GetNofFakeHits() const { return fNofFakeHits; };
45
46 /** Number of MCTracks with common hits **/
47 Int_t GetNofMCTracks() const { return fNofMCTracks; };
48
51 { // AZ
52 Double_t all = GetNofHits();
53 return (all == 0) ? 0. : (fNofTrueHits / all);
54 }
56 { // AZ
57 Double_t all = GetNofHits();
58 return (all == 0) ? 0. : ((fNofWrongHits + fNofFakeHits) / all);
59 }
60
61 private:
62 /** Index of matched CbmMCTrack **/
64
65 /** Number of true hits (belonging to the matched MCTrack) **/
67
68 /** Number of wrong hits (belonging to other MCTracks) **/
70
71 /** Number of fake hits (belonging to no MCTrack) **/
73
74 /** Number of MCTrackx with common hits **/
76
78};
79
80#endif
int Int_t
double Double_t
#define ClassDef(name, id)
Int_t fNofTrueHits
Number of true hits (belonging to the matched MCTrack).
virtual ~CbmTrackMatch()
Destructor.
Int_t GetNofTrueHits() const
Number of true hits on track (from matched MC track).
Int_t fNofMCTracks
Number of MCTrackx with common hits.
CbmTrackMatch()
Default constructor.
Double_t GetWrongOverAllHitsRatio() const
Int_t fNofWrongHits
Number of wrong hits (belonging to other MCTracks).
Int_t fNofFakeHits
Number of fake hits (belonging to no MCTrack).
Int_t GetMCTrackId() const
Index of matched MC track.
Int_t GetNofMCTracks() const
Number of MCTracks with common hits.
Int_t fMCTrackId
Index of matched CbmMCTrack.
Int_t GetNofFakeHits() const
Number of fake hits on track (from no MC track).
Double_t GetTrueOverAllHitsRatio() const
Int_t GetNofHits() const
Int_t GetNofWrongHits() const
Number of wrong hits on track (from other MC tracks).