CbmRoot
CbmL1MCTrack.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 Monte Carlo information
13  *
14  *====================================================================
15  */
16 
17 #ifndef CbmL1MCTrack_H
18 #define CbmL1MCTrack_H
19 
20 #include "CbmL1MCPoint.h"
21 #include "TLorentzVector.h"
22 #include "TVector3.h"
23 #include <iostream>
24 #include <vector>
25 using std::vector;
26 
27 class CbmL1Track;
28 
29 class CbmL1MCTrack {
30 public:
31  double mass, q, p, x, y, z, px, py, pz, time;
33  vector<int> Points; // indices of pints in L1::vMCPoints
34  vector<int> StsHits; // indices of hits in algo->vStsHits or L1::vStsHits
35 
37  : mass(0.)
38  , q(0.)
39  , p(0.)
40  , x(0.)
41  , y(0.)
42  , z(0.)
43  , px(0.)
44  , py(0.)
45  , pz(0.)
46  , time(0.)
47  , ID(-1)
48  , iFile(-1)
49  , iEvent(-1)
50  , mother_ID(-1)
51  , pdg(-1)
52  , Points()
53  , StsHits()
54  , nMCContStations(0)
55  , nHitContStations(0)
56  , maxNStaMC(0)
57  , maxNSensorMC(0)
58  , maxNStaHits(0)
59  , nStations(0)
60  , nMCStations(0)
62  , isAdditional(0)
63  , rTracks()
64  , tTracks() {};
65 
66  CbmL1MCTrack(int _ID)
67  : mass(0.)
68  , q(0.)
69  , p(0.)
70  , x(0.)
71  , y(0.)
72  , z(0.)
73  , px(0.)
74  , py(0.)
75  , pz(0.)
76  , time(0.)
77  , ID(_ID)
78  , iFile(-1)
79  , iEvent(-1)
80  , mother_ID(-1)
81  , pdg(-1)
82  , Points()
83  , StsHits()
84  , nMCContStations(0)
85  , nHitContStations(0)
86  , maxNStaMC(0)
87  , maxNSensorMC(0)
88  , maxNStaHits(0)
89  , nStations(0)
90  , nMCStations()
92  , isAdditional(0)
93  , rTracks()
94  , tTracks() {};
95  CbmL1MCTrack(double mass,
96  double q,
97  TVector3 vr,
98  TLorentzVector vp,
99  int ID,
100  int mother_ID,
101  int pdg);
102  // CbmL1MCTrack(TmpMCPoints &mcPoint, TVector3 vr, TLorentzVector vp, int ID, int mother_ID);
103 
104  bool IsPrimary() const { return mother_ID < 0; };
105  bool IsReconstructable() const { return isReconstructable; };
106  bool IsAdditional() const { return isAdditional; }
107  int NStations() const { return nStations; };
108  int NMCStations() const { return nMCStations; };
109  int NMCContStations() const { return nMCContStations; };
110  float Fraction_MC();
111 
112  void Init();
113 
114  void AddRecoTrack(CbmL1Track* rTr) { rTracks.push_back(rTr); }
115  vector<CbmL1Track*>& GetRecoTracks() { return rTracks; }
116  int GetNClones() const { return rTracks.size() - 1; }
117  bool IsReconstructed() const { return rTracks.size(); }
118 
119  void AddTouchTrack(CbmL1Track* tTr) { tTracks.push_back(tTr); }
120  bool IsDisturbed() const { return tTracks.size(); }
121 
122  friend class CbmL1;
123 
124 private:
125  int nMCContStations; // number of consecutive stations with mcPoints
126  int nHitContStations; // number of consecutive stations with hits
127  int maxNStaMC; // max number of mcPoints on station
128  int maxNSensorMC; // max number of mcPoints with same z
129  int maxNStaHits; // max number of hits on station
130 
131  int nStations; // number of stations with hits
132  int nMCStations; // number of stations with MCPoints
133 
135  bool isAdditional; // is not reconstructable, but stil interesting
136 
137  void CalculateMCCont();
138  void CalculateHitCont();
139  void CalculateMaxNStaHits();
140  void CalculateMaxNStaMC();
142 
143  // next members filled and used in Performance
144  vector<CbmL1Track*> rTracks; // array of assosiated recoTracks
145  vector<CbmL1Track*>
146  tTracks; // array of recoTracks wich aren't assosiated with this mcTrack, but use some hits from it.
147 };
148 
149 
150 #endif
CbmL1MCTrack::Init
void Init()
Definition: CbmL1MCTrack.cxx:82
CbmL1MCTrack::q
double q
Definition: CbmL1MCTrack.h:31
CbmL1MCTrack::NMCStations
int NMCStations() const
Definition: CbmL1MCTrack.h:108
CbmL1MCTrack::nStations
int nStations
Definition: CbmL1MCTrack.h:131
CbmL1MCTrack::CalculateMaxNStaMC
void CalculateMaxNStaMC()
Definition: CbmL1MCTrack.cxx:199
CbmL1MCTrack::y
double y
Definition: CbmL1MCTrack.h:31
CbmL1MCTrack::x
double x
Definition: CbmL1MCTrack.h:31
CbmL1MCTrack::IsDisturbed
bool IsDisturbed() const
Definition: CbmL1MCTrack.h:120
CbmL1MCTrack::maxNStaMC
int maxNStaMC
Definition: CbmL1MCTrack.h:127
CbmL1MCTrack::px
double px
Definition: CbmL1MCTrack.h:31
CbmL1MCTrack::CalculateMCCont
void CalculateMCCont()
Definition: CbmL1MCTrack.cxx:115
CbmL1MCTrack::pdg
int pdg
Definition: CbmL1MCTrack.h:32
CbmL1MCTrack::nMCContStations
int nMCContStations
Definition: CbmL1MCTrack.h:125
CbmL1MCTrack::nHitContStations
int nHitContStations
Definition: CbmL1MCTrack.h:126
CbmL1MCTrack::py
double py
Definition: CbmL1MCTrack.h:31
CbmL1MCTrack::maxNSensorMC
int maxNSensorMC
Definition: CbmL1MCTrack.h:128
CbmL1MCTrack::CalculateIsReconstructable
void CalculateIsReconstructable()
Definition: CbmL1MCTrack.cxx:233
CbmL1MCTrack::CbmL1MCTrack
CbmL1MCTrack()
Definition: CbmL1MCTrack.h:36
CbmL1MCTrack::p
double p
Definition: CbmL1MCTrack.h:31
CbmL1MCTrack::Points
vector< int > Points
Definition: CbmL1MCTrack.h:33
CbmL1MCTrack::mother_ID
int mother_ID
Definition: CbmL1MCTrack.h:32
CbmL1MCTrack::z
double z
Definition: CbmL1MCTrack.h:31
CbmL1MCTrack::IsPrimary
bool IsPrimary() const
Definition: CbmL1MCTrack.h:104
CbmL1MCTrack::ID
int ID
Definition: CbmL1MCTrack.h:32
CbmL1MCTrack::AddTouchTrack
void AddTouchTrack(CbmL1Track *tTr)
Definition: CbmL1MCTrack.h:119
CbmL1MCTrack::isAdditional
bool isAdditional
Definition: CbmL1MCTrack.h:135
CbmL1MCTrack::iEvent
int iEvent
Definition: CbmL1MCTrack.h:32
CbmL1MCTrack::IsAdditional
bool IsAdditional() const
Definition: CbmL1MCTrack.h:106
CbmL1MCPoint.h
CbmL1MCTrack::IsReconstructed
bool IsReconstructed() const
Definition: CbmL1MCTrack.h:117
CbmL1MCTrack::GetRecoTracks
vector< CbmL1Track * > & GetRecoTracks()
Definition: CbmL1MCTrack.h:115
CbmL1MCTrack::maxNStaHits
int maxNStaHits
Definition: CbmL1MCTrack.h:129
CbmL1MCTrack::isReconstructable
bool isReconstructable
Definition: CbmL1MCTrack.h:134
CbmL1MCTrack::CbmL1MCTrack
CbmL1MCTrack(int _ID)
Definition: CbmL1MCTrack.h:66
CbmL1Track
Definition: CbmL1Track.h:33
CbmL1MCTrack::iFile
int iFile
Definition: CbmL1MCTrack.h:32
CbmL1MCTrack::rTracks
vector< CbmL1Track * > rTracks
Definition: CbmL1MCTrack.h:144
CbmL1MCTrack::AddRecoTrack
void AddRecoTrack(CbmL1Track *rTr)
Definition: CbmL1MCTrack.h:114
CbmL1MCTrack::Fraction_MC
float Fraction_MC()
Definition: CbmL1MCTrack.cxx:103
CbmL1MCTrack::NMCContStations
int NMCContStations() const
Definition: CbmL1MCTrack.h:109
CbmL1MCTrack::time
double time
Definition: CbmL1MCTrack.h:31
CbmL1MCTrack::pz
double pz
Definition: CbmL1MCTrack.h:31
CbmL1MCTrack::tTracks
vector< CbmL1Track * > tTracks
Definition: CbmL1MCTrack.h:146
CbmL1MCTrack::StsHits
vector< int > StsHits
Definition: CbmL1MCTrack.h:34
CbmL1MCTrack::CalculateMaxNStaHits
void CalculateMaxNStaHits()
Definition: CbmL1MCTrack.cxx:171
CbmL1MCTrack
Definition: CbmL1MCTrack.h:29
CbmL1MCTrack::mass
double mass
Definition: CbmL1MCTrack.h:31
CbmL1
Definition: CbmL1.h:113
CbmL1MCTrack::NStations
int NStations() const
Definition: CbmL1MCTrack.h:107
CbmL1MCTrack::nMCStations
int nMCStations
Definition: CbmL1MCTrack.h:132
CbmL1MCTrack::IsReconstructable
bool IsReconstructable() const
Definition: CbmL1MCTrack.h:105
CbmL1MCTrack::CalculateHitCont
void CalculateHitCont()
Definition: CbmL1MCTrack.cxx:136
CbmL1MCTrack::GetNClones
int GetNClones() const
Definition: CbmL1MCTrack.h:116