CbmRoot
CbmMuchDigitizerQa.cxx
Go to the documentation of this file.
1 
10 #include "CbmMuchDigitizerQa.h"
11 using std::cout;
12 using std::endl;
13 using std::vector;
14 
15 #define BINNING_CHARGE 100, 0, 300.0
16 #define BINNING_LENGTH 100, 0, 2.5
17 #define BINNING_CHARGE_LOG 100, 3, 10
18 #define BINNING_ENERGY_LOG 100, -0.5, 4.5
19 #define BINNING_ENERGY_LOG_EL 100, -0.5, 4.5
20 
21 // -------------------------------------------------------------------------
22 CbmMuchDigitizerQa::CbmMuchDigitizerQa(const char* name, Int_t verbose)
23  : FairTask(name, verbose)
24  , fGeoScheme(CbmMuchGeoScheme::Instance())
25  , fDigiManager(CbmDigiManager::Instance())
26  , fPointInfos(new TClonesArray("CbmMuchPointInfo", 10))
27  , fOutFolder("MuchDigiQA", "MuchDigitizerQA")
28  , fvUsPadsFiredR()
29  , fvUsPadsFiredXY()
30  , fvMcPointCharge()
31  , fvPadsTotalR()
32  , fvPadsFiredR()
33  , fvPadOccupancyR() {}
34 // -------------------------------------------------------------------------
35 
36 // -------------------------------------------------------------------------
38 // -------------------------------------------------------------------------
39 
41  for (int i = 0; i < fNstations; i++) {
42  delete fvUsPadsFiredR[i];
43  delete fvUsPadsFiredXY[i];
44  delete fvMcPointCharge[i];
45  delete fvPadsTotalR[i];
46  delete fvPadsFiredR[i];
47  delete fvPadOccupancyR[i];
48  }
49  fvUsPadsFiredR.clear();
50  fvUsPadsFiredXY.clear();
51  fvMcPointCharge.clear();
52  fvPadsTotalR.clear();
53  fvPadsFiredR.clear();
54  fvPadOccupancyR.clear();
55 
56  fNstations = 0;
57  fOutFolder.Clear();
58 }
59 
60 // -------------------------------------------------------------------------
62 
63  TDirectory* oldDirectory = gDirectory;
64  FairRootManager* fManager = FairRootManager::Instance();
65  fMCTracks = (TClonesArray*) fManager->GetObject("MCTrack");
66  fPoints = (TClonesArray*) fManager->GetObject("MuchPoint");
67  // Reading Much Digis from CbmMuchDigiManager which are stored as vector
69  fDigiManager->Init();
70 
71  histFolder = fOutFolder.AddFolder("hist", "Histogramms");
73  printf("Init: fNstations = %i\n", fNstations);
74 
75  //fVerbose = 3;
76  InitCounters();
77  InitCanvases();
80  InitPadHistos();
83  InitFits();
84 
85  gDirectory = oldDirectory;
86  return kSUCCESS;
87 }
88 
90 
91  fNall = new Int_t[fNstations];
92  fNpr = new Int_t[fNstations];
93  fNpi = new Int_t[fNstations];
94  fNel = new Int_t[fNstations];
95  fNmu = new Int_t[fNstations];
96  fNka = new Int_t[fNstations];
97  fNprimary = new Int_t[fNstations];
98  fNsecondary = new Int_t[fNstations];
99 
100  for (Int_t i = 0; i < fNstations; i++) {
101  fNall[i] = 0;
102  fNpr[i] = 0;
103  fNpi[i] = 0;
104  fNel[i] = 0;
105  fNmu[i] = 0;
106  fNka[i] = 0;
107  fNprimary[i] = 0;
108  fNsecondary[i] = 0;
109  }
110  fPointsTotal = 0;
112  fPointsOverCounted = 0;
113 }
114 
116 
121 
122  if (fVerbose > 2) {
123  printf("=========================================================\n");
124  printf(" Station Nr.\t| Sectors\t| Channels\t| Pad min size\t\t| Pad max"
125  "length\t \n");
126  printf("---------------------------------------------------------\n");
127  }
128 
129  Int_t nTotSectors = 0;
130  Int_t nTotChannels = 0;
131  for (Int_t iStation = 0; iStation < fNstations; iStation++) {
132  Int_t nChannels = GetNChannels(iStation);
133  Int_t nSectors = GetNSectors(iStation);
134  Double_t padMinLx = GetMinPadSize(iStation).X();
135  Double_t padMinLy = GetMinPadSize(iStation).Y();
136  Double_t padMaxLx = GetMaxPadSize(iStation).X();
137  Double_t padMaxLy = GetMaxPadSize(iStation).Y();
138  if (fPadMinLx > padMinLx) fPadMinLx = padMinLx;
139  if (fPadMinLy > padMinLy) fPadMinLy = padMinLy;
140  if (fPadMaxLx < padMaxLx) fPadMaxLx = padMaxLx;
141  if (fPadMaxLy < padMaxLy) fPadMaxLy = padMaxLy;
142  nTotSectors += nSectors;
143  nTotChannels += nChannels;
144 
145  if (fVerbose > 2) {
146  printf("%i\t\t| %i\t\t| %i\t| %5.4fx%5.4f\t\t| %5.4fx%5.4f\n",
147  iStation + 1,
148  nSectors,
149  nChannels,
150  padMinLx,
151  padMinLy,
152  padMaxLx,
153  padMaxLy);
154  printf("%i\t\t| %i\t\t\n", iStation + 1, nChannels);
155  }
156  }
157  printf("-----------------------------------------------------------\n");
158  printf(" Total:\t\t| %i\t\t\n", nTotChannels);
159  printf("===========================================================\n");
160 }
161 
163 
164  fCanvCharge =
165  new CbmQaCanvas("cMcPointCharge", "MC point charge", 2 * 800, 2 * 400);
166  fCanvCharge->Divide2D(3);
167 
169  "cMcPointChargeVsStation", "MC point charge per station", 2 * 800, 2 * 400);
171 
172  fCanvChargeVsEnergy = new CbmQaCanvas("cMcPointChargeVsEnergy",
173  "MC point charge vs particle Energy",
174  2 * 800,
175  2 * 400);
177 
178  fCanvChargeVsLength = new CbmQaCanvas("cMcPointChargeVsLength",
179  "MC point charge vs track length",
180  2 * 800,
181  2 * 400);
183 
185  new CbmQaCanvas("cTrackLength", "track length", 2 * 800, 2 * 400);
187 
189  new CbmQaCanvas("cNpadsVsArea", "N pads Vs Area", 2 * 800, 2 * 400);
190 
192  "cPadsFiredXY", "Number of pads fired vs XY", 2 * 800, 2 * 400);
194 
196  "cPadOccupancyR", "Pad occupancy [%] vs radius", 2 * 800, 2 * 400);
198 
200  new CbmQaCanvas("cPadsTotalR", "Total pads vs radius", 2 * 800, 2 * 400);
202 
203  fOutFolder.Add(fCanvCharge);
212 }
213 
215 
217  new TH1F("hCharge", "Charge distribution from tracks", BINNING_CHARGE);
218  fhMcPointCharge->GetXaxis()->SetTitle("Charge [10^{4} electrons]");
219 
220  fhMcPointChargeLog = new TH1F(
221  "hChargeLog", "Charge (log.) distribution from tracks", BINNING_CHARGE_LOG);
222  fhMcPointChargeLog->GetXaxis()->SetTitle("Charge [Lg(Number of electrons)]");
223 
225  new TH1F("hChargePr_1GeV_3mm", "Charge for 1 GeV protons", BINNING_CHARGE);
226  fhMcPointChargePr_1GeV_3mm->GetXaxis()->SetTitle("Charge [10^{4} electrons]");
227 
229  new TH2F("hChargeEnergyLog",
230  "Charge vs energy (log.) for all tracks",
233 
235  new TH2F("hChargeEnergyLogPi",
236  "Charge vs energy (log.) for pions",
239 
241  new TH2F("hChargeEnergyLogPr",
242  "Charge vs energy (log.) for protons",
245 
247  new TH2F("hChargeEnergyLogEl",
248  "Charge vs energy (log.) for electrons",
251 
252  fhMcPointChargeVsTrackLength = new TH2F("hChargeTrackLength",
253  "Charge vs length for all tracks",
256 
257  fhMcPointChargeVsTrackLengthPi = new TH2F("hChargeTrackLengthPi",
258  "Charge vs length for pions",
261 
262  fhMcPointChargeVsTrackLengthPr = new TH2F("hChargeTrackLengthPr",
263  "Charge vs length for proton",
266 
267  fhMcPointChargeVsTrackLengthEl = new TH2F("hChargeTrackLengthEl",
268  "Charge vs length for electrons",
271  std::vector<TH2F*> vChargeHistos;
272  vChargeHistos.push_back(fhMcPointChargeVsTrackEnergyLog);
273  vChargeHistos.push_back(fhMcPointChargeVsTrackEnergyLogPi);
274  vChargeHistos.push_back(fhMcPointChargeVsTrackEnergyLogPr);
275  vChargeHistos.push_back(fhMcPointChargeVsTrackEnergyLogEl);
276  vChargeHistos.push_back(fhMcPointChargeVsTrackLength);
277  vChargeHistos.push_back(fhMcPointChargeVsTrackLengthPi);
278  vChargeHistos.push_back(fhMcPointChargeVsTrackLengthPr);
279  vChargeHistos.push_back(fhMcPointChargeVsTrackLengthEl);
280 
281  for (UInt_t i = 0; i < vChargeHistos.size(); i++) {
282  TH2F* histo = vChargeHistos[i];
283  histo->SetStats(0);
284  histo->GetYaxis()->SetDecimals(kTRUE);
285  histo->GetYaxis()->SetTitleOffset(1.4);
286  histo->GetYaxis()->CenterTitle();
287  histo->GetYaxis()->SetTitle("Charge [10^{4} electrons]");
288  if (i < 4) {
289  histo->GetXaxis()->SetTitle("Lg(E_{kin} [MeV])");
290  } else {
291  histo->GetXaxis()->SetTitle("Track length [cm]");
292  }
293  histFolder->Add(histo);
294  }
295 }
296 
298 
299  fhTrackLength = new TH1F("hTrackLength", "Track length", BINNING_LENGTH);
300 
302  new TH1F("hTrackLengthPi", "Track length for pions", BINNING_LENGTH);
303 
305  new TH1F("hTrackLengthPr", "Track length for protons", BINNING_LENGTH);
306 
308  new TH1F("hTrackLengthEl", "Track length for electrons", BINNING_LENGTH);
309 
310  std::vector<TH1F*> vLengthHistos;
311  vLengthHistos.push_back(fhTrackLength);
312  vLengthHistos.push_back(fhTrackLengthPi);
313  vLengthHistos.push_back(fhTrackLengthPr);
314  vLengthHistos.push_back(fhTrackLengthEl);
315 
316  for (UInt_t i = 0; i < vLengthHistos.size(); i++) {
317  TH1F* histo = vLengthHistos[i];
318  histo->GetXaxis()->SetTitle("Track length [cm]");
319  histFolder->Add(histo);
320  }
321 }
322 
324 
325  fvMcPointCharge.resize(fNstations);
326  fvPadsTotalR.resize(fNstations);
327  fvUsPadsFiredR.resize(fNstations);
328  fvUsPadsFiredXY.resize(fNstations);
329  fvPadsFiredR.resize(fNstations);
330  fvPadOccupancyR.resize(fNstations);
331 
332  for (Int_t i = 0; i < fNstations; i++) {
333  CbmMuchStation* station = fGeoScheme->GetStation(i);
334  Double_t rMax = station->GetRmax();
335  Double_t rMin = station->GetRmin();
336 
337  fvMcPointCharge[i] = new TH1F(
338  Form("hMcPointCharge%i", i + 1),
339  Form("MC point charge : Station %i; Charge [10^4 e]; Count", i + 1),
341 
342  fvPadsTotalR[i] =
343  new TH1F(Form("hPadsTotal%i", i + 1),
344  Form("Number of pads vs radius: Station %i;Radius [cm]", i + 1),
345  100,
346  0.6 * rMin,
347  1.2 * rMax);
348 
349  fvUsPadsFiredR[i] = new TH1F(
350  Form("hUsPadsFired%i", i + 1),
351  Form("Number of fired pads vs radius: Station %i;Radius [cm]", i + 1),
352  100,
353  0.6 * rMin,
354  1.2 * rMax);
355 
356  fvUsPadsFiredXY[i] =
357  new TH2F(Form("hUsPadsFiredXY%i", i + 1),
358  Form("Pads fired XY : Station %i; X; Y", i + 1),
359  100,
360  -1.2 * rMax,
361  1.2 * rMax,
362  100,
363  -1.2 * rMax,
364  1.2 * rMax);
365 
366  fvPadsFiredR[i] = new TH1F(
367  Form("hPadsFired%i", i + 1),
368  Form("Number of fired pads vs radius: Station %i;Radius [cm]", i + 1),
369  100,
370  0.6 * rMin,
371  1.2 * rMax);
372 
373  fvPadOccupancyR[i] = new TH1F(
374  Form("hOccupancy%i", i + 1),
375  Form("Pad occupancy vs radius: Station %i;Radius [cm];Occupancy, %%",
376  i + 1),
377  100,
378  0.6 * rMin,
379  1.2 * rMax);
380 
382  histFolder->Add(fvPadsTotalR[i]);
384  histFolder->Add(fvPadsFiredR[i]);
386  }
387  fhNpadsVsS = new TH2F("hNpadsVsS",
388  "Number of fired pads vs pad area:area:n pads",
389  10,
390  -5,
391  0,
392  10,
393  0.5,
394  10.5);
395  histFolder->Add(fhNpadsVsS);
396 }
397 
399 
400  vector<CbmMuchModule*> modules = fGeoScheme->GetModules();
401  for (vector<CbmMuchModule*>::iterator im = modules.begin();
402  im != modules.end();
403  im++) {
404  CbmMuchModule* mod = (*im);
405  if (mod->GetDetectorType() == 4
406  || mod->GetDetectorType() == 3) { // modified for rpc
407  CbmMuchModuleGem* module = (CbmMuchModuleGem*) mod;
408  vector<CbmMuchPad*> pads = module->GetPads();
409  for (UInt_t ip = 0; ip < pads.size(); ip++) {
410  CbmMuchPad* pad = pads[ip];
411  Int_t stationId = CbmMuchAddress::GetStationIndex(pad->GetAddress());
412  Double_t x0 = pad->GetX();
413  Double_t y0 = pad->GetY();
414  Double_t r0 = TMath::Sqrt(x0 * x0 + y0 * y0);
415  fvPadsTotalR[stationId]->Fill(r0);
416  }
417  }
418  }
419 
420  Double_t errors[100];
421  for (Int_t i = 0; i < 100; i++) {
422  errors[i] = 0;
423  }
424  for (Int_t i = 0; i < fNstations; i++) {
425  //fvPadsTotalR[i]->Sumw2();
426  fvPadsTotalR[i]->SetError(errors);
427  }
428 }
429 
431 
432  fFitEl = new TF1("fit_el", LandauMPV, -0.5, 4.5, 1);
433  fFitEl->SetParameter(0, 0.511);
434  fFitEl->SetLineWidth(2);
435  fFitEl->SetLineColor(kBlack);
436 
437  fFitPi = new TF1("fit_pi", LandauMPV, -0.5, 4.5, 1);
438  fFitPi->SetParameter(0, 139.57);
439  fFitPi->SetLineWidth(2);
440  fFitPi->SetLineColor(kBlack);
441 
442  fFitPr = new TF1("fit_pr", LandauMPV, -0.5, 4.5, 1);
443  fFitPr->SetParameter(0, 938.27);
444  fFitPr->SetLineWidth(2);
445  fFitPr->SetLineColor(kBlack);
446 }
447 
448 // -------------------------------------------------------------------------
449 
450 // -------------------------------------------------------------------------
452  // Get run and runtime database
453 
454  // The code currently does not work,
455  // CbmMuchGeoScheme::Instance() must be initialised outside.
456  // - Sergey
457 
458  // FairRuntimeDb* db = FairRuntimeDb::instance();
459  // if ( ! db ) Fatal("SetParContainers", "No runtime database");
460  // Get MUCH geometry parameter container
461  // CbmGeoMuchPar *fGeoPar = (CbmGeoMuchPar*)
462  // db->getContainer("CbmGeoMuchPar"); TObjArray *stations =
463  // fGeoPar->GetStations(); cout<<"\n\n SG: stations:
464  // "<<stations->GetEntriesFast()<<endl;
465  // TString geoTag;
466  // CbmSetup::Instance()->GetGeoTag(ECbmModuleId::kMuch, geoTag);
467  // bool mcbmFlag = geoTag.Contains("mcbm", TString::kIgnoreCase);
468  // CbmMuchGeoScheme::Instance()->Init(stations, mcbmFlag);
469 }
470 // -------------------------------------------------------------------------
471 
472 // -------------------------------------------------------------------------x
473 void CbmMuchDigitizerQa::Exec(Option_t*) {
474 
475  fNevents++;
476  LOG(info) << "Event: " << fNevents;
477  TDirectory* oldDirectory = gDirectory;
478 
479  OccupancyQa();
480  DigitizerQa();
481  DrawCanvases();
482  if (fVerbose > 1) {
485  }
486  gDirectory = oldDirectory;
487  return;
488 }
489 // -------------------------------------------------------------------------
490 
492  for (int i = 0; i < fPoints->GetEntriesFast(); i++) {
493  CbmMuchPoint* point = (CbmMuchPoint*) fPoints->At(i);
494  Int_t stId = CbmMuchAddress::GetStationIndex(point->GetDetectorID());
495  if (stId != 0) continue;
496  Int_t layerId = CbmMuchAddress::GetLayerIndex(point->GetDetectorID());
497  if (layerId != 0) continue;
498  printf("point %4i xin=%6.2f yin=%6.2f xout=%6.2f yout=%6.2f zin=%6.2f\n",
499  i,
500  point->GetXIn(),
501  point->GetYIn(),
502  point->GetXOut(),
503  point->GetYOut(),
504  point->GetZIn());
505  }
506 }
507 // -------------------------------------------------------------------------
508 
510  for (Int_t i = 0; i < fDigiManager->GetNofDigis(ECbmModuleId::kMuch); i++) {
512  UInt_t address = digi->GetAddress();
513  Int_t stId = CbmMuchAddress::GetStationIndex(address);
514  if (stId != 0) continue;
515  Int_t layerId = CbmMuchAddress::GetLayerIndex(address);
516  if (layerId != 0) continue;
517  CbmMuchModuleGem* module =
519  if (!module) continue;
520  CbmMuchPad* pad = module->GetPad(address);
521  Double_t x0 = pad->GetX();
522  Double_t y0 = pad->GetY();
523  UInt_t charge = digi->GetAdc();
524  printf("digi %4i x0=%5.1f y0=%5.1f charge=%3i\n", i, x0, y0, charge);
525  }
526 }
527 // -------------------------------------------------------------------------
528 
530 
531  fCanvCharge->cd(1);
532  fhMcPointCharge->DrawCopy("", "");
533  fCanvCharge->cd(2);
534  fhMcPointChargeLog->DrawCopy("", "");
535  fCanvCharge->cd(3);
536  fhMcPointChargePr_1GeV_3mm->DrawCopy("", "");
537 
538  for (Int_t i = 0; i < 4; i++) {
539  fCanvTrackLength->cd(i + 1);
540  gPad->SetLogy();
541  gStyle->SetOptStat(1110);
542  }
543  fCanvTrackLength->cd(1);
544  fhTrackLength->DrawCopy("", "");
545  fCanvTrackLength->cd(2);
546  fhTrackLengthPi->DrawCopy("", "");
547  fCanvTrackLength->cd(3);
548  fhTrackLengthPr->DrawCopy("", "");
549  fCanvTrackLength->cd(4);
550  fhTrackLengthEl->DrawCopy("", "");
551 
552  for (Int_t i = 0; i < 4; i++) {
553  fCanvChargeVsEnergy->cd(i + 1);
554  gPad->Range(0, 0, 200, 200);
555  gPad->SetBottomMargin(0.11);
556  gPad->SetRightMargin(0.14);
557  gPad->SetLeftMargin(0.12);
558  gPad->SetLogz();
559  }
560  fCanvChargeVsEnergy->cd(1);
561  fhMcPointChargeVsTrackEnergyLog->DrawCopy("colz", "");
562  fCanvChargeVsEnergy->cd(2);
563  fhMcPointChargeVsTrackEnergyLogPi->DrawCopy("colz", "");
564  fFitPi->DrawCopy("same");
565  fCanvChargeVsEnergy->cd(3);
566  fhMcPointChargeVsTrackEnergyLogPr->DrawCopy("colz", "");
567  fFitPr->DrawCopy("same");
568  fCanvChargeVsEnergy->cd(4);
569  fhMcPointChargeVsTrackEnergyLogEl->DrawCopy("colz", "");
570  fFitEl->DrawCopy("same");
571 
572  for (Int_t i = 0; i < 4; i++) {
573  fCanvChargeVsLength->cd(i + 1);
574  gPad->Range(0, 0, 200, 200);
575  gPad->SetBottomMargin(0.11);
576  gPad->SetRightMargin(0.14);
577  gPad->SetLeftMargin(0.12);
578  gPad->SetLogz();
579  }
580  fCanvChargeVsLength->cd(1);
581  fhMcPointChargeVsTrackLength->DrawCopy("colz", "");
582  fCanvChargeVsLength->cd(2);
583  fhMcPointChargeVsTrackLengthPi->DrawCopy("colz", "");
584  fCanvChargeVsLength->cd(3);
585  fhMcPointChargeVsTrackLengthPr->DrawCopy("colz", "");
586  fCanvChargeVsLength->cd(4);
587  fhMcPointChargeVsTrackLengthEl->DrawCopy("colz", "");
588 
589  for (Int_t i = 0; i < fNstations; i++) {
591  //fvPadsFiredR[i]->Sumw2();
592  fvPadsFiredR[i]->Scale(1. / fNevents);
594  fvPadOccupancyR[i]->Scale(100.);
595 
596  fCanvStationCharge->cd(i + 1);
597  fvMcPointCharge[i]->DrawCopy("", "");
598  fCanvPadOccupancyR->cd(i + 1);
599  fvPadOccupancyR[i]->DrawCopy("", "");
600  fCanvPadsTotalR->cd(i + 1);
601  fvPadsTotalR[i]->DrawCopy("", "");
602  fCanvUsPadsFiredXY->cd(i + 1);
603  fvUsPadsFiredXY[i]->DrawCopy("colz", "");
604  }
605  fCanvNpadsVsArea->cd();
606  fhNpadsVsS->DrawCopy("colz", "");
607 }
608 
609 // -------------------------------------------------------------------------
611 
612  printf("FinishTask\n");
613  cout << "\n\n SG: Finish task!" << endl;
614 
615  TDirectory* oldDirectory = gDirectory;
616  bool oldBatchMode = gROOT->IsBatch();
617 
618  if (!FairRootManager::Instance() || !FairRootManager::Instance()->GetSink()) {
619  cout << "No sink found" << endl;
620  return;
621  }
622  // gROOT->SetBatch(kTRUE);
623  gROOT->SetBatch(kFALSE);
624  gStyle->SetPaperSize(20, 20);
625 
626  if (fVerbose > 1) {
627  OutputNvsS();
628  PrintCounters();
629  }
630  FairSink* sink = FairRootManager::Instance()->GetSink();
631  sink->WriteObject(&fOutFolder, nullptr);
632  gDirectory = oldDirectory;
633  gROOT->SetBatch(oldBatchMode);
634 }
635 // -------------------------------------------------------------------------
636 
638  TCanvas* c = new TCanvas("nMeanVsS", "nMeanVsS", 2 * 800, 2 * 400);
639  printf("===================================\n");
640  printf("DigitizerQa:\n");
641 
642  Double_t nMean[11];
643  Double_t s[11];
644  for (Int_t iS = 1; iS <= 10; iS++) {
645  nMean[iS] = 0;
646  s[iS] = -5.25 + 0.5 * iS;
647  Double_t total = 0;
648  for (Int_t iN = 1; iN <= 10; iN++) {
649  nMean[iS] += iN * fhNpadsVsS->GetBinContent(iS, iN);
650  total += fhNpadsVsS->GetBinContent(iS, iN);
651  }
652  if (total > 0) nMean[iS] /= total;
653  printf("%f %f\n", s[iS], nMean[iS]);
654  }
655  c->cd();
656 
657  TGraph* gNvsS = new TGraph(11, s, nMean);
658  //gNvsS->SetLineColor(2);
659  //gNvsS->SetLineWidth(4);
660  gNvsS->SetMarkerColor(4);
661  gNvsS->SetMarkerSize(1.5);
662  gNvsS->SetMarkerStyle(21);
663  gNvsS->SetTitle("nMeanVsS");
664  gNvsS->GetYaxis()->SetTitle("nMean");
665  gNvsS->GetYaxis()->SetTitle("nMean");
666  //gNvsS->DrawClone("ALP");
667  gNvsS->DrawClone("AP");
668  fOutFolder.Add(c);
669 }
670 
672 
673  printf("All tracks: ;");
674  for (Int_t i = 0; i < fNstations; i++)
675  printf("%8i;", fNall[i]);
676  printf("\n");
677  printf("------------;");
678  for (Int_t i = 0; i < fNstations; i++)
679  printf("---------");
680  printf("\n");
681  printf("Primary: ;");
682  for (Int_t i = 0; i < fNstations; i++)
683  printf("%8i;", fNprimary[i]);
684  printf("\n");
685  printf("Secondary: ;");
686  for (Int_t i = 0; i < fNstations; i++)
687  printf("%8i;", fNsecondary[i]);
688  printf("\n");
689  printf("-------------");
690  for (Int_t i = 0; i < fNstations; i++)
691  printf("---------");
692  printf("\n");
693  printf("Protons: ;");
694  for (Int_t i = 0; i < fNstations; i++)
695  printf("%8i;", fNpr[i]);
696  printf("\n");
697  printf("Pions: ;");
698  for (Int_t i = 0; i < fNstations; i++)
699  printf("%8i;", fNpi[i]);
700  printf("\n");
701  printf("Electrons: ;");
702  for (Int_t i = 0; i < fNstations; i++)
703  printf("%8i;", fNel[i]);
704  printf("\n");
705  printf("Muons: ;");
706  for (Int_t i = 0; i < fNstations; i++)
707  printf("%8i;", fNmu[i]);
708  printf("\n");
709  printf("Kaons: ;");
710  for (Int_t i = 0; i < fNstations; i++)
711  printf("%8i;", fNka[i]);
712  printf("\n");
713 }
714 
715 // -------------------------------------------------------------------------
716 Double_t CbmMuchDigitizerQa::LandauMPV(Double_t* lg_x, Double_t* par) {
717  Double_t gaz_gain_mean = 1.7e+4;
718  Double_t scale = 1.e+6;
719  gaz_gain_mean /= scale;
720  Double_t mass = par[0]; // mass in MeV
721  Double_t x = TMath::Power(10, lg_x[0]);
722  return gaz_gain_mean * MPV_n_e(x, mass);
723 }
724 // -------------------------------------------------------------------------
725 
726 // -------------------------------------------------------------------------
728  TVector3 vIn; // in position of the track
729  TVector3 vOut; // out position of the track
730  TVector3 p; // track momentum
731  fPointInfos->Clear();
732 
733  for (Int_t i = 0; i < fPoints->GetEntriesFast(); i++) {
734  CbmMuchPoint* point = (CbmMuchPoint*) fPoints->At(i);
735  Int_t stId = CbmMuchAddress::GetStationIndex(point->GetDetectorID());
736 
737  // Check if the point corresponds to a certain MC Track
738  Int_t trackId = point->GetTrackID();
739  if (trackId < 0) {
740  new ((*fPointInfos)[i]) CbmMuchPointInfo(0, 0, 0, 0, 0);
741  continue;
742  }
743  CbmMCTrack* mcTrack = (CbmMCTrack*) fMCTracks->At(trackId);
744  if (!mcTrack) {
745  new ((*fPointInfos)[i]) CbmMuchPointInfo(0, 0, 0, 0, 0);
746  continue;
747  }
748 
749  Int_t motherId = mcTrack->GetMotherId();
750  Int_t pdgCode = mcTrack->GetPdgCode();
751  TParticlePDG* particle = TDatabasePDG::Instance()->GetParticle(pdgCode);
752  if (!particle || pdgCode == 22 || // photons
753  pdgCode == 2112) // neutrons
754  {
755  new ((*fPointInfos)[i]) CbmMuchPointInfo(0, 0, 0, 0, 0);
756  continue;
757  }
758 
759  if (CbmMuchAddress::GetLayerIndex(point->GetDetectorID()) == 0) {
760  UpdateParticleCounters(stId, pdgCode, motherId);
761  }
762 
763  Double_t mass = particle->Mass();
764  point->PositionIn(vIn);
765  point->PositionOut(vOut);
766  point->Momentum(p);
767  Double_t length = (vOut - vIn).Mag(); // Track length
768  Double_t kine = sqrt(p.Mag2() + mass * mass) - mass; // Kinetic energy
769  // Get mother pdg code
770  Int_t motherPdg = 0;
771  CbmMCTrack* motherTrack = NULL;
772  if (motherId != -1) motherTrack = (CbmMCTrack*) fMCTracks->At(motherId);
773  if (motherTrack) motherPdg = motherTrack->GetPdgCode();
774  new ((*fPointInfos)[i])
775  CbmMuchPointInfo(pdgCode, motherPdg, kine, length, stId);
776  }
779 }
780 // -------------------------------------------------------------------------
781 
783  Int_t pdgCode,
784  Int_t motherId) {
785 
786  fNall[stId]++;
787  if (pdgCode == 2212)
788  fNpr[stId]++;
789  else if (pdgCode == -211 || pdgCode == 211)
790  fNpi[stId]++;
791  else if (pdgCode == -11 || pdgCode == 11)
792  fNel[stId]++;
793  else if (pdgCode == -13 || pdgCode == 13)
794  fNmu[stId]++;
795  else if (pdgCode == -321 || pdgCode == 321)
796  fNka[stId]++;
797 
798  if (motherId == -1)
799  fNprimary[stId]++;
800  else
801  fNsecondary[stId]++;
802 }
803 
805  for (Int_t i = 0; i < fDigiManager->GetNofDigis(ECbmModuleId::kMuch); i++) {
807  assert(digi);
808  CbmMatch* match =
810  assert(match);
812  assert(module);
813  if (!module) continue;
814  Double_t area = 0;
815  if (module->GetDetectorType() != 4 && module->GetDetectorType() != 3)
816  continue;
817  LOG(debug) << GetName() << " Processing MuchDigi " << i << " at address "
818  << digi->GetAddress() << " Module number "
819  << module->GetDetectorType();
820 
821  CbmMuchModuleGem* module1 = (CbmMuchModuleGem*) module;
822  assert(module1);
823  CbmMuchPad* pad = module1->GetPad(digi->GetAddress());
824  assert(pad);
825  area = pad->GetDx() * pad->GetDy();
826  Int_t nofLinks = match->GetNofLinks();
827  for (Int_t pt = 0; pt < nofLinks; pt++) {
828  Int_t pointId = match->GetLink(pt).GetIndex();
829  Int_t charge = match->GetLink(pt).GetWeight();
830  CbmMuchPointInfo* info = (CbmMuchPointInfo*) fPointInfos->At(pointId);
831  if (info->GetPdgCode() == 0) continue;
832  info->AddCharge(charge);
833  info->AddArea(area);
834  }
835  }
836 }
837 
839  Bool_t verbose = (fVerbose > 2);
840  for (Int_t i = 0; i < fPointInfos->GetEntriesFast(); i++) {
842  if (verbose) {
843  printf("%i", i);
844  info->Print();
845  }
846  Double_t length = info->GetLength();
847  Double_t kine = 1000 * (info->GetKine());
848  Double_t charge = info->GetCharge();
849  Int_t pdg = info->GetPdgCode();
850  if (pdg == 0) continue;
851  if (charge <= 0) continue;
852  Double_t log_kine = TMath::Log10(kine);
853  Double_t log_charge = TMath::Log10(charge);
854  charge = charge / 1.e+4; // measure charge in 10^4 electrons
855 
856  Int_t nPads = info->GetNPads();
857  Double_t area = info->GetArea() / nPads;
858  // printf("%f %i\n",TMath::Log2(area),nPads);
859  fhNpadsVsS->Fill(TMath::Log2(area), nPads);
860  fhMcPointCharge->Fill(charge);
861  fvMcPointCharge[info->GetStationId()]->Fill(charge);
862  fhMcPointChargeLog->Fill(log_charge);
863  fhMcPointChargeVsTrackEnergyLog->Fill(log_kine, charge);
864  fhMcPointChargeVsTrackLength->Fill(length, charge);
865  fhTrackLength->Fill(length);
866 
867  if (pdg == 2212) {
868  fhMcPointChargeVsTrackEnergyLogPr->Fill(log_kine, charge);
869  fhMcPointChargeVsTrackLengthPr->Fill(length, charge);
870  fhTrackLengthPr->Fill(length);
871  } else if (pdg == 211 || pdg == -211) {
872  fhMcPointChargeVsTrackEnergyLogPi->Fill(log_kine, charge);
873  fhMcPointChargeVsTrackLengthPi->Fill(length, charge);
874  fhTrackLengthPi->Fill(length);
875  } else if (pdg == 11 || pdg == -11) {
876  fhMcPointChargeVsTrackEnergyLogEl->Fill(log_kine, charge);
877  fhMcPointChargeVsTrackLengthEl->Fill(length, charge);
878  fhTrackLengthEl->Fill(length);
879  }
880  if (pdg == 2212 && length > 0.3 && length < 0.32 && kine > 1000
881  && kine < 1020)
882  fhMcPointChargePr_1GeV_3mm->Fill(charge);
883  }
884 }
885 
886 // -------------------------------------------------------------------------
888  // Filling occupancy plots
889  for (Int_t i = 0; i < fDigiManager->GetNofDigis(ECbmModuleId::kMuch); i++) {
891  assert(digi);
892  UInt_t address = digi->GetAddress();
893  CbmMuchModule* module = fGeoScheme->GetModuleByDetId(address);
894  if (!module) continue;
895  Double_t r0 = 0;
896  if (module->GetDetectorType() != 4 && module->GetDetectorType() != 3)
897  continue;
898  CbmMuchModuleGem* module1 = (CbmMuchModuleGem*) module;
899  CbmMuchPad* pad = module1->GetPad(
900  address); // fGeoScheme->GetPadByDetId(detectorId, channelId);
901  assert(pad);
902  Double_t x0 = pad->GetX();
903  Double_t y0 = pad->GetY();
904  r0 = TMath::Sqrt(x0 * x0 + y0 * y0);
906  fvUsPadsFiredXY[CbmMuchAddress::GetStationIndex(address)]->Fill(x0, y0);
907  }
908 }
909 // -------------------------------------------------------------------------
910 
911 // -------------------------------------------------------------------------
912 Int_t CbmMuchDigitizerQa::GetNChannels(Int_t iStation) {
913  Int_t nChannels = 0;
914  vector<CbmMuchModule*> modules = fGeoScheme->GetModules(iStation);
915  for (UInt_t im = 0; im < modules.size(); im++) {
916  CbmMuchModule* mod = modules[im];
917  if (mod->GetDetectorType() != 4 && mod->GetDetectorType() != 3) continue;
918  CbmMuchModuleGem* module = (CbmMuchModuleGem*) mod;
919  if (!module) continue;
920  nChannels += module->GetNPads();
921  }
922  return nChannels;
923 }
924 
925 // -------------------------------------------------------------------------
926 Int_t CbmMuchDigitizerQa::GetNSectors(Int_t iStation) {
927  Int_t nSectors = 0;
928  vector<CbmMuchModule*> modules = fGeoScheme->GetModules(iStation);
929  for (UInt_t im = 0; im < modules.size(); im++) {
930  CbmMuchModule* mod = modules[im];
931  if (mod->GetDetectorType() != 4 && mod->GetDetectorType() != 3) continue;
932  CbmMuchModuleGem* module = (CbmMuchModuleGem*) mod;
933  if (!module) continue;
934  nSectors += module->GetNSectors();
935  }
936  return nSectors;
937 }
938 
939 // -------------------------------------------------------------------------
940 TVector2 CbmMuchDigitizerQa::GetMinPadSize(Int_t iStation) {
941  Double_t padMinLx = std::numeric_limits<Double_t>::max();
942  Double_t padMinLy = std::numeric_limits<Double_t>::max();
943  vector<CbmMuchModule*> modules = fGeoScheme->GetModules(iStation);
944  for (UInt_t im = 0; im < modules.size(); im++) {
945  CbmMuchModule* mod = modules[im];
946  if (mod->GetDetectorType() != 1) continue;
947  CbmMuchModuleGem* module = (CbmMuchModuleGem*) mod;
948  vector<CbmMuchPad*> pads = module->GetPads();
949  for (UInt_t ip = 0; ip < pads.size(); ip++) {
950  CbmMuchPad* pad = pads[ip];
951  if (pad->GetDx() < padMinLx) padMinLx = pad->GetDx();
952  if (pad->GetDy() < padMinLy) padMinLy = pad->GetDy();
953  }
954  }
955  return TVector2(padMinLx, padMinLy);
956 }
957 // -------------------------------------------------------------------------
958 
959 // -------------------------------------------------------------------------
960 TVector2 CbmMuchDigitizerQa::GetMaxPadSize(Int_t iStation) {
961  Double_t padMaxLx = std::numeric_limits<Double_t>::min();
962  Double_t padMaxLy = std::numeric_limits<Double_t>::min();
963  vector<CbmMuchModule*> modules = fGeoScheme->GetModules(iStation);
964  for (UInt_t im = 0; im < modules.size(); im++) {
965  CbmMuchModule* mod = modules[im];
966  if (mod->GetDetectorType() != 1) continue;
967  CbmMuchModuleGem* module = (CbmMuchModuleGem*) mod;
968  vector<CbmMuchPad*> pads = module->GetPads();
969  for (UInt_t ip = 0; ip < pads.size(); ip++) {
970  CbmMuchPad* pad = pads[ip];
971  if (pad->GetDx() > padMaxLx) padMaxLx = pad->GetDx();
972  if (pad->GetDy() > padMaxLy) padMaxLy = pad->GetDy();
973  }
974  }
975  return TVector2(padMaxLx, padMaxLy);
976 }
977 // -------------------------------------------------------------------------
978 
979 // -------------------------------------------------------------------------
980 Double_t CbmMuchDigitizerQa::MPV_n_e(Double_t Tkin, Double_t mass) {
981  Double_t logT;
982  TF1 fPol6("fPol6", "pol6", -5, 10);
983  if (mass < 0.1) {
984  logT = log(Tkin * 0.511 / mass);
985  if (logT > 9.21034) logT = 9.21034;
986  if (logT < min_logT_e) logT = min_logT_e;
987  return fPol6.EvalPar(&logT, mpv_e);
988  } else if (mass >= 0.1 && mass < 0.2) {
989  logT = log(Tkin * 105.658 / mass);
990  if (logT > 9.21034) logT = 9.21034;
991  if (logT < min_logT_mu) logT = min_logT_mu;
992  return fPol6.EvalPar(&logT, mpv_mu);
993  } else {
994  logT = log(Tkin * 938.272 / mass);
995  if (logT > 9.21034) logT = 9.21034;
996  if (logT < min_logT_p) logT = min_logT_p;
997  return fPol6.EvalPar(&logT, mpv_p);
998  }
999 }
1000 
1001 void CbmMuchDigitizerQa::DivideCanvas2D(TCanvas* c, int nPads) {
1002  // divide canvas into nPads in 2D
1003  if (!c || nPads < 1) { return; }
1004  int rows = (int) sqrt(nPads);
1005  int cols = nPads / rows;
1006  if (cols * rows < nPads) { cols++; }
1007  c->Divide(cols, rows);
1008 }
1009 
1010 // -------------------------------------------------------------------------
1011 
CbmMuchDigitizerQa::OccupancyQa
void OccupancyQa()
Definition: CbmMuchDigitizerQa.cxx:887
CbmMuchDigitizerQa.h
Definition of the CbmMuchDigitizerQa class.
CbmMuchPoint::GetXOut
Double_t GetXOut() const
Definition: CbmMuchPoint.h:73
CbmMCTrack::GetMotherId
Int_t GetMotherId() const
Definition: CbmMCTrack.h:71
CbmMuchDigitizerQa::fCanvNpadsVsArea
CbmQaCanvas * fCanvNpadsVsArea
Definition: CbmMuchDigitizerQa.h:164
CbmMuchDigitizerQa::fvMcPointCharge
std::vector< TH1F * > fvMcPointCharge
Definition: CbmMuchDigitizerQa.h:153
CbmMatch
Definition: CbmMatch.h:22
CbmMuchDigitizerQa::fvPadOccupancyR
std::vector< TH1F * > fvPadOccupancyR
Definition: CbmMuchDigitizerQa.h:156
CbmMuchDigitizerQa::InitPadHistos
void InitPadHistos()
Definition: CbmMuchDigitizerQa.cxx:323
CbmMuchDigitizerQa::fCanvPadOccupancyR
CbmQaCanvas * fCanvPadOccupancyR
Definition: CbmMuchDigitizerQa.h:166
CbmMuchDigitizerQa::fDigiManager
CbmDigiManager * fDigiManager
Definition: CbmMuchDigitizerQa.h:116
CbmMuchGeoScheme
Definition: CbmMuchGeoScheme.h:43
CbmMuchPoint
Definition: CbmMuchPoint.h:21
CbmMuchStation
Definition: CbmMuchStation.h:22
CbmMuchDigitizerQa::fhTrackLengthEl
TH1F * fhTrackLengthEl
Definition: CbmMuchDigitizerQa.h:141
CbmQaCanvas::Divide2D
void Divide2D(int nPads)
Divide canvas into nPads in 2D in a nice way.
Definition: CbmQaCanvas.cxx:29
CbmMatch::GetLink
const CbmLink & GetLink(Int_t i) const
Definition: CbmMatch.h:35
CbmMuchDigitizerQa::fNall
Int_t * fNall
Definition: CbmMuchDigitizerQa.h:177
CbmMuchPointInfo::GetNPads
Int_t GetNPads()
Definition: CbmMuchPointInfo.h:41
CbmMatch::GetNofLinks
Int_t GetNofLinks() const
Definition: CbmMatch.h:38
CbmMuchDigitizerQa::fOutFolder
TFolder fOutFolder
temporary additional information
Definition: CbmMuchDigitizerQa.h:125
CbmMuchDigitizerQa
Definition: CbmMuchDigitizerQa.h:58
CbmMuchDigitizerQa::MPV_n_e
static Double_t MPV_n_e(Double_t Tkin, Double_t mass)
Definition: CbmMuchDigitizerQa.cxx:980
CbmMuchDigitizerQa::SetParContainers
virtual void SetParContainers()
Definition: CbmMuchDigitizerQa.cxx:451
CbmMuchDigitizerQa::DrawCanvases
void DrawCanvases()
Definition: CbmMuchDigitizerQa.cxx:529
CbmMuchDigitizerQa::OutputNvsS
void OutputNvsS()
Definition: CbmMuchDigitizerQa.cxx:637
CbmMuchPointInfo::AddArea
void AddArea(Double_t s)
Definition: CbmMuchPointInfo.h:28
sqrt
friend F32vec4 sqrt(const F32vec4 &a)
Definition: L1/vectors/P4_F32vec4.h:41
CbmDigiManager::Init
InitStatus Init()
Initialisation.
Definition: CbmDigiManager.cxx:71
CbmMuchModuleGem::GetPads
std::vector< CbmMuchPad * > GetPads()
Definition: CbmMuchModuleGem.cxx:41
CbmMuchDigitizerQa::PrintFrontLayerDigis
void PrintFrontLayerDigis()
Definition: CbmMuchDigitizerQa.cxx:509
CbmMuchDigitizerQa::FillDigitizerPerformancePlots
void FillDigitizerPerformancePlots()
Definition: CbmMuchDigitizerQa.cxx:838
CbmMuchDigitizerQa::fhTrackLengthPr
TH1F * fhTrackLengthPr
Definition: CbmMuchDigitizerQa.h:140
CbmMuchPad::GetY
Double_t GetY() const
Definition: CbmMuchPad.h:29
CbmMuchDigi::GetAdc
UShort_t GetAdc() const
Definition: CbmMuchDigi.h:74
CbmMCTrack::GetPdgCode
Int_t GetPdgCode() const
Definition: CbmMCTrack.h:70
i
int i
Definition: L1/vectors/P4_F32vec4.h:25
mpv_p
constexpr double mpv_p[]
Definition: CbmMuchRecoDefs.h:27
CbmMuchDigitizerQa::GetNSectors
Int_t GetNSectors(Int_t iStation)
Definition: CbmMuchDigitizerQa.cxx:926
CbmMuchDigitizerQa::GetMaxPadSize
TVector2 GetMaxPadSize(Int_t iStation)
Definition: CbmMuchDigitizerQa.cxx:960
CbmMuchDigitizerQa::fhMcPointChargeVsTrackLength
TH2F * fhMcPointChargeVsTrackLength
Definition: CbmMuchDigitizerQa.h:147
CbmMuchPad::GetDy
Double_t GetDy() const
Definition: CbmMuchPad.h:31
CbmMuchDigitizerQa::FillChargePerPoint
void FillChargePerPoint()
Definition: CbmMuchDigitizerQa.cxx:804
CbmMuchPointInfo::GetStationId
Int_t GetStationId()
Definition: CbmMuchPointInfo.h:39
CbmDigiManager::GetNofDigis
static Int_t GetNofDigis(ECbmModuleId systemId)
Definition: CbmDigiManager.cxx:62
CbmMuchDigitizerQa::fPadMinLx
Double_t fPadMinLx
Definition: CbmMuchDigitizerQa.h:191
CbmMuchDigitizerQa::InitChannelPadInfo
void InitChannelPadInfo()
Definition: CbmMuchDigitizerQa.cxx:115
CbmMuchDigitizerQa::fPadMaxLx
Double_t fPadMaxLx
Definition: CbmMuchDigitizerQa.h:193
CbmMuchDigitizerQa::fMCTracks
TClonesArray * fMCTracks
Definition: CbmMuchDigitizerQa.h:122
BINNING_ENERGY_LOG
#define BINNING_ENERGY_LOG
Definition: CbmMuchDigitizerQa.cxx:18
CbmMuchDigitizerQa::UpdateParticleCounters
void UpdateParticleCounters(Int_t stId, Int_t pdgCode, Int_t motherId)
Definition: CbmMuchDigitizerQa.cxx:782
CbmMuchDigitizerQa::fPointsUnderCounted
Int_t fPointsUnderCounted
Definition: CbmMuchDigitizerQa.h:188
CbmMuchDigitizerQa::fNevents
Int_t fNevents
output folder with histos and canvases
Definition: CbmMuchDigitizerQa.h:126
CbmMuchDigitizerQa::fhMcPointChargeVsTrackLengthEl
TH2F * fhMcPointChargeVsTrackLengthEl
Definition: CbmMuchDigitizerQa.h:150
CbmMuchPad::GetDx
Double_t GetDx() const
Definition: CbmMuchPad.h:30
CbmMuchPointInfo
Definition: CbmMuchPointInfo.h:11
CbmDigiManager::Instance
static CbmDigiManager * Instance()
Static instance.
Definition: CbmDigiManager.h:93
min
friend F32vec4 min(const F32vec4 &a, const F32vec4 &b)
Definition: L1/vectors/P4_F32vec4.h:33
CbmMuchPoint::GetYOut
Double_t GetYOut() const
Definition: CbmMuchPoint.h:74
CbmMuchPointInfo::GetCharge
Int_t GetCharge()
Definition: CbmMuchPointInfo.h:38
CbmMuchDigitizerQa::fCanvChargeVsLength
CbmQaCanvas * fCanvChargeVsLength
Definition: CbmMuchDigitizerQa.h:162
min_logT_p
constexpr double min_logT_p
Definition: CbmMuchRecoDefs.h:31
CbmMuchDigitizerQa::PrintFrontLayerPoints
void PrintFrontLayerPoints()
Definition: CbmMuchDigitizerQa.cxx:491
CbmMuchDigitizerQa::fCanvPadsTotalR
CbmQaCanvas * fCanvPadsTotalR
Definition: CbmMuchDigitizerQa.h:167
CbmMuchDigitizerQa::fGeoScheme
CbmMuchGeoScheme * fGeoScheme
Definition: CbmMuchDigitizerQa.h:114
CbmMuchDigitizerQa::GetMinPadSize
TVector2 GetMinPadSize(Int_t iStation)
Definition: CbmMuchDigitizerQa.cxx:940
CbmMuchDigitizerQa::FillTotalPadsHistos
void FillTotalPadsHistos()
Definition: CbmMuchDigitizerQa.cxx:398
CbmMuchGeoScheme::GetNStations
Int_t GetNStations() const
Definition: CbmMuchGeoScheme.h:79
CbmMuchDigitizerQa::fhMcPointCharge
TH1F * fhMcPointCharge
Definition: CbmMuchDigitizerQa.h:133
min_logT_mu
constexpr double min_logT_mu
Definition: CbmMuchRecoDefs.h:30
CbmMuchPointInfo::GetLength
Double_t GetLength()
Definition: CbmMuchPointInfo.h:35
CbmMuchModuleGem::GetNPads
Int_t GetNPads()
Definition: CbmMuchModuleGem.cxx:58
BINNING_CHARGE
#define BINNING_CHARGE
Definition: CbmMuchDigitizerQa.cxx:15
CbmMuchDigitizerQa::fNka
Int_t * fNka
Definition: CbmMuchDigitizerQa.h:182
CbmMuchPoint::PositionIn
void PositionIn(TVector3 &pos) const
Definition: CbmMuchPoint.h:79
CbmMuchDigitizerQa::InitCounters
void InitCounters()
Definition: CbmMuchDigitizerQa.cxx:89
CbmDigiManager::Get
const Digi * Get(Int_t index) const
Get a digi object.
Definition: CbmDigiManager.h:52
CbmMuchStation::GetRmax
Double_t GetRmax() const
Definition: CbmMuchStation.h:52
CbmMuchDigitizerQa::fvUsPadsFiredXY
std::vector< TH2F * > fvUsPadsFiredXY
Definition: CbmMuchDigitizerQa.h:130
CbmMuchDigitizerQa::fNpr
Int_t * fNpr
Definition: CbmMuchDigitizerQa.h:178
CbmMuchDigitizerQa::fFitEl
TF1 * fFitEl
Definition: CbmMuchDigitizerQa.h:169
CbmMuchDigitizerQa::Exec
virtual void Exec(Option_t *option)
Definition: CbmMuchDigitizerQa.cxx:473
CbmMuchDigitizerQa::fhMcPointChargeVsTrackLengthPi
TH2F * fhMcPointChargeVsTrackLengthPi
Definition: CbmMuchDigitizerQa.h:148
CbmMuchPad::GetAddress
Int_t GetAddress() const
Definition: CbmMuchPad.h:27
CbmMuchDigitizerQa::fPoints
TClonesArray * fPoints
Definition: CbmMuchDigitizerQa.h:119
CbmMuchDigitizerQa::fhMcPointChargeVsTrackEnergyLog
TH2F * fhMcPointChargeVsTrackEnergyLog
Definition: CbmMuchDigitizerQa.h:143
min_logT_e
constexpr double min_logT_e
Definition: CbmMuchRecoDefs.h:29
CbmMuchPointInfo::Print
void Print(Option_t *="") const
Definition: CbmMuchPointInfo.cxx:44
log
friend F32vec4 log(const F32vec4 &a)
Definition: L1/vectors/P4_F32vec4.h:135
CbmMuchModuleGem
Definition: CbmMuchModuleGem.h:24
CbmMuchDigitizerQa::InitCanvases
void InitCanvases()
Definition: CbmMuchDigitizerQa.cxx:162
CbmMuchDigitizerQa::fNpi
Int_t * fNpi
Definition: CbmMuchDigitizerQa.h:179
CbmDigiManager::GetMatch
const CbmMatch * GetMatch(ECbmModuleId systemId, UInt_t index) const
Get a match object.
Definition: CbmDigiManager.cxx:54
CbmMuchDigitizerQa::fCanvUsPadsFiredXY
CbmQaCanvas * fCanvUsPadsFiredXY
Definition: CbmMuchDigitizerQa.h:165
CbmMuchDigitizerQa::fPointsTotal
Int_t fPointsTotal
Definition: CbmMuchDigitizerQa.h:187
CbmMuchDigitizerQa::DivideCanvas2D
static void DivideCanvas2D(TCanvas *c, int nPads)
Definition: CbmMuchDigitizerQa.cxx:1001
CbmMuchDigitizerQa::fhTrackLengthPi
TH1F * fhTrackLengthPi
Definition: CbmMuchDigitizerQa.h:139
CbmMuchPoint::PositionOut
void PositionOut(TVector3 &pos) const
Definition: CbmMuchPoint.h:80
CbmMuchPoint::GetZIn
Double_t GetZIn() const
Definition: CbmMuchPoint.h:72
CbmMuchDigi::GetAddress
virtual Int_t GetAddress() const
Definition: CbmMuchDigi.h:77
ClassImp
ClassImp(CbmConverterManager) InitStatus CbmConverterManager
Definition: CbmConverterManager.cxx:12
CbmDigiManager
CbmDigiManager.
Definition: CbmDigiManager.h:37
CbmMuchDigitizerQa::fhMcPointChargeVsTrackEnergyLogEl
TH2F * fhMcPointChargeVsTrackEnergyLogEl
Definition: CbmMuchDigitizerQa.h:146
mpv_e
constexpr double mpv_e[]
Definition: CbmMuchRecoDefs.h:23
BINNING_CHARGE_LOG
#define BINNING_CHARGE_LOG
Definition: CbmMuchDigitizerQa.cxx:17
CbmMuchDigitizerQa::fhMcPointChargeLog
TH1F * fhMcPointChargeLog
MC point charge.
Definition: CbmMuchDigitizerQa.h:134
CbmMuchDigitizerQa::histFolder
TFolder * histFolder
Definition: CbmMuchDigitizerQa.h:91
CbmMuchDigitizerQa::DeInit
void DeInit()
Definition: CbmMuchDigitizerQa.cxx:40
CbmMuchDigitizerQa::InitFits
void InitFits()
Definition: CbmMuchDigitizerQa.cxx:430
CbmMuchDigitizerQa::LandauMPV
static Double_t LandauMPV(Double_t *x, Double_t *par)
Definition: CbmMuchDigitizerQa.cxx:716
CbmMuchModule
Definition: CbmMuchModule.h:24
CbmMuchAddress::GetLayerIndex
static Int_t GetLayerIndex(Int_t address)
Definition: CbmMuchAddress.h:106
CbmMuchDigitizerQa::fFitPi
TF1 * fFitPi
Definition: CbmMuchDigitizerQa.h:170
CbmMuchAddress::GetStationIndex
static Int_t GetStationIndex(Int_t address)
Definition: CbmMuchAddress.h:103
CbmMuchDigitizerQa::fvPadsFiredR
std::vector< TH1F * > fvPadsFiredR
Definition: CbmMuchDigitizerQa.h:155
CbmMuchDigitizerQa::fvPadsTotalR
std::vector< TH1F * > fvPadsTotalR
Definition: CbmMuchDigitizerQa.h:154
CbmMuchDigitizerQa::fhMcPointChargeVsTrackEnergyLogPi
TH2F * fhMcPointChargeVsTrackEnergyLogPi
Definition: CbmMuchDigitizerQa.h:144
CbmQaCanvas
Definition: CbmQaCanvas.h:27
CbmMuchDigitizerQa::fNstations
Int_t fNstations
Definition: CbmMuchDigitizerQa.h:115
CbmMuchDigitizerQa::fNmu
Int_t * fNmu
Definition: CbmMuchDigitizerQa.h:181
CbmMuchDigi
Definition: CbmMuchDigi.h:31
CbmMuchModule::GetDetectorType
Int_t GetDetectorType() const
Definition: CbmMuchModule.h:52
CbmMuchDigitizerQa::fFitPr
TF1 * fFitPr
Definition: CbmMuchDigitizerQa.h:171
CbmMuchPad
Definition: CbmMuchPad.h:21
CbmMuchDigitizerQa::InitChargeHistos
void InitChargeHistos()
Definition: CbmMuchDigitizerQa.cxx:214
CbmMuchDigitizerQa::Init
virtual InitStatus Init()
Definition: CbmMuchDigitizerQa.cxx:61
CbmMuchDigitizerQa::fvUsPadsFiredR
std::vector< TH1F * > fvUsPadsFiredR
number of processed events
Definition: CbmMuchDigitizerQa.h:129
mpv_mu
constexpr double mpv_mu[]
Definition: CbmMuchRecoDefs.h:25
CbmMuchDigitizerQa::fPointsOverCounted
Int_t fPointsOverCounted
Definition: CbmMuchDigitizerQa.h:189
CbmMuchDigitizerQa::~CbmMuchDigitizerQa
virtual ~CbmMuchDigitizerQa()
Definition: CbmMuchDigitizerQa.cxx:37
CbmMuchDigitizerQa::fPadMinLy
Double_t fPadMinLy
Definition: CbmMuchDigitizerQa.h:192
CbmMuchPointInfo::GetKine
Double_t GetKine()
Definition: CbmMuchPointInfo.h:34
BINNING_ENERGY_LOG_EL
#define BINNING_ENERGY_LOG_EL
Definition: CbmMuchDigitizerQa.cxx:19
CbmMuchDigitizerQa::fCanvTrackLength
CbmQaCanvas * fCanvTrackLength
Definition: CbmMuchDigitizerQa.h:163
CbmMCTrack
Definition: CbmMCTrack.h:34
CbmMuchPoint::GetYIn
Double_t GetYIn() const
Definition: CbmMuchPoint.h:71
x
Double_t x
Definition: CbmMvdSensorDigiToHitTask.cxx:68
CbmMuchDigitizerQa::PrintCounters
void PrintCounters()
Definition: CbmMuchDigitizerQa.cxx:671
CbmMuchPoint::GetXIn
Double_t GetXIn() const
Definition: CbmMuchPoint.h:70
CbmMuchDigitizerQa::fNprimary
Int_t * fNprimary
Definition: CbmMuchDigitizerQa.h:183
CbmMuchPad::GetX
Double_t GetX() const
Definition: CbmMuchPad.h:28
CbmMuchGeoScheme::GetStation
CbmMuchStation * GetStation(Int_t iStation) const
Definition: CbmMuchGeoScheme.cxx:209
CbmMuchDigitizerQa::DigitizerQa
void DigitizerQa()
Definition: CbmMuchDigitizerQa.cxx:727
CbmMuchDigitizerQa::fNel
Int_t * fNel
Definition: CbmMuchDigitizerQa.h:180
CbmMuchPointInfo::AddCharge
void AddCharge(Int_t charge)
Definition: CbmMuchPointInfo.h:27
ECbmModuleId::kMuch
@ kMuch
Muon detection system.
CbmMuchGeoScheme::GetModules
std::vector< CbmMuchModule * > GetModules() const
Definition: CbmMuchGeoScheme.cxx:852
CbmMuchDigitizerQa::FinishTask
virtual void FinishTask()
Definition: CbmMuchDigitizerQa.cxx:610
CbmMuchDigitizerQa::fhNpadsVsS
TH2F * fhNpadsVsS
Definition: CbmMuchDigitizerQa.h:151
CbmMuchDigitizerQa::fPointInfos
TClonesArray * fPointInfos
Definition: CbmMuchDigitizerQa.h:123
max
friend F32vec4 max(const F32vec4 &a, const F32vec4 &b)
Definition: L1/vectors/P4_F32vec4.h:36
CbmMuchDigitizerQa::fhTrackLength
TH1F * fhTrackLength
MC point charge for selected protons.
Definition: CbmMuchDigitizerQa.h:138
CbmMuchDigitizerQa::fCanvStationCharge
CbmQaCanvas * fCanvStationCharge
Definition: CbmMuchDigitizerQa.h:160
CbmMuchStation::GetRmin
Double_t GetRmin() const
Definition: CbmMuchStation.h:51
CbmMuchDigitizerQa::fNsecondary
Int_t * fNsecondary
Definition: CbmMuchDigitizerQa.h:184
CbmMuchGeoScheme::GetModuleByDetId
CbmMuchModule * GetModuleByDetId(Int_t detId) const
Definition: CbmMuchGeoScheme.cxx:278
CbmMuchModuleGem::GetPad
CbmMuchPad * GetPad(Int_t address)
Definition: CbmMuchModuleGem.cxx:79
CbmMuchPointInfo::GetPdgCode
Int_t GetPdgCode()
Definition: CbmMuchPointInfo.h:36
CbmMuchDigitizerQa::GetNChannels
Int_t GetNChannels(Int_t iStation)
Definition: CbmMuchDigitizerQa.cxx:912
CbmMuchDigitizerQa::CbmMuchDigitizerQa
CbmMuchDigitizerQa(const char *name="MuchHitFinderQa", Int_t verbose=1)
Definition: CbmMuchDigitizerQa.cxx:22
BINNING_LENGTH
#define BINNING_LENGTH
Definition: CbmMuchDigitizerQa.cxx:16
CbmMuchDigitizerQa::InitLengthHistos
void InitLengthHistos()
Definition: CbmMuchDigitizerQa.cxx:297
CbmMuchDigitizerQa::fhMcPointChargeVsTrackEnergyLogPr
TH2F * fhMcPointChargeVsTrackEnergyLogPr
Definition: CbmMuchDigitizerQa.h:145
CbmMuchDigitizerQa::fhMcPointChargeVsTrackLengthPr
TH2F * fhMcPointChargeVsTrackLengthPr
Definition: CbmMuchDigitizerQa.h:149
CbmMuchDigitizerQa::fPadMaxLy
Double_t fPadMaxLy
Definition: CbmMuchDigitizerQa.h:194
CbmMuchModuleGem::GetNSectors
Int_t GetNSectors() const
Definition: CbmMuchModuleGem.h:57
CbmMuchDigitizerQa::fCanvCharge
CbmQaCanvas * fCanvCharge
Definition: CbmMuchDigitizerQa.h:159
CbmMuchDigitizerQa::fCanvChargeVsEnergy
CbmQaCanvas * fCanvChargeVsEnergy
Definition: CbmMuchDigitizerQa.h:161
CbmMuchPointInfo::GetArea
Double_t GetArea()
Definition: CbmMuchPointInfo.h:40
CbmMuchDigitizerQa::fhMcPointChargePr_1GeV_3mm
TH1F * fhMcPointChargePr_1GeV_3mm
MC point charge log scale.
Definition: CbmMuchDigitizerQa.h:135