CbmRoot
CbmL1Track.h
Go to the documentation of this file.
1 /*
2  *====================================================================
3  *
4  * CBM Level 1 Reconstruction
5  *
6  * Authors: I.Kisel, S.Gorbunov
7  *
8  * e-mail : ikisel@kip.uni-heidelberg.de
9  *
10  *====================================================================
11  *
12  * L1 track class
13  *
14  *====================================================================
15  */
16 
17 
18 #ifndef CbmL1Track_H
19 #define CbmL1Track_H
20 
21 #include "CbmL1MCTrack.h"
22 #include "CbmL1TrackPar.h"
23 
24 #include <map>
25 #include <vector>
26 using std::map;
27 using std::vector;
28 
29 class L1Triplet;
30 class L1StsHit;
31 class CbmL1MCTrack;
32 
33 class CbmL1Track : public CbmL1TrackPar {
34 public:
36  : StsHits()
37  , nStations(0)
38  , index(0)
39  , fTrackTime(0.)
40  , hitMap()
41  , mcTracks()
42  , maxPurity(-1) {}
43 
44  int GetNOfHits() { return StsHits.size(); }
45 
46  void AddMCTrack(CbmL1MCTrack* mcTr) { mcTracks.push_back(mcTr); }
47  vector<CbmL1MCTrack*>& GetMCTracks() { return mcTracks; }
48  CbmL1MCTrack* GetMCTrack() { return mcTracks[0]; }
49  int GetNMCTracks() { return mcTracks.size(); }
50  bool IsGhost() { return !(mcTracks.size()); }
51 
52  void SetMaxPurity(double maxPurity_) { maxPurity = maxPurity_; }
53  double GetMaxPurity() { return maxPurity; }
54 
55  static bool compareChi2(const CbmL1Track& a, const CbmL1Track& b) {
56  return (a.chi2 < b.chi2);
57  }
58  static bool comparePChi2(const CbmL1Track* a, const CbmL1Track* b) {
59  return (a->chi2 < b->chi2);
60  }
61 
62 
63  double Tpv[7], Cpv[21];
64 
65 
66  double TLast[7], CLast[21];
67  vector<int> StsHits;
68  int nStations;
69  int index;
70 
71  double fTrackTime;
72 
73  map<int, int>
74  hitMap; // how many hits from each mcTrack belong to current recoTrack
75 private:
76  // next members filled and used in Performance
77  vector<CbmL1MCTrack*>
78  mcTracks; // array of assosiated recoTracks. Should be only one.
79  double maxPurity; // maximum persent of hits, which belong to one mcTrack.
80 };
81 
82 #endif
CbmL1Track::compareChi2
static bool compareChi2(const CbmL1Track &a, const CbmL1Track &b)
Definition: CbmL1Track.h:55
CbmL1Track::StsHits
vector< int > StsHits
Definition: CbmL1Track.h:67
CbmL1Track::GetMCTracks
vector< CbmL1MCTrack * > & GetMCTracks()
Definition: CbmL1Track.h:47
L1Triplet
Definition: L1Triplet.h:4
CbmL1Track::GetNOfHits
int GetNOfHits()
Number of Degrees of Freedom after fit.
Definition: CbmL1Track.h:44
CbmL1Track::GetMCTrack
CbmL1MCTrack * GetMCTrack()
Definition: CbmL1Track.h:48
CbmL1Track::Tpv
double Tpv[7]
Definition: CbmL1Track.h:63
CbmL1Track::hitMap
map< int, int > hitMap
Definition: CbmL1Track.h:74
CbmL1Track::CbmL1Track
CbmL1Track()
Definition: CbmL1Track.h:35
CbmL1Track::CLast
double CLast[21]
Definition: CbmL1Track.h:66
L1StsHit
Definition: L1StsHit.h:12
CbmL1Track::TLast
double TLast[7]
Definition: CbmL1Track.h:66
CbmL1Track::maxPurity
double maxPurity
Definition: CbmL1Track.h:79
CbmL1MCTrack.h
CbmL1Track::comparePChi2
static bool comparePChi2(const CbmL1Track *a, const CbmL1Track *b)
Definition: CbmL1Track.h:58
CbmL1Track::GetNMCTracks
int GetNMCTracks()
Definition: CbmL1Track.h:49
CbmL1Track::GetMaxPurity
double GetMaxPurity()
Definition: CbmL1Track.h:53
CbmL1Track
Definition: CbmL1Track.h:33
CbmL1Track::AddMCTrack
void AddMCTrack(CbmL1MCTrack *mcTr)
Definition: CbmL1Track.h:46
CbmL1MCTrack
Definition: CbmL1MCTrack.h:29
CbmL1TrackPar
Definition: CbmL1TrackPar.h:7
CbmL1Track::fTrackTime
double fTrackTime
Definition: CbmL1Track.h:71
CbmL1TrackPar.h
CbmL1Track::IsGhost
bool IsGhost()
Definition: CbmL1Track.h:50
CbmL1Track::nStations
int nStations
Definition: CbmL1Track.h:68
CbmL1Track::Cpv
double Cpv[21]
Definition: CbmL1Track.h:63
CbmL1Track::mcTracks
vector< CbmL1MCTrack * > mcTracks
Definition: CbmL1Track.h:78
CbmL1Track::SetMaxPurity
void SetMaxPurity(double maxPurity_)
Definition: CbmL1Track.h:52
CbmL1TrackPar::chi2
double chi2
Definition: CbmL1TrackPar.h:17
CbmL1Track::index
int index
Definition: CbmL1Track.h:69