BmnRoot 26.10.0-18-g4e3414f9
Software framework of the BM@N experiment
Loading...
Searching...
No Matches
BmnTrackingQaReport.cxx
Go to the documentation of this file.
1/**
2 * \file BmnTrackingQaReport.cxx
3 * \author Semen Lebedev <s.lebedev@gsi.de> - Original author. First version of code for CBM experiment.
4 * \author Sergey Merts <Sergey.Merts@gmail.com> - Modification for BMN experiment.
5 * \date 2011-2014
6 */
8
9#include "BmnDrawHist.h"
10#include "BmnDrawOnline.h"
11#include "BmnHistManager.h"
12#include "BmnReportElement.h"
13#include "BmnTrackingQa.h"
14#include "BmnUtils.h"
15#include "TCanvas.h"
16#include "TF1.h"
17#include "TGaxis.h"
18#include "TH1.h"
19#include "TLatex.h"
20#include "TLine.h"
21#include "TPaveStats.h"
22#include "TString.h"
23#include "TStyle.h"
24#include "map"
25
26#include <fstream>
27#include <set>
28#include <vector>
29
30using namespace std;
31using namespace lit;
32
39
47
49
51{
52 Out().precision(3);
53 Out() << R()->DocumentBegin();
54 Out() << R()->Title(0, GetTitle());
55 Out() << PrintEventInfo();
56 Out() << "<hr>" << endl;
58 Out() << R()->DocumentEnd();
59}
60
62{
63 // Out() << "<h2>Event generator: QGSM</h2>" << endl; //FIXME!
64 // Out() << "<h2>Energy: 4 GeV/n</h2>" << endl; //FIXME!
65 if (GetOnlyPrimes())
66 Out() << "<h2>Results only for primaries presented</h2>" << endl;
67 Out() << "<h2>Number of events: " << HM()->H1("hen_EventNo_TrackingQa")->GetEntries() << "</h2>" << endl;
68 Out() << "<h2>Mean multiplicity: " << HM()->H1("Multiplicity")->GetMean() << "</h2>" << endl;
69 Out() << "<hr>" << endl;
70 Out() << "<h3><font color=\"red\">Reconstructable</font> MC-track:</h3>"
71 << "Monte Carlo track with at least <font color=\"red\">4</font> Monte Carlo points in GEM" << endl;
72 Out() << "<h3><font color=\"red\">Good</font> track:</h3>"
73 << "Reconstructed track with at least <font color=\"red\">4</font> hits in GEM and <font "
74 "color=\"red\">60%</font> of them corresponded the same MC-track"
75 << endl;
76 Out() << "<h3><font color=\"red\">Clone</font> tracks:</h3>";
77 Out() << "Two or more reconstructed tracks with reference to the same MC-track." << endl;
78 Out() << "The number of clones is subtracted from number of good tracks before efficiency calculation." << endl;
79 Out() << "<hr>" << endl;
80 ifstream inTiming;
81 inTiming.open("timing.txt");
82 if (inTiming.is_open()) {
83 TString a1, a2, a3;
84 Float_t workTime;
85 while (!inTiming.eof()) {
86 inTiming >> a1 >> a2 >> a3 >> workTime;
87 Out() << "<h3>"
88 << "Average time of " << a1 << " " << a2 << ": "
89 << workTime / HM()->H1("hen_EventNo_TrackingQa")->GetEntries() * 1000.0 << " ms/event "
90 << "</h3>" << endl;
91 }
92 }
93 inTiming.close();
94 return "<hr>";
95}
96
98{
99 gStyle->SetPalette(77);
100 drawHist = new BmnDrawOnline("RECREATE");
101 DrawEventsInfo(fPrefix + "Impact parameter and multiplicity");
103
104 TString pNamesIn[5] = {"Sim_vs_P", "Rec_vs_P", "Well_vs_P", "Ghost_vs_P", "Split_vs_P"};
105 TString pNamesOut[3] = {"Eff_vs_P", "Fake_vs_P", "SplitEff_vs_P"};
106 DrawEffGem(fPrefix + "Efficiency on momentum", pNamesIn, pNamesOut);
107
108 TString pNamesInWide[5] = {"Sim_vs_P_wide", "Rec_vs_P_wide", "Well_vs_P_wide", "Ghost_vs_P_wide",
109 "Split_vs_P_wide"};
110 TString pNamesOutWide[3] = {"Eff_vs_P_wide", "Fake_vs_P_wide", "SplitEff_vs_P_wide"};
111 DrawEffGem(fPrefix + "Efficiency on momentum in wide range", pNamesInWide, pNamesOutWide);
112
113 TString etaNamesIn[5] = {"Sim_vs_Eta", "Rec_vs_Eta", "Well_vs_Eta", "Ghost_vs_Eta", "Split_vs_Eta"};
114 TString etaNamesOut[3] = {"Eff_vs_Eta", "Fake_vs_Eta", "SplitEff_vs_Eta"};
115 DrawEffGem(fPrefix + "Efficiency on pseudorapidity", etaNamesIn, etaNamesOut);
116
117 TString thetaNamesIn[5] = {"Sim_vs_Theta", "Rec_vs_Theta", "Well_vs_Theta", "Ghost_vs_Theta", "Split_vs_Theta"};
118 TString thetaNamesOut[3] = {"Eff_vs_Theta", "Fake_vs_Theta", "SplitEff_vs_Theta"};
119 DrawEffGem(fPrefix + "Efficiency on theta", thetaNamesIn, thetaNamesOut);
120
121 TString nhNamesIn[5] = {"Sim_vs_Nh", "Rec_vs_Nh", "Well_vs_Nh", "Ghost_vs_Nh", "Split_vs_Nh"};
122 TString nhNamesOut[3] = {"Eff_vs_Nh", "Fake_vs_Nh", "SplitEff_vs_Nh"};
123 DrawEffGem(fPrefix + "Efficiency on number of hits", nhNamesIn, nhNamesOut);
124
125 // DrawNhitsGem(fPrefix + "Distribution of RECO-tracks vs number of hits per track");
126
127 DrawTwoH2(fPrefix + "Distribution of tracks over number of hits and Pseudorapidity", "Nh_sim_Eta_sim",
128 "Nh_rec_Eta_rec", 2 * baseW, baseH);
129 DrawTwoH2(fPrefix + "Distribution of tracks over number of hits and Momentum", "Nh_sim_P_sim", "Nh_rec_P_rec",
130 2 * baseW, baseH);
131 DrawTwoH2(fPrefix + "Distribution of tracks over number of hits and Theta", "Nh_sim_Theta_sim", "Nh_rec_Theta_rec",
132 2 * baseW, baseH);
133 DrawTwoH2(fPrefix + "Distribution of tracks over Pseudorapidity and Momentum", "EtaP_sim", "EtaP_rec", 2 * baseW,
134 baseH);
135
136 for (Int_t i = 1; i < HM()->H2("EtaP_sim")->GetXaxis()->GetNbins(); ++i) {
137 for (Int_t j = 1; j < HM()->H2("EtaP_sim")->GetYaxis()->GetNbins(); ++j) {
138 Float_t nom = HM()->H2("EtaP_rec")->GetBinContent(i, j);
139 Float_t denom = HM()->H2("EtaP_sim")->GetBinContent(i, j);
140 Float_t content = (denom < 0.001) ? 0.0 : nom / denom * 100.0;
141 if (content > 100.0)
142 content = 100.0;
143 HM()->H2("Eff_vs_EtaP")->SetBinContent(i, j, content);
144 }
145 }
146 for (Int_t i = 1; i < HM()->H2("EtaP_rec")->GetXaxis()->GetNbins(); ++i) {
147 for (Int_t j = 1; j < HM()->H2("EtaP_rec")->GetYaxis()->GetNbins(); ++j) {
148 Float_t nom = HM()->H2("Clones_vs_EtaP")->GetBinContent(i, j);
149 Float_t denom = HM()->H2("EtaP_rec")->GetBinContent(i, j);
150 Float_t content = (denom < 0.001) ? 0.0 : nom / denom * 100.0;
151 if (content > 100.0)
152 content = 100.0;
153 HM()->H2("Clones_vs_EtaP")->SetBinContent(i, j, content);
154 }
155 }
156 for (Int_t i = 1; i < HM()->H2("EtaP_rec")->GetXaxis()->GetNbins(); ++i) {
157 for (Int_t j = 1; j < HM()->H2("EtaP_rec")->GetYaxis()->GetNbins(); ++j) {
158 Float_t nom = HM()->H2("Fakes_vs_EtaP")->GetBinContent(i, j);
159 Float_t denom = HM()->H2("EtaP_rec")->GetBinContent(i, j);
160 Float_t content = (denom < 0.001) ? 0.0 : nom / denom * 100.0;
161 if (content > 100.0)
162 content = 100.0;
163 HM()->H2("Fakes_vs_EtaP")->SetBinContent(i, j, content);
164 }
165 }
166
167 DrawThreeH2(fPrefix + "Distribution of Efficiency, Ghosts and Clones over Pseudorapidity and Momentum",
168 "Eff_vs_EtaP", "Clones_vs_EtaP", "Fakes_vs_EtaP");
169 DrawOneH2(fPrefix + "Correlation between number of points in MC-track and number of hits in Reco-track",
170 "Nh_rec_Nh_sim");
171 DrawTwoH2(fPrefix + "Distribution of tracks over Theta and Momentum", "ThetaP_sim", "ThetaP_rec", 2 * baseW, baseH);
172 DrawTwoH2(fPrefix + "P_reco vs P_mc", "P_rec_P_sim", "Pt_rec_Pt_sim", 2 * baseW, baseH);
173 DrawOneH2(fPrefix + "Pseudorapidity_reco vs Pseudorapidity_mc", "Eta_rec_Eta_sim");
174 DrawMomResGem(fPrefix + "Eta resolution", "EtaRes_2D", "EtaRes_1D", "EtaMean_1D", "EtaRes_Mean");
175 DrawTwoH2(fPrefix + "Tx_reco vs Tx_mc (left) and Ty_reco vs Ty_mc (right) for GLOB", "Tx_rec_Tx_sim",
176 "Ty_rec_Ty_sim", 2 * baseW, baseH);
177 DrawMomResGem(fPrefix + "Tx resolution", "TxRes_2D", "TxRes_1D", "TxMean_1D", "TxRes_Mean");
178 DrawMomResGem(fPrefix + "Ty resolution", "TyRes_2D", "TyRes_1D", "TyMean_1D", "TyRes_Mean");
179 DrawThreeH2(fPrefix + "Reco vs MC for X-, Y- and Z-component of Momentum", "Px_rec_Px_sim", "Py_rec_Py_sim",
180 "Pz_rec_Pz_sim");
181 DrawMomResGem(fPrefix + "Momentum resolution", "momRes_2D", "momRes_1D", "momMean_1D", "momRes_Mean");
182 DrawMomResGem(fPrefix + "Px resolution", "PxRes_2D", "PxRes_1D", "PxMean_1D", "PxRes_Mean");
183 DrawMomResGem(fPrefix + "Py resolution", "PyRes_2D", "PyRes_1D", "PyMean_1D", "PyRes_Mean");
184 DrawMomResGem(fPrefix + "Pz resolution", "PzRes_2D", "PzRes_1D", "PzMean_1D", "PzRes_Mean");
185 DrawMomResGem(fPrefix + "Momentum resolution vs. theta", "MomRes_vs_Theta", "MomRes_vs_Theta_1D",
186 "MomMean_vs_Theta_1D", "momRes_Mean");
187 DrawMomResGem(fPrefix + "Momentum resolution and momentum vs. length of tracks", "MomRes_vs_Length",
188 "MomRes_vs_Length_1D", "MomMean_vs_Length_1D", "momRes_Mean");
189 DrawMomResGem(fPrefix + "Momentum resolution vs. Number of hits", "MomRes_vs_nHits", "MomRes_vs_nHits_1D",
190 "MomMean_vs_nHits_1D", "momRes_Mean");
191 DrawTwoH2(fPrefix + "Tracks quality distributions", "MomRes_vs_Chi2", "Mom_vs_Chi2", 2 * baseW, baseH);
192 // DrawTwoH2(fPrefix + "Momentum resolution and momentum vs. length of tracks", "MomRes_vs_Length",
193 // "Mom_vs_Length"); DrawOneH2(fPrefix + "Momentum resolution vs. Number of hits", "MomRes_vs_nHits");
194 // DrawOneH2(fPrefix + "Momentum resolution vs. theta", "MomRes_vs_Theta");
195 DrawTwoH1(fPrefix + "Chi-square and length distributions", "Chi2", "Length", "", kFALSE);
196
197 /* New
198 DrawHitRes(fPrefix, "X");
199 DrawHitRes(fPrefix, "Y");
200
201 TString namesResPullsF[15] = {"ResX_f", "ResY_f", "ResTx_f", "ResTy_f", "ResQp_f", "ErrX_f", "ErrY_f", "ErrTx_f",
202 "ErrTy_f", "ErrQp_f", "PullX_f", "PullY_f", "PullTx_f", "PullTy_f", "PullQp_f"};
203 // TString namesRes_vs_ParF[5] = {"ResX_vs_X_f", "ResY_vs_Y_f", "ResTx_vs_Tx_f", "ResTy_vs_Ty_f",
204 "ResQp_vs_Qp_f"}; TString namesResPullsL[15] = {"ResX_l", "ResY_l", "ResTx_l", "ResTy_l", "ResQp_l", "ErrX_l",
205 "ErrY_l", "ErrTx_l", "ErrTy_l", "ErrQp_l", "PullX_l", "PullY_l", "PullTx_l", "PullTy_l", "PullQp_l"};
206
207 DrawResAndPull(fPrefix + "Residuals and Pulls for first parameters GLOB", namesResPullsF);
208 // DrawResAndPull_2D(fPrefix + "Residuals vs Parameters for first parameters GLOB", namesRes_vs_ParF);
209 DrawResAndPull(fPrefix + "Residuals and Pulls for last parameters GLOB", namesResPullsL);
210
211 New */
212 TString namesParF[5] = {"X_f", "Y_f", "Tx_f", "Ty_f", "Qp_f"};
213 TString namesParL[5] = {"X_l", "Y_l", "Tx_l", "Ty_l", "Qp_l"};
214 DrawPar(fPrefix + "First parameters", namesParF);
215 DrawPar(fPrefix + "Last parameters", namesParL);
216
217 DrawThreeH2(fPrefix + "Vertex vs number of tracks in event", "VertX_vs_Ntracks", "VertY_vs_Ntracks",
218 "VertZ_vs_Ntracks");
219 DrawVertResGem(fPrefix + "Vertex resolution", "VertResX", "VertResY", "VertResZ");
220 DrawThreeH1(fPrefix + "Vertex distribution for X and Y directions", "VertX", "VertY", "VertZ");
221
222 TString multNamesIn[5] = {"Sim_vs_mult", "Rec_vs_mult", "Well_vs_mult", "Ghost_vs_mult", "Split_vs_mult"};
223 TString multNamesOut[3] = {"Eff_vs_mult", "Fake_vs_mult", "SplitEff_vs_mult"};
224 DrawEffGem(fPrefix + "Efficiency on multiplicity", multNamesIn, multNamesOut);
225
226 // Вызов метода, который поместит все гистограммы на один холст
227 // drawHist -> DrawMainCanvas("Inner tracking");
228
229 // DrawHitRes(fPrefix, "X");
230 // DrawHitRes(fPrefix, "Y");
231 TString namesResPullsF[15] = {"ResX_f", "ResY_f", "ResTx_f", "ResTy_f", "ResQp_f",
232 "ErrX_f", "ErrY_f", "ErrTx_f", "ErrTy_f", "ErrQp_f",
233 "PullX_f", "PullY_f", "PullTx_f", "PullTy_f", "PullQp_f"};
234 TString namesResPullsL[15] = {"ResX_l", "ResY_l", "ResTx_l", "ResTy_l", "ResQp_l",
235 "ErrX_l", "ErrY_l", "ErrTx_l", "ErrTy_l", "ErrQp_l",
236 "PullX_l", "PullY_l", "PullTx_l", "PullTy_l", "PullQp_l"};
237 DrawResAndPull(fPrefix + "Residuals and Pulls for first parameters GLOB", namesResPullsF);
238
239 // TOF
240 TString pNamesInTof400[5] = {"Sim_vs_P_tof400", "Rec_vs_P_tof400", "Well_vs_P_tof400", "Ghost_vs_P_tof400",
241 "Split_vs_P_tof400"};
242 TString pNamesOutTof400[3] = {"Eff_vs_P_tof400", "Fake_vs_P_tof400", "SplitEff_vs_P_tof400"};
243 DrawEffGem(fPrefix + "Distribution of MC-tracks, reco-tracks, fakes and clones vs P_sim per event for TOF-400",
244 pNamesInTof400, pNamesOutTof400);
245 TString pNamesInTof700[5] = {"Sim_vs_P_tof700", "Rec_vs_P_tof700", "Well_vs_P_tof700", "Ghost_vs_P_tof700",
246 "Split_vs_P_tof700"};
247 TString pNamesOutTof700[3] = {"Eff_vs_P_tof700", "Fake_vs_P_tof700", "SplitEff_vs_P_tof700"};
248 DrawEffGem(fPrefix + "Distribution of MC-tracks, reco-tracks, fakes and clones vs P_sim per event for TOF-700",
249 pNamesInTof700, pNamesOutTof700);
250
251 DrawTwoH2(fPrefix + "Distribution of tracks over velocity and rigidity (track and hit have same MCID)",
252 "banana_tof400_good", "banana_tof700_good", 2 * baseW, baseH);
253 DrawThreeH2(fPrefix + "Mass correlation and banana plots for TOF-400 and TOF-700", "Mass_correlation",
254 "banana_tof400", "banana_tof700");
255 DrawTwoH1(fPrefix + "Distribution of TOF-400 residuals for correct matching", "x_residuals_tof400_good",
256 "y_residuals_tof400_good", "", kTRUE);
257 DrawTwoH1(fPrefix + "Distribution of TOF-700 residuals for correct matching", "x_residuals_tof700_good",
258 "y_residuals_tof700_good", "", kTRUE);
259 DrawTwoH1(fPrefix + "Distribution of TOF-400 residuals for wrong matching", "x_residuals_tof400_bad",
260 "y_residuals_tof400_bad", "", kTRUE);
261 DrawTwoH1(fPrefix + "Distribution of TOF-700 residuals for wrong matching", "x_residuals_tof700_bad",
262 "y_residuals_tof700_bad", "", kTRUE);
263 DrawTwoH2(fPrefix + "Residuals over rigidity for TOF-400", "x_resi_vs_mom_tof400_good", "y_resi_vs_mom_tof400_good",
264 2 * baseW, baseH);
265 DrawTwoH2(fPrefix + "Residuals over rigidity for TOF-700", "x_resi_vs_mom_tof700_good", "y_resi_vs_mom_tof700_good",
266 2 * baseW, baseH);
267
268 // drawHist->DrawMainCanvas("TOF");
269
270 // CSC
271 TString pNamesInCsc[5] = {"Sim_vs_P_csc", "Rec_vs_P_csc", "Well_vs_P_csc", "Ghost_vs_P_csc", "Split_vs_P_csc"};
272 TString pNamesOutCsc[3] = {"Eff_vs_P_csc", "Fake_vs_P_csc", "SplitEff_vs_P_csc"};
273 DrawEffGem(fPrefix + "Distribution of MC-tracks, reco-tracks, fakes and clones vs P_sim per event for CSC",
274 pNamesInCsc, pNamesOutCsc);
275 DrawTwoH1(fPrefix + "Distribution of CSC residuals for correct matching", "x_residuals_csc_good",
276 "y_residuals_csc_good", "", kTRUE);
277 DrawTwoH1(fPrefix + "Distribution of CSC residuals for wrong matching", "x_residuals_csc_bad",
278 "y_residuals_csc_bad", "", kTRUE);
279 DrawTwoH2(fPrefix + "Residuals over rigidity for CSC", "x_resi_vs_mom_csc_good", "y_resi_vs_mom_csc_good",
280 2 * baseW, baseH);
281
282 // drawHist->DrawMainCanvas("CSC");
283
284 // DCH1
285 TString pNamesInDch1[5] = {"Sim_vs_P_dch1", "Rec_vs_P_dch1", "Well_vs_P_dch1", "Ghost_vs_P_dch1",
286 "Split_vs_P_dch1"};
287 TString pNamesOutDch1[3] = {"Eff_vs_P_dch1", "Fake_vs_P_dch1", "SplitEff_vs_P_dch1"};
288 DrawEffGem(fPrefix + "Distribution of MC-tracks, reco-tracks, fakes and clones vs P_sim per event for DCH1",
289 pNamesInDch1, pNamesOutDch1);
290 DrawTwoH1(fPrefix + "Distribution of DCH1 residuals for correct matching", "x_residuals_dch1_good",
291 "y_residuals_dch1_good", "", kTRUE);
292 DrawTwoH1(fPrefix + "Distribution of DCH1 residuals for wrong matching", "x_residuals_dch1_bad",
293 "y_residuals_dch1_bad", "", kTRUE);
294 DrawTwoH2(fPrefix + "Residuals over rigidity for DCH1", "x_resi_vs_mom_dch1_good", "y_resi_vs_mom_dch1_good",
295 2 * baseW, baseH);
296
297 // DCH2
298 TString pNamesInDch2[5] = {"Sim_vs_P_dch2", "Rec_vs_P_dch2", "Well_vs_P_dch2", "Ghost_vs_P_dch2",
299 "Split_vs_P_dch2"};
300 TString pNamesOutDch2[3] = {"Eff_vs_P_dch2", "Fake_vs_P_dch2", "SplitEff_vs_P_dch2"};
301 DrawEffGem(fPrefix + "Distribution of MC-tracks, reco-tracks, fakes and clones vs P_sim per event for DCH2",
302 pNamesInDch2, pNamesOutDch2);
303 DrawTwoH1(fPrefix + "Distribution of DCH2 residuals for correct matching", "x_residuals_dch2_good",
304 "y_residuals_dch2_good", "", kTRUE);
305 DrawTwoH1(fPrefix + "Distribution of DCH2 residuals for wrong matching", "x_residuals_dch2_bad",
306 "y_residuals_dch2_bad", "", kTRUE);
307 DrawTwoH2(fPrefix + "Residuals over rigidity for DCH2", "x_resi_vs_mom_dch2_good", "y_resi_vs_mom_dch2_good",
308 2 * baseW, baseH);
309
310 // drawHist->DrawMainCanvas("DCH");
311}
312
313// void BmnTrackingQaReport::DrawEffGem(const TString canvasName, TString* inNames, TString* outNames) {
314// TString sim = inNames[0];
315// TString rec = inNames[1];
316// TString well = inNames[2];
317// TString ghost = inNames[3];
318// TString split = inNames[4];
319
320// TString eff = outNames[0];
321// TString fake = outNames[1];
322// TString clon = outNames[2];
323
324// Int_t nofEvents = HM()->H1("hen_EventNo_TrackingQa")->GetEntries();
325// TCanvas* canvas = CreateCanvas(canvasName.Data(), canvasName.Data(), 1200, 600);
326// canvas->SetGrid();
327// canvas->Divide(2, 1);
328// canvas->cd(1);
329// HM()->H1(sim)->Sumw2();
330// // HM()->H1(sim)->Scale(1. / nofEvents);
331// HM()->H1(rec)->Sumw2();
332// // HM()->H1(rec)->Scale(1. / nofEvents);
333// HM()->H1(well)->Sumw2();
334// // HM()->H1(well)->Scale(1. / nofEvents);
335// HM()->H1(ghost)->Sumw2();
336// // HM()->H1(ghost)->Scale(1. / nofEvents);
337// HM()->H1(split)->Sumw2();
338// // HM()->H1(split)->Scale(1. / nofEvents);
339
340// HM()->H1(sim)->SetMinimum(0.0);
341// HM()->H1(well)->SetMinimum(0.0);
342// HM()->H1(ghost)->SetMinimum(0.0);
343// HM()->H1(split)->SetMinimum(0.0);
344
345// printf("NAME = %s\n", HM()->H1(sim)->GetName());
346// printf("HM()->H1(sim) = %f\n", HM()->H1(sim)->GetEntries());
347// printf("HM()->H1(well) = %f\n", HM()->H1(well)->GetEntries());
348// printf("HM()->H1(ghost) = %f\n", HM()->H1(ghost)->GetEntries());
349// printf("HM()->H1(split) = %f\n", HM()->H1(split)->GetEntries());
350
351// vector<TH1*> histos1;
352// histos1.push_back(HM()->H1(sim));
353// histos1.push_back(HM()->H1(well));
354// histos1.push_back(HM()->H1(ghost));
355// histos1.push_back(HM()->H1(split));
356// vector<string> labels1;
357// labels1.push_back("MC tracks");
358// labels1.push_back("Good tracks");
359// labels1.push_back("Ghost tracks");
360// labels1.push_back("Clones");
361// drawHist->DrawH1(canvas, histos1, labels1, kLinear, kLinear, true, 0.5, 0.8, 1.0, 0.99, "PE1", kFALSE);
362
363// canvas->cd(2);
364// vector<string> labels2;
365// labels2.push_back("Efficiency");
366// labels2.push_back("Ghosts");
367// labels2.push_back("Clones");
368
369// HM()->H1(eff)->Divide(HM()->H1(well), HM()->H1(sim), 1., 1., "B");
370// HM()->H1(eff)->Scale(100.0);
371// HM()->H1(fake)->Divide(HM()->H1(ghost), HM()->H1(rec), 1., 1., "B");
372// HM()->H1(fake)->Scale(100.0);
373// HM()->H1(clon)->Divide(HM()->H1(split), HM()->H1(rec), 1., 1., "B");
374// HM()->H1(clon)->Scale(100.0);
375
376// // Boundary checking.
377// // These cases shouldn't happen, but they happen sometimes...
378// for (Int_t i = 1; i < HM()->H1(eff)->GetNbinsX(); ++i) {
379// if (HM()->H1(eff)->GetBinContent(i) > 100.0) {
380// HM()->H1(eff)->SetBinContent(i, 100.0);
381// HM()->H1(eff)->SetBinError(i, 0.0);
382// }
383// if (HM()->H1(fake)->GetBinContent(i) > 100.0) {
384// HM()->H1(fake)->SetBinContent(i, 100.0);
385// HM()->H1(fake)->SetBinError(i, 0.0);
386// }
387// if (HM()->H1(clon)->GetBinContent(i) > 100.0) {
388// HM()->H1(clon)->SetBinContent(i, 100.0);
389// HM()->H1(clon)->SetBinError(i, 0.0);
390// }
391// if (HM()->H1(eff)->GetBinContent(i) < 0.0) {
392// HM()->H1(eff)->SetBinContent(i, 0.0);
393// HM()->H1(eff)->SetBinError(i, 0.0);
394// }
395// if (HM()->H1(fake)->GetBinContent(i) < 0.0) {
396// HM()->H1(fake)->SetBinContent(i, 0.0);
397// HM()->H1(fake)->SetBinError(i, 0.0);
398// }
399// if (HM()->H1(clon)->GetBinContent(i) < 0.0) {
400// HM()->H1(clon)->SetBinContent(i, 0.0);
401// HM()->H1(clon)->SetBinError(i, 0.0);
402// }
403// }
404
405// HM()->H1(eff)->SetMaximum(100.0);
406// HM()->H1(fake)->SetMaximum(100.0);
407// HM()->H1(clon)->SetMaximum(100.0);
408// HM()->H1(eff)->SetMinimum(0.0);
409// HM()->H1(fake)->SetMinimum(0.0);
410// HM()->H1(clon)->SetMinimum(0.0);
411
412// vector<TH1*> histos2;
413// histos2.push_back(HM()->H1(eff));
414// histos2.push_back(HM()->H1(fake));
415// histos2.push_back(HM()->H1(clon));
416// drawHist->DrawH1(canvas, histos2, labels2, kLinear, kLinear, true, 0.5, 0.9, 1.0, 0.99, "PE1X0", kTRUE);
417// }
418
419void BmnTrackingQaReport::DrawEffGem(const TString canvasName, TString* inNames, TString* outNames)
420{
421 TString sim = inNames[0];
422 TString rec = inNames[1];
423 TString well = inNames[2];
424 TString ghost = inNames[3];
425 TString split = inNames[4];
426
427 TString eff = outNames[0];
428 TString fake = outNames[1];
429 TString clon = outNames[2];
430
431 // Int_t nofEvents = HM()->H1("hen_EventNo_TrackingQa")->GetEntries();
432 TCanvas* canvas = CreateCanvas(canvasName.Data(), canvasName.Data(), 2 * baseW, baseH);
433 canvas->SetGrid();
434 canvas->Divide(2, 1);
435 canvas->cd(1);
436 HM()->H1(sim)->Sumw2();
437 // HM()->H1(sim)->Scale(1. / nofEvents);
438 HM()->H1(rec)->Sumw2();
439 // HM()->H1(rec)->Scale(1. / nofEvents);
440 HM()->H1(well)->Sumw2();
441 // HM()->H1(well)->Scale(1. / nofEvents);
442 HM()->H1(ghost)->Sumw2();
443 // HM()->H1(ghost)->Scale(1. / nofEvents);
444 HM()->H1(split)->Sumw2();
445 // HM()->H1(split)->Scale(1. / nofEvents);
446
447 HM()->H1(sim)->SetMinimum(0.0);
448 HM()->H1(well)->SetMinimum(0.0);
449 HM()->H1(ghost)->SetMinimum(0.0);
450 HM()->H1(split)->SetMinimum(0.0);
451
452 // Debugging
453 // printf("NAME = %s\n", HM()->H1(sim)->GetName());
454 // printf("HM()->H1(sim) = %f\n", HM()->H1(sim)->GetEntries());
455 // printf("HM()->H1(well) = %f\n", HM()->H1(well)->GetEntries());
456 // printf("HM()->H1(ghost) = %f\n", HM()->H1(ghost)->GetEntries());
457 // printf("HM()->H1(split) = %f\n", HM()->H1(split)->GetEntries());
458
459 vector<TH1*> histos1;
460 histos1.push_back(HM()->H1(sim));
461 histos1.push_back(HM()->H1(well));
462 histos1.push_back(HM()->H1(ghost));
463 histos1.push_back(HM()->H1(split));
464 vector<string> labels1;
465 labels1.push_back("MC tracks");
466 labels1.push_back("Good tracks");
467 labels1.push_back("Ghost tracks");
468 labels1.push_back("Clones");
469 drawHist->DrawH1(canvas, histos1, labels1, kLinear, kLinear, true, 0.5, 0.81, 1.0, 0.93, "PE1", kFALSE);
470
471 canvas->cd(2);
472 vector<string> labels2;
473 labels2.push_back("Efficiency");
474 labels2.push_back("Ghosts");
475 labels2.push_back("Clones");
476
477 HM()->H1(eff)->Divide(HM()->H1(well), HM()->H1(sim), 1., 1., "B");
478 HM()->H1(eff)->Scale(100.0);
479 HM()->H1(fake)->Divide(HM()->H1(ghost), HM()->H1(rec), 1., 1., "B");
480 HM()->H1(fake)->Scale(100.0);
481 HM()->H1(clon)->Divide(HM()->H1(split), HM()->H1(rec), 1., 1., "B");
482 HM()->H1(clon)->Scale(100.0);
483
484 // Boundary checking.
485 // These cases shouldn't happen, but they happen sometimes...
486 for (Int_t i = 1; i < HM()->H1(eff)->GetNbinsX(); ++i) {
487 if (HM()->H1(eff)->GetBinContent(i) > 100.0) {
488 HM()->H1(eff)->SetBinContent(i, 100.0);
489 HM()->H1(eff)->SetBinError(i, 0.0);
490 }
491 if (HM()->H1(fake)->GetBinContent(i) > 100.0) {
492 HM()->H1(fake)->SetBinContent(i, 100.0);
493 HM()->H1(fake)->SetBinError(i, 0.0);
494 }
495 if (HM()->H1(clon)->GetBinContent(i) > 100.0) {
496 HM()->H1(clon)->SetBinContent(i, 100.0);
497 HM()->H1(clon)->SetBinError(i, 0.0);
498 }
499 if (HM()->H1(eff)->GetBinContent(i) < 0.0) {
500 HM()->H1(eff)->SetBinContent(i, 0.0);
501 HM()->H1(eff)->SetBinError(i, 0.0);
502 }
503 if (HM()->H1(fake)->GetBinContent(i) < 0.0) {
504 HM()->H1(fake)->SetBinContent(i, 0.0);
505 HM()->H1(fake)->SetBinError(i, 0.0);
506 }
507 if (HM()->H1(clon)->GetBinContent(i) < 0.0) {
508 HM()->H1(clon)->SetBinContent(i, 0.0);
509 HM()->H1(clon)->SetBinError(i, 0.0);
510 }
511 }
512
513 HM()->H1(eff)->SetMaximum(100.0);
514 HM()->H1(fake)->SetMaximum(100.0);
515 HM()->H1(clon)->SetMaximum(100.0);
516 HM()->H1(eff)->SetMinimum(0.0);
517 HM()->H1(fake)->SetMinimum(0.0);
518 HM()->H1(clon)->SetMinimum(0.0);
519
520 vector<TH1*> histos2;
521 histos2.push_back(HM()->H1(eff));
522 histos2.push_back(HM()->H1(fake));
523 histos2.push_back(HM()->H1(clon));
524 drawHist->DrawH1(canvas, histos2, labels2, kLinear, kLinear, true, 0.5, 0.81, 1.0, 0.93, "PE1X0", kTRUE);
525}
526
528{
529 Int_t nofEvents = HM()->H1("hen_EventNo_TrackingQa")->GetEntries();
530 TCanvas* canvas = CreateCanvas(canvasName.Data(), canvasName.Data(), baseW, baseH);
531 canvas->SetGrid();
532 HM()->H1("Well_vs_Nh")->Sumw2();
533 HM()->H1("Well_vs_Nh")->Scale(1. / nofEvents);
534 HM()->H1("Ghost_vs_Nh")->Sumw2();
535 HM()->H1("Ghost_vs_Nh")->Scale(1. / nofEvents);
536 vector<TH1*> histos1;
537 histos1.push_back(HM()->H1("Well_vs_Nh"));
538 histos1.push_back(HM()->H1("Ghost_vs_Nh"));
539 vector<string> labels1;
540 labels1.push_back("Good tracks");
541 labels1.push_back("Ghosts");
542 drawHist->DrawH1(canvas, histos1, labels1, kLinear, kLinear, true, 0.5, 0.81, 1.0, 0.9, "PE1", kFALSE);
543}
544
546{
547 TCanvas* canvas = CreateCanvas(canvasName.Data(), canvasName.Data(), 3 * baseW, baseH);
548 canvas->SetGrid();
549 canvas->Divide(3, 1);
550 canvas->cd(1);
551 drawHist->DrawH1(canvas, HM()->H1("Impact parameter"), kLinear, kLinear, "", kRed, 2, 1, 1.1, 20, 33);
552 canvas->cd(2);
553 drawHist->DrawH1(canvas, HM()->H1("Multiplicity"), kLinear, kLinear, "", kRed, 2, 1, 1.1, 20, 33);
554 canvas->cd(3);
555 drawHist->DrawH2(canvas, HM()->H2("Impact_Mult"), kLinear, kLinear, kLinear, "colz");
556}
557
559 TString name2d,
560 TString nameSigma,
561 TString nameMean,
562 TString nameAver)
563{
564 TCanvas* canvas = CreateCanvas(canvasName.Data(), canvasName.Data(), 4 * baseW, baseH);
565 canvas->SetGrid();
566 canvas->Divide(4, 1);
567 canvas->cd(1);
568 drawHist->DrawH2(canvas, HM()->H2(name2d), kLinear, kLinear, kLinear, "colz");
569
570 canvas->cd(2);
571 FillAndFitSlice(nameSigma, nameMean, name2d);
572 HM()->H1(nameSigma)->SetMaximum(6.0);
573 HM()->H1(nameSigma)->SetMinimum(0.0);
574 drawHist->DrawH1(canvas, HM()->H1(nameSigma), kLinear, kLinear, "PE1", kRed, 1, 0.75, 1.1, 20);
575
576 canvas->cd(3);
577 HM()->H1(nameMean)->SetMaximum(2.0);
578 HM()->H1(nameMean)->SetMinimum(-2.0);
579 drawHist->DrawH1(canvas, HM()->H1(nameMean), kLinear, kLinear, "PE1", kRed, 1, 0.75, 1.1, 20);
580
581 canvas->cd(4);
582 TH1D* projY = HM()->H2(name2d)->ProjectionY("tmp1");
583 for (Int_t iBin = 0; iBin <= projY->GetNbinsX() + 1; ++iBin) {
584 HM()->H1(nameAver)->SetBinContent(iBin, projY->GetBinContent(iBin));
585 }
586
587 drawHist->DrawH1(canvas, HM()->H1(nameAver), kLinear, kLinear, "", kBlue, 1, 0.75, 1.1, 20);
588 // drawHist->DrawH1(canvas, projY, kLinear, kLinear, "", kBlue, 1, 0.75, 1.1, 20);
589 HM()->H1(nameAver)->Fit("gaus", "RQWW", "", -2, 2);
590 HM()->H1(nameAver)->SetMaximum(HM()->H1(nameAver)->GetMaximum() * 1.05);
591 TF1* fit = HM()->H1(nameAver)->GetFunction("gaus");
592 if (!fit)
593 return;
594 TPaveStats* ps =
595 new TPaveStats(3.0, HM()->H1(nameAver)->GetMaximum() / 1.5, 10.0, HM()->H1(nameAver)->GetMaximum());
596 ps->SetFillColor(0);
597 ps->SetShadowColor(0);
598 ps->AddText(Form("#mu = %2.2f", fit->GetParameter(1)));
599 ps->AddText(Form("#sigma = %2.2f", fit->GetParameter(2)));
600 ps->Draw();
601}
602
604{
605 TCanvas* canvas = CreateCanvas(canvasName.Data(), canvasName.Data(), 5 * baseW, 3 * baseH);
606 canvas->SetGrid();
607 canvas->Divide(5, 3);
608
609 for (Int_t i = 0; i < 15; ++i) {
610 canvas->cd(i + 1);
611 if (i < 5 || i > 9)
612 HM()->H1(inNames[i])->Fit("gaus", "RQWW", "", -20, 20);
613 drawHist->DrawH1(canvas, HM()->H1(inNames[i]), kLinear, kLog, "", kBlue, 1, 0.75, 1.1, 20);
614 // if (i > 4) {
615 TF1* fit = HM()->H1(inNames[i])->GetFunction("gaus");
616 if (!fit)
617 continue;
618 Float_t xMax = HM()->H1(inNames[i])->GetXaxis()->GetXmax();
619 Float_t yMax = HM()->H1(inNames[i])->GetMaximum();
620 TPaveStats* ps = new TPaveStats(xMax * 0.2, yMax * 0.1, xMax, yMax);
621 ps->SetFillColor(0);
622 ps->SetShadowColor(0);
623 ps->AddText(Form("#mu = %2.2f", fit->GetParameter(1)));
624 ps->AddText(Form("#sigma = %2.2f", fit->GetParameter(2)));
625 ps->Draw();
626 //}
627 }
628}
629
630// void BmnTrackingQaReport::DrawResAndPull_2D(const TString canvasName, TString* inNames) {
631// TCanvas* canvas = CreateCanvas(canvasName.Data(), canvasName.Data(), 1500, 100);
632// canvas->SetGrid();
633// canvas->Divide(5, 1);
634
635// for (Int_t i = 0; i < 5; ++i) {
636// canvas->cd(i + 1);
637// drawHist->DrawH2(canvas, HM()->H2(inNames[i]), kLinear, kLinear, kLinear, "colz");
638// }
639// }
640
641void BmnTrackingQaReport::DrawPar(const TString canvasName, TString* inNames)
642{
643 TCanvas* canvas = CreateCanvas(canvasName.Data(), canvasName.Data(), 5 * baseW, baseH);
644 canvas->SetGrid();
645 canvas->Divide(5, 1);
646
647 for (Int_t i = 0; i < 5; ++i) {
648 canvas->cd(i + 1);
649 drawHist->DrawH1(canvas, HM()->H1(inNames[i]), kLinear, kLog, "", kRed, 1, 0.75, 1.1, 20);
650 }
651}
652
654{
655 Int_t nBins = HM()->H1(nameSigma)->GetXaxis()->GetNbins();
656 Int_t momResStep = HM()->H2(name2d)->GetNbinsX() / nBins;
657 Int_t bin = 0;
658 for (Int_t iBin = 1; iBin < HM()->H2(name2d)->GetNbinsX(); iBin += momResStep) {
659 TH1D* proj = HM()->H2(name2d)->ProjectionY("tmp", iBin, iBin + (momResStep - 1));
660 bin++;
661 if (proj->GetEntries() < 5)
662 continue;
663 // proj->Integral()
664 proj->Fit("gaus", "SQRww", "", -5.0, 5.0);
665 TF1* fit = proj->GetFunction("gaus");
666 if (!fit)
667 continue;
668 Float_t sigma = fit->GetParameter(2);
669 Float_t sigmaError = fit->GetParError(2);
670 Float_t mean = fit->GetParameter(1);
671 Float_t meanError = fit->GetParError(1);
672 HM()->H1(nameSigma)->SetBinContent(bin, sigma);
673 HM()->H1(nameSigma)->SetBinError(bin, sigmaError);
674 HM()->H1(nameMean)->SetBinContent(bin, mean);
675 HM()->H1(nameMean)->SetBinError(bin, meanError);
676 }
677}
678
679void BmnTrackingQaReport::DrawVertResGem(const TString canvasName, TString name1dX, TString name1dY, TString name1dZ)
680{
681 TCanvas* canvas = CreateCanvas(canvasName.Data(), canvasName.Data(), 3 * baseW, baseH);
682 canvas->SetGrid();
683 canvas->Divide(3, 1);
684
685 canvas->cd(1);
686 HM()->H1(name1dX)->Fit("gaus", "RQWW", "", -1, 1);
687 drawHist->DrawH1(canvas, HM()->H1(name1dX), kLinear, kLinear, "", kBlue, 1, 0.75, 1.1, 20);
688 DrawMuSigma(canvas->cd(1), HM()->H1(name1dX));
689 canvas->cd(2);
690 HM()->H1(name1dY)->Fit("gaus", "RQWW", "", -1, 1);
691 drawHist->DrawH1(canvas, HM()->H1(name1dY), kLinear, kLinear, "", kBlue, 1, 0.75, 1.1, 20);
692 DrawMuSigma(canvas->cd(2), HM()->H1(name1dY));
693 canvas->cd(3);
694 HM()->H1(name1dZ)->Fit("gaus", "RQWW", "", -2, 2);
695 drawHist->DrawH1(canvas, HM()->H1(name1dZ), kLinear, kLinear, "", kBlue, 1, 0.75, 1.1, 20);
696 DrawMuSigma(canvas->cd(3), HM()->H1(name1dZ));
697}
698
700{
701 pad->cd();
702 TF1* fit = h->GetFunction("gaus");
703 if (!fit)
704 return;
705 Float_t xMax = h->GetXaxis()->GetXmax();
706 Float_t yMax = h->GetMaximum();
707 TPaveStats* ps = new TPaveStats(xMax / 2, yMax / 2, xMax, yMax);
708 ps->SetFillColor(0);
709 ps->SetShadowColor(0);
710 ps->AddText(Form("#mu = %2.3f", fit->GetParameter(1)));
711 ps->AddText(Form("#sigma = %2.3f", fit->GetParameter(2)));
712 ps->Draw();
713}
714
715void BmnTrackingQaReport::DrawOneH1(const TString canvasName, const TString name1, const TString drawOpt)
716{
717 TCanvas* canvas = CreateCanvas(canvasName.Data(), canvasName.Data(), baseW, baseH);
718 canvas->SetGrid();
719 drawHist->DrawH1(canvas, HM()->H1(name1), kLinear, kLog, drawOpt.Data(), kRed, 1, 0.75, 1.1, 20);
720}
721
723 const TString name1,
724 const TString name2,
725 const TString drawOpt,
726 Bool_t doFit)
727{
728 TCanvas* canvas = CreateCanvas(canvasName.Data(), canvasName.Data(), 2 * baseW, baseH);
729 canvas->SetGrid();
730 canvas->Divide(2, 1);
731 canvas->cd(1);
732 drawHist->DrawH1(canvas, HM()->H1(name1), kLinear, kLinear, drawOpt.Data(), kRed, 1, 0.75, 1.1, 20);
733 if (doFit) {
734 HM()->H1(name1)->Fit("gaus", "WWQ");
735 DrawMuSigma(canvas->cd(1), HM()->H1(name1));
736 }
737 canvas->cd(2);
738 drawHist->DrawH1(canvas, HM()->H1(name2), kLinear, kLinear, drawOpt.Data(), kRed, 1, 0.75, 1.1, 20);
739 if (doFit) {
740 HM()->H1(name2)->Fit("gaus", "WWQ");
741 DrawMuSigma(canvas->cd(2), HM()->H1(name2));
742 }
743}
744
745void BmnTrackingQaReport::DrawOneH2(const TString canvasName, const TString name1)
746{
747 TCanvas* canvas = CreateCanvas(canvasName.Data(), canvasName.Data(), baseW, baseH);
748 canvas->SetGrid();
749 drawHist->DrawH2(canvas, HM()->H2(name1), kLinear, kLinear, kLinear, "colz");
750}
751
752// void BmnTrackingQaReport::DrawHitRes(TString pref, TString axis) {
753// TString name = Form("%s %s Residuals between hits and tracks", pref.Data(), axis.Data());
754// TCanvas* canvas = CreateCanvas(name.Data(), name.Data(), 1200, 2100);
755// canvas->SetGrid();
756// canvas->Divide(3, 3);
757// for (Int_t i = 0; i < 9; ++i) {
758// canvas->cd(i + 1);
759// HM()->H1(Form("Res%s_%dst", axis.Data(), i))->Fit("gaus", "RQ", "", -0.05, 0.05);
760// drawHist->DrawH1(canvas, HM()->H1(Form("Res%s_%dst", axis.Data(), i)), kLinear, kLinear, "", kBlue, 1,
761// 0.75, 1.1, 20);
762// // HM()->H1(Form("Res%s_%dst", axis.Data(), i))->GetYaxis()->SetMaxDigits(2);
763// // TGaxis::SetMaxDigits(2);
764// DrawMuSigma(canvas->cd(i + 1), HM()->H1(Form("Res%s_%dst", axis.Data(), i)));
765// }
766// }
767
769 const TString name1,
770 const TString name2,
771 Int_t w,
772 Int_t h)
773{
774 TCanvas* canvas = CreateCanvas(canvasName.Data(), canvasName.Data(), w, h);
775 canvas->SetGrid();
776 canvas->Divide(2, 1);
777 canvas->cd(1);
778 drawHist->DrawH2(canvas, HM()->H2(name1), kLinear, kLinear, kLinear, "colz");
779 canvas->cd(2);
780 drawHist->DrawH2(canvas, HM()->H2(name2), kLinear, kLinear, kLinear, "colz");
781}
782
784 const TString name1,
785 const TString name2,
786 const TString name3)
787{
788 TCanvas* canvas = CreateCanvas(canvasName.Data(), canvasName.Data(), 3 * baseW, baseH);
789 canvas->SetGrid();
790 canvas->Divide(3, 1);
791 canvas->cd(1);
792 drawHist->DrawH2(canvas, HM()->H2(name1), kLinear, kLinear, kLinear, "colz");
793 canvas->cd(2);
794 drawHist->DrawH2(canvas, HM()->H2(name2), kLinear, kLinear, kLinear, "colz");
795 canvas->cd(3);
796 drawHist->DrawH2(canvas, HM()->H2(name3), kLinear, kLinear, kLinear, "colz");
797}
798
800 const TString name1,
801 const TString name2,
802 const TString name3)
803{
804 TCanvas* canvas = CreateCanvas(canvasName.Data(), canvasName.Data(), 3 * baseW, baseH);
805 canvas->SetGrid();
806 canvas->Divide(3, 1);
807 canvas->cd(1);
808 drawHist->DrawH1(canvas, HM()->H1(name1), kLinear, kLinear, "", kBlue, 1, 0.75, 1.1, 20);
809 canvas->cd(2);
810 drawHist->DrawH1(canvas, HM()->H1(name2), kLinear, kLinear, "", kBlue, 1, 0.75, 1.1, 20);
811 canvas->cd(3);
812 drawHist->DrawH1(canvas, HM()->H1(name3), kLinear, kLinear, "", kBlue, 1, 0.75, 1.1, 20);
813}
int i
Definition P4_F32vec4.h:22
Create report for tracking QA.
FairTask for tracking performance calculation.
bool Bool_t
int Int_t
float Float_t
constexpr Bool_t kFALSE
constexpr Bool_t kTRUE
kRed
kBlue
char * Form(const char *fmt,...)
R__EXTERN TStyle * gStyle
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)
Definition BmnReport.h:56
void PrintCanvases() const
Print images created from canvases in the report.
const BmnReportElement * R() const
Accessor to BmnReportElement object.
Definition BmnReport.h:45
TCanvas * CreateCanvas(const char *name, const char *title, Int_t ww, Int_t wh)
Create canvas and put it to vector of TCanvases.
Definition BmnReport.cxx:75
ostream & Out() const
All text output goes to this stream.
Definition BmnReport.h:50
BmnHistManager * HM() const
Return pointer to Histogram manager.
BmnSimulationReport()
Constructor.
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)
vector< string > fGlobalTrackVariants
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)
virtual void SetFillColor(Color_t fcolor)
Double_t GetXmax() const
Int_t GetNbins() const
TVirtualPad * cd(Int_t subpadnumber=0) override
virtual Double_t GetParameter(const TString &name) const
virtual Double_t GetParError(const char *name) const
virtual Double_t GetMean(Int_t axis=1) const
TAxis * GetXaxis()
virtual TFitResultPtr Fit(const char *formula, Option_t *option="", Option_t *goption="", Double_t xmin=0, Double_t xmax=0)
virtual Double_t GetMaximum(Double_t maxval=FLT_MAX) const
virtual Int_t GetNbinsX() const
virtual void SetMaximum(Double_t maximum=-1111)
virtual void SetBinError(Int_t bin, Double_t error)
TAxis * GetYaxis()
virtual void SetMinimum(Double_t minimum=-1111)
virtual void SetBinContent(Int_t bin, Double_t content)
virtual Double_t GetEntries() const
virtual TF1 * GetFunction(const char *name) const
virtual Double_t GetBinContent(Int_t bin) const
virtual Bool_t Divide(const TH1 *h1)
virtual void Scale(Double_t c1=1, Option_t *option="")
virtual void Sumw2(Bool_t flag=kTRUE)
TH1D * ProjectionY(const char *name="_py", Int_t firstxbin=0, Int_t lastxbin=-1, Option_t *option="") const
void SetBinContent(Int_t bin, Double_t content) override
virtual Double_t GetBinContent(Int_t bin) const
virtual const char * GetTitle() const
void SetGrid(Int_t valuex=1, Int_t valuey=1) override
void Divide(Int_t nx=1, Int_t ny=1, Float_t xmargin=0.01, Float_t ymargin=0.01, Int_t color=0) override
virtual TText * AddText(const char *label)
void Draw(Option_t *option="") override
virtual void SetShadowColor(Int_t color)
const char * Data() const
virtual TVirtualPad * cd(Int_t subpadnumber=0)=0
void SetDefaultDrawStyle()
@ kLinear
Definition BmnDrawHist.h:66
@ kLog
Definition BmnDrawHist.h:65
const Int_t baseH
const Int_t baseW
Definition json.hpp:4446