CbmRoot
CbmKFTrackFitQA.cxx
Go to the documentation of this file.
1 /*
2  *====================================================================
3  *
4  * CBM KF Track Quality
5  *
6  * Authors: M.Zyzak
7  *
8  * e-mail :
9  *
10  *====================================================================
11  *
12  * KF Fit performance
13  *
14  *====================================================================
15  */
16 #include "CbmKFTrackFitQA.h"
17 
18 #include "CbmKF.h"
19 #include "CbmKFMath.h"
20 #include "CbmKFTrack.h"
21 #include "CbmMCTrack.h"
22 #include "CbmStsTrack.h"
23 #include "CbmTrackMatch.h"
24 #include "FairMCPoint.h"
25 #include "TDatabasePDG.h"
26 
27 #include "CbmMatch.h"
28 
29 #include "TBranch.h"
30 #include "TDirectory.h"
31 #include "TFile.h"
32 #include "TTree.h"
33 
34 #include <cmath>
35 #include <iostream>
36 using namespace std;
37 using std::vector;
38 
40 
42  : listStsPts(0)
43  , listMvdPts(0)
44  , listMCTracks(0)
45  , listStsTracksMatch(0)
46  , listStsTracks(0)
47  , listStsHits(0)
48  , listMvdHits(0)
49  , listMvdHitMatches(0)
50  , listStsClusters(0)
51  , listStsDigi(0)
52  , listStsDigiMatch(0)
53  ,
54 
55 
56  // Names of files
57  outfileName("outCbmTrackError.root")
58  ,
59 
60  vStsHitMatch()
61  ,
62 
63  res_STShit_x(0)
64  , res_STShit_y(0)
65  , pull_STShit_x(0)
66  , pull_STShit_y(0)
67  ,
68 
69  res_MVDhit_x(0)
70  , res_MVDhit_y(0)
71  , pull_MVDhit_x(0)
72  , pull_MVDhit_y(0)
73  ,
74 
75  res_AtPV_x(0)
76  , res_AtPV_y(0)
77  , res_AtPV_tx(0)
78  , res_AtPV_ty(0)
79  , res_AtPV_qp(0)
80  ,
81 
82  pull_AtPV_x(0)
83  , pull_AtPV_y(0)
84  , pull_AtPV_tx(0)
85  , pull_AtPV_ty(0)
86  , pull_AtPV_qp(0)
87  ,
88 
89 
90  res_AtFP_x(0)
91  , res_AtFP_y(0)
92  , res_AtFP_tx(0)
93  , res_AtFP_ty(0)
94  , res_AtFP_qp(0)
95  ,
96 
97  pull_AtFP_x(0)
98  , pull_AtFP_y(0)
99  , pull_AtFP_tx(0)
100  , pull_AtFP_ty(0)
101  , pull_AtFP_qp(0)
102  ,
103 
104  q_QA(0)
105  , dp_p(0)
106  ,
107 
108  ggg(0)
109  ,
110 
111  Nback(0) {
112  TDirectory* currentDir = gDirectory;
113  gDirectory->cd(outfileName.Data());
114 
115  ggg = new TH1F("ggg", "ggg", 6, -0.5, 5.5);
116  q_QA = new TProfile("q_QA", "q quality", 100, 0.0, 1.0, 0.0, 100.0);
117  q_QA->GetXaxis()->SetTitle("p, GeV/c");
118  q_QA->GetYaxis()->SetTitle("Q determenition efficiency, %");
119 
120  dp_p = new TProfile("dp_p", "dp_p", 100, 0.0, 1.0, 0.0, 5.0);
121  dp_p->GetXaxis()->SetTitle("p, GeV/c");
122  dp_p->GetYaxis()->SetTitle("#Deltap/p, %");
123 
124  res_STShit_x =
125  new TH1F("residual_STShit_x", "residual_STShit_x", 200, -10., 10.);
126  res_STShit_x->GetXaxis()->SetTitle("dX, um");
127  res_STShit_y =
128  new TH1F("residual_STShit_y", "residual_STShit_y", 200, -10., 10.);
129  res_STShit_y->GetXaxis()->SetTitle("dY, um");
130  pull_STShit_x = new TH1F("pull_STShit_x", "pull_STShit_x", 100, -15., 15.);
131  pull_STShit_y = new TH1F("pull_STShit_y", "pull_STShit_y", 100, -15., 15.);
132 
133  res_MVDhit_x =
134  new TH1F("residual_MVDhit_x", "residual_MVDhit_x", 200, -30., 30.);
135  res_MVDhit_x->GetXaxis()->SetTitle("dX, um");
136  res_MVDhit_y =
137  new TH1F("residual_MVDhit_y", "residual_MVDhit_y", 200, -30., 30.);
138  res_MVDhit_y->GetXaxis()->SetTitle("dY, um");
139  pull_MVDhit_x = new TH1F("pull_MVDhit_x", "pull_MVDhit_x", 100, -5., 5.);
140  pull_MVDhit_y = new TH1F("pull_MVDhit_y", "pull_MVDhit_y", 100, -5., 5.);
141 
142 
143  res_AtPV_x = new TH1F("residual_AtPV_x", "residual_AtPV_x", 2000, -1., 1.);
144  res_AtPV_x->GetXaxis()->SetTitle("dX, cm");
145  res_AtPV_y = new TH1F("residual_AtPV_y", "residual_AtPV_y", 2000, -1., 1.);
146  res_AtPV_y->GetXaxis()->SetTitle("dY, cm");
147  res_AtPV_tx =
148  new TH1F("residual_AtPV_tx", "residual_AtPV_tx", 200, -0.004, 0.004);
149  res_AtPV_tx->GetXaxis()->SetTitle("dtx");
150  res_AtPV_ty =
151  new TH1F("residual_AtPV_ty", "residual_AtPV_ty", 200, -0.004, 0.004);
152  res_AtPV_ty->GetXaxis()->SetTitle("dty");
153  res_AtPV_qp =
154  new TH1F("residual_AtPV_qp", "residual_AtPV_qp", 200, -0.05, 0.05);
155  res_AtPV_qp->GetXaxis()->SetTitle("d(Q/P), c/GeV");
156 
157  pull_AtPV_x = new TH1F("pull_AtPV_x", "pull_AtPV_x", 100, -5., 5.);
158  pull_AtPV_y = new TH1F("pull_AtPV_y", "pull_AtPV_y", 100, -5., 5.);
159  pull_AtPV_tx = new TH1F("pull_AtPV_tx", "pull_AtPV_tx", 100, -5., 5.);
160  pull_AtPV_ty = new TH1F("pull_AtPV_ty", "pull_AtPV_ty", 100, -5., 5.);
161  pull_AtPV_qp = new TH1F("pull_AtPV_qp", "pull_AtPV_qp", 100, -5., 5.);
162 
163  res_AtFP_x = new TH1F("residual_AtFP_x", "residual_AtFP_x", 200, -50., 50.);
164  res_AtFP_x->GetXaxis()->SetTitle("dX, cm");
165  res_AtFP_y = new TH1F("residual_AtFP_y", "residual_AtFP_y", 200, -400., 400.);
166  res_AtFP_y->GetXaxis()->SetTitle("dY, cm");
167  res_AtFP_tx =
168  new TH1F("residual_AtFP_tx", "residual_AtFP_tx", 200, -0.004, 0.004);
169  res_AtFP_tx->GetXaxis()->SetTitle("dtx, GeV/c");
170  res_AtFP_ty =
171  new TH1F("residual_AtFP_ty", "residual_AtFP_ty", 200, -0.004, 0.004);
172  res_AtFP_ty->GetXaxis()->SetTitle("dty, GeV/c");
173  res_AtFP_qp =
174  new TH1F("residual_AtFP_qp", "residual_AtFP_qp", 200, -0.05, 0.05);
175  res_AtFP_qp->GetXaxis()->SetTitle("d(Q/P), c/GeV");
176 
177  pull_AtFP_x = new TH1F("pull_AtFP_x", "pull_AtFP_x", 100, -5., 5.);
178  pull_AtFP_y = new TH1F("pull_AtFP_y", "pull_AtFP_y", 100, -5., 5.);
179  pull_AtFP_tx = new TH1F("pull_AtFP_tx", "pull_AtFP_tx", 100, -5., 5.);
180  pull_AtFP_ty = new TH1F("pull_AtFP_ty", "pull_AtFP_ty", 100, -5., 5.);
181  pull_AtFP_qp = new TH1F("pull_AtFP_qp", "pull_AtFP_qp", 100, -5., 5.);
182 
183  gDirectory = currentDir;
184 }
185 
187  if (res_STShit_x) delete res_STShit_x;
188  if (res_STShit_y) delete res_STShit_y;
189  if (pull_STShit_x) delete pull_STShit_x;
190  if (pull_STShit_y) delete pull_STShit_y;
191 
192  if (res_MVDhit_x) delete res_MVDhit_x;
193  if (res_MVDhit_y) delete res_MVDhit_y;
194  if (pull_MVDhit_x) delete pull_MVDhit_x;
195  if (pull_MVDhit_y) delete pull_MVDhit_y;
196 
197  if (res_AtPV_x) delete res_AtPV_x;
198  if (res_AtPV_y) delete res_AtPV_y;
199  if (res_AtPV_tx) delete res_AtPV_tx;
200  if (res_AtPV_ty) delete res_AtPV_ty;
201  if (res_AtPV_qp) delete res_AtPV_qp;
202 
203  if (pull_AtPV_x) delete pull_AtPV_x;
204  if (pull_AtPV_y) delete pull_AtPV_y;
205  if (pull_AtPV_tx) delete pull_AtPV_tx;
206  if (pull_AtPV_ty) delete pull_AtPV_ty;
207  if (pull_AtPV_qp) delete pull_AtPV_qp;
208 
209  if (res_AtFP_x) delete res_AtFP_x;
210  if (res_AtFP_y) delete res_AtFP_y;
211  if (res_AtFP_tx) delete res_AtFP_tx;
212  if (res_AtFP_ty) delete res_AtFP_ty;
213  if (res_AtFP_qp) delete res_AtFP_qp;
214 
215  if (pull_AtFP_x) delete pull_AtFP_x;
216  if (pull_AtFP_y) delete pull_AtFP_y;
217  if (pull_AtFP_tx) delete pull_AtFP_tx;
218  if (pull_AtFP_ty) delete pull_AtFP_ty;
219  if (pull_AtFP_qp) delete pull_AtFP_qp;
220 }
221 
222 InitStatus CbmKFTrackFitQA::ReInit() { return Init(); }
223 
224 InitStatus CbmKFTrackFitQA::Init() {
225  FairRootManager* fManger = FairRootManager::Instance();
226 
227  listMCTracks = dynamic_cast<TClonesArray*>(fManger->GetObject("MCTrack"));
228  listStsPts = dynamic_cast<TClonesArray*>(fManger->GetObject("StsPoint"));
229  listStsTracks = dynamic_cast<TClonesArray*>(fManger->GetObject("StsTrack"));
231  dynamic_cast<TClonesArray*>(fManger->GetObject("StsTrackMatch"));
232  listStsHits = dynamic_cast<TClonesArray*>(fManger->GetObject("StsHit"));
234  dynamic_cast<TClonesArray*>(fManger->GetObject("StsCluster"));
235  listStsDigi = dynamic_cast<TClonesArray*>(fManger->GetObject("StsDigi"));
237  dynamic_cast<TClonesArray*>(fManger->GetObject("StsDigiMatch"));
238 
239  if (CbmKF::Instance()->vMvdMaterial.size() == 0) {
240  listMvdPts = 0;
241  listMvdHits = 0;
242  listMvdHitMatches = 0;
243  } else {
244  listMvdPts = dynamic_cast<TClonesArray*>(fManger->GetObject("MvdPoint"));
245  listMvdHits = dynamic_cast<TClonesArray*>(fManger->GetObject("MvdHit"));
247  dynamic_cast<TClonesArray*>(fManger->GetObject("MvdHitMatch"));
248  }
249 
250  return kSUCCESS;
251 }
252 
253 void CbmKFTrackFitQA::Exec(Option_t* /*option*/) {
254  FillHitHistos();
255 
256  CbmKFTrErrMCPoints* MCTrackSortedArray =
257  new CbmKFTrErrMCPoints[listMCTracks->GetEntriesFast() + 1];
258  if (CbmKF::Instance()->vMvdMaterial.size() != 0)
259  for (Int_t iMvd = 0; iMvd < listMvdPts->GetEntriesFast(); iMvd++) {
260  CbmMvdPoint* MvdPoint = (CbmMvdPoint*) listMvdPts->At(iMvd);
261  //MCTrackSortedArray[MvdPoint->GetTrackID()].SetMvdPoint(MvdPoint);
262  MCTrackSortedArray[MvdPoint->GetTrackID()].MvdArray.push_back(MvdPoint);
263  }
264  for (Int_t iSts = 0; iSts < listStsPts->GetEntriesFast(); iSts++) {
265  CbmStsPoint* StsPoint = (CbmStsPoint*) listStsPts->At(iSts);
266  //MCTrackSortedArray[StsPoint->GetTrackID()].SetStsPoint(StsPoint);
267  MCTrackSortedArray[StsPoint->GetTrackID()].StsArray.push_back(StsPoint);
268  }
269  for (Int_t itrack = 0; itrack < listStsTracks->GetEntriesFast(); itrack++) {
270  CbmStsTrack* StsTrack = (CbmStsTrack*) listStsTracks->At(itrack);
271  CbmTrackMatch* StsTrackMatch =
272  (CbmTrackMatch*) listStsTracksMatch->At(itrack);
273  if (StsTrackMatch->GetNofMCTracks() == 0) continue;
274  CbmMCTrack* MCTrack =
275  (CbmMCTrack*) listMCTracks->At(StsTrackMatch->GetMCTrackId());
276  CbmKFTrack KFTrack(*StsTrack);
278  &MCTrackSortedArray[StsTrackMatch->GetMCTrackId()], MCTrack, &KFTrack);
279  // if(MCTrack->GetP() >= 1 && MCTrack->GetMotherId()==-1 && MCTrackSortedArray[StsTrackMatch->GetMCTrackId()].MvdArray.size()>1)
280  // {
281  FillHistoAtParticleVertex(MCTrack, &KFTrack);
282  // }
283  }
284  delete[] MCTrackSortedArray;
285 }
287 
289  CbmKFTrack* track_kf) {
290  CbmKFTrackInterface* tr_help1 = track_kf;
291  CbmKFTrack* tr1 = new CbmKFTrack(*tr_help1);
292  CbmKFTrackInterface* tr_help = tr1;
293 
294  tr_help->Extrapolate(
295  track_mc
296  ->GetStartZ()); //extrapolating of the track to the prodaction point
297 
298  Double_t* fT = tr_help->GetTrack();
299  Double_t* fC = tr_help->GetCovMatrix();
300 
301  // getting the q (charge) of the mc track using the pdg information
302 
303  Double_t qtrack = 0;
304  if (track_mc->GetPdgCode() < 9999999)
305  qtrack =
306  TDatabasePDG::Instance()->GetParticle(track_mc->GetPdgCode())->Charge()
307  / 3.0;
308  else
309  qtrack = 0;
310 
311  Double_t PointPx = track_mc->GetPx();
312  Double_t PointPy = track_mc->GetPy();
313  Double_t PointPz = track_mc->GetPz();
314  Double_t P_mc =
315  sqrt(PointPx * PointPx + PointPy * PointPy + PointPz * PointPz);
316 
317  //differences of the KF track and MC track parameters calculation
318  Double_t ddx =
319  fT[0]
320  - track_mc
321  ->GetStartX(); // The difference between x coordinates of the reconstructed and MC tracks
322  Double_t ddy =
323  fT[1]
324  - track_mc
325  ->GetStartY(); // The difference between y coordinates of the reconstructed and MC tracks
326  Double_t ddtx =
327  fT[2]
328  - PointPx
329  / PointPz; // The difference between tx of the reconstructed and MC tracks
330  Double_t ddty =
331  fT[3]
332  - PointPy
333  / PointPz; // The difference between ty of the reconstructed and MC tracks
334  Double_t ddqp = (fabs(1. / fT[4]) - P_mc) / P_mc; // p resolution
335  Double_t ddqp_p = fT[4]
336  - (qtrack
337  / sqrt(PointPx * PointPx + PointPy * PointPy
338  + PointPz * PointPz)); //p residual
339 
340  //differences of the KF track and MC track parameters
341  res_AtPV_x->Fill(ddx);
342  res_AtPV_y->Fill(ddy);
343  res_AtPV_tx->Fill(ddtx);
344  res_AtPV_ty->Fill(ddty);
345  if (finite(fT[4]) && (fabs(fT[4]) > 1.e-20)) res_AtPV_qp->Fill(ddqp);
346  //pulls of the parameters
347  if (finite(fC[0]) && fC[0] > 0) pull_AtPV_x->Fill(ddx / sqrt(fC[0]));
348  if (finite(fC[2]) && fC[2] > 0) pull_AtPV_y->Fill(ddy / sqrt(fC[2]));
349  if (finite(fC[5]) && fC[5] > 0) pull_AtPV_tx->Fill(ddtx / sqrt(fC[5]));
350  if (finite(fC[9]) && fC[9] > 0) pull_AtPV_ty->Fill(ddty / sqrt(fC[9]));
351  if (finite(fC[14]) && fC[14] > 0) pull_AtPV_qp->Fill(ddqp_p / sqrt(fC[14]));
352 
353  if (finite(fT[4]) && (fabs(fT[4]) > 1.e-20)) {
354  if (qtrack == (fabs(fT[4]) / fT[4]))
355  q_QA->Fill(P_mc, 100.0);
356  else
357  q_QA->Fill(P_mc, 0.0);
358 
359  if (finite(fC[14]) && fC[14] > 0)
360  dp_p->Fill(P_mc, fabs(1. / fT[4]) * sqrt(fC[14]) * 100, 1);
361  }
362 }
363 
365  CbmMCTrack* track_mc,
366  CbmKFTrack* track_kf) {
367  Double_t* fT = track_kf->GetTrack();
368  Double_t* fC = track_kf->GetCovMatrix();
369 
370  //Double_t StartX = track_kf -> GetHit(0)[];
371  Bool_t nomvdpoint = 1;
372 
373  FairMCPoint* MCFirstPoint;
374 
375  // if (fabs(track_mc->GetP()) < 1.) return;
376  // if (fabs(track_mc->GetPz()) < 0.0001) return;
377  //if (fT[4]<0.) return;
378 
379  if (!mc_points) return;
380  if ((mc_points->MvdArray.size() == 0) && (mc_points->StsArray.size() == 0))
381  return;
382 
383  if (mc_points->MvdArray.size() > 0)
384  MCFirstPoint = *mc_points->MvdArray.begin();
385  else
386  MCFirstPoint = *mc_points->StsArray.begin();
387 
388  for (vector<CbmMvdPoint*>::iterator imvd = mc_points->MvdArray.begin();
389  imvd != mc_points->MvdArray.end();
390  ++imvd) {
391  MCFirstPoint = *imvd;
392  //cout << "Z " << MCFirstPoint->GetZ() << " fT[5] " << fT[5] << " mctrackZ " << track_mc->GetStartZ() << " X " << fT[0] << " Xmc "<< track_mc->GetStartX()<<
393  //" MCID " << track_mc->GetMotherId()<< " MCIDPart " << MCFirstPoint->GetTrackID() << endl;
394  if (fabs(MCFirstPoint->GetZ() - fT[5]) < 1.) {
395  nomvdpoint = 0;
396  break;
397  }
398  }
399  if (nomvdpoint) {
400  for (vector<CbmStsPoint*>::iterator ists = mc_points->StsArray.begin();
401  ists != mc_points->StsArray.end();
402  ++ists) {
403  MCFirstPoint = *ists;
404  //cout << "Z " << MCFirstPoint->GetZ() << " fT[5] " << fT[5] << " mctrackZ " << track_mc->GetStartZ() << " X " << fT[0] << " Xmc "<< track_mc->GetStartX()<<
405  //" MCID " << track_mc->GetMotherId() << " MCIDPart " << MCFirstPoint->GetTrackID() << endl;
406  if (fabs(MCFirstPoint->GetZ() - fT[5]) < 1.) { break; }
407  }
408  }
409  track_kf->Extrapolate(MCFirstPoint->GetZ());
410 
411 
412  // getting of the q (charge) of the mc track using the pdg information
413  {
414  Double_t qtrack = 0;
415  if (track_mc->GetPdgCode() < 9999999)
416  qtrack =
417  TDatabasePDG::Instance()->GetParticle(track_mc->GetPdgCode())->Charge()
418  / 3.0;
419  else
420  qtrack = 0;
421 
422  Double_t PointPx = MCFirstPoint->GetPx();
423  Double_t PointPy = MCFirstPoint->GetPy();
424  Double_t PointPz = MCFirstPoint->GetPz();
425  Double_t P_mc =
426  sqrt(PointPx * PointPx + PointPy * PointPy + PointPz * PointPz);
427 
428  //differences of the KF track and MC track parameters calculation
429  Double_t ddx =
430  fT[0]
431  - MCFirstPoint
432  ->GetX(); // The difference between x coordinates of the reconstructed and MC tracks
433  Double_t ddy =
434  fT[1]
435  - MCFirstPoint
436  ->GetY(); // The difference between y coordinates of the reconstructed and MC tracks
437  Double_t ddtx =
438  fT[2]
439  - PointPx
440  / PointPz; // The difference between tx of the reconstructed and MC tracks
441  Double_t ddty =
442  fT[3]
443  - PointPy
444  / PointPz; // The difference between ty of the reconstructed and MC tracks
445  Double_t ddqp = (fabs(1. / fT[4]) - P_mc) / P_mc; // p resolution
446  Double_t ddqp_p = fT[4]
447  - (qtrack
448  / sqrt(PointPx * PointPx + PointPy * PointPy
449  + PointPz * PointPz)); //p residual
450 
451  //differences of the KF track and MC track parameters
452  res_AtFP_x->Fill(ddx * 10000.);
453  res_AtFP_y->Fill(ddy * 10000.);
454  res_AtFP_tx->Fill(ddtx);
455  res_AtFP_ty->Fill(ddty);
456  if (finite(fT[4]) && (fabs(fT[4]) > 1.e-20)) res_AtFP_qp->Fill(ddqp);
457  //pulls of the parameters
458  if (finite(fC[0]) && fC[0] > 0) pull_AtFP_x->Fill(ddx / sqrt(fC[0]));
459  if (finite(fC[2]) && fC[2] > 0) pull_AtFP_y->Fill(ddy / sqrt(fC[2]));
460  if (finite(fC[5]) && fC[5] > 0) pull_AtFP_tx->Fill(ddtx / sqrt(fC[5]));
461  if (finite(fC[9]) && fC[9] > 0) pull_AtFP_ty->Fill(ddty / sqrt(fC[9]));
462  if (finite(fC[14]) && fC[14] > 0) pull_AtFP_qp->Fill(ddqp_p / sqrt(fC[14]));
463 
464  if (finite(fT[4]) && (fabs(fT[4]) > 1.e-20)) {
465  if (qtrack == (fabs(fT[4]) / fT[4]))
466  q_QA->Fill(P_mc, 100.0);
467  else
468  q_QA->Fill(P_mc, 0.0);
469 
470  if (finite(fC[14]) && fC[14] > 0)
471  dp_p->Fill(P_mc, fabs(1. / fT[4]) * sqrt(fC[14]) * 100, 1);
472  }
473  //cout << ddx <<" "<< ddx/sqrt(fC[0]) << endl;
474  }
475 }
476 
478  //This function writes obtained histograms to the root file
479  TDirectory* curr = gDirectory;
480  TFile* currentFile = gFile;
481  TFile* fout = new TFile(outfileName.Data(), "Recreate");
482 
483  //differences of the KF track and MC track parameters
484  res_AtPV_x->Write();
485  res_AtPV_y->Write();
486  res_AtPV_tx->Write();
487  res_AtPV_ty->Write();
488  res_AtPV_qp->Write();
489  //pulls of the parameters
490  pull_AtPV_x->Write();
491  pull_AtPV_y->Write();
492  pull_AtPV_tx->Write();
493  pull_AtPV_ty->Write();
494  pull_AtPV_qp->Write();
495  //differences of the KF track and MC track parameters
496 
497  res_AtFP_x->Write();
498  res_AtFP_y->Write();
499  res_AtFP_tx->Write();
500  res_AtFP_ty->Write();
501  res_AtFP_qp->Write();
502  //pulls of the parameters
503  pull_AtFP_x->Write();
504  pull_AtFP_y->Write();
505  pull_AtFP_tx->Write();
506  pull_AtFP_ty->Write();
507  pull_AtFP_qp->Write();
508 
509  res_STShit_x->Write();
510  res_STShit_y->Write();
511  pull_STShit_x->Write();
512  pull_STShit_y->Write();
513 
514  res_MVDhit_x->Write();
515  res_MVDhit_y->Write();
516  pull_MVDhit_x->Write();
517  pull_MVDhit_y->Write();
518 
519  ggg->Write();
520  q_QA->Write();
521  dp_p->Write();
522 
523  fout->Close();
524  fout->Delete();
525  gFile = currentFile;
526  gDirectory = curr;
527 }
528 
530  //This function writes obtained histograms to the root file
531 
532  //differences of the KF track and MC track parameters
533  res_AtPV_x->GetXaxis()->SetTitle("dX, cm");
534  res_AtPV_x->SaveAs("res_AtPV_x.eps");
535  res_AtPV_y->GetXaxis()->SetTitle("dY, cm");
536  res_AtPV_y->SaveAs("res_AtPV_y.gif");
537  res_AtPV_tx->GetXaxis()->SetTitle("dtx");
538  res_AtPV_tx->SaveAs("res_AtPV_tx.gif");
539  res_AtPV_ty->GetXaxis()->SetTitle("dty");
540  res_AtPV_ty->SaveAs("res_AtPV_ty.gif");
541  res_AtPV_qp->GetXaxis()->SetTitle("d(Q/P), c/GeV");
542  res_AtPV_qp->SaveAs("res_AtPV_qp.gif");
543 
544  //pulls of the parameters
545  pull_AtPV_x->SaveAs("pull_AtPV_x.gif");
546  pull_AtPV_y->SaveAs("pull_AtPV_y.gif");
547  pull_AtPV_tx->SaveAs("pull_AtPV_tx.gif");
548  pull_AtPV_ty->SaveAs("pull_AtPV_ty.gif");
549  pull_AtPV_qp->SaveAs("pull_AtPV_qp.gif");
550 
551  //differences of the KF track and MC track parameters
552  res_AtFP_x->GetXaxis()->SetTitle("dX, cm");
553  res_AtFP_x->SaveAs("res_AtFP_x.gif");
554  res_AtFP_y->GetXaxis()->SetTitle("dY, cm");
555  res_AtFP_y->SaveAs("res_AtFP_y.gif");
556  res_AtFP_tx->GetXaxis()->SetTitle("dtx, GeV/c");
557  res_AtFP_tx->SaveAs("res_AtFP_tx.gif");
558  res_AtFP_ty->GetXaxis()->SetTitle("dty, GeV/c");
559  res_AtFP_ty->SaveAs("res_AtFP_ty.gif");
560  res_AtFP_qp->GetXaxis()->SetTitle("d(Q/P), c/GeV");
561  res_AtFP_qp->SaveAs("res_AtFP_qp.gif");
562 
563  //pulls of the parameters
564  pull_AtFP_x->SaveAs("pull_AtFP_x.gif");
565  pull_AtFP_y->SaveAs("pull_AtFP_y.gif");
566  pull_AtFP_tx->SaveAs("pull_AtFP_tx.gif");
567  pull_AtFP_ty->SaveAs("pull_AtFP_ty.gif");
568  pull_AtFP_qp->SaveAs("pull_AtFP_qp.gif");
569 }
570 
572  vStsHitMatch.resize(listStsHits->GetEntriesFast());
573  StsHitMatch();
574  for (Int_t iSts = 0; iSts < listStsHits->GetEntriesFast(); iSts++) {
575  CbmStsHit* StsHit = (CbmStsHit*) listStsHits->At(iSts);
576  if (vStsHitMatch[iSts] > -1) {
577  CbmStsPoint* StsP = (CbmStsPoint*) listStsPts->At(vStsHitMatch[iSts]);
578  Double_t dx = (StsHit->GetX() - 0.5 * (StsP->GetXIn() + StsP->GetXOut()));
579  Double_t dy = (StsHit->GetY() - 0.5 * (StsP->GetYIn() + StsP->GetYOut()));
580  res_STShit_x->Fill(dx);
581  res_STShit_y->Fill(dy);
582  pull_STShit_x->Fill(dx / (StsHit->GetDx()));
583  pull_STShit_y->Fill(dy / (StsHit->GetDy()));
584  }
585  }
586  // TODO correct the matching for MVD
587  // if(CbmKF::Instance()->vMvdMaterial.size() != 0)
588  // {
589  // for (Int_t iMvd=0; iMvd<listMvdHits->GetEntriesFast(); iMvd++)
590  // {
591  // CbmMvdHit* MvdHit = (CbmMvdHit*)listMvdHits->At(iMvd);
592  // CbmMvdHitMatch* MvdHitMatch = (CbmMvdHitMatch*)listMvdHitMatches->At(iMvd);
593  //
594  // if(MvdHitMatch->GetPointId() > -1)
595  // {
596  // CbmMvdPoint* MvdP = (CbmMvdPoint*) listMvdPts->At(MvdHitMatch->GetPointId());
597  // if(!MvdP) continue;
598  // Double_t dx = (MvdHit->GetX() - 0.5*(MvdP->GetX() + MvdP->GetXOut()));
599  // Double_t dy = (MvdHit->GetY() - 0.5*(MvdP->GetY() + MvdP->GetYOut()));
600  // res_MVDhit_x -> Fill( dx*10000. );
601  // res_MVDhit_y -> Fill( dy*10000. );
602  // pull_MVDhit_x -> Fill( dx/(MvdHit->GetDx()) );
603  // pull_MVDhit_y -> Fill( dy/(MvdHit->GetDy()) );
604  // }
605  // }
606  // }
607 }
608 
610  const bool useLinks =
611  0; // 0 - use HitMatch, one_to_one; 1 - use FairLinks, many_to_many. Set 0 to switch to old definition of efficiency.
612  // TODO: fix trunk problem with links. Set useLinks = 1
613 
614  for (int iH = 0; iH < listStsHits->GetEntriesFast(); iH++) {
615  CbmStsHit* stsHit = dynamic_cast<CbmStsHit*>(listStsHits->At(iH));
616  vStsHitMatch[iH] = -1;
617  int gggi = 0;
618  if (useLinks) {
619  if (listStsClusters) {
620  // if ( NLinks != 2 ) cout << "HitMatch: Error. Hit wasn't matched with 2 clusters." << endl;
621  // 1-st cluster
622  vector<int>
623  stsPointIds; // save here all mc-points matched with first cluster
624  vector<int> stsPointIds_hit;
625  int iL = 0;
626  CbmLink link = stsHit->GetMatch()->GetLink(iL);
627  CbmStsCluster* stsCluster =
628  dynamic_cast<CbmStsCluster*>(listStsClusters->At(link.GetIndex()));
629  int NLinks2 = stsCluster->GetMatch()->GetNofLinks();
630  for (int iL2 = 0; iL2 < NLinks2; iL2++) {
631  const CbmLink& link2 = stsCluster->GetMatch()->GetLink(iL2);
632  //CbmStsDigi *stsDigi = dynamic_cast<CbmStsDigi*>( listStsDigi->At( link2.GetIndex() ) );
633  // const int NLinks3 = stsDigi->GetNLinks();
634  CbmMatch* stsDigiMatch =
635  dynamic_cast<CbmMatch*>(listStsDigiMatch->At(link2.GetIndex()));
636  const int NLinks3 = stsDigiMatch->GetNofLinks();
637  for (int iL3 = 0; iL3 < NLinks3; iL3++) {
638  CbmLink link3 = stsDigiMatch->GetLink(iL3);
639  // FairLink link3 = stsDigi->GetLink(iL3);
640  int stsPointId = link3.GetIndex();
641  stsPointIds.push_back(stsPointId);
642  } // for mcPoint
643  } // for digi
644  // 2-nd cluster
645  iL = 1;
646  link = stsHit->GetMatch()->GetLink(iL);
647  stsCluster =
648  dynamic_cast<CbmStsCluster*>(listStsClusters->At(link.GetIndex()));
649  NLinks2 = stsCluster->GetMatch()->GetNofLinks();
650  for (int iL2 = 0; iL2 < NLinks2; iL2++) {
651  const CbmLink& link2 = stsCluster->GetMatch()->GetLink(iL2);
652  //CbmStsDigi *stsDigi = dynamic_cast<CbmStsDigi*>( listStsDigi->At( link2.GetIndex() ) );
653  CbmMatch* stsDigiMatch =
654  dynamic_cast<CbmMatch*>(listStsDigiMatch->At(link2.GetIndex()));
655  // const int NLinks3 = stsDigi->GetNLinks();
656  const int NLinks3 = stsDigiMatch->GetNofLinks();
657  for (int iL3 = 0; iL3 < NLinks3; iL3++) {
658  // FairLink link3 = stsDigi->GetLink(iL3);
659  CbmLink link3 = stsDigiMatch->GetLink(iL3);
660  int stsPointId = link3.GetIndex();
661 
662  if (!find(&(stsPointIds[0]),
663  &(stsPointIds[stsPointIds.size()]),
664  stsPointId))
665  continue; // check if first cluster matched with same mc-point
666  // CbmStsPoint *pt = dynamic_cast<CbmStsPoint*>( listStsPts->At(stsPointId) );
667  // if(!pt) continue;
668  // CbmMCTrack *MCTrack = dynamic_cast<CbmMCTrack*>( listMCTracks->At( pt->GetTrackID() ) );
669  // if ( !MCTrack ) continue;
670  // if ( abs(MCTrack->GetPdgCode()) >= 10000 ) continue;
671 
672  stsPointIds_hit.push_back(stsPointId);
673  vStsHitMatch[iH] = stsPointId;
674  gggi++;
675  } // for mcPoint
676  } // for digi
677  } // if clusters
678  } // if useLinks
679  ggg->Fill(gggi);
680  } // for hits
681 }
682 
683 
685  /*
686  Nback=0;
687  int NallTracks=0;
688 
689  for (Int_t ientr=0; ientr< treco->GetEntriesFast(); ientr++)
690 // for (Int_t ientr=0; ientr< 1; ientr++)
691  {
692  treco->GetEntry(ientr);
693  tmc->GetEntry(ientr);
694  cout << "Entry " << ientr << endl;
695 
696  CbmKFTrErrMCPoints MCTrackSortedArray[MCTrackArray->GetEntriesFast()+1];
697 
698  for (Int_t iMvd=0; iMvd<MvdPointArray->GetEntriesFast(); iMvd++)
699  {
700  CbmMvdPoint* MvdPoint = (CbmMvdPoint*)MvdPointArray->At(iMvd);
701  //MCTrackSortedArray[MvdPoint->GetTrackID()].SetMvdPoint(MvdPoint);
702  MCTrackSortedArray[MvdPoint->GetTrackID()].MvdArray.push_back(MvdPoint);
703  }
704 
705  for (Int_t iSts=0; iSts<StsPointArray->GetEntriesFast(); iSts++)
706  {
707  CbmStsPoint* StsPoint = (CbmStsPoint*)StsPointArray->At(iSts);
708  //MCTrackSortedArray[StsPoint->GetTrackID()].SetStsPoint(StsPoint);
709  MCTrackSortedArray[StsPoint->GetTrackID()].StsArray.push_back(StsPoint);
710  }
711 
712  NallTracks+=StsTrackArray->GetEntriesFast();
713 
714  for (Int_t itrack=0; itrack<StsTrackArray->GetEntriesFast(); itrack++)
715 // for (Int_t itrack=0; itrack<1; itrack++)
716 
717  {
718  CbmStsTrack* StsTrack = (CbmStsTrack*)StsTrackArray->At(itrack);
719  CbmTrackMatch* StsTrackMatch = (CbmTrackMatch*)StsTrackMatchArray->At(itrack);
720  Int_t NofMC = StsTrackMatch -> GetNofMCTracks();
721 //cout << itrack << "!!!!!!!" << StsTrackArray->GetEntriesFast() << endl;
722 // cout << StsTrackMatch -> GetNofMCTracks() << endl;
723  if(StsTrackMatch -> GetNofMCTracks() != 1) continue;
724  CbmMCTrack* MCTrack = (CbmMCTrack*)MCTrackArray->At(StsTrackMatch->GetMCTrackId());
725 
726  CbmKFTrack *KFTrack;
727  KFTrack = new CbmKFTrack(*StsTrack);
728 
729 // FindBackTracks(&MCTrackSortedArray[StsTrackMatch->GetMCTrackId()], MCTrack, KFTrack, ientr);
730  FillHistoAtFirstPoint(&MCTrackSortedArray[StsTrackMatch->GetMCTrackId()], MCTrack, KFTrack);
731 // FillHistoAtParticleVertex(MCTrack, KFTrack);
732  }
733  }*/
734 }
735 
737  CbmMCTrack* /*track_mc*/,
738  CbmKFTrack* /*track_kf*/,
739  int /*iEvent*/) {
740  /*
741  FILE *fBack = fopen("BackTracks.txt","a+");
742 
743  Double_t *fT = track_kf -> GetTrack();
744  Double_t *fC = track_kf -> GetCovMatrix();
745 
746  Bool_t back = 0;
747 
748  FairMCPoint *MCPoint;
749  FairMCPoint *MCFirstPoint;
750 
751  Bool_t nomvdpoint = 1;
752  Bool_t nostspoint = 1;
753 
754  if(mc_points->MvdArray.size() > 0.)
755  {
756  track_kf -> Extrapolate(mc_points->MvdArray[0]->GetZ());
757  for( vector<CbmMvdPoint*>::iterator imvd = mc_points->MvdArray.begin(); imvd < mc_points->MvdArray.begin()+1; ++imvd)
758  {
759  MCFirstPoint = *imvd;
760  }
761  }
762  else
763  {
764  track_kf -> Extrapolate(mc_points->StsArray[0]->GetZ());
765  for( vector<CbmStsPoint*>::iterator ists = mc_points->StsArray.begin(); ists < mc_points->StsArray.begin()+1; ++ists)
766  {
767  MCFirstPoint = *ists;
768  }
769  }
770 
771  for( vector<CbmMvdPoint*>::iterator imvd = mc_points->MvdArray.begin(); imvd != mc_points->MvdArray.end(); ++imvd)
772  {
773  MCPoint = *imvd;
774  if(MCPoint->GetPz()<0)
775  {
776  back=1;
777  }
778  }
779  for( vector<CbmStsPoint*>::iterator ists = mc_points->StsArray.begin(); ists != mc_points->StsArray.end(); ++ists)
780  {
781  MCPoint = *ists;
782  if(MCPoint->GetPz()<0)
783  {
784  back=1;
785  }
786  }
787  // getting of the q (charge) of the mc track using the pdg information
788  if (back)
789  {
790  cout <<"mc "<< sqrt(MCFirstPoint->GetPz()*MCFirstPoint->GetPz()+MCFirstPoint->GetPy()*MCFirstPoint->GetPy()+MCFirstPoint->GetPx()*MCFirstPoint->GetPx()) << endl;
791  cout <<"Px "<< MCFirstPoint->GetPx()<<" ";
792  cout <<"Py "<< MCFirstPoint->GetPy()<<" ";
793  cout <<"Pz "<< MCFirstPoint->GetPz()<<endl;
794  cout << "re " << fabs(1./fT[4])<<endl;
795  cout <<"PDG = "<<track_mc->GetPdgCode()<<endl;
796 
797  Nback++;
798 
799  Double_t qtrack=0;
800  if ( track_mc->GetPdgCode() < 9999999 )
801  qtrack = TDatabasePDG::Instance()->GetParticle(track_mc->GetPdgCode())->Charge()/3.0;
802  else qtrack = 0;
803 
804  Double_t PointPx = MCFirstPoint->GetPx();
805  Double_t PointPy = MCFirstPoint->GetPy();
806  Double_t PointPz = MCFirstPoint->GetPz();
807 
808  //differences of the KF track and MC track parameters calculation
809  Double_t ddx = fT[0] - MCFirstPoint->GetX(); // The difference between the x coordinates of the reconstructed and MC tracks
810  Double_t ddy = fT[1] - MCFirstPoint->GetY(); // The difference between the y coordinates of the reconstructed and MC tracks
811  Double_t ddtx = fT[2] - PointPx/PointPz; // The difference between the tx coordinates of the reconstructed and MC tracks
812  Double_t ddty = fT[3] - PointPy/PointPz; // The difference between the ty coordinates of the reconstructed and MC tracks
813  Double_t ddqp = fT[4] - (qtrack/sqrt(PointPx*PointPx+
814  PointPy*PointPy+
815  PointPz*PointPz)); // The difference between the qp coordinates of the reconstructed and MC tracks
816 
817  fprintf(fBack,"Event %i\n",iEvent);
818  fprintf(fBack,"PDG = %i\n",track_mc->GetPdgCode());
819  fprintf(fBack,"MC P = %f, Px = %f, Py = %f, Pz = %f",
820  sqrt(MCPoint->GetPz()*MCPoint->GetPz()+MCPoint->GetPy()*MCPoint->GetPy()+MCPoint->GetPx()*MCPoint->GetPx()),
821  MCPoint->GetPx(),MCPoint->GetPy(),MCPoint->GetPz());
822  fprintf(fBack," mc track reco track\n");
823  fprintf(fBack,"X %f %f\n",fT[0],MCFirstPoint->GetX());
824  fprintf(fBack,"Y %f %f\n",fT[1],MCFirstPoint->GetY());
825  fprintf(fBack,"Z %f %f\n",fT[5],MCFirstPoint->GetZ());
826  fprintf(fBack,"Tx %f %f\n",fT[2],PointPx/PointPz);
827  fprintf(fBack,"Ty %f %f\n",fT[3],PointPy/PointPz);
828  fprintf(fBack,"qp %f %f\n\n",fT[4],qtrack/sqrt(PointPx*PointPx+PointPy*PointPy+PointPz*PointPz));
829 
830  //differences of the KF track and MC track parameters
831  res_AtFP_x -> Fill(ddx*10000.);
832  res_AtFP_y -> Fill(ddy*10000.);
833  res_AtFP_tx -> Fill(ddtx);
834  res_AtFP_ty -> Fill(ddty);
835  res_AtFP_qp -> Fill(ddqp);
836 
837  //pulls of the parameters
838  pull_AtFP_x -> Fill(ddx/sqrt(fC[0]));
839  pull_AtFP_y -> Fill(ddy/sqrt(fC[2]));
840  pull_AtFP_tx -> Fill(ddtx/sqrt(fC[5]));
841  pull_AtFP_ty -> Fill(ddty/sqrt(fC[9]));
842  pull_AtFP_qp -> Fill(ddqp/sqrt(fC[14]));
843  }
844 */
845 }
CbmKFTrackFitQA::pull_MVDhit_y
TH1F * pull_MVDhit_y
Definition: CbmKFTrackFitQA.h:100
CbmKFTrackFitQA::listMvdPts
TClonesArray * listMvdPts
Definition: CbmKFTrackFitQA.h:72
CbmKFTrackFitQA::StsHitMatch
void StsHitMatch()
Definition: CbmKFTrackFitQA.cxx:609
CbmMatch
Definition: CbmMatch.h:22
CbmMCTrack::GetStartX
Double_t GetStartX() const
Definition: CbmMCTrack.h:75
CbmKFTrackFitQA::ReInit
virtual InitStatus ReInit()
Definition: CbmKFTrackFitQA.cxx:222
CbmKFTrackFitQA::ggg
TH1F * ggg
Definition: CbmKFTrackFitQA.h:133
CbmPixelHit::GetX
Double_t GetX() const
Definition: CbmPixelHit.h:83
CbmMatch::GetLink
const CbmLink & GetLink(Int_t i) const
Definition: CbmMatch.h:35
CbmMatch::GetNofLinks
Int_t GetNofLinks() const
Definition: CbmMatch.h:38
CbmKF.h
CbmStsCluster
Data class for STS clusters.
Definition: CbmStsCluster.h:31
CbmStsPoint::GetXOut
Double_t GetXOut() const
Definition: CbmStsPoint.h:84
CbmKFTrackFitQA::res_AtPV_x
TH1F * res_AtPV_x
Definition: CbmKFTrackFitQA.h:104
CbmKFTrackFitQA::CbmKFTrackFitQA
CbmKFTrackFitQA()
CbmKFTrackFitQA::res_STShit_y
TH1F * res_STShit_y
Definition: CbmKFTrackFitQA.h:93
CbmKFTrackFitQA::res_MVDhit_x
TH1F * res_MVDhit_x
Definition: CbmKFTrackFitQA.h:97
CbmKFTrackFitQA::res_AtPV_y
TH1F * res_AtPV_y
Definition: CbmKFTrackFitQA.h:105
CbmKFTrackInterface::GetTrack
virtual Double_t * GetTrack()
Is it electron.
Definition: CbmKFTrackInterface.cxx:33
CbmPixelHit::GetY
Double_t GetY() const
Definition: CbmPixelHit.h:84
CbmKFTrackFitQA::listMvdHits
TClonesArray * listMvdHits
Definition: CbmKFTrackFitQA.h:77
sqrt
friend F32vec4 sqrt(const F32vec4 &a)
Definition: L1/vectors/P4_F32vec4.h:41
CbmKFTrackFitQA::pull_AtPV_tx
TH1F * pull_AtPV_tx
Definition: CbmKFTrackFitQA.h:112
CbmKFTrackFitQA::pull_AtPV_x
TH1F * pull_AtPV_x
Definition: CbmKFTrackFitQA.h:110
CbmPixelHit::GetDx
Double_t GetDx() const
Definition: CbmPixelHit.h:85
CbmKFTrackFitQA::Exec
void Exec(Option_t *option)
Definition: CbmKFTrackFitQA.cxx:253
CbmKFTrackFitQA::pull_AtPV_qp
TH1F * pull_AtPV_qp
Definition: CbmKFTrackFitQA.h:114
CbmKFTrack::GetTrack
Double_t * GetTrack()
Is it electron.
Definition: CbmKFTrack.h:58
CbmMCTrack::GetPdgCode
Int_t GetPdgCode() const
Definition: CbmMCTrack.h:70
CbmKFTrackFitQA::Init
virtual InitStatus Init()
Definition: CbmKFTrackFitQA.cxx:224
CbmTrackMatch
Definition: CbmTrackMatch.h:18
CbmKFTrackFitQA::dp_p
TProfile * dp_p
Definition: CbmKFTrackFitQA.h:131
CbmKFTrackFitQA::res_AtPV_ty
TH1F * res_AtPV_ty
Definition: CbmKFTrackFitQA.h:107
CbmKFTrackFitQA::listStsClusters
TClonesArray * listStsClusters
Definition: CbmKFTrackFitQA.h:79
CbmKFTrackFitQA::FillHitHistos
void FillHitHistos()
Definition: CbmKFTrackFitQA.cxx:571
ClassImp
ClassImp(CbmKFTrackFitQA) CbmKFTrackFitQA
Definition: CbmKFTrackFitQA.cxx:39
CbmKF::vMvdMaterial
std::vector< CbmKFTube > vMvdMaterial
Definition: CbmKF.h:73
CbmMCTrack::GetPx
Double_t GetPx() const
Definition: CbmMCTrack.h:72
CbmMCTrack::GetPy
Double_t GetPy() const
Definition: CbmMCTrack.h:73
CbmStsPoint
Definition: CbmStsPoint.h:27
CbmMatch.h
CbmTrackMatch.h
CbmPixelHit::GetDy
Double_t GetDy() const
Definition: CbmPixelHit.h:86
CbmKFTrackFitQA::res_AtPV_tx
TH1F * res_AtPV_tx
Definition: CbmKFTrackFitQA.h:106
CbmKFTrackFitQA
Definition: CbmKFTrackFitQA.h:42
CbmKFTrackFitQA::pull_AtPV_y
TH1F * pull_AtPV_y
Definition: CbmKFTrackFitQA.h:111
CbmKFTrackFitQA::listStsDigiMatch
TClonesArray * listStsDigiMatch
Definition: CbmKFTrackFitQA.h:81
CbmKFTrackFitQA::listStsTracksMatch
TClonesArray * listStsTracksMatch
Definition: CbmKFTrackFitQA.h:74
CbmKFTrErrMCPoints::MvdArray
std::vector< CbmMvdPoint * > MvdArray
Definition: CbmKFTrErrMCPoints.h:78
CbmKFTrackFitQA::FillHistoAtFirstPoint
void FillHistoAtFirstPoint(CbmKFTrErrMCPoints *mc_points, CbmMCTrack *track_mc, CbmKFTrack *track_kf)
Definition: CbmKFTrackFitQA.cxx:364
CbmKFTrackFitQA::listStsTracks
TClonesArray * listStsTracks
Definition: CbmKFTrackFitQA.h:75
CbmKFTrackFitQA::pull_AtFP_qp
TH1F * pull_AtFP_qp
Definition: CbmKFTrackFitQA.h:127
CbmKFMath.h
CbmHit::GetMatch
CbmMatch * GetMatch() const
Definition: CbmHit.h:74
CbmKFTrackFitQA::q_QA
TProfile * q_QA
Definition: CbmKFTrackFitQA.h:130
CbmStsHit
data class for a reconstructed 3-d hit in the STS
Definition: CbmStsHit.h:31
CbmKF::Instance
static CbmKF * Instance()
Definition: CbmKF.h:39
CbmKFTrackFitQA::res_STShit_x
TH1F * res_STShit_x
Definition: CbmKFTrackFitQA.h:92
finite
T finite(T x)
Definition: CbmL1Def.h:21
CbmStsTrack.h
Data class for STS tracks.
CbmMvdPoint
Definition: CbmMvdPoint.h:28
CbmTrackMatch::GetNofMCTracks
Int_t GetNofMCTracks() const
Definition: CbmTrackMatch.h:56
CbmKFTrackFitQA::pull_AtFP_y
TH1F * pull_AtFP_y
Definition: CbmKFTrackFitQA.h:124
CbmKFTrackFitQA::res_AtFP_qp
TH1F * res_AtFP_qp
Definition: CbmKFTrackFitQA.h:121
CbmStsPoint::GetYOut
Double_t GetYOut() const
Definition: CbmStsPoint.h:85
CbmKFTrack::GetCovMatrix
Double_t * GetCovMatrix()
array[6] of track parameters(x,y,tx,ty,qp,z)
Definition: CbmKFTrack.h:59
CbmKFTrErrMCPoints
Definition: CbmKFTrErrMCPoints.h:32
CbmKFTrackFitQA::pull_STShit_y
TH1F * pull_STShit_y
Definition: CbmKFTrackFitQA.h:95
CbmKFTrackFitQA::res_AtPV_qp
TH1F * res_AtPV_qp
Definition: CbmKFTrackFitQA.h:108
CbmKFTrackFitQA::listStsPts
TClonesArray * listStsPts
Definition: CbmKFTrackFitQA.h:71
CbmKFTrackFitQA::res_MVDhit_y
TH1F * res_MVDhit_y
Definition: CbmKFTrackFitQA.h:98
CbmKFTrackFitQA::FillHistoAtParticleVertex
void FillHistoAtParticleVertex(CbmMCTrack *track_mc, CbmKFTrack *track_kf)
Definition: CbmKFTrackFitQA.cxx:288
CbmKFTrack.h
CbmKFTrackFitQA::~CbmKFTrackFitQA
~CbmKFTrackFitQA()
Definition: CbmKFTrackFitQA.cxx:186
CbmStsPoint::GetXIn
Double_t GetXIn() const
Definition: CbmStsPoint.h:81
CbmKFTrackFitQA::pull_AtFP_x
TH1F * pull_AtFP_x
Definition: CbmKFTrackFitQA.h:123
CbmKFTrackFitQA::vStsHitMatch
std::vector< int > vStsHitMatch
Definition: CbmKFTrackFitQA.h:87
CbmKFTrackInterface
Definition: CbmKFTrackInterface.h:26
CbmStsPoint::GetYIn
Double_t GetYIn() const
Definition: CbmStsPoint.h:82
CbmKFTrackFitQA::Save
void Save()
Definition: CbmKFTrackFitQA.cxx:529
CbmKFTrackFitQA.h
CbmKFTrackFitQA::KFWrite
void KFWrite()
Definition: CbmKFTrackFitQA.cxx:477
CbmMCTrack::GetStartY
Double_t GetStartY() const
Definition: CbmMCTrack.h:76
CbmKFTrackFitQA::pull_AtFP_tx
TH1F * pull_AtFP_tx
Definition: CbmKFTrackFitQA.h:125
CbmKFTrackInterface::GetCovMatrix
virtual Double_t * GetCovMatrix()
array[6] of track parameters(x,y,tx,ty,qp,z)
Definition: CbmKFTrackInterface.cxx:34
CbmMCTrack.h
CbmKFTrackFitQA::listMvdHitMatches
TClonesArray * listMvdHitMatches
Definition: CbmKFTrackFitQA.h:78
CbmKFTrackFitQA::listMCTracks
TClonesArray * listMCTracks
Definition: CbmKFTrackFitQA.h:73
CbmMCTrack
Definition: CbmMCTrack.h:34
fabs
friend F32vec4 fabs(const F32vec4 &a)
Definition: L1/vectors/P4_F32vec4.h:60
CbmTrackMatch::GetMCTrackId
Int_t GetMCTrackId() const
Definition: CbmTrackMatch.h:44
CbmKFTrackFitQA::Finish
void Finish()
Definition: CbmKFTrackFitQA.cxx:286
CbmKFTrErrMCPoints::StsArray
std::vector< CbmStsPoint * > StsArray
Definition: CbmKFTrErrMCPoints.h:77
CbmKFTrackFitQA::res_AtFP_tx
TH1F * res_AtFP_tx
Definition: CbmKFTrackFitQA.h:119
CbmKFTrackFitQA::listStsDigi
TClonesArray * listStsDigi
Definition: CbmKFTrackFitQA.h:80
CbmKFTrackFitQA::res_AtFP_y
TH1F * res_AtFP_y
Definition: CbmKFTrackFitQA.h:118
CbmKFTrackFitQA::outfileName
TString outfileName
Definition: CbmKFTrackFitQA.h:85
CbmKFTrackFitQA::pull_AtFP_ty
TH1F * pull_AtFP_ty
Definition: CbmKFTrackFitQA.h:126
CbmStsTrack
Definition: CbmStsTrack.h:37
CbmKFTrackFitQA::FindBackTracks
void FindBackTracks()
Definition: CbmKFTrackFitQA.cxx:684
CbmKFTrack
Definition: CbmKFTrack.h:21
CbmKFTrackFitQA::pull_STShit_x
TH1F * pull_STShit_x
Definition: CbmKFTrackFitQA.h:94
CbmKFTrackFitQA::res_AtFP_x
TH1F * res_AtFP_x
Definition: CbmKFTrackFitQA.h:117
CbmKFTrackFitQA::pull_AtPV_ty
TH1F * pull_AtPV_ty
Definition: CbmKFTrackFitQA.h:113
CbmMCTrack::GetPz
Double_t GetPz() const
Definition: CbmMCTrack.h:74
CbmKFTrackFitQA::res_AtFP_ty
TH1F * res_AtFP_ty
Definition: CbmKFTrackFitQA.h:120
CbmKFTrackFitQA::pull_MVDhit_x
TH1F * pull_MVDhit_x
Definition: CbmKFTrackFitQA.h:99
CbmCluster::GetMatch
CbmMatch * GetMatch() const
Definition: CbmCluster.h:91
CbmKFTrackInterface::Extrapolate
Int_t Extrapolate(Double_t z, Double_t *QP0=0)
Access to i-th hit.
Definition: CbmKFTrackInterface.cxx:39
CbmKFTrackFitQA::listStsHits
TClonesArray * listStsHits
Definition: CbmKFTrackFitQA.h:76