CbmRoot
CbmRichGeoTestOpt.cxx
Go to the documentation of this file.
1 
6 #include "CbmRichGeoTestOpt.h"
7 
8 #include "CbmDrawHist.h"
9 #include "utils/CbmUtils.h"
10 
11 #include "TBox.h"
12 #include "TFile.h"
13 #include "TLine.h"
14 #include "TStyle.h"
15 #include "TText.h"
16 #include <iostream>
17 #include <utility>
18 
19 using namespace std;
20 
22  : fReferenceInd(-1), fDrawReference(false), fHM(nullptr), fOutputDir("") {}
23 
25 
26 void CbmRichGeoTestOpt::SetFilePathes(vector<string> geoTestBoxPathes,
27  vector<string> geoTestOmega3Pathes,
28  vector<string> geoTestOmega8Pathes,
29  vector<string> urqmdTestPathes,
30  vector<string> recoQaBoxPathes,
31  vector<string> recoQaUrqmdPathes) {
32  fGeoTestBoxPathes = geoTestBoxPathes;
33  fGeoTestOmega3Pathes = geoTestOmega3Pathes;
34  fGeoTestOmega8Pathes = geoTestOmega8Pathes;
35  fUrqmdTestPathes = urqmdTestPathes;
36  fRecoQaBoxPathes = recoQaBoxPathes;
37  fRecoQaUrqmdPathes = recoQaUrqmdPathes;
38 }
39 
41 
43  int iFile) {
44  string path = "";
45  if (fileEnum == kGeoTestBoxFile) path = fGeoTestBoxPathes[iFile];
46  if (fileEnum == kGeoTestOmega3File) path = fGeoTestOmega3Pathes[iFile];
47  if (fileEnum == kGeoTestOmega8File) path = fGeoTestOmega8Pathes[iFile];
48  if (fileEnum == kUrqmdTestFile) path = fUrqmdTestPathes[iFile];
49  if (fileEnum == kRecoQaBoxFile) path = fRecoQaBoxPathes[iFile];
50  if (fileEnum == kRecoQaUrqmdFile) path = fRecoQaUrqmdPathes[iFile];
51 
52  return path;
53 }
54 
56  string path = "";
57  if (fileEnum == kGeoTestBoxFile) return "kGeoTestBoxFile";
58  if (fileEnum == kGeoTestOmega3File) return "kGeoTestOmega3File";
59  if (fileEnum == kGeoTestOmega8File) return "kGeoTestOmega8File";
60  if (fileEnum == kUrqmdTestFile) return "kUrqmdTestFile";
61  if (fileEnum == kRecoQaBoxFile) return "kRecoQaBoxFile";
62  if (fileEnum == kRecoQaUrqmdFile) return "kRecoQaUrqmdFile";
63 
64  return path;
65 }
66 
67 pair<double, double>
69  int iFile,
70  const string& histName) {
71  string path = GetFilePath(fileEnum, iFile);
72  if (path == "") return make_pair(0., 0.);
73  TFile* file = new TFile(path.c_str(), "READ");
74  if (file == nullptr) return make_pair(0., 0.);
75  TH1D* hist = (TH1D*) file->Get(histName.c_str());
76  if (hist == nullptr) return make_pair(0., 0.);
77  double mean = hist->GetMean();
78  double rms = hist->GetRMS();
79  file->Close();
80  delete file;
81  return make_pair(mean, rms);
82 }
83 
84 pair<double, double>
86  int iFile,
87  const string& histName) {
88  string path = GetFilePath(fileEnum, iFile);
89  if (path == "") return make_pair(0., 0.);
90  TFile* file = new TFile(path.c_str(), "READ");
91  if (file == nullptr) return make_pair(0., 0.);
92  TH2D* hist = (TH2D*) file->Get(histName.c_str());
93  if (hist == nullptr) return make_pair(0., 0.);
94  TH1D* py = hist->ProjectionY((histName + to_string(iFile) + "_py").c_str());
95  double mean = py->GetMean();
96  double rms = py->GetRMS();
97  file->Close();
98  delete file;
99  return make_pair(mean, rms);
100 }
101 
103  int iFile,
104  const string& histName) {
105  string path = GetFilePath(fileEnum, iFile);
106  if (path == "") return 0.;
107  TFile* file = new TFile(path.c_str(), "READ");
108  if (file == nullptr) return 0.;
109  TH1* hist = (TH1*) file->Get(histName.c_str());
110  if (hist == nullptr) return 0.;
111  double entries = hist->GetEntries(); //hist->Integral();
112  file->Close();
113  delete file;
114  return entries;
115 }
116 
117 
119  const string& histName,
120  CbmRichGeoTestOptHistEnum histEnum,
121  const string& titleY,
122  double minY,
123  double maxY,
124  int nofParts,
125  int nofFilesPart) {
126  string canvasName = "richgeoopt_sim_" + GetFileEnumName(fileEnum) + "_"
127  + histName + to_string(nofParts);
128  fHM->CreateCanvas(canvasName, canvasName, 900, 600);
129  vector<TH1*> hists;
130  vector<string> legend;
131  double refValue = 0.;
132  for (int iP = 0; iP < nofParts; iP++) {
133  string histNameInd = GetFileEnumName(fileEnum) + "_sim_" + histName + "_"
134  + to_string(nofParts) + "_" + to_string(iP);
135  fHM->Create1<TH1D>(histNameInd,
136  histNameInd + ";Geometry;" + titleY,
137  nofFilesPart,
138  .5,
139  nofFilesPart + .5);
140  for (int iF = 0; iF < nofFilesPart; iF++) {
141  double value = 0.;
142  int ind = iP * nofFilesPart + iF;
143  if (histEnum == kH1MeanHist)
144  value = H1MeanRms(fileEnum, ind, histName).first;
145  else if (histEnum == kH1RmsHist)
146  value = H1MeanRms(fileEnum, ind, histName).second;
147  else if (histEnum == kH2MeanHist)
148  value = H2ProjYMeanRms(fileEnum, ind, histName).first;
149  else if (histEnum == kH2RmsHist)
150  value = H2ProjYMeanRms(fileEnum, ind, histName).second;
151  else if (histEnum == kHEntriesHist)
152  value =
153  HEntries(fileEnum, ind, histName) / 1000.; // TODO: get nof events
154 
155  if (ind + 1 == fReferenceInd) refValue = value;
156  fHM->H1(histNameInd)->SetBinContent(iF + 1, value);
157  }
158  hists.push_back(fHM->H1(histNameInd));
159  legend.push_back(to_string(iP));
160  }
161 
162  DrawManyH1(hists, legend, minY, maxY);
163  DrawReferenceLineH1(refValue);
164 }
165 
166 
168  const string& histName1,
169  const string& histName2,
170  const string& titleY,
171  double minY,
172  double maxY,
173  int nofParts,
174  int nofFilesPart,
175  double effCoeff) {
176  string canvasName = "richgeoopt_sim_" + GetFileEnumName(fileEnum) + "_"
177  + histName1 + "_" + histName2 + to_string(nofParts);
178  fHM->CreateCanvas(canvasName, canvasName, 900, 600);
179  vector<TH1*> hists;
180  vector<string> legend;
181  double refValue = 0.;
182  for (int iP = 0; iP < nofParts; iP++) {
183  string histEffName = GetFileEnumName(fileEnum) + "_sim_" + histName1 + "_"
184  + histName2 + "_" + to_string(nofParts) + "_"
185  + to_string(iP);
186  //int nofFilesPart = (GetNofFiles() / nofParts) + 1;
187  fHM->Create1<TH1D>(histEffName,
188  histEffName + ";Geometry;" + titleY,
189  nofFilesPart,
190  .5,
191  nofFilesPart + .5);
192  for (int iF = 0; iF < nofFilesPart; iF++) {
193  int ind = iP * nofFilesPart + iF;
194  double entries1 = HEntries(fileEnum, ind, histName1);
195  double entries2 = HEntries(fileEnum, ind, histName2);
196  double value = (entries2 != 0) ? effCoeff * entries1 / entries2 : 0.;
197  if (ind + 1 == fReferenceInd) refValue = value;
198  fHM->H1(histEffName)->SetBinContent(iF + 1, value);
199  }
200  hists.push_back(fHM->H1(histEffName));
201  legend.push_back(to_string(iP));
202  }
203  DrawManyH1(hists, legend, minY, maxY);
204  DrawReferenceLineH1(refValue);
205 }
206 
208  const string& histName,
209  CbmRichGeoTestOptHistEnum histEnum,
210  const string& titleZ,
211  double minZ,
212  double maxZ,
213  int precision) {
214  string canvasName =
215  "richgeoopt_sim_" + GetFileEnumName(fileEnum) + "_" + histName + "_2d";
216  TCanvas* c = fHM->CreateCanvas(canvasName, canvasName, 2000, 1000);
217  c->Divide(4, 2);
218  vector<string> camTilt = {
219  "0 deg", "3 deg", "6 deg", "9 deg", "12 deg", "15 deg", "18 deg", "21 deg"};
220  int nofParts = camTilt.size();
221  int nofFilesPart = GetNofFiles() / nofParts;
222  int nofX = 9;
223  int nofY = 9;
224  double shift = 0.5 * 200. / 10.;
225  double refBinCenterX = -1., refBinCenterY = -1.;
226  double refBinWidthX = -1., refBinWidthY = -1.;
227  for (int iP = 0; iP < nofParts; iP++) {
228  string histNameInd = GetFileEnumName(fileEnum) + "_sim_" + histName + "_"
229  + to_string(iP) + "_2d";
230  fHM->Create2<TH2D>(histNameInd,
231  histNameInd + ";Shift CamY [mm];Shift CamZ [mm];"
232  + titleZ,
233  nofX,
234  -100. - shift,
235  100 + shift,
236  nofY,
237  -100. - shift,
238  100 + shift);
239  for (int iX = 0; iX < nofX; iX++) {
240  for (int iY = 0; iY < nofY; iY++) {
241  double value = 0.;
242  int ind = iP * nofFilesPart + iX * nofX + iY;
243  //cout << iP << " " << iX << " " << iY << " " << ind << endl;
244  if (histEnum == kH1MeanHist)
245  value = H1MeanRms(fileEnum, ind, histName).first;
246  else if (histEnum == kH1RmsHist)
247  value = H1MeanRms(fileEnum, ind, histName).second;
248  else if (histEnum == kH2MeanHist)
249  value = H2ProjYMeanRms(fileEnum, ind, histName).first;
250  else if (histEnum == kH2RmsHist)
251  value = H2ProjYMeanRms(fileEnum, ind, histName).second;
252  else if (histEnum == kHEntriesHist)
253  value =
254  HEntries(fileEnum, ind, histName) / 1000.; // TODO: get nof events
255  if (ind + 1 == fReferenceInd) {
256  refBinCenterX =
257  fHM->H2(histNameInd)->GetXaxis()->GetBinCenter(iX + 1);
258  refBinCenterY =
259  fHM->H2(histNameInd)->GetYaxis()->GetBinCenter(iY + 1);
260  refBinWidthX = fHM->H2(histNameInd)->GetXaxis()->GetBinWidth(iX + 1);
261  refBinWidthY = fHM->H2(histNameInd)->GetYaxis()->GetBinWidth(iY + 1);
262  }
263  fHM->H2(histNameInd)->SetBinContent(iX + 1, iY + 1, value);
264  }
265  }
266  c->cd(iP + 1);
267  DrawH2(fHM->H2(histNameInd), kLinear, kLinear, kLinear, "COLZ");
268  DrawTextLabelsH2(fHM->H2(histNameInd), precision);
269  fHM->H2(histNameInd)->GetZaxis()->SetRangeUser(minZ, maxZ);
270  fHM->H2(histNameInd)->SetMarkerSize(1.2);
271  DrawTextOnPad(camTilt[iP], 0.1, 0.9, 0.9, 0.99);
272  if (refBinWidthX > 0. && refBinWidthY > 0.) {
274  refBinCenterX, refBinCenterY, refBinWidthX, refBinWidthY);
275  refBinWidthX = -1.;
276  refBinWidthY = -1.;
277  }
278  }
279 }
280 
282  const string& histName1,
283  const string& histName2,
284  const string& titleZ,
285  double minZ,
286  double maxZ,
287  double effCoeff,
288  int precision) {
289  string canvasName = "richgeoopt_sim_" + GetFileEnumName(fileEnum) + "_"
290  + histName1 + "_" + histName2 + "_2d";
291  TCanvas* c = fHM->CreateCanvas(canvasName, canvasName, 2000, 1000);
292  c->Divide(4, 2);
293  vector<string> camTilt = {
294  "0 deg", "3 deg", "6 deg", "9 deg", "12 deg", "15 deg", "18 deg", "21 deg"};
295  int nofParts = camTilt.size();
296  int nofFilesPart = GetNofFiles() / nofParts;
297  int nofX = 9;
298  int nofY = 9;
299  double shift = 0.5 * 200. / 10.;
300  double refBinCenterX = -1., refBinCenterY = -1.;
301  double refBinWidthX = -1., refBinWidthY = -1.;
302  for (int iP = 0; iP < nofParts; iP++) {
303  string histNameInd = GetFileEnumName(fileEnum) + "_sim_" + histName1 + "_"
304  + histName2 + "_" + to_string(iP) + "_2d";
305  fHM->Create2<TH2D>(histNameInd,
306  histNameInd + ";Shift CamY [mm];Shift CamZ [mm];"
307  + titleZ,
308  nofX,
309  -100. - shift,
310  100 + shift,
311  nofY,
312  -100. - shift,
313  100 + shift);
314  for (int iX = 0; iX < nofX; iX++) {
315  for (int iY = 0; iY < nofY; iY++) {
316  int ind = iP * nofFilesPart + iX * nofX + iY;
317  //cout << iP << " " << iX << " " << iY << " " << ind << endl;
318  double entries1 = HEntries(fileEnum, ind, histName1);
319  double entries2 = HEntries(fileEnum, ind, histName2);
320  double value = (entries2 != 0) ? effCoeff * entries1 / entries2 : 0.;
321  if (ind + 1 == fReferenceInd) {
322  refBinCenterX =
323  fHM->H2(histNameInd)->GetXaxis()->GetBinCenter(iX + 1);
324  refBinCenterY =
325  fHM->H2(histNameInd)->GetYaxis()->GetBinCenter(iY + 1);
326  refBinWidthX = fHM->H2(histNameInd)->GetXaxis()->GetBinWidth(iX + 1);
327  refBinWidthY = fHM->H2(histNameInd)->GetYaxis()->GetBinWidth(iY + 1);
328  }
329  fHM->H2(histNameInd)->SetBinContent(iX + 1, iY + 1, value);
330  }
331  }
332  c->cd(iP + 1);
333  DrawH2(fHM->H2(histNameInd), kLinear, kLinear, kLinear, "COLZ");
334  DrawTextLabelsH2(fHM->H2(histNameInd), precision);
335  fHM->H2(histNameInd)->SetMarkerSize(1.2);
336  fHM->H2(histNameInd)->GetZaxis()->SetRangeUser(minZ, maxZ);
337  DrawTextOnPad(camTilt[iP], 0.1, 0.9, 0.9, 0.99);
338  if (refBinWidthX > 0. && refBinWidthY > 0.) {
340  refBinCenterX, refBinCenterY, refBinWidthX, refBinWidthY);
341  refBinWidthX = -1.;
342  refBinWidthY = -1.;
343  }
344  }
345 }
346 
347 void CbmRichGeoTestOpt::DrawTextLabelsH2(TH2* h, int precision) {
348  for (int i = 1; i <= h->GetNbinsX(); i++) {
349  for (int j = 1; j <= h->GetNbinsY(); j++) {
350  auto t = new TText(
351  h->GetXaxis()->GetBinCenter(i),
352  h->GetYaxis()->GetBinCenter(j),
353  Cbm::NumberToString(h->GetBinContent(i, j), precision).c_str());
354  t->SetTextAlign(22);
355  t->SetTextFont(43);
356  t->SetTextSize(12);
357  t->SetTextColor(kBlack);
358  t->Draw();
359  }
360  }
361 }
362 
363 void CbmRichGeoTestOpt::DrawManyH1(const vector<TH1*>& hist,
364  const vector<string>& legend,
365  double minY,
366  double maxY) {
367  vector<string> camTilt = {
368  "0 deg", "3 deg", "6 deg", "9 deg", "12 deg", "15 deg", "18 deg", "21 deg"};
369  bool drawLegend = (hist.size() == 1) ? false : true;
370  DrawH1(hist,
371  (hist.size() == camTilt.size()) ? camTilt : legend,
372  kLinear,
373  kLinear,
374  drawLegend,
375  0.9,
376  0.75,
377  0.99,
378  0.99);
379  gPad->SetLeftMargin(0.1);
380  gPad->SetRightMargin(0.01);
381  hist[0]->GetYaxis()->SetTitleOffset(0.8);
382  hist[0]->GetYaxis()->SetRangeUser(minY, maxY);
383  DrawLines(false, true, minY, maxY);
384 }
385 
386 void CbmRichGeoTestOpt::DrawLines(bool drawCamTilt,
387  bool drawCamY,
388  double minY,
389  double maxY) {
390  double nMinY = minY + 0.8 * (maxY - minY);
391  double nMaxY = maxY;
392  // cam Y
393  if (drawCamY) {
394  for (int i = 1; i <= 72; i++) {
395  TLine* line = new TLine(i * 9 + .5, nMinY, i * 9 + .5, nMaxY);
396  line->SetLineColor(kGreen + 2);
397  line->SetLineWidth(2);
398  line->Draw();
399  }
400  }
401 
402  // cam Tilt
403  if (drawCamTilt) {
404  for (int i = 1; i <= 8; i++) {
405  TLine* line = new TLine(i * 81 + .5, nMinY, i * 81 + .5, nMaxY);
406  line->SetLineColor(kBlue + 2);
407  line->SetLineWidth(2);
408  line->Draw();
409  }
410  }
411 }
412 
414  if (!fDrawReference) return;
415 
416  TLine* line = new TLine(0., value, 1e5, value);
417  line->SetLineColor(kGreen + 4);
418  line->SetLineWidth(1);
419  line->Draw();
420 }
421 
423  double centerY,
424  double widthX,
425  double widthY) {
426  if (!fDrawReference) return;
427 
428  TBox* box = new TBox(centerX - 0.5 * widthX,
429  centerY - 0.5 * widthY,
430  centerX + 0.5 * widthX,
431  centerY + 0.5 * widthY);
432  box->SetLineColor(kGreen + 4);
433  box->SetLineWidth(2);
434  box->SetFillStyle(0);
435  box->Draw();
436 }
437 
438 void CbmRichGeoTestOpt::Draw(Option_t*) {
439  fHM = new CbmHistManager();
440 
442  // int nofFilesPartAll = GetNofFiles() / 1.;
443  int nofFilesPartCamTilt = GetNofFiles() / 8;
444 
445  //1D
447  "fhNofHits_hits",
448  kH1MeanHist,
449  "#hits in ring",
450  27,
451  31,
452  8,
453  nofFilesPartCamTilt);
455  "fhBoverAVsMom_points",
456  kH2MeanHist,
457  "B/A (hit fit)",
458  0.88,
459  0.95,
460  8,
461  nofFilesPartCamTilt);
463  "fhDRVsNofHits",
464  kH2RmsHist,
465  "dR.RMS [cm]",
466  0.29,
467  0.4,
468  8,
469  nofFilesPartCamTilt);
471  "fhRadiusVsNofHits",
472  kH2RmsHist,
473  "Radius.RMS [cm]",
474  0.3,
475  0.6,
476  8,
477  nofFilesPartCamTilt);
479  "fhAccMomEl",
480  "fhMcMomEl",
481  "Geometrical acceptance [%]",
482  88,
483  92,
484  8,
485  nofFilesPartCamTilt,
486  100.);
488  "fh_nof_hits_per_event",
489  kH1MeanHist,
490  "Nof hits per event",
491  600,
492  850,
493  8,
494  nofFilesPartCamTilt);
496  "fh_gamma_nontarget_mom",
498  "e^{#pm}_{not target} from #gamma per event",
499  20,
500  24,
501  8,
502  nofFilesPartCamTilt);
504  "hte_Rich_Rich_Electron_Rec_p",
505  "hte_Rich_Rich_Electron_Acc_p",
506  "Ring reco efficiency [%]",
507  84,
508  98,
509  8,
510  nofFilesPartCamTilt,
511  100.);
513  "hte_StsRich_StsRich_Electron_Rec_p",
514  "hte_StsRich_StsRich_Electron_Acc_p",
515  "STS-RICH matching efficiency [%]",
516  80,
517  90,
518  8,
519  nofFilesPartCamTilt,
520  100.);
522  "hte_Rich_Rich_Electron_Rec_p",
523  "hte_Rich_Rich_Electron_Acc_p",
524  "Ring reco efficiency [%]",
525  86,
526  100,
527  8,
528  nofFilesPartCamTilt,
529  100.);
531  "hte_StsRich_StsRich_Electron_Rec_p",
532  "hte_StsRich_StsRich_Electron_Acc_p",
533  "STS-RICH matching efficiency [%]",
534  82,
535  94,
536  8,
537  nofFilesPartCamTilt,
538  100.);
540  "hps_Rich_All_RecPions_p",
541  "hps_Rich_All_Rec_p",
542  "Pion Suppression (RICH)",
543  100,
544  240,
545  8,
546  nofFilesPartCamTilt,
547  1.);
549  "hpe_StsRich_StsRich_Electron_Rec_p",
550  "hpe_StsRich_StsRich_Electron_Acc_p",
551  "El id (RICH) [%]",
552  80,
553  92,
554  8,
555  nofFilesPartCamTilt,
556  100.);
558  "fhAccMomEl",
559  "fhMcMomEl",
560  "Geometrical acceptance [%]",
561  45,
562  52,
563  8,
564  nofFilesPartCamTilt,
565  100.);
567  "fhAccMomEl",
568  "fhMcMomEl",
569  "Geometrical acceptance [%]",
570  52,
571  58,
572  8,
573  nofFilesPartCamTilt,
574  100.);
575 
576  //2D
578  kGeoTestBoxFile, "fhNofHits_hits", kH1MeanHist, "#hits in ring", 27, 31, 1);
580  "fhBoverAVsMom_points",
581  kH2MeanHist,
582  "B/A (point fit)",
583  0.88,
584  0.95,
585  1);
587  kGeoTestBoxFile, "fhDRVsNofHits", kH2RmsHist, "dR.RMS [cm]", 0.29, 0.4, 1);
589  "fhRadiusVsNofHits",
590  kH2RmsHist,
591  "Radius.RMS [cm]",
592  0.3,
593  0.6,
594  1);
596  "fhAccMomEl",
597  "fhMcMomEl",
598  "Geometrical acceptance [%]",
599  88,
600  92,
601  100.,
602  1);
604  "fh_nof_hits_per_event",
605  kH1MeanHist,
606  "Nof hits per event",
607  600,
608  850,
609  0);
611  "fh_gamma_nontarget_mom",
613  "e^{#pm}_{not target} from #gamma per event",
614  20,
615  24,
616  1);
618  "hte_Rich_Rich_Electron_Rec_p",
619  "hte_Rich_Rich_Electron_Acc_p",
620  "Ring reco efficiency [%]",
621  84,
622  98,
623  100.,
624  1);
626  "hte_StsRich_StsRich_Electron_Rec_p",
627  "hte_StsRich_StsRich_Electron_Acc_p",
628  "STS-RICH matching efficiency [%]",
629  80,
630  90,
631  100.,
632  1);
634  "hte_Rich_Rich_Electron_Rec_p",
635  "hte_Rich_Rich_Electron_Acc_p",
636  "Ring reco efficiency [%]",
637  86,
638  100,
639  100.,
640  1);
642  "hte_StsRich_StsRich_Electron_Rec_p",
643  "hte_StsRich_StsRich_Electron_Acc_p",
644  "STS-RICH matching efficiency [%]",
645  82,
646  94,
647  100.,
648  1);
650  "hps_Rich_All_RecPions_p",
651  "hps_Rich_All_Rec_p",
652  "Pion Suppression (RICH)",
653  100,
654  240,
655  1.,
656  0);
658  "hpe_StsRich_StsRich_Electron_Rec_p",
659  "hpe_StsRich_StsRich_Electron_Acc_p",
660  "El id (RICH) [%]",
661  80,
662  92,
663  100.,
664  1);
666  "fhAccMomEl",
667  "fhMcMomEl",
668  "Geometrical acceptance [%]",
669  45,
670  52,
671  100.,
672  1);
674  "fhAccMomEl",
675  "fhMcMomEl",
676  "Geometrical acceptance [%]",
677  52,
678  58,
679  100.,
680  1);
681 
683 }
684 
685 
CbmRichGeoTestOpt::fUrqmdTestPathes
vector< string > fUrqmdTestPathes
Definition: CbmRichGeoTestOpt.h:128
kHEntriesHist
@ kHEntriesHist
Definition: CbmRichGeoTestOpt.h:31
CbmRichGeoTestOpt::DrawMeanEff
void DrawMeanEff(CbmRichGeoTestOptFileEnum fileEnum, const string &histName1, const string &histName2, const string &titleY, double minY, double maxY, int nofParts, int nofFilesPart, double effCoeff)
Definition: CbmRichGeoTestOpt.cxx:167
CbmRichGeoTestOpt::~CbmRichGeoTestOpt
virtual ~CbmRichGeoTestOpt()
Destructor.
Definition: CbmRichGeoTestOpt.cxx:24
h
Generates beam ions for transport simulation.
Definition: CbmBeamGenerator.h:17
CbmRichGeoTestOpt::DrawMeanEff2D
void DrawMeanEff2D(CbmRichGeoTestOptFileEnum fileEnum, const string &histName1, const string &histName2, const string &titleZ, double minZ, double maxZ, double effCoeff, int precision)
Definition: CbmRichGeoTestOpt.cxx:281
CbmRichGeoTestOptHistEnum
CbmRichGeoTestOptHistEnum
Definition: CbmRichGeoTestOpt.h:26
CbmRichGeoTestOpt::DrawMeanRms
void DrawMeanRms(CbmRichGeoTestOptFileEnum fileEnum, const string &histName, CbmRichGeoTestOptHistEnum histEnum, const string &titleY, double minY, double maxY, int nofParts, int nofFilesPart)
Definition: CbmRichGeoTestOpt.cxx:118
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
i
int i
Definition: L1/vectors/P4_F32vec4.h:25
CbmRichGeoTestOpt::fRecoQaBoxPathes
vector< string > fRecoQaBoxPathes
Definition: CbmRichGeoTestOpt.h:129
CbmRichGeoTestOpt::GetFileEnumName
string GetFileEnumName(CbmRichGeoTestOptFileEnum fileEnum)
Definition: CbmRichGeoTestOpt.cxx:55
CbmHistManager::H2
TH2 * H2(const std::string &name) const
Return pointer to TH2 histogram.
Definition: CbmHistManager.h:190
kH1RmsHist
@ kH1RmsHist
Definition: CbmRichGeoTestOpt.h:28
kGeoTestBoxFile
@ kGeoTestBoxFile
Definition: CbmRichGeoTestOpt.h:18
kH1MeanHist
@ kH1MeanHist
Definition: CbmRichGeoTestOpt.h:27
CbmRichGeoTestOpt::fRecoQaUrqmdPathes
vector< string > fRecoQaUrqmdPathes
Definition: CbmRichGeoTestOpt.h:130
CbmRichGeoTestOpt::fOutputDir
string fOutputDir
Definition: CbmRichGeoTestOpt.h:137
CbmDrawHist.h
Helper functions for drawing 1D and 2D histograms and graphs.
DrawTextOnPad
void DrawTextOnPad(const string &text, Double_t x1, Double_t y1, Double_t x2, Double_t y2)
Definition: CbmDrawHist.cxx:253
CbmRichGeoTestOpt::HEntries
double HEntries(CbmRichGeoTestOptFileEnum fileEnum, int iFile, const string &histName)
Definition: CbmRichGeoTestOpt.cxx:102
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
CbmRichGeoTestOpt::H2ProjYMeanRms
pair< double, double > H2ProjYMeanRms(CbmRichGeoTestOptFileEnum fileType, int iFile, const string &histName)
Definition: CbmRichGeoTestOpt.cxx:85
CbmHistManager
Histogram manager.
Definition: CbmHistManager.h:41
kGeoTestOmega3File
@ kGeoTestOmega3File
Definition: CbmRichGeoTestOpt.h:19
kLinear
@ kLinear
Definition: CbmDrawHist.h:79
CbmRichGeoTestOptFileEnum
CbmRichGeoTestOptFileEnum
Definition: CbmRichGeoTestOpt.h:17
CbmRichGeoTestOpt::DrawReferenceLineH1
void DrawReferenceLineH1(double value)
Definition: CbmRichGeoTestOpt.cxx:413
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
kRecoQaBoxFile
@ kRecoQaBoxFile
Definition: CbmRichGeoTestOpt.h:22
CbmRichGeoTestOpt::CbmRichGeoTestOpt
CbmRichGeoTestOpt()
Constructor.
Definition: CbmRichGeoTestOpt.cxx:21
kH2RmsHist
@ kH2RmsHist
Definition: CbmRichGeoTestOpt.h:30
ClassImp
ClassImp(CbmConverterManager) InitStatus CbmConverterManager
Definition: CbmConverterManager.cxx:12
kRecoQaUrqmdFile
@ kRecoQaUrqmdFile
Definition: CbmRichGeoTestOpt.h:23
kGeoTestOmega8File
@ kGeoTestOmega8File
Definition: CbmRichGeoTestOpt.h:20
CbmHistManager::H1
TH1 * H1(const std::string &name) const
Return pointer to TH1 histogram.
Definition: CbmHistManager.h:170
kUrqmdTestFile
@ kUrqmdTestFile
Definition: CbmRichGeoTestOpt.h:21
CbmUtils.h
CbmRichGeoTestOpt::GetFilePath
string GetFilePath(CbmRichGeoTestOptFileEnum fileType, int iFile)
Definition: CbmRichGeoTestOpt.cxx:42
CbmRichGeoTestOpt::DrawManyH1
void DrawManyH1(const vector< TH1 * > &hist, const vector< string > &legend, double minY, double maxY)
Definition: CbmRichGeoTestOpt.cxx:363
CbmRichGeoTestOpt::Draw
void Draw(Option_t *option="")
Definition: CbmRichGeoTestOpt.cxx:438
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
CbmRichGeoTestOpt::fDrawReference
bool fDrawReference
Definition: CbmRichGeoTestOpt.h:133
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
CbmRichGeoTestOpt::fGeoTestBoxPathes
vector< string > fGeoTestBoxPathes
Definition: CbmRichGeoTestOpt.h:125
kH2MeanHist
@ kH2MeanHist
Definition: CbmRichGeoTestOpt.h:29
CbmRichGeoTestOpt::DrawLines
void DrawLines(bool drawCamTilt, bool drawCamY, double minY, double maxY)
Definition: CbmRichGeoTestOpt.cxx:386
CbmRichGeoTestOpt::fReferenceInd
int fReferenceInd
Definition: CbmRichGeoTestOpt.h:132
DrawH2
void DrawH2(TH2 *hist, HistScale logx, HistScale logy, HistScale logz, const string &drawOpt)
Definition: CbmDrawHist.cxx:84
SetDefaultDrawStyle
void SetDefaultDrawStyle()
Definition: CbmDrawHist.cxx:33
CbmRichGeoTestOpt::H1MeanRms
pair< double, double > H1MeanRms(CbmRichGeoTestOptFileEnum fileType, int iFile, const string &histName)
Definition: CbmRichGeoTestOpt.cxx:68
CbmRichGeoTestOpt::SetFilePathes
void SetFilePathes(vector< string > geoTestPathes, vector< string > geoTestOmega3Pathes, vector< string > geoTestOmega8Pathes, vector< string > urqmdTestPathes, vector< string > recoQaBoxPathes, vector< string > recoQaUrqmdPathes)
Definition: CbmRichGeoTestOpt.cxx:26
CbmRichGeoTestOpt::fGeoTestOmega3Pathes
vector< string > fGeoTestOmega3Pathes
Definition: CbmRichGeoTestOpt.h:126
Cbm::NumberToString
std::string NumberToString(const T &value, int precision=1)
Definition: CbmUtils.h:23
CbmRichGeoTestOpt
Definition: CbmRichGeoTestOpt.h:34
CbmRichGeoTestOpt::DrawReferenceBoxH2
void DrawReferenceBoxH2(double centerX, double centerY, double widthX, double widthY)
Definition: CbmRichGeoTestOpt.cxx:422
CbmRichGeoTestOpt::fHM
CbmHistManager * fHM
Definition: CbmRichGeoTestOpt.h:135
CbmRichGeoTestOpt::DrawMeanRms2D
void DrawMeanRms2D(CbmRichGeoTestOptFileEnum fileEnum, const string &histName, CbmRichGeoTestOptHistEnum histEnum, const string &titleZ, double minZ, double maxZ, int precision)
Definition: CbmRichGeoTestOpt.cxx:207
CbmRichGeoTestOpt.h
Creates comparison plots for RICH geometry testing.
CbmRichGeoTestOpt::DrawTextLabelsH2
void DrawTextLabelsH2(TH2 *h, int precision)
Definition: CbmRichGeoTestOpt.cxx:347
CbmRichGeoTestOpt::GetNofFiles
int GetNofFiles()
Definition: CbmRichGeoTestOpt.cxx:40
CbmRichGeoTestOpt::fGeoTestOmega8Pathes
vector< string > fGeoTestOmega8Pathes
Definition: CbmRichGeoTestOpt.h:127