BmnRoot
Loading...
Searching...
No Matches
BmnTrackingQaReport.cxx
Go to the documentation of this file.
1
8#include <fstream>
9#include <set>
10#include <vector>
11#include "BmnTrackingQa.h"
12#include "BmnUtils.h"
13#include "TCanvas.h"
14#include "TF1.h"
15#include "TGaxis.h"
16#include "TH1.h"
17#include "TLatex.h"
18#include "TLine.h"
19#include "TPaveStats.h"
20#include "TString.h"
21#include "TStyle.h"
22#include "map"
23#include "BmnDrawHist.h"
24#include "BmnDrawOnline.h"
25#include "BmnHistManager.h"
26#include "BmnReportElement.h"
27
28
29using namespace std;
30using namespace lit;
31
33 fGlobalTrackVariants() {
34 SetReportName("tracking_qa");
35}
36
38 fGlobalTrackVariants(),
39 fPrefix("") {
40 SetReportName(name);
41}
42
45
47 Out().precision(3);
48 Out() << R()->DocumentBegin();
49 Out() << R()->Title(0, GetTitle());
50 Out() << PrintEventInfo();
51 Out() << "<hr>" << endl;
53 Out() << R()->DocumentEnd();
54}
55
57 // Out() << "<h2>Event generator: QGSM</h2>" << endl; //FIXME!
58 // Out() << "<h2>Energy: 4 GeV/n</h2>" << endl; //FIXME!
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;
71 ifstream inTiming;
72 inTiming.open("timing.txt");
73 if (inTiming.is_open()) {
74 TString a1, a2, a3;
75 Float_t workTime;
76 while (!inTiming.eof()) {
77 inTiming >> a1 >> a2 >> a3 >> workTime;
78 Out() << "<h3>"
79 << "Average time of " << a1 << " " << a2 << ": " << workTime / HM()->H1("hen_EventNo_TrackingQa")->GetEntries() * 1000.0 << " ms/event "
80 << "</h3>" << endl;
81 }
82 }
83 inTiming.close();
84 return "<hr>";
85}
86
88 gStyle->SetPalette(77);
89 drawHist = new BmnDrawOnline("RECREATE");
90 DrawEventsInfo(fPrefix + "Impact parameter and multiplicity");
92
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"};
95 DrawEffGem(fPrefix + "Efficiency on momentum", pNamesIn, pNamesOut);
96
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);
100
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"};
103 DrawEffGem(fPrefix + "Efficiency on pseudorapidity", etaNamesIn, etaNamesOut);
104
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"};
107 DrawEffGem(fPrefix + "Efficiency on theta", thetaNamesIn, thetaNamesOut);
108
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"};
111 DrawEffGem(fPrefix + "Efficiency on number of hits", nhNamesIn, nhNamesOut);
112
113 //DrawNhitsGem(fPrefix + "Distribution of RECO-tracks vs number of hits per track");
114
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);
118 DrawTwoH2(fPrefix + "Distribution of tracks over Pseudorapidity and Momentum", "EtaP_sim", "EtaP_rec", 2 * baseW, baseH);
119
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);
127 }
128 }
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);
136 }
137 }
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);
145 }
146 }
147
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");
150 DrawTwoH2(fPrefix + "Distribution of tracks over Theta and Momentum", "ThetaP_sim", "ThetaP_rec", 2 * baseW, baseH);
151 DrawTwoH2(fPrefix + "P_reco vs P_mc", "P_rec_P_sim", "Pt_rec_Pt_sim", 2 * baseW, baseH);
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);
155 DrawMomResGem(fPrefix + "Tx resolution", "TxRes_2D", "TxRes_1D", "TxMean_1D", "TxRes_Mean");
156 DrawMomResGem(fPrefix + "Ty resolution", "TyRes_2D", "TyRes_1D", "TyMean_1D", "TyRes_Mean");
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");
159 DrawMomResGem(fPrefix + "Px resolution", "PxRes_2D", "PxRes_1D", "PxMean_1D", "PxRes_Mean");
160 DrawMomResGem(fPrefix + "Py resolution", "PyRes_2D", "PyRes_1D", "PyMean_1D", "PyRes_Mean");
161 DrawMomResGem(fPrefix + "Pz resolution", "PzRes_2D", "PzRes_1D", "PzMean_1D", "PzRes_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");
165 DrawTwoH2(fPrefix + "Tracks quality distributions", "MomRes_vs_Chi2", "Mom_vs_Chi2", 2 * baseW, baseH);
166 //DrawTwoH2(fPrefix + "Momentum resolution and momentum vs. length of tracks", "MomRes_vs_Length", "Mom_vs_Length");
167 //DrawOneH2(fPrefix + "Momentum resolution vs. Number of hits", "MomRes_vs_nHits");
168 //DrawOneH2(fPrefix + "Momentum resolution vs. theta", "MomRes_vs_Theta");
169 DrawTwoH1(fPrefix + "Chi-square and length distributions", "Chi2", "Length", "", kFALSE);
170
171 /* New
172 DrawHitRes(fPrefix, "X");
173 DrawHitRes(fPrefix, "Y");
174
175 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"};
176 // TString namesRes_vs_ParF[5] = {"ResX_vs_X_f", "ResY_vs_Y_f", "ResTx_vs_Tx_f", "ResTy_vs_Ty_f", "ResQp_vs_Qp_f"};
177 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"};
178
179 DrawResAndPull(fPrefix + "Residuals and Pulls for first parameters GLOB", namesResPullsF);
180 // DrawResAndPull_2D(fPrefix + "Residuals vs Parameters for first parameters GLOB", namesRes_vs_ParF);
181 DrawResAndPull(fPrefix + "Residuals and Pulls for last parameters GLOB", namesResPullsL);
182
183 New */
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"};
186 DrawPar(fPrefix + "First parameters", namesParF);
187 DrawPar(fPrefix + "Last parameters", namesParL);
188
189 DrawThreeH2(fPrefix + "Vertex vs number of tracks in event", "VertX_vs_Ntracks", "VertY_vs_Ntracks", "VertZ_vs_Ntracks");
190 DrawVertResGem(fPrefix + "Vertex resolution", "VertResX", "VertResY", "VertResZ");
191 DrawThreeH1(fPrefix + "Vertex distribution for X and Y directions", "VertX", "VertY", "VertZ");
192
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"};
195 DrawEffGem(fPrefix + "Efficiency on multiplicity", multNamesIn, multNamesOut);
196
197 //Вызов метода, который поместит все гистограммы на один холст
198 //drawHist -> DrawMainCanvas("Inner tracking");
199
200
201 // DrawHitRes(fPrefix, "X");
202 // DrawHitRes(fPrefix, "Y");
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"};
205 DrawResAndPull(fPrefix + "Residuals and Pulls for first parameters GLOB", namesResPullsF);
206
207 //TOF
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);
214
215
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);
224
225 //drawHist->DrawMainCanvas("TOF");
226
227 //CSC
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);
233 DrawTwoH2(fPrefix + "Residuals over rigidity for CSC", "x_resi_vs_mom_csc_good", "y_resi_vs_mom_csc_good", 2 * baseW, baseH);
234
235 //drawHist->DrawMainCanvas("CSC");
236
237 //DCH1
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);
244
245 //DCH2
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);
252
253 //drawHist->DrawMainCanvas("DCH");
254}
255
256// void BmnTrackingQaReport::DrawEffGem(const TString canvasName, TString* inNames, TString* outNames) {
257// TString sim = inNames[0];
258// TString rec = inNames[1];
259// TString well = inNames[2];
260// TString ghost = inNames[3];
261// TString split = inNames[4];
262
263// TString eff = outNames[0];
264// TString fake = outNames[1];
265// TString clon = outNames[2];
266
267// Int_t nofEvents = HM()->H1("hen_EventNo_TrackingQa")->GetEntries();
268// TCanvas* canvas = CreateCanvas(canvasName.Data(), canvasName.Data(), 1200, 600);
269// canvas->SetGrid();
270// canvas->Divide(2, 1);
271// canvas->cd(1);
272// HM()->H1(sim)->Sumw2();
273// // HM()->H1(sim)->Scale(1. / nofEvents);
274// HM()->H1(rec)->Sumw2();
275// // HM()->H1(rec)->Scale(1. / nofEvents);
276// HM()->H1(well)->Sumw2();
277// // HM()->H1(well)->Scale(1. / nofEvents);
278// HM()->H1(ghost)->Sumw2();
279// // HM()->H1(ghost)->Scale(1. / nofEvents);
280// HM()->H1(split)->Sumw2();
281// // HM()->H1(split)->Scale(1. / nofEvents);
282
283// HM()->H1(sim)->SetMinimum(0.0);
284// HM()->H1(well)->SetMinimum(0.0);
285// HM()->H1(ghost)->SetMinimum(0.0);
286// HM()->H1(split)->SetMinimum(0.0);
287
288// printf("NAME = %s\n", HM()->H1(sim)->GetName());
289// printf("HM()->H1(sim) = %f\n", HM()->H1(sim)->GetEntries());
290// printf("HM()->H1(well) = %f\n", HM()->H1(well)->GetEntries());
291// printf("HM()->H1(ghost) = %f\n", HM()->H1(ghost)->GetEntries());
292// printf("HM()->H1(split) = %f\n", HM()->H1(split)->GetEntries());
293
294// vector<TH1*> histos1;
295// histos1.push_back(HM()->H1(sim));
296// histos1.push_back(HM()->H1(well));
297// histos1.push_back(HM()->H1(ghost));
298// histos1.push_back(HM()->H1(split));
299// vector<string> labels1;
300// labels1.push_back("MC tracks");
301// labels1.push_back("Good tracks");
302// labels1.push_back("Ghost tracks");
303// labels1.push_back("Clones");
304// drawHist->DrawH1(canvas, histos1, labels1, kLinear, kLinear, true, 0.5, 0.8, 1.0, 0.99, "PE1", kFALSE);
305
306// canvas->cd(2);
307// vector<string> labels2;
308// labels2.push_back("Efficiency");
309// labels2.push_back("Ghosts");
310// labels2.push_back("Clones");
311
312// HM()->H1(eff)->Divide(HM()->H1(well), HM()->H1(sim), 1., 1., "B");
313// HM()->H1(eff)->Scale(100.0);
314// HM()->H1(fake)->Divide(HM()->H1(ghost), HM()->H1(rec), 1., 1., "B");
315// HM()->H1(fake)->Scale(100.0);
316// HM()->H1(clon)->Divide(HM()->H1(split), HM()->H1(rec), 1., 1., "B");
317// HM()->H1(clon)->Scale(100.0);
318
319// // Boundary checking.
320// // These cases shouldn't happen, but they happen sometimes...
321// for (Int_t i = 1; i < HM()->H1(eff)->GetNbinsX(); ++i) {
322// if (HM()->H1(eff)->GetBinContent(i) > 100.0) {
323// HM()->H1(eff)->SetBinContent(i, 100.0);
324// HM()->H1(eff)->SetBinError(i, 0.0);
325// }
326// if (HM()->H1(fake)->GetBinContent(i) > 100.0) {
327// HM()->H1(fake)->SetBinContent(i, 100.0);
328// HM()->H1(fake)->SetBinError(i, 0.0);
329// }
330// if (HM()->H1(clon)->GetBinContent(i) > 100.0) {
331// HM()->H1(clon)->SetBinContent(i, 100.0);
332// HM()->H1(clon)->SetBinError(i, 0.0);
333// }
334// if (HM()->H1(eff)->GetBinContent(i) < 0.0) {
335// HM()->H1(eff)->SetBinContent(i, 0.0);
336// HM()->H1(eff)->SetBinError(i, 0.0);
337// }
338// if (HM()->H1(fake)->GetBinContent(i) < 0.0) {
339// HM()->H1(fake)->SetBinContent(i, 0.0);
340// HM()->H1(fake)->SetBinError(i, 0.0);
341// }
342// if (HM()->H1(clon)->GetBinContent(i) < 0.0) {
343// HM()->H1(clon)->SetBinContent(i, 0.0);
344// HM()->H1(clon)->SetBinError(i, 0.0);
345// }
346// }
347
348// HM()->H1(eff)->SetMaximum(100.0);
349// HM()->H1(fake)->SetMaximum(100.0);
350// HM()->H1(clon)->SetMaximum(100.0);
351// HM()->H1(eff)->SetMinimum(0.0);
352// HM()->H1(fake)->SetMinimum(0.0);
353// HM()->H1(clon)->SetMinimum(0.0);
354
355// vector<TH1*> histos2;
356// histos2.push_back(HM()->H1(eff));
357// histos2.push_back(HM()->H1(fake));
358// histos2.push_back(HM()->H1(clon));
359// drawHist->DrawH1(canvas, histos2, labels2, kLinear, kLinear, true, 0.5, 0.9, 1.0, 0.99, "PE1X0", kTRUE);
360// }
361
362void BmnTrackingQaReport::DrawEffGem(const TString canvasName, TString* inNames, TString* outNames) {
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];
368
369 TString eff = outNames[0];
370 TString fake = outNames[1];
371 TString clon = outNames[2];
372
373 //Int_t nofEvents = HM()->H1("hen_EventNo_TrackingQa")->GetEntries();
374 TCanvas* canvas = CreateCanvas(canvasName.Data(), canvasName.Data(), 2 * baseW, baseH);
375 canvas->SetGrid();
376 canvas->Divide(2, 1);
377 canvas->cd(1);
378 HM()->H1(sim)->Sumw2();
379 // HM()->H1(sim)->Scale(1. / nofEvents);
380 HM()->H1(rec)->Sumw2();
381 // HM()->H1(rec)->Scale(1. / nofEvents);
382 HM()->H1(well)->Sumw2();
383 // HM()->H1(well)->Scale(1. / nofEvents);
384 HM()->H1(ghost)->Sumw2();
385 // HM()->H1(ghost)->Scale(1. / nofEvents);
386 HM()->H1(split)->Sumw2();
387 // HM()->H1(split)->Scale(1. / nofEvents);
388
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);
393
394//Debugging
395 // printf("NAME = %s\n", HM()->H1(sim)->GetName());
396 // printf("HM()->H1(sim) = %f\n", HM()->H1(sim)->GetEntries());
397 // printf("HM()->H1(well) = %f\n", HM()->H1(well)->GetEntries());
398 // printf("HM()->H1(ghost) = %f\n", HM()->H1(ghost)->GetEntries());
399 // printf("HM()->H1(split) = %f\n", HM()->H1(split)->GetEntries());
400
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);
412
413 canvas->cd(2);
414 vector<string> labels2;
415 labels2.push_back("Efficiency");
416 labels2.push_back("Ghosts");
417 labels2.push_back("Clones");
418
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);
425
426 // Boundary checking.
427 // These cases shouldn't happen, but they happen sometimes...
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);
432 }
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);
436 }
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);
440 }
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);
444 }
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);
448 }
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);
452 }
453 }
454
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);
461
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);
467}
468
469void BmnTrackingQaReport::DrawNhitsGem(const TString canvasName) {
470 Int_t nofEvents = HM()->H1("hen_EventNo_TrackingQa")->GetEntries();
471 TCanvas* canvas = CreateCanvas(canvasName.Data(), canvasName.Data(), baseW, baseH);
472 canvas->SetGrid();
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);
484}
485
486void BmnTrackingQaReport::DrawEventsInfo(const TString canvasName) {
487 TCanvas* canvas = CreateCanvas(canvasName.Data(), canvasName.Data(), 3 * baseW, baseH);
488 canvas->SetGrid();
489 canvas->Divide(3, 1);
490 canvas->cd(1);
491 drawHist->DrawH1(canvas, HM()->H1("Impact parameter"), kLinear, kLinear, "", kRed, 2, 1, 1.1, 20, 33);
492 canvas->cd(2);
493 drawHist->DrawH1(canvas, HM()->H1("Multiplicity"), kLinear, kLinear, "", kRed, 2, 1, 1.1, 20, 33);
494 canvas->cd(3);
495 drawHist->DrawH2(canvas, HM()->H2("Impact_Mult"), kLinear, kLinear, kLinear, "colz");
496}
497
498void BmnTrackingQaReport::DrawMomResGem(const TString canvasName, TString name2d, TString nameSigma, TString nameMean, TString nameAver) {
499 TCanvas* canvas = CreateCanvas(canvasName.Data(), canvasName.Data(), 4 * baseW, baseH);
500 canvas->SetGrid();
501 canvas->Divide(4, 1);
502 canvas->cd(1);
503 drawHist->DrawH2(canvas, HM()->H2(name2d), kLinear, kLinear, kLinear, "colz");
504
505 canvas->cd(2);
506 FillAndFitSlice(nameSigma, nameMean, name2d);
507 HM()->H1(nameSigma)->SetMaximum(6.0);
508 HM()->H1(nameSigma)->SetMinimum(0.0);
509 drawHist->DrawH1(canvas, HM()->H1(nameSigma), kLinear, kLinear, "PE1", kRed, 1, 0.75, 1.1, 20);
510
511 canvas->cd(3);
512 HM()->H1(nameMean)->SetMaximum(2.0);
513 HM()->H1(nameMean)->SetMinimum(-2.0);
514 drawHist->DrawH1(canvas, HM()->H1(nameMean), kLinear, kLinear, "PE1", kRed, 1, 0.75, 1.1, 20);
515
516 canvas->cd(4);
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));
520 }
521
522 drawHist->DrawH1(canvas, HM()->H1(nameAver), kLinear, kLinear, "", kBlue, 1, 0.75, 1.1, 20);
523 // drawHist->DrawH1(canvas, projY, kLinear, kLinear, "", kBlue, 1, 0.75, 1.1, 20);
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");
527 if (!fit) return;
528 TPaveStats* ps = new TPaveStats(3.0, HM()->H1(nameAver)->GetMaximum() / 1.5, 10.0, HM()->H1(nameAver)->GetMaximum());
529 ps->SetFillColor(0);
530 ps->SetShadowColor(0);
531 ps->AddText(Form("#mu = %2.2f", fit->GetParameter(1)));
532 ps->AddText(Form("#sigma = %2.2f", fit->GetParameter(2)));
533 ps->Draw();
534}
535
536void BmnTrackingQaReport::DrawResAndPull(const TString canvasName, TString* inNames) {
537 TCanvas* canvas = CreateCanvas(canvasName.Data(), canvasName.Data(), 5 * baseW, 3 * baseH);
538 canvas->SetGrid();
539 canvas->Divide(5, 3);
540
541 for (Int_t i = 0; i < 15; ++i) {
542 canvas->cd(i + 1);
543 if (i < 5 || i > 9) HM()->H1(inNames[i])->Fit("gaus", "RQWW", "", -20, 20);
544 drawHist->DrawH1(canvas, HM()->H1(inNames[i]), kLinear, kLog, "", kBlue, 1, 0.75, 1.1, 20);
545 //if (i > 4) {
546 TF1* fit = HM()->H1(inNames[i])->GetFunction("gaus");
547 if (!fit) continue;
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);
551 ps->SetFillColor(0);
552 ps->SetShadowColor(0);
553 ps->AddText(Form("#mu = %2.2f", fit->GetParameter(1)));
554 ps->AddText(Form("#sigma = %2.2f", fit->GetParameter(2)));
555 ps->Draw();
556 //}
557 }
558}
559
560// void BmnTrackingQaReport::DrawResAndPull_2D(const TString canvasName, TString* inNames) {
561// TCanvas* canvas = CreateCanvas(canvasName.Data(), canvasName.Data(), 1500, 100);
562// canvas->SetGrid();
563// canvas->Divide(5, 1);
564
565// for (Int_t i = 0; i < 5; ++i) {
566// canvas->cd(i + 1);
567// drawHist->DrawH2(canvas, HM()->H2(inNames[i]), kLinear, kLinear, kLinear, "colz");
568// }
569// }
570
571void BmnTrackingQaReport::DrawPar(const TString canvasName, TString* inNames) {
572 TCanvas* canvas = CreateCanvas(canvasName.Data(), canvasName.Data(), 5 * baseW, baseH);
573 canvas->SetGrid();
574 canvas->Divide(5, 1);
575
576 for (Int_t i = 0; i < 5; ++i) {
577 canvas->cd(i + 1);
578 drawHist->DrawH1(canvas, HM()->H1(inNames[i]), kLinear, kLog, "", kRed, 1, 0.75, 1.1, 20);
579 }
580}
581
582void BmnTrackingQaReport::FillAndFitSlice(TString nameSigma, TString nameMean, TString name2d) {
583 Int_t nBins = HM()->H1(nameSigma)->GetXaxis()->GetNbins();
584 Int_t momResStep = HM()->H2(name2d)->GetNbinsX() / nBins;
585 Int_t bin = 0;
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));
588 bin++;
589 if (proj->GetEntries() < 5) continue;
590 // proj->Integral()
591 proj->Fit("gaus", "SQRww", "", -5.0, 5.0);
592 TF1* fit = proj->GetFunction("gaus");
593 if (!fit) continue;
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);
602 }
603}
604
605void BmnTrackingQaReport::DrawVertResGem(const TString canvasName, TString name1dX, TString name1dY, TString name1dZ) {
606 TCanvas* canvas = CreateCanvas(canvasName.Data(), canvasName.Data(), 3 * baseW, baseH);
607 canvas->SetGrid();
608 canvas->Divide(3, 1);
609
610 canvas->cd(1);
611 HM()->H1(name1dX)->Fit("gaus", "RQWW", "", -1, 1);
612 drawHist->DrawH1(canvas, HM()->H1(name1dX), kLinear, kLinear, "", kBlue, 1, 0.75, 1.1, 20);
613 DrawMuSigma(canvas->cd(1), HM()->H1(name1dX));
614 canvas->cd(2);
615 HM()->H1(name1dY)->Fit("gaus", "RQWW", "", -1, 1);
616 drawHist->DrawH1(canvas, HM()->H1(name1dY), kLinear, kLinear, "", kBlue, 1, 0.75, 1.1, 20);
617 DrawMuSigma(canvas->cd(2), HM()->H1(name1dY));
618 canvas->cd(3);
619 HM()->H1(name1dZ)->Fit("gaus", "RQWW", "", -2, 2);
620 drawHist->DrawH1(canvas, HM()->H1(name1dZ), kLinear, kLinear, "", kBlue, 1, 0.75, 1.1, 20);
621 DrawMuSigma(canvas->cd(3), HM()->H1(name1dZ));
622}
623
624void BmnTrackingQaReport::DrawMuSigma(TVirtualPad* pad, TH1* h) {
625 pad->cd();
626 TF1* fit = h->GetFunction("gaus");
627 if (!fit) return;
628 Float_t xMax = h->GetXaxis()->GetXmax();
629 Float_t yMax = h->GetMaximum();
630 TPaveStats* ps = new TPaveStats(xMax / 2, yMax / 2, xMax, yMax);
631 ps->SetFillColor(0);
632 ps->SetShadowColor(0);
633 ps->AddText(Form("#mu = %2.3f", fit->GetParameter(1)));
634 ps->AddText(Form("#sigma = %2.3f", fit->GetParameter(2)));
635 ps->Draw();
636}
637
638void BmnTrackingQaReport::DrawOneH1(const TString canvasName, const TString name1, const TString drawOpt) {
639 TCanvas* canvas = CreateCanvas(canvasName.Data(), canvasName.Data(), baseW, baseH);
640 canvas->SetGrid();
641 drawHist->DrawH1(canvas, HM()->H1(name1), kLinear, kLog, drawOpt.Data(), kRed, 1, 0.75, 1.1, 20);
642}
643
644void BmnTrackingQaReport::DrawTwoH1(const TString canvasName, const TString name1, const TString name2, const TString drawOpt, Bool_t doFit) {
645 TCanvas* canvas = CreateCanvas(canvasName.Data(), canvasName.Data(), 2 * baseW, baseH);
646 canvas->SetGrid();
647 canvas->Divide(2, 1);
648 canvas->cd(1);
649 drawHist->DrawH1(canvas, HM()->H1(name1), kLinear, kLinear, drawOpt.Data(), kRed, 1, 0.75, 1.1, 20);
650 if (doFit) {
651 HM()->H1(name1)->Fit("gaus", "WWQ");
652 DrawMuSigma(canvas->cd(1), HM()->H1(name1));
653 }
654 canvas->cd(2);
655 drawHist->DrawH1(canvas, HM()->H1(name2), kLinear, kLinear, drawOpt.Data(), kRed, 1, 0.75, 1.1, 20);
656 if (doFit) {
657 HM()->H1(name2)->Fit("gaus", "WWQ");
658 DrawMuSigma(canvas->cd(2), HM()->H1(name2));
659 }
660}
661
662void BmnTrackingQaReport::DrawOneH2(const TString canvasName, const TString name1) {
663 TCanvas* canvas = CreateCanvas(canvasName.Data(), canvasName.Data(), baseW, baseH);
664 canvas->SetGrid();
665 drawHist->DrawH2(canvas, HM()->H2(name1), kLinear, kLinear, kLinear, "colz");
666}
667
668// void BmnTrackingQaReport::DrawHitRes(TString pref, TString axis) {
669// TString name = Form("%s %s Residuals between hits and tracks", pref.Data(), axis.Data());
670// TCanvas* canvas = CreateCanvas(name.Data(), name.Data(), 1200, 2100);
671// canvas->SetGrid();
672// canvas->Divide(3, 3);
673// for (Int_t i = 0; i < 9; ++i) {
674// canvas->cd(i + 1);
675// HM()->H1(Form("Res%s_%dst", axis.Data(), i))->Fit("gaus", "RQ", "", -0.05, 0.05);
676// drawHist->DrawH1(canvas, HM()->H1(Form("Res%s_%dst", axis.Data(), i)), kLinear, kLinear, "", kBlue, 1, 0.75, 1.1, 20);
677// // HM()->H1(Form("Res%s_%dst", axis.Data(), i))->GetYaxis()->SetMaxDigits(2);
678// // TGaxis::SetMaxDigits(2);
679// DrawMuSigma(canvas->cd(i + 1), HM()->H1(Form("Res%s_%dst", axis.Data(), i)));
680// }
681// }
682
683void BmnTrackingQaReport::DrawTwoH2(const TString canvasName, const TString name1, const TString name2, Int_t w, Int_t h) {
684 TCanvas* canvas = CreateCanvas(canvasName.Data(), canvasName.Data(), w, h);
685 canvas->SetGrid();
686 canvas->Divide(2, 1);
687 canvas->cd(1);
688 drawHist->DrawH2(canvas, HM()->H2(name1), kLinear, kLinear, kLinear, "colz");
689 canvas->cd(2);
690 drawHist->DrawH2(canvas, HM()->H2(name2), kLinear, kLinear, kLinear, "colz");
691}
692
693void BmnTrackingQaReport::DrawThreeH2(const TString canvasName, const TString name1, const TString name2, const TString name3) {
694 TCanvas* canvas = CreateCanvas(canvasName.Data(), canvasName.Data(), 3 * baseW, baseH);
695 canvas->SetGrid();
696 canvas->Divide(3, 1);
697 canvas->cd(1);
698 drawHist->DrawH2(canvas, HM()->H2(name1), kLinear, kLinear, kLinear, "colz");
699 canvas->cd(2);
700 drawHist->DrawH2(canvas, HM()->H2(name2), kLinear, kLinear, kLinear, "colz");
701 canvas->cd(3);
702 drawHist->DrawH2(canvas, HM()->H2(name3), kLinear, kLinear, kLinear, "colz");
703}
704
705void BmnTrackingQaReport::DrawThreeH1(const TString canvasName, const TString name1, const TString name2, const TString name3) {
706 TCanvas* canvas = CreateCanvas(canvasName.Data(), canvasName.Data(), 3 * baseW, baseH);
707 canvas->SetGrid();
708 canvas->Divide(3, 1);
709 canvas->cd(1);
710 drawHist->DrawH1(canvas, HM()->H1(name1), kLinear, kLinear, "", kBlue, 1, 0.75, 1.1, 20);
711 canvas->cd(2);
712 drawHist->DrawH1(canvas, HM()->H1(name2), kLinear, kLinear, "", kBlue, 1, 0.75, 1.1, 20);
713 canvas->cd(3);
714 drawHist->DrawH1(canvas, HM()->H1(name3), kLinear, kLinear, "", kBlue, 1, 0.75, 1.1, 20);
715}
int i
Definition P4_F32vec4.h:22
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)
Definition BmnReport.h:56
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...
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. Canvases created with this function will be automati...
Definition BmnReport.cxx:75
ostream & Out() const
All text output goes to this stream.
Definition BmnReport.h:50
Base class for simulation reports.
BmnHistManager * HM() const
Return pointer to Histogram manager.
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()
@ kLinear
Definition BmnDrawHist.h:71
@ kLog
Definition BmnDrawHist.h:70
const Int_t baseH
const Int_t baseW
STL namespace.