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) {
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();
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);
298 if (resPt1a->GetEntries() > 0 && resPt2a->GetEntries() > 0 && resPt3a->GetEntries() > 0 &&
299 resPt4a->GetEntries() > 0 && resPt5a->GetEntries() > 0 && resPt6a->GetEntries() > 0) {
303 resPt1a->Fit(fit2,
"Q",
"R");
304 resPt2a->Fit(fit2,
"Q",
"R");
305 resPt3a->Fit(fit2,
"Q",
"R");
306 resPt4a->Fit(fit2,
"Q",
"R");
307 resPt5a->Fit(fit2,
"Q",
"R");
308 resPt6a->Fit(fit2,
"Q",
"R");
309 sigma_pt1.push_back(resPt1a->GetFunction(
"fit2")->GetParameter(2));
310 sigma_pt1.push_back(resPt2a->GetFunction(
"fit2")->GetParameter(2));
311 sigma_pt1.push_back(resPt3a->GetFunction(
"fit2")->GetParameter(2));
312 sigma_pt1.push_back(resPt4a->GetFunction(
"fit2")->GetParameter(2));
313 sigma_pt1.push_back(resPt5a->GetFunction(
"fit2")->GetParameter(2));
314 sigma_pt1.push_back(resPt6a->GetFunction(
"fit2")->GetParameter(2));
315 error_pt1.push_back(resPt1a->GetFunction(
"fit2")->GetParError(2));
316 error_pt1.push_back(resPt2a->GetFunction(
"fit2")->GetParError(2));
317 error_pt1.push_back(resPt3a->GetFunction(
"fit2")->GetParError(2));
318 error_pt1.push_back(resPt4a->GetFunction(
"fit2")->GetParError(2));
319 error_pt1.push_back(resPt5a->GetFunction(
"fit2")->GetParError(2));
320 error_pt1.push_back(resPt6a->GetFunction(
"fit2")->GetParError(2));
323 for (
int i = 0;
i < 6;
i++) {
324 resPt1->SetBinContent(
i + 1, sigma_pt1[
i]);
325 resPt1->SetBinError(
i + 1, error_pt1[
i]);
328 edm::LogWarning(
"DataNotFound") <<
"L1 tracks not found for pT resolution (2-3)!\n";
329 for (
int i = 0;
i < 6;
i++) {
330 resPt1->SetBinContent(
i + 1, -1);
331 resPt1->SetBinError(
i + 1, -1);
336 edm::LogWarning(
"DataNotFound") <<
"Monitor elements for pT resolution (2-3) cannot be found!\n";
339 if (merespt_eta0to0p7_pt3to8 && merespt_eta0p7to1_pt3to8 && merespt_eta1to1p2_pt3to8 &&
340 merespt_eta1p2to1p6_pt3to8 && merespt_eta1p6to2_pt3to8 && merespt_eta2to2p4_pt3to8) {
345 TH1F *resPt1b = merespt_eta0to0p7_pt3to8->
getTH1F();
346 TH1F *resPt2b = merespt_eta0p7to1_pt3to8->
getTH1F();
347 TH1F *resPt3b = merespt_eta1to1p2_pt3to8->
getTH1F();
348 TH1F *resPt4b = merespt_eta1p2to1p6_pt3to8->
getTH1F();
349 TH1F *resPt5b = merespt_eta1p6to2_pt3to8->
getTH1F();
350 TH1F *resPt6b = merespt_eta2to2p4_pt3to8->
getTH1F();
354 ibooker.
book1D(
"pTResVsEta_3-8",
"p_{T} resolution vs |#eta|, for p_{T}: 3-8 GeV", eta_binnum, eta_bins);
355 TH1F *resPt2 = me_res_pt2->
getTH1F();
356 resPt2->GetXaxis()->SetTitle(
"tracking particle |#eta|");
357 resPt2->GetYaxis()->SetTitle(
"#sigma(#Deltap_{T}/p_{T})");
358 resPt2->SetMinimum(0.0);
359 resPt2->SetStats(
false);
363 if (resPt1b->GetEntries() > 0 && resPt2b->GetEntries() > 0 && resPt3b->GetEntries() > 0 &&
364 resPt4b->GetEntries() > 0 && resPt5b->GetEntries() > 0 && resPt6b->GetEntries() > 0) {
367 resPt1b->Fit(fit2,
"Q",
"R");
368 resPt2b->Fit(fit2,
"Q",
"R");
369 resPt3b->Fit(fit2,
"Q",
"R");
370 resPt4b->Fit(fit2,
"Q",
"R");
371 resPt5b->Fit(fit2,
"Q",
"R");
372 resPt6b->Fit(fit2,
"Q",
"R");
373 sigma_pt2.push_back(resPt1b->GetFunction(
"fit2")->GetParameter(2));
374 sigma_pt2.push_back(resPt2b->GetFunction(
"fit2")->GetParameter(2));
375 sigma_pt2.push_back(resPt3b->GetFunction(
"fit2")->GetParameter(2));
376 sigma_pt2.push_back(resPt4b->GetFunction(
"fit2")->GetParameter(2));
377 sigma_pt2.push_back(resPt5b->GetFunction(
"fit2")->GetParameter(2));
378 sigma_pt2.push_back(resPt6b->GetFunction(
"fit2")->GetParameter(2));
379 error_pt2.push_back(resPt1b->GetFunction(
"fit2")->GetParError(2));
380 error_pt2.push_back(resPt2b->GetFunction(
"fit2")->GetParError(2));
381 error_pt2.push_back(resPt3b->GetFunction(
"fit2")->GetParError(2));
382 error_pt2.push_back(resPt4b->GetFunction(
"fit2")->GetParError(2));
383 error_pt2.push_back(resPt5b->GetFunction(
"fit2")->GetParError(2));
384 error_pt2.push_back(resPt6b->GetFunction(
"fit2")->GetParError(2));
387 for (
int i = 0;
i < 6;
i++) {
388 resPt2->SetBinContent(
i + 1, sigma_pt2[
i]);
389 resPt2->SetBinError(
i + 1, error_pt2[
i]);
392 edm::LogWarning(
"DataNotFound") <<
"L1 tracks not found for pT resolution (3-8)!\n";
393 for (
int i = 0;
i < 6;
i++) {
394 resPt2->SetBinContent(
i + 1, -1);
395 resPt2->SetBinError(
i + 1, -1);
400 edm::LogWarning(
"DataNotFound") <<
"Monitor elements for pT resolution (3-8) cannot be found!\n";
403 if (merespt_eta0to0p7_pt8toInf && merespt_eta0p7to1_pt8toInf && merespt_eta1to1p2_pt8toInf &&
404 merespt_eta1p2to1p6_pt8toInf && merespt_eta1p6to2_pt8toInf && merespt_eta2to2p4_pt8toInf) {
409 TH1F *resPt1c = merespt_eta0to0p7_pt8toInf->
getTH1F();
410 TH1F *resPt2c = merespt_eta0p7to1_pt8toInf->
getTH1F();
411 TH1F *resPt3c = merespt_eta1to1p2_pt8toInf->
getTH1F();
412 TH1F *resPt4c = merespt_eta1p2to1p6_pt8toInf->
getTH1F();
413 TH1F *resPt5c = merespt_eta1p6to2_pt8toInf->
getTH1F();
414 TH1F *resPt6c = merespt_eta2to2p4_pt8toInf->
getTH1F();
418 ibooker.
book1D(
"pTResVsEta_8-inf",
"p_{T} resolution vs |#eta|, for p_{T}: >8 GeV", eta_binnum, eta_bins);
419 TH1F *resPt3 = me_res_pt3->
getTH1F();
420 resPt3->GetXaxis()->SetTitle(
"tracking particle |#eta|");
421 resPt3->GetYaxis()->SetTitle(
"#sigma(#Deltap_{T}/p_{T})");
422 resPt3->SetMinimum(0.0);
423 resPt3->SetStats(
false);
426 if (resPt1c->GetEntries() > 0 && resPt2c->GetEntries() > 0 && resPt3c->GetEntries() > 0 &&
427 resPt4c->GetEntries() > 0 && resPt5c->GetEntries() > 0 && resPt6c->GetEntries() > 0) {
431 resPt1c->Fit(fit2,
"Q",
"R");
432 resPt2c->Fit(fit2,
"Q",
"R");
433 resPt3c->Fit(fit2,
"Q",
"R");
434 resPt4c->Fit(fit2,
"Q",
"R");
435 resPt5c->Fit(fit2,
"Q",
"R");
436 resPt6c->Fit(fit2,
"Q",
"R");
437 sigma_pt3.push_back(resPt1c->GetFunction(
"fit2")->GetParameter(2));
438 sigma_pt3.push_back(resPt2c->GetFunction(
"fit2")->GetParameter(2));
439 sigma_pt3.push_back(resPt3c->GetFunction(
"fit2")->GetParameter(2));
440 sigma_pt3.push_back(resPt4c->GetFunction(
"fit2")->GetParameter(2));
441 sigma_pt3.push_back(resPt5c->GetFunction(
"fit2")->GetParameter(2));
442 sigma_pt3.push_back(resPt6c->GetFunction(
"fit2")->GetParameter(2));
443 error_pt3.push_back(resPt1c->GetFunction(
"fit2")->GetParError(2));
444 error_pt3.push_back(resPt2c->GetFunction(
"fit2")->GetParError(2));
445 error_pt3.push_back(resPt3c->GetFunction(
"fit2")->GetParError(2));
446 error_pt3.push_back(resPt4c->GetFunction(
"fit2")->GetParError(2));
447 error_pt3.push_back(resPt5c->GetFunction(
"fit2")->GetParError(2));
448 error_pt3.push_back(resPt6c->GetFunction(
"fit2")->GetParError(2));
451 for (
int i = 0;
i < 6;
i++) {
452 resPt3->SetBinContent(
i + 1, sigma_pt3[
i]);
453 resPt3->SetBinError(
i + 1, error_pt3[
i]);
456 edm::LogWarning(
"DataNotFound") <<
"L1 tracks not found for pT resolution (8-inf)!\n";
457 for (
int i = 0;
i < 6;
i++) {
458 resPt3->SetBinContent(
i + 1, -1);
459 resPt3->SetBinError(
i + 1, -1);
464 edm::LogWarning(
"DataNotFound") <<
"Monitor elements for pT resolution (8-inf) cannot be found!\n";
467 if (mereseta_eta0to0p7 && mereseta_eta0p7to1 && mereseta_eta1to1p2 && mereseta_eta1p2to1p6 && mereseta_eta1p6to2 &&
468 mereseta_eta2to2p4) {
473 TH1F *resEta1 = mereseta_eta0to0p7->
getTH1F();
474 TH1F *resEta2 = mereseta_eta0p7to1->
getTH1F();
475 TH1F *resEta3 = mereseta_eta1to1p2->
getTH1F();
476 TH1F *resEta4 = mereseta_eta1p2to1p6->
getTH1F();
477 TH1F *resEta5 = mereseta_eta1p6to2->
getTH1F();
478 TH1F *resEta6 = mereseta_eta2to2p4->
getTH1F();
481 MonitorElement *me_res_eta = ibooker.
book1D(
"EtaResolution",
"#eta resolution vs |#eta|", eta_binnum, eta_bins);
482 TH1F *resEta = me_res_eta->
getTH1F();
483 resEta->GetXaxis()->SetTitle(
"tracking particle |#eta|");
484 resEta->GetYaxis()->SetTitle(
"#sigma(#Delta#eta)");
485 resEta->SetMinimum(0.0);
486 resEta->SetStats(
false);
489 if (resEta1->GetEntries() > 0 && resEta2->GetEntries() > 0 && resEta3->GetEntries() > 0 &&
490 resEta4->GetEntries() > 0 && resEta5->GetEntries() > 0 && resEta6->GetEntries() > 0) {
493 resEta1->Fit(
fit,
"Q",
"R");
494 resEta2->Fit(
fit,
"Q",
"R");
495 resEta3->Fit(
fit,
"Q",
"R");
496 resEta4->Fit(
fit,
"Q",
"R");
497 resEta5->Fit(
fit,
"Q",
"R");
498 resEta6->Fit(
fit,
"Q",
"R");
499 sigma_eta.push_back(resEta1->GetFunction(
"fit")->GetParameter(2));
500 sigma_eta.push_back(resEta2->GetFunction(
"fit")->GetParameter(2));
501 sigma_eta.push_back(resEta3->GetFunction(
"fit")->GetParameter(2));
502 sigma_eta.push_back(resEta4->GetFunction(
"fit")->GetParameter(2));
503 sigma_eta.push_back(resEta5->GetFunction(
"fit")->GetParameter(2));
504 sigma_eta.push_back(resEta6->GetFunction(
"fit")->GetParameter(2));
505 error_eta.push_back(resEta1->GetFunction(
"fit")->GetParError(2));
506 error_eta.push_back(resEta2->GetFunction(
"fit")->GetParError(2));
507 error_eta.push_back(resEta3->GetFunction(
"fit")->GetParError(2));
508 error_eta.push_back(resEta4->GetFunction(
"fit")->GetParError(2));
509 error_eta.push_back(resEta5->GetFunction(
"fit")->GetParError(2));
510 error_eta.push_back(resEta6->GetFunction(
"fit")->GetParError(2));
513 for (
int i = 0;
i < 6;
i++) {
514 resEta->SetBinContent(
i + 1, sigma_eta[
i]);
515 resEta->SetBinError(
i + 1, error_eta[
i]);
518 edm::LogWarning(
"DataNotFound") <<
"L1 tracks not found for eta resolution!\n";
519 for (
int i = 0;
i < 6;
i++) {
520 resEta->SetBinContent(
i + 1, -1);
521 resEta->SetBinError(
i + 1, -1);
526 edm::LogWarning(
"DataNotFound") <<
"Monitor elements for eta resolution cannot be found!\n";
529 if (meresphi_eta0to0p7 && meresphi_eta0p7to1 && meresphi_eta1to1p2 && meresphi_eta1p2to1p6 && meresphi_eta1p6to2 &&
530 meresphi_eta2to2p4) {
535 TH1F *resPhi1 = meresphi_eta0to0p7->
getTH1F();
536 TH1F *resPhi2 = meresphi_eta0p7to1->
getTH1F();
537 TH1F *resPhi3 = meresphi_eta1to1p2->
getTH1F();
538 TH1F *resPhi4 = meresphi_eta1p2to1p6->
getTH1F();
539 TH1F *resPhi5 = meresphi_eta1p6to2->
getTH1F();
540 TH1F *resPhi6 = meresphi_eta2to2p4->
getTH1F();
543 MonitorElement *me_res_phi = ibooker.
book1D(
"PhiResolution",
"#phi resolution vs |#eta|", eta_binnum, eta_bins);
544 TH1F *resPhi = me_res_phi->
getTH1F();
545 resPhi->GetXaxis()->SetTitle(
"tracking particle |#eta|");
546 resPhi->GetYaxis()->SetTitle(
"#sigma(#Delta#phi)");
547 resPhi->SetMinimum(0.0);
548 resPhi->SetStats(
false);
551 if (resPhi1->GetEntries() > 0 && resPhi2->GetEntries() > 0 && resPhi3->GetEntries() > 0 &&
552 resPhi4->GetEntries() > 0 && resPhi5->GetEntries() > 0 && resPhi6->GetEntries() > 0) {
555 resPhi1->Fit(
fit,
"Q",
"R");
556 resPhi2->Fit(
fit,
"Q",
"R");
557 resPhi3->Fit(
fit,
"Q",
"R");
558 resPhi4->Fit(
fit,
"Q",
"R");
559 resPhi5->Fit(
fit,
"Q",
"R");
560 resPhi6->Fit(
fit,
"Q",
"R");
561 sigma_phi.push_back(resPhi1->GetFunction(
"fit")->GetParameter(2));
562 sigma_phi.push_back(resPhi2->GetFunction(
"fit")->GetParameter(2));
563 sigma_phi.push_back(resPhi3->GetFunction(
"fit")->GetParameter(2));
564 sigma_phi.push_back(resPhi4->GetFunction(
"fit")->GetParameter(2));
565 sigma_phi.push_back(resPhi5->GetFunction(
"fit")->GetParameter(2));
566 sigma_phi.push_back(resPhi6->GetFunction(
"fit")->GetParameter(2));
567 error_phi.push_back(resPhi1->GetFunction(
"fit")->GetParError(2));
568 error_phi.push_back(resPhi2->GetFunction(
"fit")->GetParError(2));
569 error_phi.push_back(resPhi3->GetFunction(
"fit")->GetParError(2));
570 error_phi.push_back(resPhi4->GetFunction(
"fit")->GetParError(2));
571 error_phi.push_back(resPhi5->GetFunction(
"fit")->GetParError(2));
572 error_phi.push_back(resPhi6->GetFunction(
"fit")->GetParError(2));
575 for (
int i = 0;
i < 6;
i++) {
576 resPhi->SetBinContent(
i + 1, sigma_phi[
i]);
577 resPhi->SetBinError(
i + 1, error_phi[
i]);
580 edm::LogWarning(
"DataNotFound") <<
"L1 tracks not found for phi resolution!\n";
581 for (
int i = 0;
i < 6;
i++) {
582 resPhi->SetBinContent(
i + 1, -1);
583 resPhi->SetBinError(
i + 1, -1);
588 edm::LogWarning(
"DataNotFound") <<
"Monitor elements for phi resolution cannot be found!\n";
591 if (meresVtxZ_eta0to0p7 && meresVtxZ_eta0p7to1 && meresVtxZ_eta1to1p2 && meresVtxZ_eta1p2to1p6 &&
592 meresVtxZ_eta1p6to2 && meresVtxZ_eta2to2p4) {
597 TH1F *resVtxZ_1 = meresVtxZ_eta0to0p7->
getTH1F();
598 TH1F *resVtxZ_2 = meresVtxZ_eta0p7to1->
getTH1F();
599 TH1F *resVtxZ_3 = meresVtxZ_eta1to1p2->
getTH1F();
600 TH1F *resVtxZ_4 = meresVtxZ_eta1p2to1p6->
getTH1F();
601 TH1F *resVtxZ_5 = meresVtxZ_eta1p6to2->
getTH1F();
602 TH1F *resVtxZ_6 = meresVtxZ_eta2to2p4->
getTH1F();
605 MonitorElement *me_res_VtxZ = ibooker.
book1D(
"VtxZResolution",
"VtxZ resolution vs |#eta|", eta_binnum, eta_bins);
606 TH1F *resVtxZ = me_res_VtxZ->
getTH1F();
607 resVtxZ->GetXaxis()->SetTitle(
"tracking particle |#eta|");
608 resVtxZ->GetYaxis()->SetTitle(
"#sigma(#DeltaVtxZ) [cm]");
609 resVtxZ->SetMinimum(0.0);
610 resVtxZ->SetStats(
false);
613 if (resVtxZ_1->GetEntries() > 0 && resVtxZ_2->GetEntries() > 0 && resVtxZ_3->GetEntries() > 0 &&
614 resVtxZ_4->GetEntries() > 0 && resVtxZ_5->GetEntries() > 0 && resVtxZ_6->GetEntries() > 0) {
617 resVtxZ_1->Fit(fit3,
"Q",
"R");
618 resVtxZ_2->Fit(fit3,
"Q",
"R");
619 resVtxZ_3->Fit(fit3,
"Q",
"R");
620 resVtxZ_4->Fit(fit3,
"Q",
"R");
621 resVtxZ_5->Fit(fit3,
"Q",
"R");
622 resVtxZ_6->Fit(fit3,
"Q",
"R");
623 sigma_VtxZ.push_back(resVtxZ_1->GetFunction(
"fit3")->GetParameter(2));
624 sigma_VtxZ.push_back(resVtxZ_2->GetFunction(
"fit3")->GetParameter(2));
625 sigma_VtxZ.push_back(resVtxZ_3->GetFunction(
"fit3")->GetParameter(2));
626 sigma_VtxZ.push_back(resVtxZ_4->GetFunction(
"fit3")->GetParameter(2));
627 sigma_VtxZ.push_back(resVtxZ_5->GetFunction(
"fit3")->GetParameter(2));
628 sigma_VtxZ.push_back(resVtxZ_6->GetFunction(
"fit3")->GetParameter(2));
629 error_VtxZ.push_back(resVtxZ_1->GetFunction(
"fit3")->GetParError(2));
630 error_VtxZ.push_back(resVtxZ_2->GetFunction(
"fit3")->GetParError(2));
631 error_VtxZ.push_back(resVtxZ_3->GetFunction(
"fit3")->GetParError(2));
632 error_VtxZ.push_back(resVtxZ_4->GetFunction(
"fit3")->GetParError(2));
633 error_VtxZ.push_back(resVtxZ_5->GetFunction(
"fit3")->GetParError(2));
634 error_VtxZ.push_back(resVtxZ_6->GetFunction(
"fit3")->GetParError(2));
637 for (
int i = 0;
i < 6;
i++) {
638 resVtxZ->SetBinContent(
i + 1, sigma_VtxZ[
i]);
639 resVtxZ->SetBinError(
i + 1, error_VtxZ[
i]);
642 edm::LogWarning(
"DataNotFound") <<
"L1 tracks not found for VtxZ resolution!\n";
643 for (
int i = 0;
i < 6;
i++) {
644 resVtxZ->SetBinContent(
i + 1, -1);
645 resVtxZ->SetBinError(
i + 1, -1);
650 edm::LogWarning(
"DataNotFound") <<
"Monitor elements for VtxZ resolution cannot be found!\n";
653 if (meresd0_eta0to0p7 && meresd0_eta0p7to1 && meresd0_eta1to1p2 && meresd0_eta1p2to1p6 && meresd0_eta1p6to2 &&
659 TH1F *resd0_1 = meresd0_eta0to0p7->
getTH1F();
660 TH1F *resd0_2 = meresd0_eta0p7to1->
getTH1F();
661 TH1F *resd0_3 = meresd0_eta1to1p2->
getTH1F();
662 TH1F *resd0_4 = meresd0_eta1p2to1p6->
getTH1F();
663 TH1F *resd0_5 = meresd0_eta1p6to2->
getTH1F();
664 TH1F *resd0_6 = meresd0_eta2to2p4->
getTH1F();
667 MonitorElement *me_res_d0 = ibooker.
book1D(
"d0Resolution",
"d_{0} resolution vs |#eta|", eta_binnum, eta_bins);
668 TH1F *resd0 = me_res_d0->
getTH1F();
669 resd0->GetXaxis()->SetTitle(
"tracking particle |#eta|");
670 resd0->GetYaxis()->SetTitle(
"#sigma(#Deltad_{0}) [cm]");
671 resd0->SetMinimum(0.0);
672 resd0->SetStats(
false);
675 if (resd0_1->GetEntries() > 0 && resd0_2->GetEntries() > 0 && resd0_3->GetEntries() > 0 &&
676 resd0_4->GetEntries() > 0 && resd0_5->GetEntries() > 0 && resd0_6->GetEntries() > 0) {
679 resd0_1->Fit(
fit,
"Q",
"R");
680 resd0_2->Fit(
fit,
"Q",
"R");
681 resd0_3->Fit(
fit,
"Q",
"R");
682 resd0_4->Fit(
fit,
"Q",
"R");
683 resd0_5->Fit(
fit,
"Q",
"R");
684 resd0_6->Fit(
fit,
"Q",
"R");
685 sigma_d0.push_back(resd0_1->GetFunction(
"fit")->GetParameter(2));
686 sigma_d0.push_back(resd0_2->GetFunction(
"fit")->GetParameter(2));
687 sigma_d0.push_back(resd0_3->GetFunction(
"fit")->GetParameter(2));
688 sigma_d0.push_back(resd0_4->GetFunction(
"fit")->GetParameter(2));
689 sigma_d0.push_back(resd0_5->GetFunction(
"fit")->GetParameter(2));
690 sigma_d0.push_back(resd0_6->GetFunction(
"fit")->GetParameter(2));
691 error_d0.push_back(resd0_1->GetFunction(
"fit")->GetParError(2));
692 error_d0.push_back(resd0_2->GetFunction(
"fit")->GetParError(2));
693 error_d0.push_back(resd0_3->GetFunction(
"fit")->GetParError(2));
694 error_d0.push_back(resd0_4->GetFunction(
"fit")->GetParError(2));
695 error_d0.push_back(resd0_5->GetFunction(
"fit")->GetParError(2));
696 error_d0.push_back(resd0_6->GetFunction(
"fit")->GetParError(2));
699 for (
int i = 0;
i < 6;
i++) {
700 resd0->SetBinContent(
i + 1, sigma_d0[
i]);
701 resd0->SetBinError(
i + 1, error_d0[
i]);
704 edm::LogWarning(
"DataNotFound") <<
"L1 tracks not found for d0 resolution!\n";
705 for (
int i = 0;
i < 6;
i++) {
706 resd0->SetBinContent(
i + 1, -1);
707 resd0->SetBinError(
i + 1, -1);
712 edm::LogWarning(
"DataNotFound") <<
"Monitor elements for d0 resolution cannot be found!\n";
717 edm::LogWarning(
"DataNotFound") <<
"Cannot find valid DQM back end \n";