13 TF1 *
fit =
new TF1(
"fit",
"gaus", -0.01, 0.01);
14 TF1 *fit2 =
new TF1(
"fit2",
"gaus", -0.1, 0.1);
15 TF1 *fit3 =
new TF1(
"fit3",
"gaus", -1, 1);
17 std::vector<double> sigma_pt1;
18 std::vector<double> error_pt1;
19 std::vector<double> sigma_pt2;
20 std::vector<double> error_pt2;
21 std::vector<double> sigma_pt3;
22 std::vector<double> error_pt3;
23 std::vector<double> sigma_eta;
24 std::vector<double> error_eta;
25 std::vector<double> sigma_phi;
26 std::vector<double> error_phi;
27 std::vector<double> sigma_VtxZ;
28 std::vector<double> error_VtxZ;
29 std::vector<double> sigma_d0;
30 std::vector<double> error_d0;
32 float eta_bins[] = {0.0, 0.7, 1.0, 1.2, 1.6, 2.0, 2.4};
53 MonitorElement *merespt_eta0to0p7_pt2to3 =
dbe->
get(
"SiOuterTrackerV/Tracks/Resolution/respt_eta0to0p7_pt2to3");
54 MonitorElement *merespt_eta0p7to1_pt2to3 =
dbe->
get(
"SiOuterTrackerV/Tracks/Resolution/respt_eta0p7to1_pt2to3");
55 MonitorElement *merespt_eta1to1p2_pt2to3 =
dbe->
get(
"SiOuterTrackerV/Tracks/Resolution/respt_eta1to1p2_pt2to3");
56 MonitorElement *merespt_eta1p2to1p6_pt2to3 =
dbe->
get(
"SiOuterTrackerV/Tracks/Resolution/respt_eta1p2to1p6_pt2to3");
57 MonitorElement *merespt_eta1p6to2_pt2to3 =
dbe->
get(
"SiOuterTrackerV/Tracks/Resolution/respt_eta1p6to2_pt2to3");
58 MonitorElement *merespt_eta2to2p4_pt2to3 =
dbe->
get(
"SiOuterTrackerV/Tracks/Resolution/respt_eta2to2p4_pt2to3");
59 MonitorElement *merespt_eta0to0p7_pt3to8 =
dbe->
get(
"SiOuterTrackerV/Tracks/Resolution/respt_eta0to0p7_pt3to8");
60 MonitorElement *merespt_eta0p7to1_pt3to8 =
dbe->
get(
"SiOuterTrackerV/Tracks/Resolution/respt_eta0p7to1_pt3to8");
61 MonitorElement *merespt_eta1to1p2_pt3to8 =
dbe->
get(
"SiOuterTrackerV/Tracks/Resolution/respt_eta1to1p2_pt3to8");
62 MonitorElement *merespt_eta1p2to1p6_pt3to8 =
dbe->
get(
"SiOuterTrackerV/Tracks/Resolution/respt_eta1p2to1p6_pt3to8");
63 MonitorElement *merespt_eta1p6to2_pt3to8 =
dbe->
get(
"SiOuterTrackerV/Tracks/Resolution/respt_eta1p6to2_pt3to8");
64 MonitorElement *merespt_eta2to2p4_pt3to8 =
dbe->
get(
"SiOuterTrackerV/Tracks/Resolution/respt_eta2to2p4_pt3to8");
65 MonitorElement *merespt_eta0to0p7_pt8toInf =
dbe->
get(
"SiOuterTrackerV/Tracks/Resolution/respt_eta0to0p7_pt8toInf");
66 MonitorElement *merespt_eta0p7to1_pt8toInf =
dbe->
get(
"SiOuterTrackerV/Tracks/Resolution/respt_eta0p7to1_pt8toInf");
67 MonitorElement *merespt_eta1to1p2_pt8toInf =
dbe->
get(
"SiOuterTrackerV/Tracks/Resolution/respt_eta1to1p2_pt8toInf");
69 dbe->
get(
"SiOuterTrackerV/Tracks/Resolution/respt_eta1p2to1p6_pt8toInf");
70 MonitorElement *merespt_eta1p6to2_pt8toInf =
dbe->
get(
"SiOuterTrackerV/Tracks/Resolution/respt_eta1p6to2_pt8toInf");
71 MonitorElement *merespt_eta2to2p4_pt8toInf =
dbe->
get(
"SiOuterTrackerV/Tracks/Resolution/respt_eta2to2p4_pt8toInf");
73 MonitorElement *mereseta_eta0to0p7 =
dbe->
get(
"SiOuterTrackerV/Tracks/Resolution/reseta_eta0to0p7");
74 MonitorElement *mereseta_eta0p7to1 =
dbe->
get(
"SiOuterTrackerV/Tracks/Resolution/reseta_eta0p7to1");
75 MonitorElement *mereseta_eta1to1p2 =
dbe->
get(
"SiOuterTrackerV/Tracks/Resolution/reseta_eta1to1p2");
76 MonitorElement *mereseta_eta1p2to1p6 =
dbe->
get(
"SiOuterTrackerV/Tracks/Resolution/reseta_eta1p2to1p6");
77 MonitorElement *mereseta_eta1p6to2 =
dbe->
get(
"SiOuterTrackerV/Tracks/Resolution/reseta_eta1p6to2");
78 MonitorElement *mereseta_eta2to2p4 =
dbe->
get(
"SiOuterTrackerV/Tracks/Resolution/reseta_eta2to2p4");
80 MonitorElement *meresphi_eta0to0p7 =
dbe->
get(
"SiOuterTrackerV/Tracks/Resolution/resphi_eta0to0p7");
81 MonitorElement *meresphi_eta0p7to1 =
dbe->
get(
"SiOuterTrackerV/Tracks/Resolution/resphi_eta0p7to1");
82 MonitorElement *meresphi_eta1to1p2 =
dbe->
get(
"SiOuterTrackerV/Tracks/Resolution/resphi_eta1to1p2");
83 MonitorElement *meresphi_eta1p2to1p6 =
dbe->
get(
"SiOuterTrackerV/Tracks/Resolution/resphi_eta1p2to1p6");
84 MonitorElement *meresphi_eta1p6to2 =
dbe->
get(
"SiOuterTrackerV/Tracks/Resolution/resphi_eta1p6to2");
85 MonitorElement *meresphi_eta2to2p4 =
dbe->
get(
"SiOuterTrackerV/Tracks/Resolution/resphi_eta2to2p4");
87 MonitorElement *meresVtxZ_eta0to0p7 =
dbe->
get(
"SiOuterTrackerV/Tracks/Resolution/resVtxZ_eta0to0p7");
88 MonitorElement *meresVtxZ_eta0p7to1 =
dbe->
get(
"SiOuterTrackerV/Tracks/Resolution/resVtxZ_eta0p7to1");
89 MonitorElement *meresVtxZ_eta1to1p2 =
dbe->
get(
"SiOuterTrackerV/Tracks/Resolution/resVtxZ_eta1to1p2");
90 MonitorElement *meresVtxZ_eta1p2to1p6 =
dbe->
get(
"SiOuterTrackerV/Tracks/Resolution/resVtxZ_eta1p2to1p6");
91 MonitorElement *meresVtxZ_eta1p6to2 =
dbe->
get(
"SiOuterTrackerV/Tracks/Resolution/resVtxZ_eta1p6to2");
92 MonitorElement *meresVtxZ_eta2to2p4 =
dbe->
get(
"SiOuterTrackerV/Tracks/Resolution/resVtxZ_eta2to2p4");
94 MonitorElement *meresd0_eta0to0p7 =
dbe->
get(
"SiOuterTrackerV/Tracks/Resolution/resd0_eta0to0p7");
95 MonitorElement *meresd0_eta0p7to1 =
dbe->
get(
"SiOuterTrackerV/Tracks/Resolution/resd0_eta0p7to1");
96 MonitorElement *meresd0_eta1to1p2 =
dbe->
get(
"SiOuterTrackerV/Tracks/Resolution/resd0_eta1to1p2");
97 MonitorElement *meresd0_eta1p2to1p6 =
dbe->
get(
"SiOuterTrackerV/Tracks/Resolution/resd0_eta1p2to1p6");
98 MonitorElement *meresd0_eta1p6to2 =
dbe->
get(
"SiOuterTrackerV/Tracks/Resolution/resd0_eta1p6to2");
99 MonitorElement *meresd0_eta2to2p4 =
dbe->
get(
"SiOuterTrackerV/Tracks/Resolution/resd0_eta2to2p4");
101 if (meN_eta && meD_eta) {
106 denominator->Sumw2();
114 numerator->GetNbinsX(),
115 numerator->GetXaxis()->GetXmin(),
116 numerator->GetXaxis()->GetXmax());
119 me_effic_eta->
getTH1F()->Divide(numerator, denominator, 1., 1.,
"B");
121 me_effic_eta->
getTH1F()->GetYaxis()->SetTitle(
"Efficiency");
122 me_effic_eta->
getTH1F()->SetMaximum(1.0);
123 me_effic_eta->
getTH1F()->SetMinimum(0.0);
124 me_effic_eta->
getTH1F()->SetStats(
false);
127 edm::LogWarning(
"DataNotFound") <<
"Monitor elements for eta efficiency cannot be found!\n";
130 if (meN_pt && meD_pt) {
132 TH1F *numerator2 = meN_pt->
getTH1F();
134 TH1F *denominator2 = meD_pt->
getTH1F();
135 denominator2->Sumw2();
143 numerator2->GetNbinsX(),
144 numerator2->GetXaxis()->GetXmin(),
145 numerator2->GetXaxis()->GetXmax());
148 me_effic_pt->
getTH1F()->Divide(numerator2, denominator2, 1., 1.,
"B");
149 me_effic_pt->
setAxisTitle(
"Tracking particle p_{T} [GeV]");
150 me_effic_pt->
getTH1F()->GetYaxis()->SetTitle(
"Efficiency");
151 me_effic_pt->
getTH1F()->SetMaximum(1.0);
152 me_effic_pt->
getTH1F()->SetMinimum(0.0);
153 me_effic_pt->
getTH1F()->SetStats(
false);
156 edm::LogWarning(
"DataNotFound") <<
"Monitor elements for pT efficiency cannot be found!\n";
159 if (meN_pt_zoom && meD_pt_zoom) {
161 TH1F *numerator2_zoom = meN_pt_zoom->
getTH1F();
162 numerator2_zoom->Sumw2();
163 TH1F *denominator2_zoom = meD_pt_zoom->
getTH1F();
164 denominator2_zoom->Sumw2();
170 MonitorElement *me_effic_pt_zoom = ibooker.book1D(
"PtEfficiency_zoom",
172 numerator2_zoom->GetNbinsX(),
173 numerator2_zoom->GetXaxis()->GetXmin(),
174 numerator2_zoom->GetXaxis()->GetXmax());
177 me_effic_pt_zoom->
getTH1F()->Divide(numerator2_zoom, denominator2_zoom, 1., 1.,
"B");
178 me_effic_pt_zoom->
setAxisTitle(
"Tracking particle p_{T} [GeV]");
179 me_effic_pt_zoom->
getTH1F()->GetYaxis()->SetTitle(
"Efficiency");
180 me_effic_pt_zoom->
getTH1F()->SetMaximum(1.0);
181 me_effic_pt_zoom->
getTH1F()->SetMinimum(0.0);
182 me_effic_pt_zoom->
getTH1F()->SetStats(
false);
185 edm::LogWarning(
"DataNotFound") <<
"Monitor elements for zoom pT efficiency cannot be found!\n";
188 if (meN_d0 && meD_d0) {
190 TH1F *numerator5 = meN_d0->
getTH1F();
192 TH1F *denominator5 = meD_d0->
getTH1F();
193 denominator5->Sumw2();
201 numerator5->GetNbinsX(),
202 numerator5->GetXaxis()->GetXmin(),
203 numerator5->GetXaxis()->GetXmax());
206 me_effic_d0->
getTH1F()->Divide(numerator5, denominator5, 1., 1.,
"B");
207 me_effic_d0->
setAxisTitle(
"Tracking particle d_{0} [cm]");
208 me_effic_d0->
getTH1F()->GetYaxis()->SetTitle(
"Efficiency");
209 me_effic_d0->
getTH1F()->SetMaximum(1.0);
210 me_effic_d0->
getTH1F()->SetMinimum(0.0);
211 me_effic_d0->
getTH1F()->SetStats(
false);
214 edm::LogWarning(
"DataNotFound") <<
"Monitor elements for d0 efficiency cannot be found!\n";
217 if (meN_VtxR && meD_VtxR) {
219 TH1F *numerator6 = meN_VtxR->
getTH1F();
221 TH1F *denominator6 = meD_VtxR->
getTH1F();
222 denominator6->Sumw2();
230 numerator6->GetNbinsX(),
231 numerator6->GetXaxis()->GetXmin(),
232 numerator6->GetXaxis()->GetXmax());
235 me_effic_VtxR->
getTH1F()->Divide(numerator6, denominator6, 1., 1.,
"B");
236 me_effic_VtxR->
setAxisTitle(
"Tracking particle VtxR [cm]");
237 me_effic_VtxR->
getTH1F()->GetYaxis()->SetTitle(
"Efficiency");
238 me_effic_VtxR->
getTH1F()->SetMaximum(1.0);
239 me_effic_VtxR->
getTH1F()->SetMinimum(0.0);
240 me_effic_VtxR->
getTH1F()->SetStats(
false);
243 edm::LogWarning(
"DataNotFound") <<
"Monitor elements for VtxR efficiency cannot be found!\n";
246 if (meN_VtxZ && meD_VtxZ) {
248 TH1F *numerator7 = meN_VtxZ->
getTH1F();
250 TH1F *denominator7 = meD_VtxZ->
getTH1F();
251 denominator7->Sumw2();
259 numerator7->GetNbinsX(),
260 numerator7->GetXaxis()->GetXmin(),
261 numerator7->GetXaxis()->GetXmax());
264 me_effic_VtxZ->
getTH1F()->Divide(numerator7, denominator7, 1., 1.,
"B");
265 me_effic_VtxZ->
setAxisTitle(
"Tracking particle VtxZ [cm]");
266 me_effic_VtxZ->
getTH1F()->GetYaxis()->SetTitle(
"Efficiency");
267 me_effic_VtxZ->
getTH1F()->SetMaximum(1.0);
268 me_effic_VtxZ->
getTH1F()->SetMinimum(0.0);
269 me_effic_VtxZ->
getTH1F()->SetStats(
false);
272 edm::LogWarning(
"DataNotFound") <<
"Monitor elements for VtxZ efficiency cannot be found!\n";
275 if (merespt_eta0to0p7_pt2to3 && merespt_eta0p7to1_pt2to3 && merespt_eta1to1p2_pt2to3 &&
276 merespt_eta1p2to1p6_pt2to3 && merespt_eta1p6to2_pt2to3 && merespt_eta2to2p4_pt2to3) {
281 TH1F *resPt1a = merespt_eta0to0p7_pt2to3->
getTH1F();
282 TH1F *resPt2a = merespt_eta0p7to1_pt2to3->
getTH1F();
283 TH1F *resPt3a = merespt_eta1to1p2_pt2to3->
getTH1F();
284 TH1F *resPt4a = merespt_eta1p2to1p6_pt2to3->
getTH1F();
285 TH1F *resPt5a = merespt_eta1p6to2_pt2to3->
getTH1F();
286 TH1F *resPt6a = merespt_eta2to2p4_pt2to3->
getTH1F();
290 ibooker.book1D(
"pTResVsEta_2-3",
"p_{T} resolution vs |#eta|, for p_{T}: 2-3 GeV", eta_binnum, eta_bins);
291 TH1F *resPt1 = me_res_pt1->
getTH1F();
292 resPt1->GetXaxis()->SetTitle(
"tracking particle |#eta|");
293 resPt1->GetYaxis()->SetTitle(
"#sigma(#Deltap_{T}/p_{T})");
294 resPt1->SetMinimum(0.0);
295 resPt1->SetStats(
false);
297 int testNumEntries1 = resPt1a->GetEntries();
298 if (testNumEntries1 > 0) {
301 resPt1a->Fit(fit2,
"R");
302 resPt2a->Fit(fit2,
"R");
303 resPt3a->Fit(fit2,
"R");
304 resPt4a->Fit(fit2,
"R");
305 resPt5a->Fit(fit2,
"R");
306 resPt6a->Fit(fit2,
"R");
307 sigma_pt1.push_back(resPt1a->GetFunction(
"fit2")->GetParameter(2));
308 sigma_pt1.push_back(resPt2a->GetFunction(
"fit2")->GetParameter(2));
309 sigma_pt1.push_back(resPt3a->GetFunction(
"fit2")->GetParameter(2));
310 sigma_pt1.push_back(resPt4a->GetFunction(
"fit2")->GetParameter(2));
311 sigma_pt1.push_back(resPt5a->GetFunction(
"fit2")->GetParameter(2));
312 sigma_pt1.push_back(resPt6a->GetFunction(
"fit2")->GetParameter(2));
313 error_pt1.push_back(resPt1a->GetFunction(
"fit2")->GetParError(2));
314 error_pt1.push_back(resPt2a->GetFunction(
"fit2")->GetParError(2));
315 error_pt1.push_back(resPt3a->GetFunction(
"fit2")->GetParError(2));
316 error_pt1.push_back(resPt4a->GetFunction(
"fit2")->GetParError(2));
317 error_pt1.push_back(resPt5a->GetFunction(
"fit2")->GetParError(2));
318 error_pt1.push_back(resPt6a->GetFunction(
"fit2")->GetParError(2));
321 for (
int i = 0;
i < 6;
i++) {
322 resPt1->SetBinContent(
i + 1, sigma_pt1[
i]);
323 resPt1->SetBinError(i + 1, error_pt1[i]);
326 edm::LogWarning(
"DataNotFound") <<
"L1 tracks not found for pT resolution (2-3)!\n";
327 for (
int i = 0;
i < 6;
i++) {
328 resPt1->SetBinContent(
i + 1, -1);
329 resPt1->SetBinError(
i + 1, -1);
334 edm::LogWarning(
"DataNotFound") <<
"Monitor elements for pT resolution (2-3) cannot be found!\n";
337 if (merespt_eta0to0p7_pt3to8 && merespt_eta0p7to1_pt3to8 && merespt_eta1to1p2_pt3to8 &&
338 merespt_eta1p2to1p6_pt3to8 && merespt_eta1p6to2_pt3to8 && merespt_eta2to2p4_pt3to8) {
343 TH1F *resPt1b = merespt_eta0to0p7_pt3to8->
getTH1F();
344 TH1F *resPt2b = merespt_eta0p7to1_pt3to8->
getTH1F();
345 TH1F *resPt3b = merespt_eta1to1p2_pt3to8->
getTH1F();
346 TH1F *resPt4b = merespt_eta1p2to1p6_pt3to8->
getTH1F();
347 TH1F *resPt5b = merespt_eta1p6to2_pt3to8->
getTH1F();
348 TH1F *resPt6b = merespt_eta2to2p4_pt3to8->
getTH1F();
352 ibooker.book1D(
"pTResVsEta_3-8",
"p_{T} resolution vs |#eta|, for p_{T}: 3-8 GeV", eta_binnum, eta_bins);
353 TH1F *resPt2 = me_res_pt2->
getTH1F();
354 resPt2->GetXaxis()->SetTitle(
"tracking particle |#eta|");
355 resPt2->GetYaxis()->SetTitle(
"#sigma(#Deltap_{T}/p_{T})");
356 resPt2->SetMinimum(0.0);
357 resPt2->SetStats(
false);
359 int testNumEntries2 = resPt1b->GetEntries();
360 if (testNumEntries2 > 0) {
363 resPt1b->Fit(fit2,
"R");
364 resPt2b->Fit(fit2,
"R");
365 resPt3b->Fit(fit2,
"R");
366 resPt4b->Fit(fit2,
"R");
367 resPt5b->Fit(fit2,
"R");
368 resPt6b->Fit(fit2,
"R");
369 sigma_pt2.push_back(resPt1b->GetFunction(
"fit2")->GetParameter(2));
370 sigma_pt2.push_back(resPt2b->GetFunction(
"fit2")->GetParameter(2));
371 sigma_pt2.push_back(resPt3b->GetFunction(
"fit2")->GetParameter(2));
372 sigma_pt2.push_back(resPt4b->GetFunction(
"fit2")->GetParameter(2));
373 sigma_pt2.push_back(resPt5b->GetFunction(
"fit2")->GetParameter(2));
374 sigma_pt2.push_back(resPt6b->GetFunction(
"fit2")->GetParameter(2));
375 error_pt2.push_back(resPt1b->GetFunction(
"fit2")->GetParError(2));
376 error_pt2.push_back(resPt2b->GetFunction(
"fit2")->GetParError(2));
377 error_pt2.push_back(resPt3b->GetFunction(
"fit2")->GetParError(2));
378 error_pt2.push_back(resPt4b->GetFunction(
"fit2")->GetParError(2));
379 error_pt2.push_back(resPt5b->GetFunction(
"fit2")->GetParError(2));
380 error_pt2.push_back(resPt6b->GetFunction(
"fit2")->GetParError(2));
383 for (
int i = 0;
i < 6;
i++) {
384 resPt2->SetBinContent(
i + 1, sigma_pt2[
i]);
385 resPt2->SetBinError(i + 1, error_pt2[i]);
388 edm::LogWarning(
"DataNotFound") <<
"L1 tracks not found for pT resolution (3-8)!\n";
389 for (
int i = 0;
i < 6;
i++) {
390 resPt2->SetBinContent(
i + 1, -1);
391 resPt2->SetBinError(
i + 1, -1);
396 edm::LogWarning(
"DataNotFound") <<
"Monitor elements for pT resolution (3-8) cannot be found!\n";
399 if (merespt_eta0to0p7_pt8toInf && merespt_eta0p7to1_pt8toInf && merespt_eta1to1p2_pt8toInf &&
400 merespt_eta1p2to1p6_pt8toInf && merespt_eta1p6to2_pt8toInf && merespt_eta2to2p4_pt8toInf) {
405 TH1F *resPt1c = merespt_eta0to0p7_pt8toInf->
getTH1F();
406 TH1F *resPt2c = merespt_eta0p7to1_pt8toInf->
getTH1F();
407 TH1F *resPt3c = merespt_eta1to1p2_pt8toInf->
getTH1F();
408 TH1F *resPt4c = merespt_eta1p2to1p6_pt8toInf->
getTH1F();
409 TH1F *resPt5c = merespt_eta1p6to2_pt8toInf->
getTH1F();
410 TH1F *resPt6c = merespt_eta2to2p4_pt8toInf->
getTH1F();
414 ibooker.book1D(
"pTResVsEta_8-inf",
"p_{T} resolution vs |#eta|, for p_{T}: >8 GeV", eta_binnum, eta_bins);
415 TH1F *resPt3 = me_res_pt3->
getTH1F();
416 resPt3->GetXaxis()->SetTitle(
"tracking particle |#eta|");
417 resPt3->GetYaxis()->SetTitle(
"#sigma(#Deltap_{T}/p_{T})");
418 resPt3->SetMinimum(0.0);
419 resPt3->SetStats(
false);
421 int testNumEntries3 = resPt1c->GetEntries();
422 if (testNumEntries3 > 0) {
425 resPt1c->Fit(fit2,
"R");
426 resPt2c->Fit(fit2,
"R");
427 resPt3c->Fit(fit2,
"R");
428 resPt4c->Fit(fit2,
"R");
429 resPt5c->Fit(fit2,
"R");
430 resPt6c->Fit(fit2,
"R");
431 sigma_pt3.push_back(resPt1c->GetFunction(
"fit2")->GetParameter(2));
432 sigma_pt3.push_back(resPt2c->GetFunction(
"fit2")->GetParameter(2));
433 sigma_pt3.push_back(resPt3c->GetFunction(
"fit2")->GetParameter(2));
434 sigma_pt3.push_back(resPt4c->GetFunction(
"fit2")->GetParameter(2));
435 sigma_pt3.push_back(resPt5c->GetFunction(
"fit2")->GetParameter(2));
436 sigma_pt3.push_back(resPt6c->GetFunction(
"fit2")->GetParameter(2));
437 error_pt3.push_back(resPt1c->GetFunction(
"fit2")->GetParError(2));
438 error_pt3.push_back(resPt2c->GetFunction(
"fit2")->GetParError(2));
439 error_pt3.push_back(resPt3c->GetFunction(
"fit2")->GetParError(2));
440 error_pt3.push_back(resPt4c->GetFunction(
"fit2")->GetParError(2));
441 error_pt3.push_back(resPt5c->GetFunction(
"fit2")->GetParError(2));
442 error_pt3.push_back(resPt6c->GetFunction(
"fit2")->GetParError(2));
445 for (
int i = 0;
i < 6;
i++) {
446 resPt3->SetBinContent(
i + 1, sigma_pt3[
i]);
447 resPt3->SetBinError(i + 1, error_pt3[i]);
450 edm::LogWarning(
"DataNotFound") <<
"L1 tracks not found for pT resolution (8-inf)!\n";
451 for (
int i = 0;
i < 6;
i++) {
452 resPt3->SetBinContent(
i + 1, -1);
453 resPt3->SetBinError(
i + 1, -1);
458 edm::LogWarning(
"DataNotFound") <<
"Monitor elements for pT resolution (8-inf) cannot be found!\n";
461 if (mereseta_eta0to0p7 && mereseta_eta0p7to1 && mereseta_eta1to1p2 && mereseta_eta1p2to1p6 && mereseta_eta1p6to2 &&
462 mereseta_eta2to2p4) {
467 TH1F *resEta1 = mereseta_eta0to0p7->
getTH1F();
468 TH1F *resEta2 = mereseta_eta0p7to1->
getTH1F();
469 TH1F *resEta3 = mereseta_eta1to1p2->
getTH1F();
470 TH1F *resEta4 = mereseta_eta1p2to1p6->
getTH1F();
471 TH1F *resEta5 = mereseta_eta1p6to2->
getTH1F();
472 TH1F *resEta6 = mereseta_eta2to2p4->
getTH1F();
475 MonitorElement *me_res_eta = ibooker.book1D(
"EtaResolution",
"#eta resolution vs |#eta|", eta_binnum, eta_bins);
476 TH1F *resEta = me_res_eta->
getTH1F();
477 resEta->GetXaxis()->SetTitle(
"tracking particle |#eta|");
478 resEta->GetYaxis()->SetTitle(
"#sigma(#Delta#eta)");
479 resEta->SetMinimum(0.0);
480 resEta->SetStats(
false);
482 int testNumEntries4 = resEta1->GetEntries();
483 if (testNumEntries4 > 0) {
486 resEta1->Fit(
fit,
"R");
487 resEta2->Fit(
fit,
"R");
488 resEta3->Fit(
fit,
"R");
489 resEta4->Fit(
fit,
"R");
490 resEta5->Fit(
fit,
"R");
491 resEta6->Fit(
fit,
"R");
492 sigma_eta.push_back(resEta1->GetFunction(
"fit")->GetParameter(2));
493 sigma_eta.push_back(resEta2->GetFunction(
"fit")->GetParameter(2));
494 sigma_eta.push_back(resEta3->GetFunction(
"fit")->GetParameter(2));
495 sigma_eta.push_back(resEta4->GetFunction(
"fit")->GetParameter(2));
496 sigma_eta.push_back(resEta5->GetFunction(
"fit")->GetParameter(2));
497 sigma_eta.push_back(resEta6->GetFunction(
"fit")->GetParameter(2));
498 error_eta.push_back(resEta1->GetFunction(
"fit")->GetParError(2));
499 error_eta.push_back(resEta2->GetFunction(
"fit")->GetParError(2));
500 error_eta.push_back(resEta3->GetFunction(
"fit")->GetParError(2));
501 error_eta.push_back(resEta4->GetFunction(
"fit")->GetParError(2));
502 error_eta.push_back(resEta5->GetFunction(
"fit")->GetParError(2));
503 error_eta.push_back(resEta6->GetFunction(
"fit")->GetParError(2));
506 for (
int i = 0;
i < 6;
i++) {
507 resEta->SetBinContent(
i + 1, sigma_eta[
i]);
508 resEta->SetBinError(i + 1, error_eta[i]);
511 edm::LogWarning(
"DataNotFound") <<
"L1 tracks not found for eta resolution!\n";
512 for (
int i = 0;
i < 6;
i++) {
513 resEta->SetBinContent(
i + 1, -1);
514 resEta->SetBinError(
i + 1, -1);
519 edm::LogWarning(
"DataNotFound") <<
"Monitor elements for eta resolution cannot be found!\n";
522 if (meresphi_eta0to0p7 && meresphi_eta0p7to1 && meresphi_eta1to1p2 && meresphi_eta1p2to1p6 && meresphi_eta1p6to2 &&
523 meresphi_eta2to2p4) {
528 TH1F *resPhi1 = meresphi_eta0to0p7->
getTH1F();
529 TH1F *resPhi2 = meresphi_eta0p7to1->
getTH1F();
530 TH1F *resPhi3 = meresphi_eta1to1p2->
getTH1F();
531 TH1F *resPhi4 = meresphi_eta1p2to1p6->
getTH1F();
532 TH1F *resPhi5 = meresphi_eta1p6to2->
getTH1F();
533 TH1F *resPhi6 = meresphi_eta2to2p4->
getTH1F();
536 MonitorElement *me_res_phi = ibooker.book1D(
"PhiResolution",
"#phi resolution vs |#eta|", eta_binnum, eta_bins);
537 TH1F *resPhi = me_res_phi->
getTH1F();
538 resPhi->GetXaxis()->SetTitle(
"tracking particle |#eta|");
539 resPhi->GetYaxis()->SetTitle(
"#sigma(#Delta#phi)");
540 resPhi->SetMinimum(0.0);
541 resPhi->SetStats(
false);
543 int testNumEntries5 = resPhi1->GetEntries();
544 if (testNumEntries5 > 0) {
547 resPhi1->Fit(
fit,
"R");
548 resPhi2->Fit(
fit,
"R");
549 resPhi3->Fit(
fit,
"R");
550 resPhi4->Fit(
fit,
"R");
551 resPhi5->Fit(
fit,
"R");
552 resPhi6->Fit(
fit,
"R");
553 sigma_phi.push_back(resPhi1->GetFunction(
"fit")->GetParameter(2));
554 sigma_phi.push_back(resPhi2->GetFunction(
"fit")->GetParameter(2));
555 sigma_phi.push_back(resPhi3->GetFunction(
"fit")->GetParameter(2));
556 sigma_phi.push_back(resPhi4->GetFunction(
"fit")->GetParameter(2));
557 sigma_phi.push_back(resPhi5->GetFunction(
"fit")->GetParameter(2));
558 sigma_phi.push_back(resPhi6->GetFunction(
"fit")->GetParameter(2));
559 error_phi.push_back(resPhi1->GetFunction(
"fit")->GetParError(2));
560 error_phi.push_back(resPhi2->GetFunction(
"fit")->GetParError(2));
561 error_phi.push_back(resPhi3->GetFunction(
"fit")->GetParError(2));
562 error_phi.push_back(resPhi4->GetFunction(
"fit")->GetParError(2));
563 error_phi.push_back(resPhi5->GetFunction(
"fit")->GetParError(2));
564 error_phi.push_back(resPhi6->GetFunction(
"fit")->GetParError(2));
567 for (
int i = 0;
i < 6;
i++) {
568 resPhi->SetBinContent(
i + 1, sigma_phi[
i]);
569 resPhi->SetBinError(i + 1, error_phi[i]);
572 edm::LogWarning(
"DataNotFound") <<
"L1 tracks not found for phi resolution!\n";
573 for (
int i = 0;
i < 6;
i++) {
574 resPhi->SetBinContent(
i + 1, -1);
575 resPhi->SetBinError(
i + 1, -1);
580 edm::LogWarning(
"DataNotFound") <<
"Monitor elements for phi resolution cannot be found!\n";
583 if (meresVtxZ_eta0to0p7 && meresVtxZ_eta0p7to1 && meresVtxZ_eta1to1p2 && meresVtxZ_eta1p2to1p6 &&
584 meresVtxZ_eta1p6to2 && meresVtxZ_eta2to2p4) {
589 TH1F *resVtxZ_1 = meresVtxZ_eta0to0p7->
getTH1F();
590 TH1F *resVtxZ_2 = meresVtxZ_eta0p7to1->
getTH1F();
591 TH1F *resVtxZ_3 = meresVtxZ_eta1to1p2->
getTH1F();
592 TH1F *resVtxZ_4 = meresVtxZ_eta1p2to1p6->
getTH1F();
593 TH1F *resVtxZ_5 = meresVtxZ_eta1p6to2->
getTH1F();
594 TH1F *resVtxZ_6 = meresVtxZ_eta2to2p4->
getTH1F();
597 MonitorElement *me_res_VtxZ = ibooker.book1D(
"VtxZResolution",
"VtxZ resolution vs |#eta|", eta_binnum, eta_bins);
598 TH1F *resVtxZ = me_res_VtxZ->
getTH1F();
599 resVtxZ->GetXaxis()->SetTitle(
"tracking particle |#eta|");
600 resVtxZ->GetYaxis()->SetTitle(
"#sigma(#DeltaVtxZ) [cm]");
601 resVtxZ->SetMinimum(0.0);
602 resVtxZ->SetStats(
false);
604 int testNumEntries6 = resVtxZ_1->GetEntries();
605 if (testNumEntries6 > 0) {
608 resVtxZ_1->Fit(fit3,
"R");
609 resVtxZ_2->Fit(fit3,
"R");
610 resVtxZ_3->Fit(fit3,
"R");
611 resVtxZ_4->Fit(fit3,
"R");
612 resVtxZ_5->Fit(fit3,
"R");
613 resVtxZ_6->Fit(fit3,
"R");
614 sigma_VtxZ.push_back(resVtxZ_1->GetFunction(
"fit3")->GetParameter(2));
615 sigma_VtxZ.push_back(resVtxZ_2->GetFunction(
"fit3")->GetParameter(2));
616 sigma_VtxZ.push_back(resVtxZ_3->GetFunction(
"fit3")->GetParameter(2));
617 sigma_VtxZ.push_back(resVtxZ_4->GetFunction(
"fit3")->GetParameter(2));
618 sigma_VtxZ.push_back(resVtxZ_5->GetFunction(
"fit3")->GetParameter(2));
619 sigma_VtxZ.push_back(resVtxZ_6->GetFunction(
"fit3")->GetParameter(2));
620 error_VtxZ.push_back(resVtxZ_1->GetFunction(
"fit3")->GetParError(2));
621 error_VtxZ.push_back(resVtxZ_2->GetFunction(
"fit3")->GetParError(2));
622 error_VtxZ.push_back(resVtxZ_3->GetFunction(
"fit3")->GetParError(2));
623 error_VtxZ.push_back(resVtxZ_4->GetFunction(
"fit3")->GetParError(2));
624 error_VtxZ.push_back(resVtxZ_5->GetFunction(
"fit3")->GetParError(2));
625 error_VtxZ.push_back(resVtxZ_6->GetFunction(
"fit3")->GetParError(2));
628 for (
int i = 0;
i < 6;
i++) {
629 resVtxZ->SetBinContent(
i + 1, sigma_VtxZ[
i]);
630 resVtxZ->SetBinError(i + 1, error_VtxZ[i]);
633 edm::LogWarning(
"DataNotFound") <<
"L1 tracks not found for VtxZ resolution!\n";
634 for (
int i = 0;
i < 6;
i++) {
635 resVtxZ->SetBinContent(
i + 1, -1);
636 resVtxZ->SetBinError(
i + 1, -1);
641 edm::LogWarning(
"DataNotFound") <<
"Monitor elements for VtxZ resolution cannot be found!\n";
644 if (meresd0_eta0to0p7 && meresd0_eta0p7to1 && meresd0_eta1to1p2 && meresd0_eta1p2to1p6 && meresd0_eta1p6to2 &&
650 TH1F *resd0_1 = meresd0_eta0to0p7->
getTH1F();
651 TH1F *resd0_2 = meresd0_eta0p7to1->
getTH1F();
652 TH1F *resd0_3 = meresd0_eta1to1p2->
getTH1F();
653 TH1F *resd0_4 = meresd0_eta1p2to1p6->
getTH1F();
654 TH1F *resd0_5 = meresd0_eta1p6to2->
getTH1F();
655 TH1F *resd0_6 = meresd0_eta2to2p4->
getTH1F();
658 MonitorElement *me_res_d0 = ibooker.book1D(
"d0Resolution",
"d_{0} resolution vs |#eta|", eta_binnum, eta_bins);
659 TH1F *resd0 = me_res_d0->
getTH1F();
660 resd0->GetXaxis()->SetTitle(
"tracking particle |#eta|");
661 resd0->GetYaxis()->SetTitle(
"#sigma(#Deltad_{0}) [cm]");
662 resd0->SetMinimum(0.0);
663 resd0->SetStats(
false);
665 int testNumEntries7 = resd0_1->GetEntries();
666 if (testNumEntries7 > 0) {
669 resd0_1->Fit(
fit,
"R");
670 resd0_2->Fit(
fit,
"R");
671 resd0_3->Fit(
fit,
"R");
672 resd0_4->Fit(
fit,
"R");
673 resd0_5->Fit(
fit,
"R");
674 resd0_6->Fit(
fit,
"R");
675 sigma_d0.push_back(resd0_1->GetFunction(
"fit")->GetParameter(2));
676 sigma_d0.push_back(resd0_2->GetFunction(
"fit")->GetParameter(2));
677 sigma_d0.push_back(resd0_3->GetFunction(
"fit")->GetParameter(2));
678 sigma_d0.push_back(resd0_4->GetFunction(
"fit")->GetParameter(2));
679 sigma_d0.push_back(resd0_5->GetFunction(
"fit")->GetParameter(2));
680 sigma_d0.push_back(resd0_6->GetFunction(
"fit")->GetParameter(2));
681 error_d0.push_back(resd0_1->GetFunction(
"fit")->GetParError(2));
682 error_d0.push_back(resd0_2->GetFunction(
"fit")->GetParError(2));
683 error_d0.push_back(resd0_3->GetFunction(
"fit")->GetParError(2));
684 error_d0.push_back(resd0_4->GetFunction(
"fit")->GetParError(2));
685 error_d0.push_back(resd0_5->GetFunction(
"fit")->GetParError(2));
686 error_d0.push_back(resd0_6->GetFunction(
"fit")->GetParError(2));
689 for (
int i = 0;
i < 6;
i++) {
690 resd0->SetBinContent(
i + 1, sigma_d0[
i]);
691 resd0->SetBinError(i + 1, error_d0[i]);
694 edm::LogWarning(
"DataNotFound") <<
"L1 tracks not found for d0 resolution!\n";
695 for (
int i = 0;
i < 6;
i++) {
696 resd0->SetBinContent(
i + 1, -1);
697 resd0->SetBinError(
i + 1, -1);
702 edm::LogWarning(
"DataNotFound") <<
"Monitor elements for d0 resolution cannot be found!\n";
707 edm::LogWarning(
"DataNotFound") <<
"Cannot find valid DQM back end \n";
virtual TH1F * getTH1F() const
MonitorElement * get(std::string const &path) const
get ME from full pathname (e.g. "my/long/dir/my_histo")
void setCurrentFolder(std::string const &fullpath)
virtual void setAxisTitle(const std::string &title, int axis=1)
set x-, y- or z-axis title (axis=1, 2, 3 respectively)