19#include "TPaveStats.h"
23#include "BmnDrawHist.h"
24#include "BmnDrawOnline.h"
25#include "BmnHistManager.h"
26#include "BmnReportElement.h"
33 fGlobalTrackVariants() {
38 fGlobalTrackVariants(),
51 Out() <<
"<hr>" << endl;
59 if (
GetOnlyPrimes())
Out() <<
"<h2>Results only for primaries presented</h2>" << endl;
60 Out() <<
"<h2>Number of events: " <<
HM()->
H1(
"hen_EventNo_TrackingQa")->GetEntries() <<
"</h2>" << endl;
61 Out() <<
"<h2>Mean multiplicity: " <<
HM()->
H1(
"Multiplicity")->GetMean() <<
"</h2>" << endl;
62 Out() <<
"<hr>" << endl;
63 Out() <<
"<h3><font color=\"red\">Reconstructable</font> MC-track:</h3>"
64 <<
"Monte Carlo track with at least <font color=\"red\">4</font> Monte Carlo points in GEM" << endl;
65 Out() <<
"<h3><font color=\"red\">Good</font> track:</h3>"
66 <<
"Reconstructed track with at least <font color=\"red\">4</font> hits in GEM and <font color=\"red\">60%</font> of them corresponded the same MC-track" << endl;
67 Out() <<
"<h3><font color=\"red\">Clone</font> tracks:</h3>";
68 Out() <<
"Two or more reconstructed tracks with reference to the same MC-track." << endl;
69 Out() <<
"The number of clones is subtracted from number of good tracks before efficiency calculation." << endl;
70 Out() <<
"<hr>" << endl;
72 inTiming.open(
"timing.txt");
73 if (inTiming.is_open()) {
76 while (!inTiming.eof()) {
77 inTiming >> a1 >> a2 >> a3 >> workTime;
79 <<
"Average time of " << a1 <<
" " << a2 <<
": " << workTime /
HM()->
H1(
"hen_EventNo_TrackingQa")->GetEntries() * 1000.0 <<
" ms/event "
88 gStyle->SetPalette(77);
93 TString pNamesIn[5] = {
"Sim_vs_P",
"Rec_vs_P",
"Well_vs_P",
"Ghost_vs_P",
"Split_vs_P"};
94 TString pNamesOut[3] = {
"Eff_vs_P",
"Fake_vs_P",
"SplitEff_vs_P"};
97 TString pNamesInWide[5] = {
"Sim_vs_P_wide",
"Rec_vs_P_wide",
"Well_vs_P_wide",
"Ghost_vs_P_wide",
"Split_vs_P_wide"};
98 TString pNamesOutWide[3] = {
"Eff_vs_P_wide",
"Fake_vs_P_wide",
"SplitEff_vs_P_wide"};
99 DrawEffGem(
fPrefix +
"Efficiency on momentum in wide range", pNamesInWide, pNamesOutWide);
101 TString etaNamesIn[5] = {
"Sim_vs_Eta",
"Rec_vs_Eta",
"Well_vs_Eta",
"Ghost_vs_Eta",
"Split_vs_Eta"};
102 TString etaNamesOut[3] = {
"Eff_vs_Eta",
"Fake_vs_Eta",
"SplitEff_vs_Eta"};
105 TString thetaNamesIn[5] = {
"Sim_vs_Theta",
"Rec_vs_Theta",
"Well_vs_Theta",
"Ghost_vs_Theta",
"Split_vs_Theta"};
106 TString thetaNamesOut[3] = {
"Eff_vs_Theta",
"Fake_vs_Theta",
"SplitEff_vs_Theta"};
109 TString nhNamesIn[5] = {
"Sim_vs_Nh",
"Rec_vs_Nh",
"Well_vs_Nh",
"Ghost_vs_Nh",
"Split_vs_Nh"};
110 TString nhNamesOut[3] = {
"Eff_vs_Nh",
"Fake_vs_Nh",
"SplitEff_vs_Nh"};
115 DrawTwoH2(
fPrefix +
"Distribution of tracks over number of hits and Pseudorapidity",
"Nh_sim_Eta_sim",
"Nh_rec_Eta_rec", 2 *
baseW,
baseH);
116 DrawTwoH2(
fPrefix +
"Distribution of tracks over number of hits and Momentum",
"Nh_sim_P_sim",
"Nh_rec_P_rec", 2 *
baseW,
baseH);
117 DrawTwoH2(
fPrefix +
"Distribution of tracks over number of hits and Theta",
"Nh_sim_Theta_sim",
"Nh_rec_Theta_rec", 2 *
baseW,
baseH);
120 for (Int_t
i = 1;
i <
HM()->
H2(
"EtaP_sim")->GetXaxis()->GetNbins(); ++
i) {
121 for (Int_t j = 1; j <
HM()->
H2(
"EtaP_sim")->GetYaxis()->GetNbins(); ++j) {
122 Float_t nom =
HM()->
H2(
"EtaP_rec")->GetBinContent(
i, j);
123 Float_t denom =
HM()->
H2(
"EtaP_sim")->GetBinContent(
i, j);
124 Float_t content = (denom < 0.001) ? 0.0 : nom / denom * 100.0;
125 if (content > 100.0) content = 100.0;
126 HM()->
H2(
"Eff_vs_EtaP")->SetBinContent(
i, j, content);
129 for (Int_t
i = 1;
i <
HM()->
H2(
"EtaP_rec")->GetXaxis()->GetNbins(); ++
i) {
130 for (Int_t j = 1; j <
HM()->
H2(
"EtaP_rec")->GetYaxis()->GetNbins(); ++j) {
131 Float_t nom =
HM()->
H2(
"Clones_vs_EtaP")->GetBinContent(
i, j);
132 Float_t denom =
HM()->
H2(
"EtaP_rec")->GetBinContent(
i, j);
133 Float_t content = (denom < 0.001) ? 0.0 : nom / denom * 100.0;
134 if (content > 100.0) content = 100.0;
135 HM()->
H2(
"Clones_vs_EtaP")->SetBinContent(
i, j, content);
138 for (Int_t
i = 1;
i <
HM()->
H2(
"EtaP_rec")->GetXaxis()->GetNbins(); ++
i) {
139 for (Int_t j = 1; j <
HM()->
H2(
"EtaP_rec")->GetYaxis()->GetNbins(); ++j) {
140 Float_t nom =
HM()->
H2(
"Fakes_vs_EtaP")->GetBinContent(
i, j);
141 Float_t denom =
HM()->
H2(
"EtaP_rec")->GetBinContent(
i, j);
142 Float_t content = (denom < 0.001) ? 0.0 : nom / denom * 100.0;
143 if (content > 100.0) content = 100.0;
144 HM()->
H2(
"Fakes_vs_EtaP")->SetBinContent(
i, j, content);
148 DrawThreeH2(
fPrefix +
"Distribution of Efficiency, Ghosts and Clones over Pseudorapidity and Momentum",
"Eff_vs_EtaP",
"Clones_vs_EtaP",
"Fakes_vs_EtaP");
149 DrawOneH2(
fPrefix +
"Correlation between number of points in MC-track and number of hits in Reco-track",
"Nh_rec_Nh_sim");
152 DrawOneH2(
fPrefix +
"Pseudorapidity_reco vs Pseudorapidity_mc",
"Eta_rec_Eta_sim");
153 DrawMomResGem(
fPrefix +
"Eta resolution",
"EtaRes_2D",
"EtaRes_1D",
"EtaMean_1D",
"EtaRes_Mean");
154 DrawTwoH2(
fPrefix +
"Tx_reco vs Tx_mc (left) and Ty_reco vs Ty_mc (right) for GLOB",
"Tx_rec_Tx_sim",
"Ty_rec_Ty_sim", 2 *
baseW,
baseH);
157 DrawThreeH2(
fPrefix +
"Reco vs MC for X-, Y- and Z-component of Momentum",
"Px_rec_Px_sim",
"Py_rec_Py_sim",
"Pz_rec_Pz_sim");
158 DrawMomResGem(
fPrefix +
"Momentum resolution",
"momRes_2D",
"momRes_1D",
"momMean_1D",
"momRes_Mean");
162 DrawMomResGem(
fPrefix +
"Momentum resolution vs. theta",
"MomRes_vs_Theta",
"MomRes_vs_Theta_1D",
"MomMean_vs_Theta_1D",
"momRes_Mean");
163 DrawMomResGem(
fPrefix +
"Momentum resolution and momentum vs. length of tracks",
"MomRes_vs_Length",
"MomRes_vs_Length_1D",
"MomMean_vs_Length_1D",
"momRes_Mean");
164 DrawMomResGem(
fPrefix +
"Momentum resolution vs. Number of hits",
"MomRes_vs_nHits",
"MomRes_vs_nHits_1D",
"MomMean_vs_nHits_1D",
"momRes_Mean");
169 DrawTwoH1(
fPrefix +
"Chi-square and length distributions",
"Chi2",
"Length",
"", kFALSE);
184 TString namesParF[5] = {
"X_f",
"Y_f",
"Tx_f",
"Ty_f",
"Qp_f"};
185 TString namesParL[5] = {
"X_l",
"Y_l",
"Tx_l",
"Ty_l",
"Qp_l"};
189 DrawThreeH2(
fPrefix +
"Vertex vs number of tracks in event",
"VertX_vs_Ntracks",
"VertY_vs_Ntracks",
"VertZ_vs_Ntracks");
191 DrawThreeH1(
fPrefix +
"Vertex distribution for X and Y directions",
"VertX",
"VertY",
"VertZ");
193 TString multNamesIn[5] = {
"Sim_vs_mult",
"Rec_vs_mult",
"Well_vs_mult",
"Ghost_vs_mult",
"Split_vs_mult"};
194 TString multNamesOut[3] = {
"Eff_vs_mult",
"Fake_vs_mult",
"SplitEff_vs_mult"};
203 TString namesResPullsF[15] = {
"ResX_f",
"ResY_f",
"ResTx_f",
"ResTy_f",
"ResQp_f",
"ErrX_f",
"ErrY_f",
"ErrTx_f",
"ErrTy_f",
"ErrQp_f",
"PullX_f",
"PullY_f",
"PullTx_f",
"PullTy_f",
"PullQp_f"};
204 TString namesResPullsL[15] = {
"ResX_l",
"ResY_l",
"ResTx_l",
"ResTy_l",
"ResQp_l",
"ErrX_l",
"ErrY_l",
"ErrTx_l",
"ErrTy_l",
"ErrQp_l",
"PullX_l",
"PullY_l",
"PullTx_l",
"PullTy_l",
"PullQp_l"};
208 TString pNamesInTof400[5] = {
"Sim_vs_P_tof400",
"Rec_vs_P_tof400",
"Well_vs_P_tof400",
"Ghost_vs_P_tof400",
"Split_vs_P_tof400"};
209 TString pNamesOutTof400[3] = {
"Eff_vs_P_tof400",
"Fake_vs_P_tof400",
"SplitEff_vs_P_tof400"};
210 DrawEffGem(
fPrefix +
"Distribution of MC-tracks, reco-tracks, fakes and clones vs P_sim per event for TOF-400", pNamesInTof400, pNamesOutTof400);
211 TString pNamesInTof700[5] = {
"Sim_vs_P_tof700",
"Rec_vs_P_tof700",
"Well_vs_P_tof700",
"Ghost_vs_P_tof700",
"Split_vs_P_tof700"};
212 TString pNamesOutTof700[3] = {
"Eff_vs_P_tof700",
"Fake_vs_P_tof700",
"SplitEff_vs_P_tof700"};
213 DrawEffGem(
fPrefix +
"Distribution of MC-tracks, reco-tracks, fakes and clones vs P_sim per event for TOF-700", pNamesInTof700, pNamesOutTof700);
216 DrawTwoH2(
fPrefix +
"Distribution of tracks over velocity and rigidity (track and hit have same MCID)",
"banana_tof400_good",
"banana_tof700_good", 2 *
baseW,
baseH);
217 DrawThreeH2(
fPrefix +
"Mass correlation and banana plots for TOF-400 and TOF-700",
"Mass_correlation",
"banana_tof400",
"banana_tof700");
218 DrawTwoH1(
fPrefix +
"Distribution of TOF-400 residuals for correct matching",
"x_residuals_tof400_good",
"y_residuals_tof400_good",
"", kTRUE);
219 DrawTwoH1(
fPrefix +
"Distribution of TOF-700 residuals for correct matching",
"x_residuals_tof700_good",
"y_residuals_tof700_good",
"", kTRUE);
220 DrawTwoH1(
fPrefix +
"Distribution of TOF-400 residuals for wrong matching",
"x_residuals_tof400_bad",
"y_residuals_tof400_bad",
"", kTRUE);
221 DrawTwoH1(
fPrefix +
"Distribution of TOF-700 residuals for wrong matching",
"x_residuals_tof700_bad",
"y_residuals_tof700_bad",
"", kTRUE);
222 DrawTwoH2(
fPrefix +
"Residuals over rigidity for TOF-400",
"x_resi_vs_mom_tof400_good",
"y_resi_vs_mom_tof400_good", 2 *
baseW,
baseH);
223 DrawTwoH2(
fPrefix +
"Residuals over rigidity for TOF-700",
"x_resi_vs_mom_tof700_good",
"y_resi_vs_mom_tof700_good", 2 *
baseW,
baseH);
228 TString pNamesInCsc[5] = {
"Sim_vs_P_csc",
"Rec_vs_P_csc",
"Well_vs_P_csc",
"Ghost_vs_P_csc",
"Split_vs_P_csc" };
229 TString pNamesOutCsc[3] = {
"Eff_vs_P_csc",
"Fake_vs_P_csc",
"SplitEff_vs_P_csc" };
230 DrawEffGem(
fPrefix +
"Distribution of MC-tracks, reco-tracks, fakes and clones vs P_sim per event for CSC", pNamesInCsc, pNamesOutCsc);
231 DrawTwoH1(
fPrefix +
"Distribution of CSC residuals for correct matching",
"x_residuals_csc_good",
"y_residuals_csc_good",
"", kTRUE);
232 DrawTwoH1(
fPrefix +
"Distribution of CSC residuals for wrong matching",
"x_residuals_csc_bad",
"y_residuals_csc_bad",
"", kTRUE);
238 TString pNamesInDch1[5] = {
"Sim_vs_P_dch1",
"Rec_vs_P_dch1",
"Well_vs_P_dch1",
"Ghost_vs_P_dch1",
"Split_vs_P_dch1" };
239 TString pNamesOutDch1[3] = {
"Eff_vs_P_dch1",
"Fake_vs_P_dch1",
"SplitEff_vs_P_dch1" };
240 DrawEffGem(
fPrefix +
"Distribution of MC-tracks, reco-tracks, fakes and clones vs P_sim per event for DCH1", pNamesInDch1, pNamesOutDch1);
241 DrawTwoH1(
fPrefix +
"Distribution of DCH1 residuals for correct matching",
"x_residuals_dch1_good",
"y_residuals_dch1_good",
"", kTRUE);
242 DrawTwoH1(
fPrefix +
"Distribution of DCH1 residuals for wrong matching",
"x_residuals_dch1_bad",
"y_residuals_dch1_bad",
"", kTRUE);
243 DrawTwoH2(
fPrefix +
"Residuals over rigidity for DCH1",
"x_resi_vs_mom_dch1_good",
"y_resi_vs_mom_dch1_good", 2 *
baseW,
baseH);
246 TString pNamesInDch2[5] = {
"Sim_vs_P_dch2",
"Rec_vs_P_dch2",
"Well_vs_P_dch2",
"Ghost_vs_P_dch2",
"Split_vs_P_dch2" };
247 TString pNamesOutDch2[3] = {
"Eff_vs_P_dch2",
"Fake_vs_P_dch2",
"SplitEff_vs_P_dch2" };
248 DrawEffGem(
fPrefix +
"Distribution of MC-tracks, reco-tracks, fakes and clones vs P_sim per event for DCH2", pNamesInDch2, pNamesOutDch2);
249 DrawTwoH1(
fPrefix +
"Distribution of DCH2 residuals for correct matching",
"x_residuals_dch2_good",
"y_residuals_dch2_good",
"", kTRUE);
250 DrawTwoH1(
fPrefix +
"Distribution of DCH2 residuals for wrong matching",
"x_residuals_dch2_bad",
"y_residuals_dch2_bad",
"", kTRUE);
251 DrawTwoH2(
fPrefix +
"Residuals over rigidity for DCH2",
"x_resi_vs_mom_dch2_good",
"y_resi_vs_mom_dch2_good", 2 *
baseW,
baseH);
363 TString sim = inNames[0];
364 TString rec = inNames[1];
365 TString well = inNames[2];
366 TString ghost = inNames[3];
367 TString split = inNames[4];
369 TString eff = outNames[0];
370 TString fake = outNames[1];
371 TString clon = outNames[2];
376 canvas->Divide(2, 1);
378 HM()->
H1(sim)->Sumw2();
380 HM()->
H1(rec)->Sumw2();
382 HM()->
H1(well)->Sumw2();
384 HM()->
H1(ghost)->Sumw2();
386 HM()->
H1(split)->Sumw2();
389 HM()->
H1(sim)->SetMinimum(0.0);
390 HM()->
H1(well)->SetMinimum(0.0);
391 HM()->
H1(ghost)->SetMinimum(0.0);
392 HM()->
H1(split)->SetMinimum(0.0);
401 vector<TH1*> histos1;
402 histos1.push_back(
HM()->H1(sim));
403 histos1.push_back(
HM()->H1(well));
404 histos1.push_back(
HM()->H1(ghost));
405 histos1.push_back(
HM()->H1(split));
406 vector<string> labels1;
407 labels1.push_back(
"MC tracks");
408 labels1.push_back(
"Good tracks");
409 labels1.push_back(
"Ghost tracks");
410 labels1.push_back(
"Clones");
411 drawHist->
DrawH1(canvas, histos1, labels1,
kLinear,
kLinear,
true, 0.5, 0.81, 1.0, 0.93,
"PE1", kFALSE);
414 vector<string> labels2;
415 labels2.push_back(
"Efficiency");
416 labels2.push_back(
"Ghosts");
417 labels2.push_back(
"Clones");
419 HM()->
H1(eff)->Divide(
HM()->H1(well),
HM()->H1(sim), 1., 1.,
"B");
420 HM()->
H1(eff)->Scale(100.0);
421 HM()->
H1(fake)->Divide(
HM()->H1(ghost),
HM()->H1(rec), 1., 1.,
"B");
422 HM()->
H1(fake)->Scale(100.0);
423 HM()->
H1(clon)->Divide(
HM()->H1(split),
HM()->H1(rec), 1., 1.,
"B");
424 HM()->
H1(clon)->Scale(100.0);
428 for (Int_t
i = 1;
i <
HM()->
H1(eff)->GetNbinsX(); ++
i) {
429 if (
HM()->
H1(eff)->GetBinContent(
i) > 100.0) {
430 HM()->
H1(eff)->SetBinContent(
i, 100.0);
431 HM()->
H1(eff)->SetBinError(
i, 0.0);
433 if (
HM()->H1(fake)->GetBinContent(
i) > 100.0) {
434 HM()->
H1(fake)->SetBinContent(
i, 100.0);
435 HM()->
H1(fake)->SetBinError(
i, 0.0);
437 if (
HM()->H1(clon)->GetBinContent(
i) > 100.0) {
438 HM()->
H1(clon)->SetBinContent(
i, 100.0);
439 HM()->
H1(clon)->SetBinError(
i, 0.0);
441 if (
HM()->H1(eff)->GetBinContent(
i) < 0.0) {
442 HM()->
H1(eff)->SetBinContent(
i, 0.0);
443 HM()->
H1(eff)->SetBinError(
i, 0.0);
445 if (
HM()->H1(fake)->GetBinContent(
i) < 0.0) {
446 HM()->
H1(fake)->SetBinContent(
i, 0.0);
447 HM()->
H1(fake)->SetBinError(
i, 0.0);
449 if (
HM()->H1(clon)->GetBinContent(
i) < 0.0) {
450 HM()->
H1(clon)->SetBinContent(
i, 0.0);
451 HM()->
H1(clon)->SetBinError(
i, 0.0);
455 HM()->
H1(eff)->SetMaximum(100.0);
456 HM()->
H1(fake)->SetMaximum(100.0);
457 HM()->
H1(clon)->SetMaximum(100.0);
458 HM()->
H1(eff)->SetMinimum(0.0);
459 HM()->
H1(fake)->SetMinimum(0.0);
460 HM()->
H1(clon)->SetMinimum(0.0);
462 vector<TH1*> histos2;
463 histos2.push_back(
HM()->H1(eff));
464 histos2.push_back(
HM()->H1(fake));
465 histos2.push_back(
HM()->H1(clon));
466 drawHist->
DrawH1(canvas, histos2, labels2,
kLinear,
kLinear,
true, 0.5, 0.81, 1.0, 0.93,
"PE1X0", kTRUE);
470 Int_t nofEvents =
HM()->
H1(
"hen_EventNo_TrackingQa")->GetEntries();
473 HM()->
H1(
"Well_vs_Nh")->Sumw2();
474 HM()->
H1(
"Well_vs_Nh")->Scale(1. / nofEvents);
475 HM()->
H1(
"Ghost_vs_Nh")->Sumw2();
476 HM()->
H1(
"Ghost_vs_Nh")->Scale(1. / nofEvents);
477 vector<TH1*> histos1;
478 histos1.push_back(
HM()->H1(
"Well_vs_Nh"));
479 histos1.push_back(
HM()->H1(
"Ghost_vs_Nh"));
480 vector<string> labels1;
481 labels1.push_back(
"Good tracks");
482 labels1.push_back(
"Ghosts");
483 drawHist->
DrawH1(canvas, histos1, labels1,
kLinear,
kLinear,
true, 0.5, 0.81, 1.0, 0.9,
"PE1", kFALSE);
489 canvas->Divide(3, 1);
491 drawHist->
DrawH1(canvas,
HM()->H1(
"Impact parameter"),
kLinear,
kLinear,
"", kRed, 2, 1, 1.1, 20, 33);
493 drawHist->
DrawH1(canvas,
HM()->H1(
"Multiplicity"),
kLinear,
kLinear,
"", kRed, 2, 1, 1.1, 20, 33);
501 canvas->Divide(4, 1);
507 HM()->
H1(nameSigma)->SetMaximum(6.0);
508 HM()->
H1(nameSigma)->SetMinimum(0.0);
512 HM()->
H1(nameMean)->SetMaximum(2.0);
513 HM()->
H1(nameMean)->SetMinimum(-2.0);
517 TH1D* projY =
HM()->
H2(name2d)->ProjectionY(
"tmp1");
518 for (Int_t iBin = 0; iBin <= projY->GetNbinsX() + 1; ++iBin) {
519 HM()->
H1(nameAver)->SetBinContent(iBin, projY->GetBinContent(iBin));
524 HM()->
H1(nameAver)->Fit(
"gaus",
"RQWW",
"", -2, 2);
525 HM()->
H1(nameAver)->SetMaximum(
HM()->H1(nameAver)->GetMaximum() * 1.05);
526 TF1* fit =
HM()->
H1(nameAver)->GetFunction(
"gaus");
528 TPaveStats* ps =
new TPaveStats(3.0,
HM()->H1(nameAver)->GetMaximum() / 1.5, 10.0,
HM()->H1(nameAver)->GetMaximum());
530 ps->SetShadowColor(0);
531 ps->AddText(Form(
"#mu = %2.2f", fit->GetParameter(1)));
532 ps->AddText(Form(
"#sigma = %2.2f", fit->GetParameter(2)));
539 canvas->Divide(5, 3);
541 for (Int_t
i = 0;
i < 15; ++
i) {
543 if (i < 5 || i > 9)
HM()->
H1(inNames[
i])->Fit(
"gaus",
"RQWW",
"", -20, 20);
546 TF1* fit =
HM()->
H1(inNames[
i])->GetFunction(
"gaus");
548 Float_t xMax =
HM()->
H1(inNames[
i])->GetXaxis()->GetXmax();
549 Float_t yMax =
HM()->
H1(inNames[
i])->GetMaximum();
550 TPaveStats* ps =
new TPaveStats(xMax * 0.2, yMax * 0.1, xMax, yMax);
552 ps->SetShadowColor(0);
553 ps->AddText(Form(
"#mu = %2.2f", fit->GetParameter(1)));
554 ps->AddText(Form(
"#sigma = %2.2f", fit->GetParameter(2)));
574 canvas->Divide(5, 1);
576 for (Int_t
i = 0;
i < 5; ++
i) {
583 Int_t nBins =
HM()->
H1(nameSigma)->GetXaxis()->GetNbins();
584 Int_t momResStep =
HM()->
H2(name2d)->GetNbinsX() / nBins;
586 for (Int_t iBin = 1; iBin <
HM()->
H2(name2d)->GetNbinsX(); iBin += momResStep) {
587 TH1D* proj =
HM()->
H2(name2d)->ProjectionY(
"tmp", iBin, iBin + (momResStep - 1));
589 if (proj->GetEntries() < 5)
continue;
591 proj->Fit(
"gaus",
"SQRww",
"", -5.0, 5.0);
592 TF1* fit = proj->GetFunction(
"gaus");
594 Float_t sigma = fit->GetParameter(2);
595 Float_t sigmaError = fit->GetParError(2);
596 Float_t mean = fit->GetParameter(1);
597 Float_t meanError = fit->GetParError(1);
598 HM()->
H1(nameSigma)->SetBinContent(bin, sigma);
599 HM()->
H1(nameSigma)->SetBinError(bin, sigmaError);
600 HM()->
H1(nameMean)->SetBinContent(bin, mean);
601 HM()->
H1(nameMean)->SetBinError(bin, meanError);
608 canvas->Divide(3, 1);
611 HM()->
H1(name1dX)->Fit(
"gaus",
"RQWW",
"", -1, 1);
615 HM()->
H1(name1dY)->Fit(
"gaus",
"RQWW",
"", -1, 1);
619 HM()->
H1(name1dZ)->Fit(
"gaus",
"RQWW",
"", -2, 2);
626 TF1* fit = h->GetFunction(
"gaus");
628 Float_t xMax = h->GetXaxis()->GetXmax();
629 Float_t yMax = h->GetMaximum();
630 TPaveStats* ps =
new TPaveStats(xMax / 2, yMax / 2, xMax, yMax);
632 ps->SetShadowColor(0);
633 ps->AddText(Form(
"#mu = %2.3f", fit->GetParameter(1)));
634 ps->AddText(Form(
"#sigma = %2.3f", fit->GetParameter(2)));
641 drawHist->
DrawH1(canvas,
HM()->H1(name1),
kLinear,
kLog, drawOpt.Data(), kRed, 1, 0.75, 1.1, 20);
647 canvas->Divide(2, 1);
651 HM()->
H1(name1)->Fit(
"gaus",
"WWQ");
657 HM()->
H1(name2)->Fit(
"gaus",
"WWQ");
684 TCanvas* canvas =
CreateCanvas(canvasName.Data(), canvasName.Data(), w, h);
686 canvas->Divide(2, 1);
696 canvas->Divide(3, 1);
708 canvas->Divide(3, 1);
Create report for tracking QA.
FairTask for tracking performance calculation.
void DrawH2(TCanvas *canvas, TH2 *hist, HistScale logx=kLinear, HistScale logy=kLinear, HistScale logz=kLinear, const string &drawOpt="COLZ")
void DrawH1(TCanvas *canvas, TH1 *hist, HistScale logx=kLinear, HistScale logy=kLinear, const string &drawOpt="", Int_t color=BmnDrawingOptions::Color(0), Int_t lineWidth=BmnDrawingOptions::LineWidth(), Int_t lineStyle=BmnDrawingOptions::LineStyle(0), Float_t markerSize=BmnDrawingOptions::MarkerSize(), Int_t markerStyle=BmnDrawingOptions::MarkerStyle(0), Int_t fillColor=-1)
TH2 * H2(const TString &name) const
Return pointer to TH2 histogram.
TH1 * H1(const TString &name) const
Return pointer to TH1 histogram.
virtual string Title(int size, const string &title) const =0
Return string with title.
virtual string DocumentBegin() const =0
Return string with open tags for document.
virtual string DocumentEnd() const =0
Return string with close tags of the document.
void SetReportName(TString name)
void PrintCanvases() const
Print images created from canvases in the report.
const BmnReportElement * R() const
Accessor to BmnReportElement object. User has to write the report using available tags from BmnReport...
TCanvas * CreateCanvas(const char *name, const char *title, Int_t ww, Int_t wh)
Create canvas and put it to vector of TCanvases. Canvases created with this function will be automati...
ostream & Out() const
All text output goes to this stream.
Base class for simulation reports.
BmnHistManager * HM() const
Return pointer to Histogram manager.
Bool_t GetOnlyPrimes() const
void DrawOneH2(const TString canvasName, const TString name1)
void DrawMomResGem(const TString canvasName, TString name2d, TString nameSigma, TString nameMean, TString nameAver)
void DrawTwoH2(const TString canvasName, const TString name1, const TString name2, Int_t w=1000, Int_t h=500)
void DrawPar(const TString canvasName, TString *inNames)
void DrawTwoH1(const TString canvasName, const TString name1, const TString name2, const TString drawOpt, Bool_t doFit)
BmnTrackingQaReport()
Constructor.
void DrawMuSigma(TVirtualPad *pad, TH1 *h)
virtual ~BmnTrackingQaReport()
Destructor.
virtual void Draw()
Inherited from BmnSimulationReport.
void DrawThreeH2(const TString canvasName, const TString name1, const TString name2, const TString name3)
void DrawResAndPull(const TString canvasName, TString *inNames)
void DrawOneH1(const TString canvasName, const TString name1, const TString drawOpt)
virtual void Create()
Inherited from BmnSimulationReport.
void DrawEffGem(const TString canvasName, TString *inNames, TString *outNames)
void FillAndFitSlice(TString nameSigma, TString nameMean, TString name2d)
void DrawNhitsGem(const TString canvasName)
void DrawVertResGem(const TString canvasName, TString name1dX, TString name1dY, TString name1dZ)
void DrawThreeH1(const TString canvasName, const TString name1, const TString name2, const TString name3)
void DrawEventsInfo(const TString canvasName)
void SetDefaultDrawStyle()