CbmRoot
CbmKFParticleFinderQA.cxx
Go to the documentation of this file.
1 //-----------------------------------------------------------
2 //-----------------------------------------------------------
3 
4 // Cbm Headers ----------------------
6 #include "CbmMCDataArray.h"
7 #include "CbmMCDataManager.h"
8 #include "CbmMCEventList.h"
9 #include "CbmMCTrack.h"
10 #include "CbmTrack.h"
11 #include "CbmTrackMatchNew.h"
12 
13 #include "FairRunAna.h"
14 
15 //KF Particle headers
16 #include "KFMCTrack.h"
17 #include "KFParticleMatch.h"
18 #include "KFParticleTopoReconstructor.h"
19 #include "KFTopoPerformance.h"
20 
21 //ROOT headers
22 #include "TCanvas.h"
23 #include "TClonesArray.h"
24 #include "TDatabasePDG.h"
25 #include "TF1.h"
26 #include "TFile.h"
27 #include "TH1F.h"
28 #include "TMath.h"
29 #include "TObject.h"
30 #include "TSystem.h"
31 
32 //c++ and std headers
33 #include <cmath>
34 #include <iomanip>
35 #include <iostream>
36 #include <vector>
37 using std::vector;
38 
40  const char* name,
41  Int_t iVerbose,
42  const KFParticleTopoReconstructor* tr,
43  TString outFileName)
44  : FairTask(name, iVerbose)
45  , fMCTracksBranchName("MCTrack")
46  , fTrackMatchBranchName("StsTrackMatch")
47  , fMCTrackArray(nullptr)
48  , fMCTrackArrayEvent(nullptr)
49  , fEventList(nullptr)
50  , fTrackMatchArray(nullptr)
51  , fRecParticles(nullptr)
52  , fMCParticles(nullptr)
53  , fMatchParticles(nullptr)
54  , fSaveParticles(false)
55  , fSaveMCParticles(false)
56  , fTimeSliceMode(false)
57  , fOutFileName(outFileName)
58  , fOutFile(nullptr)
59  , fEfffileName("Efficiency.txt")
60  , fTopoPerformance(nullptr)
61  , fPrintFrequency(100)
62  , fNEvents(0)
63  , fTime()
64  , fSuperEventAnalysis(false)
65  , fReferenceResults("./")
66  , fDecayToAnalyse(-1)
67  , fCheckDecayQA(false)
68  , fTestOk(false) {
69  for (Int_t i = 0; i < 5; i++)
70  fTime[i] = 0;
71 
72  fTopoPerformance = new KFTopoPerformance;
73  fTopoPerformance->SetTopoReconstructor(tr);
74 
75  TFile* curFile = gFile;
76  TDirectory* curDirectory = gDirectory;
77 
78  if (!(fOutFileName == ""))
79  fOutFile = new TFile(fOutFileName.Data(), "RECREATE");
80  else
81  fOutFile = gFile;
82  fTopoPerformance->CreateHistos(
83  "KFTopoReconstructor",
84  fOutFile,
85  tr->GetKFParticleFinder()->GetReconstructionList());
86 
87  gFile = curFile;
88  gDirectory = curDirectory;
89 }
90 
93 
94  if (fSaveParticles) fRecParticles->Delete();
95  if (fSaveMCParticles) {
96  fMCParticles->Delete();
97  fMatchParticles->Delete();
98  }
99 }
100 
102  //Get ROOT Manager
103  FairRootManager* ioman = FairRootManager::Instance();
104 
105  if (ioman == 0) {
106  Error("CbmKFParticleFinderQA::Init", "RootManager not instantiated!");
107  return kERROR;
108  }
109 
110  //check the mode
111  fTimeSliceMode = 0;
112  if (ioman->CheckBranch("Event")) fTimeSliceMode = 1;
113 
114  //MC Tracks
115  if (fTimeSliceMode) {
116  FairRootManager* fManger = FairRootManager::Instance();
117  CbmMCDataManager* mcManager =
118  (CbmMCDataManager*) fManger->GetObject("MCDataManager");
119  if (mcManager == 0)
120  Error("CbmKFParticleFinderQA::Init", "MC Data Manager not found!");
121 
122  fMCTrackArray = mcManager->InitBranch("MCTrack");
123 
124  if (fMCTrackArray == 0) {
125  Error("CbmKFParticleFinderQA::Init", "mc track array not found!");
126  return kERROR;
127  }
128 
129  fEventList = (CbmMCEventList*) ioman->GetObject("MCEventList.");
130  if (fEventList == 0) {
131  Error("CbmKFParticleFinderQA::Init", "MC Event List not found!");
132  return kERROR;
133  }
134  } else {
135  fMCTrackArrayEvent = (TClonesArray*) ioman->GetObject("MCTrack");
136  }
137 
138  //Track match
139  fTrackMatchArray = (TClonesArray*) ioman->GetObject(fTrackMatchBranchName);
140  if (fTrackMatchArray == 0) {
141  Error("CbmKFParticleFinderQA::Init", "track match array not found!");
142  return kERROR;
143  }
144 
145  if (fSaveParticles) {
146  // create and register TClonesArray with output reco particles
147  fRecParticles = new TClonesArray("KFParticle", 100);
148  ioman->Register("RecoParticles",
149  "KFParticle",
151  IsOutputBranchPersistent("RecoParticles"));
152  }
153 
154  if (fSaveMCParticles) {
155  // create and register TClonesArray with output MC particles
156  fMCParticles = new TClonesArray("KFMCParticle", 100);
157  ioman->Register("KFMCParticles",
158  "KFParticle",
159  fMCParticles,
160  IsOutputBranchPersistent("KFMCParticles"));
161 
162  // create and register TClonesArray with matching between reco and MC particles
163  fMatchParticles = new TClonesArray("KFParticleMatch", 100);
164  ioman->Register("KFParticleMatch",
165  "KFParticle",
167  IsOutputBranchPersistent("KFParticleMatch"));
168  }
169  return kSUCCESS;
170 }
171 
172 void CbmKFParticleFinderQA::Exec(Option_t* /*opt*/) {
173  if (!fSuperEventAnalysis) {
174  if (fSaveParticles) fRecParticles->Delete();
175  if (fSaveMCParticles) {
176  fMCParticles->Delete();
177  fMatchParticles->Delete();
178  }
179 
180  int nMCEvents = 1;
181  if (fTimeSliceMode) nMCEvents = fEventList->GetNofEvents();
182 
183  vector<KFMCTrack> mcTracks;
184  vector<vector<vector<int>>> indexMap(1);
185  indexMap[0].resize(nMCEvents);
186 
187  int mcIndexOffset = 0;
188 
189  for (int iMCEvent = 0; iMCEvent < nMCEvents; iMCEvent++) {
190  int nMCTracks = 0;
191  if (fTimeSliceMode)
192  nMCTracks = fMCTrackArray->Size(0, iMCEvent);
193  else
194  nMCTracks = fMCTrackArrayEvent->GetEntriesFast();
195 
196  if (fTimeSliceMode) indexMap[0][iMCEvent].resize(nMCTracks);
197 
198  for (Int_t iMC = 0; iMC < nMCTracks; iMC++) {
199  CbmMCTrack* cbmMCTrack;
200  if (fTimeSliceMode)
201  cbmMCTrack = (CbmMCTrack*) fMCTrackArray->Get(0, iMCEvent, iMC);
202  else
203  cbmMCTrack = (CbmMCTrack*) fMCTrackArrayEvent->At(iMC);
204 
205  KFMCTrack kfMCTrack;
206  kfMCTrack.SetX(cbmMCTrack->GetStartX());
207  kfMCTrack.SetY(cbmMCTrack->GetStartY());
208  kfMCTrack.SetZ(cbmMCTrack->GetStartZ());
209  kfMCTrack.SetPx(cbmMCTrack->GetPx());
210  kfMCTrack.SetPy(cbmMCTrack->GetPy());
211  kfMCTrack.SetPz(cbmMCTrack->GetPz());
212 
213  Int_t pdg = cbmMCTrack->GetPdgCode();
214  Double_t q = 1;
215  if (pdg < 9999999
216  && ((TParticlePDG*) TDatabasePDG::Instance()->GetParticle(pdg)))
217  q = TDatabasePDG::Instance()->GetParticle(pdg)->Charge() / 3.0;
218  else if (pdg == 1000010020)
219  q = 1;
220  else if (pdg == -1000010020)
221  q = -1;
222  else if (pdg == 1000010030)
223  q = 1;
224  else if (pdg == -1000010030)
225  q = -1;
226  else if (pdg == 1000020030)
227  q = 2;
228  else if (pdg == -1000020030)
229  q = -2;
230  else if (pdg == 1000020040)
231  q = 2;
232  else if (pdg == -1000020040)
233  q = -2;
234  else
235  q = 0;
236  Double_t p = cbmMCTrack->GetP();
237 
238  if (cbmMCTrack->GetMotherId() >= 0)
239  kfMCTrack.SetMotherId(cbmMCTrack->GetMotherId() + mcIndexOffset);
240  else
241  kfMCTrack.SetMotherId(-iMCEvent - 1);
242  kfMCTrack.SetQP(q / p);
243  kfMCTrack.SetPDG(pdg);
244  kfMCTrack.SetNMCPoints(0);
245 
246  if (fTimeSliceMode) indexMap[0][iMCEvent][iMC] = mcTracks.size();
247  mcTracks.push_back(kfMCTrack);
248  }
249 
250  mcIndexOffset += nMCTracks;
251  }
252 
253  Int_t ntrackMatches = fTrackMatchArray->GetEntriesFast();
254 
255  vector<int> trackMatch(ntrackMatches, -1);
256 
257  for (int iTr = 0; iTr < ntrackMatches; iTr++) {
258  CbmTrackMatchNew* stsTrackMatch =
260 
261  if (stsTrackMatch->GetNofLinks() == 0) continue;
262  Float_t bestWeight = 0.f;
263  Float_t totalWeight = 0.f;
264  Int_t mcTrackId = -1;
265  CbmLink link;
266  for (int iLink = 0; iLink < stsTrackMatch->GetNofLinks(); iLink++) {
267  totalWeight += stsTrackMatch->GetLink(iLink).GetWeight();
268  if (stsTrackMatch->GetLink(iLink).GetWeight() > bestWeight) {
269  bestWeight = stsTrackMatch->GetLink(iLink).GetWeight();
270  int iMCTrack = stsTrackMatch->GetLink(iLink).GetIndex();
271  link = stsTrackMatch->GetLink(iLink);
272 
273  if (fTimeSliceMode)
274  mcTrackId = indexMap[link.GetFile()][link.GetEntry()][iMCTrack];
275  else
276  mcTrackId = stsTrackMatch->GetLink(iLink).GetIndex();
277  }
278  }
279  if (bestWeight / totalWeight < 0.7) continue;
280  // if(mcTrackId >= nMCTracks || mcTrackId < 0)
281  // {
282  // std::cout << "Sts Matching is wrong! StsTackId = " << mcTrackId << " N mc tracks = " << nMCTracks << std::endl;
283  // continue;
284  // }
285 
286  if (TMath::Abs(mcTracks[mcTrackId].PDG()) > 4000
287  && !(TMath::Abs(mcTracks[mcTrackId].PDG()) == 1000010020
288  || TMath::Abs(mcTracks[mcTrackId].PDG()) == 1000010030
289  || TMath::Abs(mcTracks[mcTrackId].PDG()) == 1000020030
290  || TMath::Abs(mcTracks[mcTrackId].PDG()) == 1000020040))
291  continue;
292  mcTracks[mcTrackId].SetReconstructed();
293  trackMatch[iTr] = mcTrackId;
294  }
295 
296  fTopoPerformance->SetMCTracks(mcTracks);
297  fTopoPerformance->SetTrackMatch(trackMatch);
298 
299  fTopoPerformance->CheckMCTracks();
300  fTopoPerformance->MatchTracks();
301  fTopoPerformance->FillHistos();
302 
303  fNEvents++;
304  fTime[4] += fTopoPerformance->GetTopoReconstructor()->Time();
305  for (int iT = 0; iT < 4; iT++)
306  fTime[iT] += fTopoPerformance->GetTopoReconstructor()->StatTime(iT);
307  if (fNEvents % fPrintFrequency == 0) {
308  std::cout << "Topo reconstruction time"
309  << " Real = " << std::setw(10) << fTime[4] / fNEvents * 1.e3
310  << " ms" << std::endl;
311  std::cout << " Init " << fTime[0] / fNEvents * 1.e3
312  << " ms" << std::endl;
313  std::cout << " PV Finder " << fTime[1] / fNEvents * 1.e3
314  << " ms" << std::endl;
315  std::cout << " Sort Tracks " << fTime[2] / fNEvents * 1.e3
316  << " ms" << std::endl;
317  std::cout << " KF Particle Finder " << fTime[3] / fNEvents * 1.e3
318  << " ms" << std::endl;
319  }
320 
321  // save particles to a ROOT file
322  if (fSaveParticles) {
323  for (unsigned int iP = 0;
324  iP < fTopoPerformance->GetTopoReconstructor()->GetParticles().size();
325  iP++) {
326  new ((*fRecParticles)[iP]) KFParticle(
327  fTopoPerformance->GetTopoReconstructor()->GetParticles()[iP]);
328  }
329  }
330 
331  if (fSaveMCParticles) {
332  for (unsigned int iP = 0;
333  iP < fTopoPerformance->GetTopoReconstructor()->GetParticles().size();
334  iP++) {
335  new ((*fMatchParticles)[iP]) KFParticleMatch();
337 
338  Short_t matchType = 0;
339  int iMCPart = -1;
340  if (!(fTopoPerformance->ParticlesMatch()[iP]
341  .IsMatchedWithPdg())) //background
342  {
343  if (fTopoPerformance->ParticlesMatch()[iP].IsMatched()) {
344  iMCPart =
345  fTopoPerformance->ParticlesMatch()[iP].GetBestMatchWithPdg();
346  matchType = 1;
347  }
348  } else {
349  iMCPart =
350  fTopoPerformance->ParticlesMatch()[iP].GetBestMatchWithPdg();
351  matchType = 2;
352  }
353 
354  p->SetMatch(iMCPart);
355  p->SetMatchType(matchType);
356  }
357 
358  for (unsigned int iP = 0; iP < fTopoPerformance->MCParticles().size();
359  iP++) {
360  new ((*fMCParticles)[iP])
361  KFMCParticle(fTopoPerformance->MCParticles()[iP]);
362  }
363  }
364  }
365 }
366 
368  if (fSuperEventAnalysis) {
369  fTopoPerformance->SetPrintEffFrequency(1);
370 
371  vector<KFMCTrack> mcTracks(0);
372  Int_t ntrackMatches =
373  fTopoPerformance->GetTopoReconstructor()->GetParticles().size();
374  vector<int> trackMatch(ntrackMatches, -1);
375 
376  fTopoPerformance->SetMCTracks(mcTracks);
377  fTopoPerformance->SetTrackMatch(trackMatch);
378  fTopoPerformance->CheckMCTracks();
379  fTopoPerformance->MatchTracks();
380  fTopoPerformance->FillHistos();
381 
382  fTime[4] += fTopoPerformance->GetTopoReconstructor()->Time();
383  for (int iT = 0; iT < 4; iT++)
384  fTime[iT] += fTopoPerformance->GetTopoReconstructor()->StatTime(iT);
385 
386  std::cout << "Topo reconstruction time"
387  << " Real = " << std::setw(10) << fTime[4] * 1.e3 << " ms"
388  << std::endl;
389  std::cout << " Init " << fTime[0] * 1.e3 << " ms"
390  << std::endl;
391  std::cout << " PV Finder " << fTime[1] * 1.e3 << " ms"
392  << std::endl;
393  std::cout << " Sort Tracks " << fTime[2] * 1.e3 << " ms"
394  << std::endl;
395  std::cout << " KF Particle Finder " << fTime[3] * 1.e3 << " ms"
396  << std::endl;
397  }
398 
399  TDirectory* curr = gDirectory;
400  TFile* currentFile = gFile;
401  // Open output file and write histograms
402 
403  fOutFile->cd();
404  WriteHistosCurFile(fTopoPerformance->GetHistosDirectory());
405 
406  if (fCheckDecayQA && fDecayToAnalyse > -1) {
407  if (fDecayToAnalyse < 0)
408  Error("CbmKFParticleFinderQA::Finish",
409  "Please specify the decay to be analysed.");
410  else
411  CheckDecayQA();
412  }
413 
414  if (!(fOutFileName == "")) {
415  fOutFile->Close();
416  fOutFile->Delete();
417  }
418  gFile = currentFile;
419  gDirectory = curr;
420 
421  std::fstream eff(fEfffileName.Data(), std::fstream::out);
422  eff << fTopoPerformance->fParteff;
423  eff.close();
424 }
425 
427  if (!obj->IsFolder())
428  obj->Write();
429  else {
430  TDirectory* cur = gDirectory;
431  TFile* currentFile = gFile;
432 
433  TDirectory* sub = cur->GetDirectory(obj->GetName());
434  sub->cd();
435  TList* listSub = (static_cast<TDirectory*>(obj))->GetList();
436  TIter it(listSub);
437  while (TObject* obj1 = it())
438  WriteHistosCurFile(obj1);
439  cur->cd();
440  gFile = currentFile;
441  gDirectory = cur;
442  }
443 }
444 
446  fTopoPerformance->SetPrintEffFrequency(n);
447  fPrintFrequency = n;
448 }
449 
451  float sigma[14],
452  const bool saveReferenceResults) const {
453  static const int nParameters = 7;
454  TString parameterName[nParameters] = {"X", "Y", "Z", "Px", "Py", "Pz", "E"};
455 
456  TH1F* histogram[nParameters * 2];
457  TF1* fit[nParameters * 2];
458 
459  for (int iParameter = 0; iParameter < nParameters; iParameter++) {
460  TString cloneResidualName =
461  TString("hResidual") + parameterName[iParameter];
462  histogram[iParameter] =
463  (TH1F*) (fTopoPerformance->GetDecayResidual(fDecayToAnalyse, iParameter)
464  ->Clone(cloneResidualName.Data()));
465  fit[iParameter] =
466  new TF1(TString("fitResidual") + parameterName[iParameter],
467  "gaus",
468  histogram[iParameter]->GetXaxis()->GetXmin(),
469  histogram[iParameter]->GetXaxis()->GetXmax());
470  fit[iParameter]->SetLineColor(kRed);
471  histogram[iParameter]->Fit(TString("fitResidual")
472  + parameterName[iParameter],
473  "QN",
474  "",
475  histogram[iParameter]->GetXaxis()->GetXmin(),
476  histogram[iParameter]->GetXaxis()->GetXmax());
477  sigma[iParameter] = fit[iParameter]->GetParameter(2);
478 
479  TString clonePullName = TString("hPull") + parameterName[iParameter];
480  histogram[iParameter + nParameters] =
481  (TH1F*) (fTopoPerformance->GetDecayPull(fDecayToAnalyse, iParameter)
482  ->Clone(clonePullName.Data()));
483  fit[iParameter + nParameters] =
484  new TF1(TString("fitPull") + parameterName[iParameter],
485  "gaus",
486  histogram[iParameter + nParameters]->GetXaxis()->GetXmin(),
487  histogram[iParameter + nParameters]->GetXaxis()->GetXmax());
488  fit[iParameter + nParameters]->SetLineColor(kRed);
489  histogram[iParameter + nParameters]->Fit(
490  TString("fitPull") + parameterName[iParameter],
491  "QN",
492  "",
493  histogram[iParameter + nParameters]->GetXaxis()->GetXmin(),
494  histogram[iParameter + nParameters]->GetXaxis()->GetXmax());
495  sigma[iParameter + nParameters] =
496  fit[iParameter + nParameters]->GetParameter(2);
497  }
498 
499  if (saveReferenceResults) {
500  TCanvas fitCanvas("fitCanvas", "fitCanvas", 1600, 800);
501  fitCanvas.Divide(4, 4);
502 
503  int padMap[nParameters * 2] = {
504  1, 2, 3, 9, 10, 11, 12, 5, 6, 7, 13, 14, 15, 16};
505  for (int iHisto = 0; iHisto < nParameters * 2; iHisto++) {
506  fitCanvas.cd(padMap[iHisto]);
507  histogram[iHisto]->Draw();
508  fit[iHisto]->Draw("same");
509  }
510 
511  TString canvasFile = TString("FitQA_")
512  + fTopoPerformance->fParteff.partName[fDecayToAnalyse]
513  + TString(".pdf");
514  fitCanvas.SaveAs(canvasFile.Data());
515  }
516 
517  for (int iHisto = 0; iHisto < nParameters * 2; iHisto++)
518  if (fit[iHisto]) delete fit[iHisto];
519 }
520 
522  float sigma[14];
523  FitDecayQAHistograms(sigma, true);
524 
525  TString referenceFileName =
526  fReferenceResults + TString("/qa_")
527  + fTopoPerformance->fParteff.partName[fDecayToAnalyse] + TString(".root");
528  TString qaFileName = TString("qa_")
529  + fTopoPerformance->fParteff.partName[fDecayToAnalyse]
530  + TString(".root");
531 
532  int iQAFile = 2;
533  while (!gSystem->AccessPathName(qaFileName)) {
534  qaFileName =
535  TString("qa_") + fTopoPerformance->fParteff.partName[fDecayToAnalyse];
536  qaFileName += iQAFile;
537  qaFileName += TString(".root");
538  iQAFile++;
539  }
540 
541  TFile* curFile = gFile;
542  TDirectory* curDirectory = gDirectory;
543  TFile* qaFile = new TFile(qaFileName.Data(), "RECREATE");
544 
545  TString qaHistoName =
546  TString("qa_") + fTopoPerformance->fParteff.partName[fDecayToAnalyse];
547  TH1F* qaHisto = new TH1F(qaHistoName.Data(), qaHistoName.Data(), 16, 0, 16);
548 
549  TString binLabel[16] = {"#sigma_{x}",
550  "#sigma_{y}",
551  "#sigma_{z}",
552  "#sigma_{p_{x}}",
553  "#sigma_{p_{y}}",
554  "#sigma_{p_{z}}",
555  "#sigma_{E}",
556  "P_{x}",
557  "P_{y}",
558  "P_{z}",
559  "P_{p_{x}}",
560  "P_{p_{y}}",
561  "P_{p_{z}}",
562  "P_{E}",
563  "#varepsilon_{4#pi}",
564  "#varepsilon_{KFP}"};
565  for (int iBin = 0; iBin < 16; iBin++)
566  qaHisto->GetXaxis()->SetBinLabel(iBin + 1, binLabel[iBin].Data());
567 
568  for (int iSigma = 0; iSigma < 14; iSigma++)
569  qaHisto->SetBinContent(iSigma + 1, sigma[iSigma]);
570 
571  qaHisto->SetBinContent(
572  15, fTopoPerformance->fParteff.GetTotal4piEfficiency(fDecayToAnalyse));
573  qaHisto->SetBinContent(
574  16, fTopoPerformance->fParteff.GetTotalKFPEfficiency(fDecayToAnalyse));
575 
576  qaHisto->Write();
577 
578  //compare with the reference results
579  TFile* referenceFile = new TFile(referenceFileName.Data(), "READ");
580  if (referenceFile->IsOpen()) {
581  TH1F* referenceHisto = (TH1F*) referenceFile->Get(qaHistoName);
582  if (referenceHisto) {
583  fTestOk = true;
584  for (int iBin = 1; iBin <= 7; iBin++)
585  fTestOk &= fabs(referenceHisto->GetBinContent(iBin)
586  - qaHisto->GetBinContent(iBin))
587  / referenceHisto->GetBinContent(iBin)
588  < 0.25;
589  for (int iBin = 8; iBin <= 14; iBin++)
590  fTestOk &= fabs(referenceHisto->GetBinContent(iBin)
591  - qaHisto->GetBinContent(iBin))
592  / referenceHisto->GetBinContent(iBin)
593  < 0.25;
594  for (int iBin = 15; iBin <= 16; iBin++)
595  fTestOk &= fabs(referenceHisto->GetBinContent(iBin)
596  - qaHisto->GetBinContent(iBin))
597  / referenceHisto->GetBinContent(iBin)
598  < 0.1;
599  }
600  referenceFile->Close();
601  referenceFile->Delete();
602  }
603 
604  if (qaFile) {
605  qaFile->Close();
606  qaFile->Delete();
607  }
608 
609  gFile = curFile;
610  gDirectory = curDirectory;
611 }
612 
CbmKFParticleFinderQA::fMCTrackArray
CbmMCDataArray * fMCTrackArray
Name of the input TCA with track match.
Definition: CbmKFParticleFinderQA.h:68
CbmMCTrack::GetMotherId
Int_t GetMotherId() const
Definition: CbmMCTrack.h:71
CbmMCDataManager::GetObject
CbmMCDataObject * GetObject(const char *name)
Definition: CbmMCDataManager.cxx:137
CbmMCTrack::GetStartX
Double_t GetStartX() const
Definition: CbmMCTrack.h:75
CbmMCDataManager.h
KFParticleMatch.h
CbmKFParticleFinderQA::SetPrintEffFrequency
void SetPrintEffFrequency(Int_t n)
Definition: CbmKFParticleFinderQA.cxx:445
CbmKFParticleFinderQA::fTrackMatchArray
TClonesArray * fTrackMatchArray
Definition: CbmKFParticleFinderQA.h:71
CbmKFParticleFinderQA::Init
virtual InitStatus Init()
Definition: CbmKFParticleFinderQA.cxx:101
KFParticleMatch
Definition: KFParticleMatch.h:23
CbmMatch::GetLink
const CbmLink & GetLink(Int_t i) const
Definition: CbmMatch.h:35
CbmMatch::GetNofLinks
Int_t GetNofLinks() const
Definition: CbmMatch.h:38
ClassImp
ClassImp(CbmKFParticleFinderQA)
CbmKFParticleFinderQA::fNEvents
Int_t fNEvents
Definition: CbmKFParticleFinderQA.h:91
CbmKFParticleFinderQA::fTime
Double_t fTime[5]
Definition: CbmKFParticleFinderQA.h:92
CbmMCDataArray::Size
Int_t Size(Int_t fileNumber, Int_t eventNumber)
Definition: CbmMCDataArray.cxx:133
KFParticleMatch::SetMatch
void SetMatch(Int_t i)
Definition: KFParticleMatch.h:29
CbmKFParticleFinderQA::WriteHistosCurFile
void WriteHistosCurFile(TObject *obj)
Definition: CbmKFParticleFinderQA.cxx:426
CbmKFParticleFinderQA
Definition: CbmKFParticleFinderQA.h:21
CbmMCTrack::GetPdgCode
Int_t GetPdgCode() const
Definition: CbmMCTrack.h:70
i
int i
Definition: L1/vectors/P4_F32vec4.h:25
CbmMCDataManager::InitBranch
CbmMCDataArray * InitBranch(const char *name)
Definition: CbmMCDataManager.cxx:106
CbmMCDataArray.h
CbmKFParticleFinderQA::~CbmKFParticleFinderQA
~CbmKFParticleFinderQA()
Definition: CbmKFParticleFinderQA.cxx:91
CbmKFParticleFinderQA::fSuperEventAnalysis
bool fSuperEventAnalysis
Definition: CbmKFParticleFinderQA.h:95
CbmMCTrack::GetPx
Double_t GetPx() const
Definition: CbmMCTrack.h:72
CbmKFParticleFinderQA::FitDecayQAHistograms
void FitDecayQAHistograms(float sigma[14], const bool saveReferenceResults=false) const
Definition: CbmKFParticleFinderQA.cxx:450
CbmMCTrack::GetPy
Double_t GetPy() const
Definition: CbmMCTrack.h:73
CbmKFParticleFinderQA::fCheckDecayQA
bool fCheckDecayQA
Definition: CbmKFParticleFinderQA.h:100
CbmKFParticleFinderQA::fSaveParticles
Bool_t fSaveParticles
Definition: CbmKFParticleFinderQA.h:78
CbmKFParticleFinderQA::CbmKFParticleFinderQA
CbmKFParticleFinderQA(const char *name="CbmKFParticleFinderQA", Int_t iVerbose=0, const KFParticleTopoReconstructor *tr=0, TString outFileName="CbmKFParticleFinderQA.root")
Definition: CbmKFParticleFinderQA.cxx:39
CbmKFParticleFinderQA::CheckDecayQA
void CheckDecayQA()
Definition: CbmKFParticleFinderQA.cxx:521
CbmMCTrack::GetStartZ
Double_t GetStartZ() const
Definition: CbmMCTrack.h:77
CbmMCEventList::GetNofEvents
std::size_t GetNofEvents() const
Number of events in the list @value Number of events.
Definition: CbmMCEventList.h:90
CbmKFParticleFinderQA::fDecayToAnalyse
int fDecayToAnalyse
Definition: CbmKFParticleFinderQA.h:99
CbmKFParticleFinderQA::fOutFile
TFile * fOutFile
Definition: CbmKFParticleFinderQA.h:85
mcTracks
static vector< vector< QAMCTrack > > mcTracks
Definition: CbmTofHitFinderTBQA.cxx:112
CbmTrack.h
CbmMCDataArray::Get
TObject * Get(const CbmLink *lnk)
Definition: CbmMCDataArray.h:47
CbmKFParticleFinderQA::fMCParticles
TClonesArray * fMCParticles
Definition: CbmKFParticleFinderQA.h:75
CbmTrackMatchNew.h
nMCTracks
Int_t nMCTracks
Definition: CbmHadronAnalysis.cxx:63
CbmKFParticleFinderQA::fTopoPerformance
KFTopoPerformance * fTopoPerformance
Definition: CbmKFParticleFinderQA.h:88
CbmMCEventList
Container class for MC events with number, file and start time.
Definition: CbmMCEventList.h:38
CbmKFParticleFinderQA::fTestOk
bool fTestOk
Definition: CbmKFParticleFinderQA.h:101
CbmKFParticleFinderQA::fEventList
CbmMCEventList * fEventList
Definition: CbmKFParticleFinderQA.h:70
CbmKFParticleFinderQA::fRecParticles
TClonesArray * fRecParticles
Definition: CbmKFParticleFinderQA.h:74
CbmKFParticleFinderQA::fTrackMatchBranchName
TString fTrackMatchBranchName
Name of the input TCA with MC tracks.
Definition: CbmKFParticleFinderQA.h:65
CbmMCDataManager
Task class creating and managing CbmMCDataArray objects.
Definition: CbmMCDataManager.h:27
CbmKFParticleFinderQA.h
CbmMCEventList.h
CbmMCTrack::GetStartY
Double_t GetStartY() const
Definition: CbmMCTrack.h:76
CbmMCTrack.h
CbmMCTrack
Definition: CbmMCTrack.h:34
fabs
friend F32vec4 fabs(const F32vec4 &a)
Definition: L1/vectors/P4_F32vec4.h:60
CbmKFParticleFinderQA::fPrintFrequency
Int_t fPrintFrequency
Definition: CbmKFParticleFinderQA.h:90
CbmKFParticleFinderQA::fReferenceResults
TString fReferenceResults
Definition: CbmKFParticleFinderQA.h:98
CbmKFParticleFinderQA::fSaveMCParticles
Bool_t fSaveMCParticles
Definition: CbmKFParticleFinderQA.h:79
CbmTrackMatchNew
Definition: CbmTrackMatchNew.h:19
CbmKFParticleFinderQA::fMCTrackArrayEvent
TClonesArray * fMCTrackArrayEvent
Definition: CbmKFParticleFinderQA.h:69
CbmKFParticleFinderQA::fMatchParticles
TClonesArray * fMatchParticles
Definition: CbmKFParticleFinderQA.h:76
CbmKFParticleFinderQA::fEfffileName
TString fEfffileName
Definition: CbmKFParticleFinderQA.h:86
CbmKFParticleFinderQA::Finish
virtual void Finish()
Definition: CbmKFParticleFinderQA.cxx:367
KFParticleMatch::SetMatchType
void SetMatchType(Short_t i)
Definition: KFParticleMatch.h:31
CbmKFParticleFinderQA::fTimeSliceMode
bool fTimeSliceMode
Definition: CbmKFParticleFinderQA.h:81
CbmMCTrack::GetP
Double_t GetP() const
Definition: CbmMCTrack.h:100
CbmMCTrack::GetPz
Double_t GetPz() const
Definition: CbmMCTrack.h:74
CbmKFParticleFinderQA::fOutFileName
TString fOutFileName
Definition: CbmKFParticleFinderQA.h:84
CbmKFParticleFinderQA::Exec
virtual void Exec(Option_t *opt)
Definition: CbmKFParticleFinderQA.cxx:172