CbmRoot
CbmPsdMCbmQaReal.cxx
Go to the documentation of this file.
1 #include "CbmPsdMCbmQaReal.h"
2 
3 #include "TCanvas.h"
4 #include "TClonesArray.h"
5 #include "TEllipse.h"
6 #include "TF1.h"
7 #include "TGeoBBox.h"
8 #include "TGeoManager.h"
9 #include "TGeoNode.h"
10 #include "TH1.h"
11 #include "TH1D.h"
12 #include "TLine.h"
13 #include "TMarker.h"
14 #include "TMath.h"
15 #include "TStyle.h"
16 #include "TSystem.h"
17 #include <TFile.h>
18 
19 
20 #include "CbmDrawHist.h"
21 #include "CbmEvent.h"
22 #include "CbmGlobalTrack.h"
23 #include "CbmMatchRecoToMC.h"
24 #include "CbmPsdDigi.h"
25 #include "CbmPsdMCbmHit.h"
26 #include "CbmStsDigi.h"
27 #include "CbmTofDigi.h"
28 #include "CbmTofHit.h"
29 #include "CbmTofTracklet.h"
30 #include "CbmTrackMatchNew.h"
31 #include "CbmTrdTrack.h"
32 #include "TLatex.h"
33 
34 #include "CbmDigiManager.h"
35 #include "CbmHistManager.h"
36 #include "CbmUtils.h"
37 
38 #include <boost/assign/list_of.hpp>
39 #include <cmath>
40 #include <iostream>
41 #include <sstream>
42 #include <string>
43 
44 using namespace std;
45 using boost::assign::list_of;
46 
47 #define PsdZPos 348.
48 
50  : FairTask("CbmPsdMCbmQaReal")
51  , fT0Digis(nullptr)
52  , fPsdHits(nullptr)
53  , fTofHits(nullptr)
54  , fTofTracks(nullptr)
55  , fCbmEvent(nullptr)
56  , fHM(nullptr)
57  , fEntryNum(0)
58  , fOutputDir("result") {}
59 
60 InitStatus CbmPsdMCbmQaReal::Init() {
61  cout << "CbmPsdMCbmQaReal::Init" << endl;
62 
63  FairRootManager* ioman = FairRootManager::Instance();
64  if (nullptr == ioman) {
65  Fatal("CbmPsdMCbmQaReal::Init", "RootManager not instantised!");
66  }
67 
69  fDigiMan->Init();
70 
72  Fatal("CbmPsdMCbmQaReal::Init", "No Psd Digis!");
73 
75  Fatal("CbmPsdMCbmQaReal::Init", "No Tof Digis!");
76 
77 
78  fPsdHits = (TClonesArray*) ioman->GetObject("PsdHit");
79  if (nullptr == fPsdHits) { Fatal("CbmPsdMCbmQaReal::Init", "No Psd Hits!"); }
80 
81  fTofHits = (TClonesArray*) ioman->GetObject("TofHit");
82  if (nullptr == fTofHits) { Fatal("CbmPsdMCbmQaReal::Init", "No Tof Hits!"); }
83 
84  fTofTracks = (TClonesArray*) ioman->GetObject("TofTracks");
85  if (nullptr == fTofTracks) {
86  Fatal("CbmPsdMCbmQaReal::Init", "No Tof Tracks!");
87  }
88 
89  // fT0Digis =(TClonesArray*) ioman->GetObject("CbmT0Digi");
90  // if (nullptr == fT0Digis) { Fatal("CbmPsdMCbmQaReal::Init", "No T0 Digis!");}
91 
92  fCbmEvent = (TClonesArray*) ioman->GetObject("CbmEvent");
93  if (nullptr == fCbmEvent) { Fatal("CbmPsdMCbmQaReal::Init", "No Event!"); }
94 
96 
97  return kSUCCESS;
98 }
99 
101  fHM = new CbmHistManager();
102 
103  fHM->Create1<TH1D>("fhNofEntries", "fhNofEntries; Counts", 1, 0.5, 1.5);
104  fHM->Create1<TH1D>("fhNofCbmEvents", "fhNofCbmEvents;Counts", 1, 0.5, 1.5);
105 
106  fHM->Create1<TH1D>(
107  "fhHitsInTimeslice", "fhHitsInTimeslice;Timeslice;#Hits", 200, 1, 200);
108 
109  // nof objects per timeslice
110  fHM->Create1<TH1D>("fhNofPsdDigisInTimeslice",
111  "fhNofPsdDigisInTimeslice;# PSD digis / timeslice;Counts",
112  100,
113  0,
114  2000);
115  fHM->Create1<TH1D>("fhNofPsdHitsInTimeslice",
116  "fhNofPsdHitsInTimeslice;# PSD hits / timeslice;Counts",
117  100,
118  0,
119  2000);
120 
121  // PSD hits
122  fHM->Create2<TH2D>("fhPsdHitPos",
123  "fhPsdHitPos;PSD module id [];PSD section id [];Counts",
124  20,
125  0,
126  20,
127  20,
128  0,
129  20);
130  fHM->Create1<TH1D>(
131  "fhPsdHitsTimeLog", "fhPsdHitsTimeLog;Time [ns];Counts", 400, 0., 0.);
132 
133 
134  // PSD digis, the limits of log histograms are set in Exec method
135  fHM->Create1<TH1D>(
136  "fhPsdDigisTimeLog", "fhNofPsdDigisTimeLog;Time [ns];Counts", 400, 0., 0.);
137  fHM->Create1<TH1D>(
138  "fhTofDigisTimeLog", "fhTofDigisTimeLog;Time [ns];Counts", 400, 0., 0.);
139  fHM->Create1<TH1D>(
140  "fhStsDigisTimeLog", "fhStsDigisTimeLog;Time [ns];Counts", 400, 0., 0.);
141  fHM->Create1<TH1D>(
142  "fhT0DigisTimeLog", "fhT0DigisTimeLog;Time [ns];Counts", 400, 0., 0.);
143 
144  //Edep
145  fHM->Create1<TH1D>(
146  "fhPsdDigisEdep", "fhPsdDigisEdep;Edep [adc counts];Counts", 500, 0, 50000);
147  fHM->Create1<TH1D>(
148  "fhPsdHitEdep", "fhPsdHitEdep;Edep [adc counts];Counts", 500, 0, 50000);
149  fHM->Create1<TH1D>("fhPsdEdepInEvent",
150  "fhPsdEdepInEvent; Edep [adc counts]; Counts",
151  500,
152  0,
153  300000);
154 
155  //Tof Psd correlation
156  fHM->Create2<TH2D>(
157  "fhTofTrackMultPsdEdep",
158  "fhTofTrackMultPsdEdep;PSD Edep [adc counts];Tof track Mult [];Counts",
159  500,
160  0,
161  400000,
162  20,
163  0,
164  20);
165  fHM->Create2<TH2D>(
166  "fhTofHitMultPsdEdep",
167  "fhTofHitMultPsdEdep;PSD Edep [adc counts];Tof hit Mult [];Counts",
168  500,
169  0,
170  400000,
171  50,
172  0,
173  50);
174 
175  //Tof Hits
176  fHM->Create3<TH3D>(
177  "fhTofXYZ",
178  "fhTofXYZ;Tof Hit X [cm];TofHit Z [cm];Tof Hit Y [cm];Counts",
179  100,
180  -20,
181  20,
182  141,
183  230.,
184  370.,
185  100,
186  -20,
187  20);
188  fHM->Create1<TH1D>(
189  "fhTofHitsZ", "fhTofHitsZ;Z [cm];Counts", 350, -0.5, 349.5);
190  fHM->Create2<TH2D>("fhTofHitsXZ",
191  "fhTofHitsXZ;Z [cm];X [cm];Counts",
192  600,
193  -150,
194  450,
195  500,
196  -50,
197  450);
198 
199  //Tof Tracks
200  fHM->Create1<TH1D>("fhTofTracksPerEvent",
201  "fhTofTracksPerEvent;NofTracks/Event;Counts",
202  20,
203  -5,
204  25);
205  fHM->Create2<TH2D>("fhTofTracksXY",
206  "fhTofTracksXY;X[cm];Y[cm];NofTracks/cm^2",
207  250,
208  -100,
209  150,
210  300,
211  -150,
212  150);
213 }
214 
215 
216 void CbmPsdMCbmQaReal::Exec(Option_t* /*option*/) {
217  fEntryNum++;
218  fHM->H1("fhNofEntries")->Fill(1);
219  cout << "CbmPsdMCbmQaReal, entry No. " << fEntryNum << endl;
220 
221  if (fDigiHitsInitialized == false) {
225 
226  double minTime = std::numeric_limits<double>::max();
227  for (int i = 0; i < fDigiMan->GetNofDigis(ECbmModuleId::kPsd); i++) {
228  const CbmPsdDigi* psdDigi = fDigiMan->Get<CbmPsdDigi>(i);
229  // fHM->H1("fhRichDigisToT")->Fill(richDigi->GetToT());
230  if (psdDigi->GetTime() < minTime) minTime = psdDigi->GetTime();
231  }
232 
233  double dT = 40e9;
234  fHM->H1("fhPsdHitsTimeLog")->GetXaxis()->SetLimits(minTime, minTime + dT);
235  fHM->H1("fhPsdDigisTimeLog")
236  ->GetXaxis()
237  ->SetLimits(minTime, minTime + dT);
238  fHM->H1("fhTofDigisTimeLog")
239  ->GetXaxis()
240  ->SetLimits(minTime, minTime + dT);
241  fHM->H1("fhStsDigisTimeLog")
242  ->GetXaxis()
243  ->SetLimits(minTime, minTime + dT);
244  fHM->H1("fhT0DigisTimeLog")->GetXaxis()->SetLimits(minTime, minTime + dT);
245 
246 
247  fDigiHitsInitialized = true;
248  }
249  } // if (fDigiHitsInitialized == false)
250 
251  if (fDigiHitsInitialized == true) {
252 
253  int nofPsdDigis = fDigiMan->GetNofDigis(ECbmModuleId::kPsd);
254  fHM->H1("fhNofPsdDigisInTimeslice")->Fill(nofPsdDigis);
255  for (int i = 0; i < nofPsdDigis; i++) {
256  const CbmPsdDigi* digi = fDigiMan->Get<CbmPsdDigi>(i);
257  fHM->H1("fhPsdDigisTimeLog")->Fill(digi->GetTime());
258  fHM->H1("fhPsdDigisEdep")->Fill(digi->GetEdep());
259  }
260 
261  int nofTofDigis = fDigiMan->GetNofDigis(ECbmModuleId::kTof);
262  for (int i = 0; i < nofTofDigis; i++) {
263  const CbmTofDigi* digi = fDigiMan->Get<CbmTofDigi>(i);
264  fHM->H1("fhTofDigisTimeLog")->Fill(digi->GetTime());
265  }
266 
268  int nofStsDigis = fDigiMan->GetNofDigis(ECbmModuleId::kSts);
269  for (int i = 0; i < nofStsDigis; i++) {
270  const CbmStsDigi* digi = fDigiMan->Get<CbmStsDigi>(i);
271  fHM->H1("fhStsDigisTimeLog")->Fill(digi->GetTime());
272  }
273  }
274 
275  // int nofT0Digis = fT0Digis->GetEntries();
276  // for (int i = 0; i < nofT0Digis; i++) {
277  // CbmDigi* digi = static_cast<CbmDigi*>(fT0Digis->At(i));
278  // fHM->H1("fhT0DigisTimeLog")->Fill(digi->GetTime() );
279  // fHM->H1("fhT0DigisTimeLogZoom")->Fill(digi->GetTime() );
280  // fHM->H1("fhT0DigisTimeLogZoom2")->Fill(digi->GetTime());
281  // }
282  }
283 
284  int nofPsdHits = fPsdHits->GetEntries();
285  fHM->H1("fhNofPsdHitsInTimeslice")->Fill(nofPsdHits);
286  fHM->H1("fhHitsInTimeslice")->Fill(fEntryNum, nofPsdHits);
287  for (int iH = 0; iH < nofPsdHits; iH++) {
288  CbmPsdMCbmHit* psdHit = static_cast<CbmPsdMCbmHit*>(fPsdHits->At(iH));
289  fHM->H2("fhPsdHitPos")->Fill(psdHit->GetModuleID(), psdHit->GetSectionID());
290  fHM->H1("fhPsdHitEdep")->Fill(psdHit->GetEdep());
291  }
292 
293  //CBMEVENT
294  auto fNCbmEvent = fCbmEvent->GetEntriesFast();
295 
296  for (int i = 0; i < fNCbmEvent; i++) {
297  fHM->H1("fhNofCbmEvents")->Fill(1);
298  CbmEvent* ev = static_cast<CbmEvent*>(fCbmEvent->At(i));
299  std::vector<int> evPsdHitIndx;
300 
301  // Scan Event to find first Digi that triggered.
302  std::cout << "Sts Digis:" << ev->GetNofData(ECbmDataType::kStsDigi)
303  << std::endl;
304  std::cout << "Much Digis:" << ev->GetNofData(ECbmDataType::kMuchDigi)
305  << std::endl;
306  std::cout << "Tof Digis:" << ev->GetNofData(ECbmDataType::kTofDigi)
307  << std::endl;
308  std::cout << "Rich Digis:" << ev->GetNofData(ECbmDataType::kRichDigi)
309  << std::endl;
310  std::cout << "Psd Digis:" << ev->GetNofData(ECbmDataType::kPsdDigi)
311  << std::endl;
312 
313  Int_t nofTofTracksInEvent = ev->GetNofData(ECbmDataType::kTofTrack);
314  Int_t nofPsdHitsInEvent = ev->GetNofData(ECbmDataType::kPsdHit);
315  Int_t nofTofHitsInEvent = ev->GetNofData(ECbmDataType::kTofHit);
316  Double_t PsdEdepInEvent = 0.;
317  for (int j = 0; j < nofPsdHitsInEvent; j++) {
318  auto iPsdHit = ev->GetIndex(ECbmDataType::kPsdHit, j);
319  evPsdHitIndx.push_back(iPsdHit);
320  CbmPsdMCbmHit* psdHit =
321  static_cast<CbmPsdMCbmHit*>(fPsdHits->At(iPsdHit));
322  PsdEdepInEvent += psdHit->GetEdep();
323  }
324  fHM->H1("fhPsdEdepInEvent")->Fill(PsdEdepInEvent);
325  fHM->H2("fhTofTrackMultPsdEdep")->Fill(PsdEdepInEvent, nofTofTracksInEvent);
326  fHM->H2("fhTofHitMultPsdEdep")->Fill(PsdEdepInEvent, nofTofHitsInEvent);
327 
328  for (int j = 0; j < nofTofHitsInEvent; j++) {
329  auto iTofHit = ev->GetIndex(ECbmDataType::kTofHit, j);
330  CbmTofHit* tofHit = static_cast<CbmTofHit*>(fTofHits->At(iTofHit));
331  //if (tofHit->GetZ() < 2.) continue; // Cut T0 away!
332 
333  fHM->H1("fhTofHitsZ")->Fill(tofHit->GetZ());
334  fHM->H1("fhTofHitsXZ")->Fill(tofHit->GetZ(), tofHit->GetX());
335  fHM->H3("fhTofXYZ")->Fill(tofHit->GetX(), tofHit->GetZ(), tofHit->GetY());
336  }
337 
338  fHM->H1("fhTofTracksPerEvent")->Fill(nofTofTracksInEvent);
339  for (int j = 0; j < nofTofTracksInEvent; j++) {
340  auto iTofTrack = ev->GetIndex(ECbmDataType::kTofTrack, j);
341  CbmTofTracklet* tTrack =
342  static_cast<CbmTofTracklet*>(fTofTracks->At(iTofTrack));
343 
344  fHM->H2("fhTofTracksXY")
345  ->Fill(tTrack->GetFitX(PsdZPos), tTrack->GetFitY(PsdZPos));
346  }
347 
348  } //End CbmEvent loop
349 }
350 
351 
353  cout.precision(4);
354 
355  //SetDefaultDrawStyle();
356  //gStyle->SetOptStat(1111);
357  double nofEvents = fHM->H1("fhNofCbmEvents")->GetEntries();
358  fHM->ScaleByPattern("fh_.*", 1. / nofEvents);
359 
360  {
361  fHM->CreateCanvas(
362  "psd_mcbm_fhNofEntries", "psd_mcbm_fhNofEntries", 600, 600);
363  DrawH1(fHM->H1("fhNofEntries"));
364  }
365 
366  {
367  fHM->CreateCanvas(
368  "psd_mcbm_fhNofCbmEvents", "psd_mcbm_fhNofCbmEvents", 600, 600);
369  DrawH1(fHM->H1("fhNofCbmEvents"));
370  }
371 
372  {
373  fHM->CreateCanvas("HitsInTimeslice", "HitsInTimeslice", 600, 600);
374  DrawH1(fHM->H1("fhHitsInTimeslice"));
375  }
376 
377 
378  {
379  TCanvas* c = fHM->CreateCanvas("psd_mcbm_nofObjectsInTimeslice",
380  "psd_mcbm_nofObjectsInTimeslice",
381  1500,
382  500);
383  c->Divide(2, 1);
384  c->cd(1);
385  DrawH1(fHM->H1("fhNofPsdDigisInTimeslice"), kLinear, kLog);
386  c->cd(2);
387  DrawH1(fHM->H1("fhNofPsdHitsInTimeslice"), kLinear, kLog);
388  }
389 
390  {
391  fHM->CreateCanvas("psd_mcbm_XY", "psd_mcbm_XY", 1200, 600);
392  DrawH2(fHM->H2("fhPsdHitPos"));
393  }
394 
395  {
396  fHM->CreateCanvas(
397  "psd_mcbm_DigisTimeLog", "psd_mcbm_DigisTimeLog", 1200, 1200);
398  DrawH1({fHM->H1("fhStsDigisTimeLog"),
399  fHM->H1("fhTofDigisTimeLog"),
400  fHM->H1("fhT0DigisTimeLog"),
401  fHM->H1("fhPsdDigisTimeLog")},
402  {"STS", "TOF", "T0", "PSD"},
403  kLinear,
404  kLog,
405  true,
406  0.87,
407  0.75,
408  0.99,
409  0.99);
410  gPad->SetLeftMargin(0.1);
411  gPad->SetRightMargin(0.10);
412  fHM->H1("fhStsDigisTimeLog")->GetYaxis()->SetTitleOffset(0.7);
413  fHM->H1("fhStsDigisTimeLog")->SetMinimum(0.9);
414  }
415 
416  {
417  fHM->CreateCanvas(
418  "psd_mcbm_fhPsdDigisEdep", "psd_mcbm_fhPsdDigisEdep", 600, 600);
419  DrawH1(fHM->H1("fhPsdDigisEdep"));
420  }
421 
422  {
423  fHM->CreateCanvas(
424  "psd_mcbm_fhPsdHitEdep", "psd_mcbm_fhPsdHitEdep", 600, 600);
425  DrawH1(fHM->H1("fhPsdHitEdep"));
426  }
427 
428  {
429  fHM->CreateCanvas(
430  "psd_mcbm_fhPsdEdepInEvent", "psd_mcbm_fhPsdEdepInEvent", 600, 600);
431  DrawH1(fHM->H1("fhPsdEdepInEvent"));
432  }
433 
434  {
435  fHM->CreateCanvas("psd_mcbm_fhTofTrackMultPsdEdep",
436  "psd_mcbm_fhTofTrackMultPsdEdep",
437  1200,
438  1200);
439  DrawH2(fHM->H2("fhTofTrackMultPsdEdep"));
440  }
441 
442  {
443  fHM->CreateCanvas("psd_mcbm_fhTofHitMultPsdEdep",
444  "psd_mcbm_fhTofHitMultPsdEdep",
445  1200,
446  1200);
447  DrawH2(fHM->H2("fhTofHitMultPsdEdep"));
448  }
449 
450  {
451  fHM->CreateCanvas("TofHitsZ", "TofHitsZ", 1200, 1200);
452  DrawH1(fHM->H1("fhTofHitsZ"));
453  }
454 
455  {
456  fHM->CreateCanvas("TofHitsXZ", "TofHitsXZ", 1200, 1200);
457  DrawH2(fHM->H2("fhTofHitsXZ"));
458  }
459 
460  {
461  fHM->CreateCanvas("ToF_XYZ", "ToF_XYZ", 1200, 1200);
462  fHM->H3("fhTofXYZ")->Draw();
463  }
464 
465  {
466  TCanvas* c = fHM->CreateCanvas("TofTracksXY", "TofTracksXY", 1200, 800);
467  c->Divide(2, 1);
468  c->cd(1);
469  DrawH2(fHM->H2("fhTofTracksXY"));
470  //c->cd(2);
471  //DrawH2(fHM->H2("fhTofTracksXYRICH"));
472  }
473 }
474 
475 
477  //std::cout<<"Tracks: "<< fTofTracks->GetEntriesFast() <<std::endl;
478  std::cout << "Drawing Hists...";
479  DrawHist();
480  std::cout << "DONE!" << std::endl;
481 
482  if (this->fDoDrawCanvas) {
484  std::cout << "Canvas saved to Images!" << std::endl;
485  }
486 
487  if (this->fDoWriteHistToFile) {
488  TDirectory* oldir = gDirectory;
489  std::string s = fOutputDir + "/RecoHists.root";
490  TFile* outFile = new TFile(s.c_str(), "RECREATE");
491  if (outFile->IsOpen()) {
492  fHM->WriteToFile();
493  std::cout << "Written to Root-file \"" << s << "\" ...";
494  outFile->Close();
495  std::cout << "Done!" << std::endl;
496  }
497  gDirectory->cd(oldir->GetPath());
498  }
499 }
500 
501 
502 void CbmPsdMCbmQaReal::DrawFromFile(const string& fileName,
503  const string& outputDir) {
504  fOutputDir = outputDir;
505 
506  if (fHM != nullptr) delete fHM;
507 
508  fHM = new CbmHistManager();
509  TFile* file = new TFile(fileName.c_str());
510  fHM->ReadFromFile(file);
511  DrawHist();
512 
514 }
515 
516 
CbmPsdMCbmQaReal::fPsdHits
TClonesArray * fPsdHits
Definition: CbmPsdMCbmQaReal.h:75
CbmHit::GetZ
Double_t GetZ() const
Definition: CbmHit.h:70
CbmPsdMCbmQaReal::Init
virtual InitStatus Init()
Inherited from FairTask.
Definition: CbmPsdMCbmQaReal.cxx:60
CbmEvent::GetIndex
UInt_t GetIndex(ECbmDataType type, UInt_t iData)
Definition: CbmEvent.cxx:24
CbmPsdMCbmQaReal::fHM
CbmHistManager * fHM
Definition: CbmPsdMCbmQaReal.h:80
ECbmDataType::kRichDigi
@ kRichDigi
CbmHistManager::WriteToFile
void WriteToFile()
Write all histograms to current opened file.
Definition: core/base/CbmHistManager.cxx:103
CbmPixelHit::GetX
Double_t GetX() const
Definition: CbmPixelHit.h:83
ECbmDataType::kStsDigi
@ kStsDigi
CbmPsdDigi.h
CbmHistManager::ScaleByPattern
void ScaleByPattern(const std::string &pattern, Double_t scale)
Scale histograms which name matches specified pattern.
Definition: core/base/CbmHistManager.cxx:221
CbmPsdMCbmQaReal::fDigiHitsInitialized
bool fDigiHitsInitialized
Definition: CbmPsdMCbmQaReal.h:88
CbmPixelHit::GetY
Double_t GetY() const
Definition: CbmPixelHit.h:84
CbmHistManager::Create3
void Create3(const std::string &name, const std::string &title, Int_t nofBinsX, Double_t minBinX, Double_t maxBinX, Int_t nofBinsY, Double_t minBinY, Double_t maxBinY, Int_t nofBinsZ, Double_t minBinZ, Double_t maxBinZ)
Helper function for creation of 3-dimensional histograms and profiles. Template argument is a real ob...
Definition: CbmHistManager.h:140
CbmHistManager::ReadFromFile
void ReadFromFile(TFile *file)
Read histograms from file.
Definition: core/base/CbmHistManager.cxx:110
CbmDigiManager::Init
InitStatus Init()
Initialisation.
Definition: CbmDigiManager.cxx:71
CbmPsdMCbmQaReal::fCbmEvent
TClonesArray * fCbmEvent
Definition: CbmPsdMCbmQaReal.h:78
CbmHistManager::Create2
void Create2(const std::string &name, const std::string &title, Int_t nofBinsX, Double_t minBinX, Double_t maxBinX, Int_t nofBinsY, Double_t minBinY, Double_t maxBinY)
Helper function for creation of 2-dimensional histograms and profiles. Template argument is a real ob...
Definition: CbmHistManager.h:104
CbmPsdMCbmQaReal::fDigiMan
CbmDigiManager * fDigiMan
Definition: CbmPsdMCbmQaReal.h:72
CbmTofTracklet
Provides information on attaching a TofHit to a TofTrack.
Definition: CbmTofTracklet.h:25
CbmPsdMCbmQaReal.h
i
int i
Definition: L1/vectors/P4_F32vec4.h:25
ECbmDataType::kTofDigi
@ kTofDigi
CbmHistManager::H2
TH2 * H2(const std::string &name) const
Return pointer to TH2 histogram.
Definition: CbmHistManager.h:190
CbmGlobalTrack.h
CbmDigiManager::GetNofDigis
static Int_t GetNofDigis(ECbmModuleId systemId)
Definition: CbmDigiManager.cxx:62
CbmPsdMCbmQaReal::CbmPsdMCbmQaReal
CbmPsdMCbmQaReal()
Standard constructor.
Definition: CbmPsdMCbmQaReal.cxx:49
ECbmDataType::kTofHit
@ kTofHit
CbmTofDigi.h
ECbmModuleId::kTof
@ kTof
Time-of-flight Detector.
CbmDrawHist.h
Helper functions for drawing 1D and 2D histograms and graphs.
CbmHistManager.h
Histogram manager.
CbmMatchRecoToMC.h
FairTask for matching RECO data to MC.
CbmDigiManager::IsPresent
static Bool_t IsPresent(ECbmModuleId systemId)
Presence of a digi branch.
Definition: CbmDigiManager.cxx:112
CbmTofTracklet.h
CbmHistManager::H3
TH3 * H3(const std::string &name) const
Return pointer to TH3 histogram.
Definition: CbmHistManager.h:210
CbmDigiManager::Instance
static CbmDigiManager * Instance()
Static instance.
Definition: CbmDigiManager.h:93
CbmPsdMCbmQaReal::fDoDrawCanvas
bool fDoDrawCanvas
Definition: CbmPsdMCbmQaReal.h:86
fTofTracks
TClonesArray * fTofTracks
Definition: CbmHadronAnalysis.cxx:51
ECbmDataType::kTofTrack
@ kTofTrack
CbmEvent.h
DrawH1
void DrawH1(TH1 *hist, HistScale logx, HistScale logy, const string &drawOpt, Int_t color, Int_t lineWidth, Int_t lineStyle, Int_t markerSize, Int_t markerStyle)
Definition: CbmDrawHist.cxx:49
CbmPsdMCbmQaReal::DrawFromFile
void DrawFromFile(const string &fileName, const string &outputDir)
Draw histogram from file.
Definition: CbmPsdMCbmQaReal.cxx:502
CbmStsDigi.h
CbmPsdMCbmQaReal::fEntryNum
Int_t fEntryNum
Definition: CbmPsdMCbmQaReal.h:82
CbmHistManager
Histogram manager.
Definition: CbmHistManager.h:41
CbmPsdMCbmQaReal::fOutputDir
string fOutputDir
Definition: CbmPsdMCbmQaReal.h:83
CbmPsdMCbmQaReal::DrawHist
void DrawHist()
Draw histograms.
Definition: CbmPsdMCbmQaReal.cxx:352
CbmDigiManager::Get
const Digi * Get(Int_t index) const
Get a digi object.
Definition: CbmDigiManager.h:52
ECbmDataType::kPsdDigi
@ kPsdDigi
kLinear
@ kLinear
Definition: CbmDrawHist.h:79
CbmStsDigi::GetTime
Double_t GetTime() const
Definition: CbmStsDigi.h:83
CbmTrackMatchNew.h
CbmTofDigi::GetTime
Double_t GetTime() const
Inherited from CbmDigi.
Definition: CbmTofDigi.h:111
CbmHistManager::Create1
void Create1(const std::string &name, const std::string &title, Int_t nofBins, Double_t minBin, Double_t maxBin)
Helper function for creation of 1-dimensional histograms and profiles. Template argument is a real ob...
Definition: CbmHistManager.h:81
CbmPsdMCbmQaReal
Definition: CbmPsdMCbmQaReal.h:20
CbmPsdDigi::GetTime
Double_t GetTime() const
Time.
Definition: CbmPsdDigi.h:127
ClassImp
ClassImp(CbmConverterManager) InitStatus CbmConverterManager
Definition: CbmConverterManager.cxx:12
CbmHistManager::H1
TH1 * H1(const std::string &name) const
Return pointer to TH1 histogram.
Definition: CbmHistManager.h:170
CbmStsDigi
Data class for a single-channel message in the STS.
Definition: CbmStsDigi.h:29
PsdZPos
#define PsdZPos
Definition: CbmPsdMCbmQaReal.cxx:47
CbmUtils.h
CbmPsdMCbmHit.h
CbmTofDigi
Data class for expanded digital TOF information.
Definition: CbmTofDigi.h:38
CbmHistManager::CreateCanvas
TCanvas * CreateCanvas(const std::string &name, const std::string &title, Int_t width, Int_t height)
Create and draw TCanvas and store pointer to it.
Definition: core/base/CbmHistManager.cxx:267
CbmEvent::GetNofData
Int_t GetNofData() const
Definition: CbmEvent.h:90
CbmHistManager::SaveCanvasToImage
void SaveCanvasToImage(const std::string &outputDir, const std::string &options="png,eps")
Save all stored canvases to images.
Definition: core/base/CbmHistManager.cxx:276
CbmPsdMCbmHit::GetSectionID
Double_t GetSectionID() const
Index of PSD section @value section index [].
Definition: CbmPsdMCbmHit.h:59
CbmPsdMCbmQaReal::fTofTracks
TClonesArray * fTofTracks
Definition: CbmPsdMCbmQaReal.h:77
CbmPsdMCbmQaReal::InitHistograms
void InitHistograms()
Initialize histograms.
Definition: CbmPsdMCbmQaReal.cxx:100
CbmTofTracklet::GetFitX
Double_t GetFitX(Double_t Z)
Definition: CbmTofTracklet.cxx:516
CbmDigiManager.h
CbmTofTracklet::GetFitY
Double_t GetFitY(Double_t Z)
Definition: CbmTofTracklet.cxx:520
CbmPsdMCbmHit::GetModuleID
Int_t GetModuleID() const
Index of PSD module @value module index [].
Definition: CbmPsdMCbmHit.h:53
CbmEvent
Class characterising one event by a collection of links (indices) to data objects,...
Definition: CbmEvent.h:30
CbmPsdMCbmHit
data class for hit information in PSD
Definition: CbmPsdMCbmHit.h:24
CbmPsdMCbmQaReal::fDoWriteHistToFile
bool fDoWriteHistToFile
Definition: CbmPsdMCbmQaReal.h:85
ECbmModuleId::kPsd
@ kPsd
Projectile spectator detector.
CbmTofHit
Definition: core/data/tof/CbmTofHit.h:26
DrawH2
void DrawH2(TH2 *hist, HistScale logx, HistScale logy, HistScale logz, const string &drawOpt)
Definition: CbmDrawHist.cxx:84
CbmPsdDigi
Data class for PSD digital information.
Definition: CbmPsdDigi.h:31
CbmPsdMCbmQaReal::Exec
virtual void Exec(Option_t *option)
Inherited from FairTask.
Definition: CbmPsdMCbmQaReal.cxx:216
CbmPsdMCbmQaReal::fTofHits
TClonesArray * fTofHits
Definition: CbmPsdMCbmQaReal.h:76
CbmTrdTrack.h
CbmPsdMCbmHit::GetEdep
Double_t GetEdep() const
Energy deposited in PSD section @value Energy [a.u.].
Definition: CbmPsdMCbmHit.h:65
ECbmDataType::kPsdHit
@ kPsdHit
max
friend F32vec4 max(const F32vec4 &a, const F32vec4 &b)
Definition: L1/vectors/P4_F32vec4.h:36
ECbmModuleId::kSts
@ kSts
Silicon Tracking System.
CbmPsdMCbmQaReal::Finish
virtual void Finish()
Inherited from FairTask.
Definition: CbmPsdMCbmQaReal.cxx:476
kLog
@ kLog
Definition: CbmDrawHist.h:78
ECbmDataType::kMuchDigi
@ kMuchDigi
CbmPsdDigi::GetEdep
Double_t GetEdep() const
Energy deposit.
Definition: CbmPsdDigi.h:99