14 #include "CbmTofHit.h"
18 #include "FairRootManager.h"
20 #include "TClonesArray.h"
43 , fArrayStsTrack(NULL)
44 , fArrayTrdTrack(NULL)
70 FairRootManager*
rootMgr = FairRootManager::Instance();
72 cout <<
"-E- CbmGlobalTrackFitterKF::Init :"
73 <<
" ROOT manager is not instantiated" << endl;
79 cout <<
"-W- CbmGlobalTrackFitterKF::Init :"
80 <<
" no Sts hit array" << endl;
84 cout <<
"-W- CbmGlobalTrackFitterKF::Init :"
85 <<
" no TRD hit array" << endl;
89 cout <<
"-W- CbmGlobalTrackFitterKF::Init :"
90 <<
" no TOF hit array" << endl;
95 cout <<
"-W- CbmGlobalTrackFitterKF::Init : "
96 <<
"no STS track array!" << endl;
100 cout <<
"-W- CbmGlobalTrackFitterKF::Init : "
101 <<
"no TRD track array!" << endl;
112 cout <<
"-W- CbmGlobalTrackFitterKF::Init : "
113 <<
"no Primary Vertex!" << endl;
134 Double_t length = 0.;
139 if (-1 == stsTrackIndex) {
return; }
142 if (NULL == stsTrack) {
return; }
143 const FairTrackParam* paramFirst;
151 if (paramFirst->GetQp()) { p = TMath::Abs(1. / paramFirst->GetQp()); }
176 if (-1 == trdTrackIndex) {
return; }
179 if (NULL == trdTrack) {
return; }
184 while (z < (trdHit->
GetZ() - 2.)) {
192 length += TMath::Sqrt(TMath::Power(x_new - x_old, 2)
193 + TMath::Power(y_new - y_old, 2)
194 + TMath::Power(z_new - z_old, 2));
201 for (Int_t iTrd = 1; iTrd < trdTrack->
GetNofHits(); iTrd++) {
210 y_new = trdHit->
GetY();
212 x_new = trdHit->
GetX();
216 length += TMath::Sqrt(TMath::Power(x_new - x_old, 2)
217 + TMath::Power(y_new - y_old, 2)
218 + TMath::Power(z_new - z_old, 2));
226 if (-1 == tofIndex) {
return; }
228 x_new = tofHit->
GetX();
229 y_new = tofHit->
GetY();
230 z_new = tofHit->
GetZ();
232 TMath::Sqrt(TMath::Power(x_new - x_old, 2) + TMath::Power(y_new - y_old, 2)
233 + TMath::Power(z_new - z_old, 2));