15 #include "FairRootManager.h"
17 #include "TClonesArray.h"
38 , fArrayStsPoint(NULL)
39 , fArrayTrdPoint(NULL)
42 , fArrayStsTrack(NULL)
43 , fArrayTrdTrack(NULL)
44 , fArrayGlbTrack(NULL)
48 , fh_first_restx(NULL)
49 , fh_first_resty(NULL)
56 , fh_first_pullx(NULL)
57 , fh_first_pully(NULL)
58 , fh_first_pulltx(NULL)
59 , fh_first_pullty(NULL)
62 , fh_last_pulltx(NULL)
63 , fh_last_pullty(NULL)
72 : FairTask(name, verbose)
73 , fArrayStsPoint(NULL)
74 , fArrayTrdPoint(NULL)
77 , fArrayStsTrack(NULL)
78 , fArrayTrdTrack(NULL)
79 , fArrayGlbTrack(NULL)
83 , fh_first_restx(NULL)
84 , fh_first_resty(NULL)
91 , fh_first_pullx(NULL)
92 , fh_first_pully(NULL)
93 , fh_first_pulltx(NULL)
94 , fh_first_pullty(NULL)
97 , fh_last_pulltx(NULL)
98 , fh_last_pullty(NULL)
117 FairRootManager*
rootMgr = FairRootManager::Instance();
119 cout <<
"-E- CbmFitGlobalTracksQa::Init :"
120 <<
" ROOT manager is not instantiated" << endl;
126 cout <<
"-E- CbmFitGlobalTracksQa::Init : "
127 <<
"no STS point array!" << endl;
131 cout <<
"-E- CbmFitGlobalTracksQa::Init : "
132 <<
"no TRD point array!" << endl;
137 cout <<
"-W- CbmFitGlobalTracksQa::Init :"
138 <<
" no STS hit array" << endl;
142 cout <<
"-W- CbmFitGlobalTracksQa::Init :"
143 <<
" no TRD hit array" << endl;
148 cout <<
"-W- CbmFitGlobalTracksQa::Init : "
149 <<
"no STS track array!" << endl;
153 cout <<
"-W- CbmFitGlobalTracksQa::Init : "
154 <<
"no TRD track array!" << endl;
158 cout <<
"-W- CbmFitGlobalTracksQa::Init : "
159 <<
"no global track array!" << endl;
191 for (Int_t iGlbTrack = 0; iGlbTrack <
fArrayGlbTrack->GetEntriesFast();
196 if (NULL == glbTrack)
continue;
205 if (stsTrackIndex >= 0) {
207 if (NULL != stsTrack) {
212 if (NULL != stsHit) { stsPointIndex = stsHit->
GetRefId(); }
214 cout <<
"-W- CbmFitGlobalTracksQa::Exec : "
215 <<
"STS track " << stsTrackIndex <<
" is empty!" << endl;
218 if (stsPointIndex >= 0) {
220 if (NULL != stsPoint) {
221 stsPoint->Position(
pos);
222 stsPoint->Momentum(mom);
227 - mom.X() / mom.Z());
229 - mom.Y() / mom.Z());
232 / TMath::Sqrt(glbTrack->
GetParamFirst()->GetCovariance(0, 0)));
235 / TMath::Sqrt(glbTrack->
GetParamFirst()->GetCovariance(1, 1)));
238 / TMath::Sqrt(glbTrack->
GetParamFirst()->GetCovariance(2, 2)));
241 / TMath::Sqrt(glbTrack->
GetParamFirst()->GetCovariance(3, 3)));
248 if (NULL != trdTrack) {
253 if (NULL != trdHit) { trdPointIndex = trdHit->
GetRefId(); }
255 cout <<
"-W- CbmFitGlobalTracksQa::Exec : "
256 <<
"TRD track " << trdTrackIndex <<
" is empty!" << endl;
259 if (trdPointIndex >= 0) {
261 if (NULL != trdPoint) {
262 trdPoint->Position(
pos);
263 trdPoint->Momentum(mom);
268 - mom.X() / mom.Z());
270 - mom.Y() / mom.Z());
273 / TMath::Sqrt(glbTrack->
GetParamFirst()->GetCovariance(0, 0)));
276 / TMath::Sqrt(glbTrack->
GetParamFirst()->GetCovariance(1, 1)));
279 / TMath::Sqrt(glbTrack->
GetParamFirst()->GetCovariance(2, 2)));
282 / TMath::Sqrt(glbTrack->
GetParamFirst()->GetCovariance(3, 3)));
291 if (trdTrackIndex >= 0) {
293 if (NULL != trdTrack) {
298 if (NULL != trdHit) { trdPointIndex = trdHit->
GetRefId(); }
300 cout <<
"-W- CbmFitGlobalTracksQa::Exec : "
301 <<
"TRD track " << trdTrackIndex <<
" is empty!" << endl;
304 if (trdPointIndex >= 0) {
306 if (NULL != trdPoint) {
307 trdPoint->Position(
pos);
308 trdPoint->Momentum(mom);
313 - mom.X() / mom.Z());
315 - mom.Y() / mom.Z());
318 / TMath::Sqrt(glbTrack->
GetParamLast()->GetCovariance(0, 0)));
321 / TMath::Sqrt(glbTrack->
GetParamLast()->GetCovariance(1, 1)));
324 / TMath::Sqrt(glbTrack->
GetParamLast()->GetCovariance(2, 2)));
327 / TMath::Sqrt(glbTrack->
GetParamLast()->GetCovariance(3, 3)));
334 if (NULL != stsTrack) {
339 if (NULL != stsHit) { stsPointIndex = stsHit->
GetRefId(); }
341 cout <<
"-W- CbmFitGlobalTracksQa::Exec : "
342 <<
"STS track " << stsTrackIndex <<
" is empty!" << endl;
345 if (stsPointIndex >= 0) {
347 if (NULL != stsPoint) {
348 stsPoint->Position(
pos);
349 stsPoint->Momentum(mom);
354 - mom.X() / mom.Z());
356 - mom.Y() / mom.Z());
359 / TMath::Sqrt(glbTrack->
GetParamLast()->GetCovariance(0, 0)));
362 / TMath::Sqrt(glbTrack->
GetParamLast()->GetCovariance(1, 1)));
365 / TMath::Sqrt(glbTrack->
GetParamLast()->GetCovariance(2, 2)));
368 / TMath::Sqrt(glbTrack->
GetParamLast()->GetCovariance(3, 3)));
394 new TH1F(
"h_glb_first_resx",
"x residual at first TRD layer", 200, -1., 1.);
396 new TH1F(
"h_glb_first_resy",
"y residual at first TRD layer", 200, -1., 1.);
398 "h_glb_first_restx",
"t_{x} residual at first TRD layer", 200, -0.01, 0.01);
400 "h_glb_first_resty",
"t_{y} residual at first TRD layer", 200, -0.01, 0.01);
402 "h_glb_first_resz",
"z residual at first TRD layer", 100, -0.5, 0.5);
406 new TH1F(
"h_glb_last_resx",
"x residual at last TRD layer", 200, -1., 1.);
408 new TH1F(
"h_glb_last_resy",
"y residual at last TRD layer", 200, -1., 1.);
410 "h_glb_last_restx",
"t_{x} residual at last TRD layer", 200, -0.01, 0.01);
412 "h_glb_last_resty",
"t_{y} residual at last TRD layer", 200, -0.01, 0.01);
414 new TH1F(
"h_glb_last_resz",
"z residual at last TRD layer", 100, -0.5, 0.5);
418 new TH1F(
"h_glb_first_pullx",
"x pull at first TRD layer", 200, -10., 10.);
420 new TH1F(
"h_glb_first_pully",
"y pull at first TRD layer", 200, -10., 10.);
422 "h_glb_first_pulltx",
"t_{x} pull at first TRD layer", 200, -10., 10.);
424 "h_glb_first_pullty",
"t_{y} pull at first TRD layer", 200, -10., 10.);
428 new TH1F(
"h_glb_last_pullx",
"x pull at last TRD layer", 200, -10., 10.);
430 new TH1F(
"h_glb_last_pully",
"y pull at last TRD layer", 200, -10., 10.);
432 "h_glb_last_pulltx",
"t_{x} pull at last TRD layer", 200, -10., 10.);
434 "h_glb_last_pullty",
"t_{y} pull at last TRD layer", 200, -10., 10.);
438 new TH1F(
"h_glb_chi2ndf",
"#chi^{2}/NDF of track fit", 500, 0., 50.);