CMS 3D CMS Logo

MtdGlobalRecoHarvester.cc
Go to the documentation of this file.
1 #include <string>
2 
7 
10 
12 
14 public:
15  explicit MtdGlobalRecoHarvester(const edm::ParameterSet& iConfig);
16  ~MtdGlobalRecoHarvester() override;
17 
18  static void fillDescriptions(edm::ConfigurationDescriptions& descriptions);
19 
20 protected:
22 
23 private:
25 
26  // --- Histograms
33 };
34 
35 // ------------ constructor and destructor --------------
37  : folder_(iConfig.getParameter<std::string>("folder")) {}
38 
40 
41 // ------------ endjob tasks ----------------------------
43  // --- Get the monitoring histograms
44  MonitorElement* meBTLTrackEffEtaTot = igetter.get(folder_ + "TrackBTLEffEtaTot");
45  MonitorElement* meBTLTrackEffPhiTot = igetter.get(folder_ + "TrackBTLEffPhiTot");
46  MonitorElement* meBTLTrackEffPtTot = igetter.get(folder_ + "TrackBTLEffPtTot");
47  MonitorElement* meBTLTrackEffEtaMtd = igetter.get(folder_ + "TrackBTLEffEtaMtd");
48  MonitorElement* meBTLTrackEffPhiMtd = igetter.get(folder_ + "TrackBTLEffPhiMtd");
49  MonitorElement* meBTLTrackEffPtMtd = igetter.get(folder_ + "TrackBTLEffPtMtd");
50  MonitorElement* meETLTrackEffEtaTotZneg = igetter.get(folder_ + "TrackETLEffEtaTotZneg");
51  MonitorElement* meETLTrackEffPhiTotZneg = igetter.get(folder_ + "TrackETLEffPhiTotZneg");
52  MonitorElement* meETLTrackEffPtTotZneg = igetter.get(folder_ + "TrackETLEffPtTotZneg");
53  MonitorElement* meETLTrackEffEtaMtdZnegD1 = igetter.get(folder_ + "TrackETLEffEtaMtdZnegD1");
54  MonitorElement* meETLTrackEffEtaMtdZnegD2 = igetter.get(folder_ + "TrackETLEffEtaMtdZnegD2");
55  MonitorElement* meETLTrackEffPhiMtdZnegD1 = igetter.get(folder_ + "TrackETLEffPhiMtdZnegD1");
56  MonitorElement* meETLTrackEffPhiMtdZnegD2 = igetter.get(folder_ + "TrackETLEffPhiMtdZnegD2");
57  MonitorElement* meETLTrackEffPtMtdZnegD1 = igetter.get(folder_ + "TrackETLEffPtMtdZnegD1");
58  MonitorElement* meETLTrackEffPtMtdZnegD2 = igetter.get(folder_ + "TrackETLEffPtMtdZnegD2");
59  MonitorElement* meETLTrackEffEtaTotZpos = igetter.get(folder_ + "TrackETLEffEtaTotZpos");
60  MonitorElement* meETLTrackEffPhiTotZpos = igetter.get(folder_ + "TrackETLEffPhiTotZpos");
61  MonitorElement* meETLTrackEffPtTotZpos = igetter.get(folder_ + "TrackETLEffPtTotZpos");
62  MonitorElement* meETLTrackEffEtaMtdZposD1 = igetter.get(folder_ + "TrackETLEffEtaMtdZposD1");
63  MonitorElement* meETLTrackEffEtaMtdZposD2 = igetter.get(folder_ + "TrackETLEffEtaMtdZposD2");
64  MonitorElement* meETLTrackEffPhiMtdZposD1 = igetter.get(folder_ + "TrackETLEffPhiMtdZposD1");
65  MonitorElement* meETLTrackEffPhiMtdZposD2 = igetter.get(folder_ + "TrackETLEffPhiMtdZposD2");
66  MonitorElement* meETLTrackEffPtMtdZposD1 = igetter.get(folder_ + "TrackETLEffPtMtdZposD1");
67  MonitorElement* meETLTrackEffPtMtdZposD2 = igetter.get(folder_ + "TrackETLEffPtMtdZposD2");
68 
69  if (!meBTLTrackEffEtaTot || !meBTLTrackEffPhiTot || !meBTLTrackEffPtTot || !meBTLTrackEffEtaMtd ||
70  !meBTLTrackEffPhiMtd || !meBTLTrackEffPtMtd || !meETLTrackEffEtaTotZneg || !meETLTrackEffPhiTotZneg ||
71  !meETLTrackEffPtTotZneg || !meETLTrackEffEtaMtdZnegD1 || !meETLTrackEffPhiMtdZnegD1 ||
72  !meETLTrackEffPtMtdZnegD1 || !meETLTrackEffEtaTotZpos || !meETLTrackEffPhiTotZpos || !meETLTrackEffPtTotZpos ||
73  !meETLTrackEffEtaMtdZposD1 || !meETLTrackEffPhiMtdZposD1 || !meETLTrackEffPtMtdZposD1 ||
74  !meETLTrackEffEtaMtdZnegD2 || !meETLTrackEffPhiMtdZnegD2 || !meETLTrackEffPtMtdZnegD2 ||
75  !meETLTrackEffEtaMtdZposD2 || !meETLTrackEffPhiMtdZposD2 || !meETLTrackEffPtMtdZposD2) {
76  edm::LogError("MtdGlobalRecoHarvester") << "Monitoring histograms not found!" << std::endl;
77  return;
78  }
79 
80  // --- Book histograms
81  ibook.cd(folder_);
82  meBtlEtaEff_ = ibook.book1D("BtlEtaEff",
83  " Track Efficiency VS Eta;#eta;Efficiency",
84  meBTLTrackEffEtaTot->getNbinsX(),
85  meBTLTrackEffEtaTot->getTH1()->GetXaxis()->GetXmin(),
86  meBTLTrackEffEtaTot->getTH1()->GetXaxis()->GetXmax());
87  meBtlPhiEff_ = ibook.book1D("BtlPhiEff",
88  "Track Efficiency VS Phi;#phi [rad];Efficiency",
89  meBTLTrackEffPhiTot->getNbinsX(),
90  meBTLTrackEffPhiTot->getTH1()->GetXaxis()->GetXmin(),
91  meBTLTrackEffPhiTot->getTH1()->GetXaxis()->GetXmax());
92  meBtlPtEff_ = ibook.book1D("BtlPtEff",
93  "Track Efficiency VS Pt;Pt [GeV];Efficiency",
94  meBTLTrackEffPtTot->getNbinsX(),
95  meBTLTrackEffPtTot->getTH1()->GetXaxis()->GetXmin(),
96  meBTLTrackEffPtTot->getTH1()->GetXaxis()->GetXmax());
97  meEtlEtaEff_[0] = ibook.book1D("EtlEtaEffZnegD1",
98  " Track Efficiency VS Eta (-Z, Single(topo1D)/First(topo2D) Disk);#eta;Efficiency",
99  meETLTrackEffEtaTotZneg->getNbinsX(),
100  meETLTrackEffEtaTotZneg->getTH1()->GetXaxis()->GetXmin(),
101  meETLTrackEffEtaTotZneg->getTH1()->GetXaxis()->GetXmax());
102  meEtlEtaEff_[1] = ibook.book1D("EtlEtaEffZnegD2",
103  " Track Efficiency VS Eta (-Z, Second Disk);#eta;Efficiency",
104  meETLTrackEffEtaTotZneg->getNbinsX(),
105  meETLTrackEffEtaTotZneg->getTH1()->GetXaxis()->GetXmin(),
106  meETLTrackEffEtaTotZneg->getTH1()->GetXaxis()->GetXmax());
107  meEtlPhiEff_[0] =
108  ibook.book1D("EtlPhiEffZnegD1",
109  "Track Efficiency VS Phi (-Z, Single(topo1D)/First(topo2D) Disk);#phi [rad];Efficiency",
110  meETLTrackEffPhiTotZneg->getNbinsX(),
111  meETLTrackEffPhiTotZneg->getTH1()->GetXaxis()->GetXmin(),
112  meETLTrackEffPhiTotZneg->getTH1()->GetXaxis()->GetXmax());
113  meEtlPhiEff_[1] = ibook.book1D("EtlPhiEffZnegD2",
114  "Track Efficiency VS Phi (-Z, Second Disk);#phi [rad];Efficiency",
115  meETLTrackEffPhiTotZneg->getNbinsX(),
116  meETLTrackEffPhiTotZneg->getTH1()->GetXaxis()->GetXmin(),
117  meETLTrackEffPhiTotZneg->getTH1()->GetXaxis()->GetXmax());
118  meEtlPtEff_[0] = ibook.book1D("EtlPtEffZnegD1",
119  "Track Efficiency VS Pt (-Z, Single(topo1D)/First(topo2D) Disk);Pt [GeV];Efficiency",
120  meETLTrackEffPtTotZneg->getNbinsX(),
121  meETLTrackEffPtTotZneg->getTH1()->GetXaxis()->GetXmin(),
122  meETLTrackEffPtTotZneg->getTH1()->GetXaxis()->GetXmax());
123  meEtlPtEff_[1] = ibook.book1D("EtlPtEffZnegD2",
124  "Track Efficiency VS Pt (-Z, Second Disk);Pt [GeV];Efficiency",
125  meETLTrackEffPtTotZneg->getNbinsX(),
126  meETLTrackEffPtTotZneg->getTH1()->GetXaxis()->GetXmin(),
127  meETLTrackEffPtTotZneg->getTH1()->GetXaxis()->GetXmax());
128  meEtlEtaEff_[2] = ibook.book1D("EtlEtaEffZposD1",
129  " Track Efficiency VS Eta (+Z, Single(topo1D)/First(topo2D) Disk);#eta;Efficiency",
130  meETLTrackEffEtaTotZpos->getNbinsX(),
131  meETLTrackEffEtaTotZpos->getTH1()->GetXaxis()->GetXmin(),
132  meETLTrackEffEtaTotZpos->getTH1()->GetXaxis()->GetXmax());
133  meEtlEtaEff_[3] = ibook.book1D("EtlEtaEffZposD2",
134  " Track Efficiency VS Eta (+Z, Second Disk);#eta;Efficiency",
135  meETLTrackEffEtaTotZpos->getNbinsX(),
136  meETLTrackEffEtaTotZpos->getTH1()->GetXaxis()->GetXmin(),
137  meETLTrackEffEtaTotZpos->getTH1()->GetXaxis()->GetXmax());
138  meEtlPhiEff_[2] =
139  ibook.book1D("EtlPhiEffZposD1",
140  "Track Efficiency VS Phi (+Z, Single(topo1D)/First(topo2D) Disk);#phi [rad];Efficiency",
141  meETLTrackEffPhiTotZpos->getNbinsX(),
142  meETLTrackEffPhiTotZpos->getTH1()->GetXaxis()->GetXmin(),
143  meETLTrackEffPhiTotZpos->getTH1()->GetXaxis()->GetXmax());
144  meEtlPhiEff_[3] = ibook.book1D("EtlPhiEffZposD2",
145  "Track Efficiency VS Phi (+Z, Second Disk);#phi [rad];Efficiency",
146  meETLTrackEffPhiTotZpos->getNbinsX(),
147  meETLTrackEffPhiTotZpos->getTH1()->GetXaxis()->GetXmin(),
148  meETLTrackEffPhiTotZpos->getTH1()->GetXaxis()->GetXmax());
149  meEtlPtEff_[2] = ibook.book1D("EtlPtEffZposD1",
150  "Track Efficiency VS Pt (+Z, Single(topo1D)/First(topo2D) Disk);Pt [GeV];Efficiency",
151  meETLTrackEffPtTotZpos->getNbinsX(),
152  meETLTrackEffPtTotZpos->getTH1()->GetXaxis()->GetXmin(),
153  meETLTrackEffPtTotZpos->getTH1()->GetXaxis()->GetXmax());
154  meEtlPtEff_[3] = ibook.book1D("EtlPtEffZposD2",
155  "Track Efficiency VS Pt (+Z, Second Disk);Pt [GeV];Efficiency",
156  meETLTrackEffPtTotZpos->getNbinsX(),
157  meETLTrackEffPtTotZpos->getTH1()->GetXaxis()->GetXmin(),
158  meETLTrackEffPtTotZpos->getTH1()->GetXaxis()->GetXmax());
159  meBtlEtaEff_->getTH1()->SetMinimum(0.);
160  meBtlPhiEff_->getTH1()->SetMinimum(0.);
161  meBtlPtEff_->getTH1()->SetMinimum(0.);
162  for (int i = 0; i < 4; i++) {
163  meEtlEtaEff_[i]->getTH1()->SetMinimum(0.);
164  meEtlPhiEff_[i]->getTH1()->SetMinimum(0.);
165  meEtlPtEff_[i]->getTH1()->SetMinimum(0.);
166  }
167 
168  // --- Calculate efficiency BTL
169  for (int ibin = 1; ibin <= meBTLTrackEffEtaTot->getNbinsX(); ibin++) {
170  double eff = meBTLTrackEffEtaMtd->getBinContent(ibin) / meBTLTrackEffEtaTot->getBinContent(ibin);
171  double bin_err = sqrt((meBTLTrackEffEtaMtd->getBinContent(ibin) *
172  (meBTLTrackEffEtaTot->getBinContent(ibin) - meBTLTrackEffEtaMtd->getBinContent(ibin))) /
173  pow(meBTLTrackEffEtaTot->getBinContent(ibin), 3));
174  if (meBTLTrackEffEtaTot->getBinContent(ibin) == 0) {
175  eff = 0;
176  bin_err = 0;
177  }
178  meBtlEtaEff_->setBinContent(ibin, eff);
179  meBtlEtaEff_->setBinError(ibin, bin_err);
180  }
181  for (int ibin = 1; ibin <= meBTLTrackEffPhiTot->getNbinsX(); ibin++) {
182  double eff = meBTLTrackEffPhiMtd->getBinContent(ibin) / meBTLTrackEffPhiTot->getBinContent(ibin);
183  double bin_err = sqrt((meBTLTrackEffPhiMtd->getBinContent(ibin) *
184  (meBTLTrackEffPhiTot->getBinContent(ibin) - meBTLTrackEffPhiMtd->getBinContent(ibin))) /
185  pow(meBTLTrackEffPhiTot->getBinContent(ibin), 3));
186  if (meBTLTrackEffPhiTot->getBinContent(ibin) == 0) {
187  eff = 0;
188  bin_err = 0;
189  }
190  meBtlPhiEff_->setBinContent(ibin, eff);
191  meBtlPhiEff_->setBinError(ibin, bin_err);
192  }
193  for (int ibin = 1; ibin <= meBTLTrackEffPtTot->getNbinsX(); ibin++) {
194  double eff = meBTLTrackEffPtMtd->getBinContent(ibin) / meBTLTrackEffPtTot->getBinContent(ibin);
195  double bin_err = sqrt((meBTLTrackEffPtMtd->getBinContent(ibin) *
196  (meBTLTrackEffPtTot->getBinContent(ibin) - meBTLTrackEffPtMtd->getBinContent(ibin))) /
197  pow(meBTLTrackEffPtTot->getBinContent(ibin), 3));
198  if (meBTLTrackEffPtTot->getBinContent(ibin) == 0) {
199  eff = 0;
200  bin_err = 0;
201  }
202  meBtlPtEff_->setBinContent(ibin, eff);
203  meBtlPtEff_->setBinError(ibin, bin_err);
204  }
205  // --- Calculate efficiency ETL
206  for (int ibin = 1; ibin <= meETLTrackEffEtaTotZneg->getNbinsX(); ibin++) {
207  double eff = meETLTrackEffEtaMtdZnegD1->getBinContent(ibin) / meETLTrackEffEtaTotZneg->getBinContent(ibin);
208  double bin_err =
209  sqrt((meETLTrackEffEtaMtdZnegD1->getBinContent(ibin) *
210  (meETLTrackEffEtaTotZneg->getBinContent(ibin) - meETLTrackEffEtaMtdZnegD1->getBinContent(ibin))) /
211  pow(meETLTrackEffEtaTotZneg->getBinContent(ibin), 3));
212  if (meETLTrackEffEtaTotZneg->getBinContent(ibin) == 0) {
213  eff = 0;
214  bin_err = 0;
215  }
216  meEtlEtaEff_[0]->setBinContent(ibin, eff);
217  meEtlEtaEff_[0]->setBinError(ibin, bin_err);
218  }
219 
220  for (int ibin = 1; ibin <= meETLTrackEffEtaTotZneg->getNbinsX(); ibin++) {
221  double eff = meETLTrackEffEtaMtdZnegD2->getBinContent(ibin) / meETLTrackEffEtaTotZneg->getBinContent(ibin);
222  double bin_err =
223  sqrt((meETLTrackEffEtaMtdZnegD2->getBinContent(ibin) *
224  (meETLTrackEffEtaTotZneg->getBinContent(ibin) - meETLTrackEffEtaMtdZnegD2->getBinContent(ibin))) /
225  pow(meETLTrackEffEtaTotZneg->getBinContent(ibin), 3));
226  if (meETLTrackEffEtaTotZneg->getBinContent(ibin) == 0) {
227  eff = 0;
228  bin_err = 0;
229  }
230  meEtlEtaEff_[1]->setBinContent(ibin, eff);
231  meEtlEtaEff_[1]->setBinError(ibin, bin_err);
232  }
233 
234  for (int ibin = 1; ibin <= meETLTrackEffEtaTotZpos->getNbinsX(); ibin++) {
235  double eff = meETLTrackEffEtaMtdZposD1->getBinContent(ibin) / meETLTrackEffEtaTotZpos->getBinContent(ibin);
236  double bin_err =
237  sqrt((meETLTrackEffEtaMtdZposD1->getBinContent(ibin) *
238  (meETLTrackEffEtaTotZpos->getBinContent(ibin) - meETLTrackEffEtaMtdZposD1->getBinContent(ibin))) /
239  pow(meETLTrackEffEtaTotZpos->getBinContent(ibin), 3));
240  if (meETLTrackEffEtaTotZpos->getBinContent(ibin) == 0) {
241  eff = 0;
242  bin_err = 0;
243  }
244  meEtlEtaEff_[2]->setBinContent(ibin, eff);
245  meEtlEtaEff_[2]->setBinError(ibin, bin_err);
246  }
247 
248  for (int ibin = 1; ibin <= meETLTrackEffEtaTotZpos->getNbinsX(); ibin++) {
249  double eff = meETLTrackEffEtaMtdZposD2->getBinContent(ibin) / meETLTrackEffEtaTotZpos->getBinContent(ibin);
250  double bin_err =
251  sqrt((meETLTrackEffEtaMtdZposD2->getBinContent(ibin) *
252  (meETLTrackEffEtaTotZpos->getBinContent(ibin) - meETLTrackEffEtaMtdZposD2->getBinContent(ibin))) /
253  pow(meETLTrackEffEtaTotZpos->getBinContent(ibin), 3));
254  if (meETLTrackEffEtaTotZpos->getBinContent(ibin) == 0) {
255  eff = 0;
256  bin_err = 0;
257  }
258  meEtlEtaEff_[3]->setBinContent(ibin, eff);
259  meEtlEtaEff_[3]->setBinError(ibin, bin_err);
260  }
261 
262  for (int ibin = 1; ibin <= meETLTrackEffPhiTotZneg->getNbinsX(); ibin++) {
263  double eff = meETLTrackEffPhiMtdZnegD1->getBinContent(ibin) / meETLTrackEffPhiTotZneg->getBinContent(ibin);
264  double bin_err =
265  sqrt((meETLTrackEffPhiMtdZnegD1->getBinContent(ibin) *
266  (meETLTrackEffPhiTotZneg->getBinContent(ibin) - meETLTrackEffPhiMtdZnegD1->getBinContent(ibin))) /
267  pow(meETLTrackEffPhiTotZneg->getBinContent(ibin), 3));
268  if (meETLTrackEffPhiTotZneg->getBinContent(ibin) == 0) {
269  eff = 0;
270  bin_err = 0;
271  }
272  meEtlPhiEff_[0]->setBinContent(ibin, eff);
273  meEtlPhiEff_[0]->setBinError(ibin, bin_err);
274  }
275 
276  for (int ibin = 1; ibin <= meETLTrackEffPhiTotZneg->getNbinsX(); ibin++) {
277  double eff = meETLTrackEffPhiMtdZnegD2->getBinContent(ibin) / meETLTrackEffPhiTotZneg->getBinContent(ibin);
278  double bin_err =
279  sqrt((meETLTrackEffPhiMtdZnegD2->getBinContent(ibin) *
280  (meETLTrackEffPhiTotZneg->getBinContent(ibin) - meETLTrackEffPhiMtdZnegD2->getBinContent(ibin))) /
281  pow(meETLTrackEffPhiTotZneg->getBinContent(ibin), 3));
282  if (meETLTrackEffPhiTotZneg->getBinContent(ibin) == 0) {
283  eff = 0;
284  bin_err = 0;
285  }
286  meEtlPhiEff_[1]->setBinContent(ibin, eff);
287  meEtlPhiEff_[1]->setBinError(ibin, bin_err);
288  }
289 
290  for (int ibin = 1; ibin <= meETLTrackEffPhiTotZpos->getNbinsX(); ibin++) {
291  double eff = meETLTrackEffPhiMtdZposD1->getBinContent(ibin) / meETLTrackEffPhiTotZpos->getBinContent(ibin);
292  double bin_err =
293  sqrt((meETLTrackEffPhiMtdZposD1->getBinContent(ibin) *
294  (meETLTrackEffPhiTotZpos->getBinContent(ibin) - meETLTrackEffPhiMtdZposD1->getBinContent(ibin))) /
295  pow(meETLTrackEffPhiTotZpos->getBinContent(ibin), 3));
296  if (meETLTrackEffPhiTotZpos->getBinContent(ibin) == 0) {
297  eff = 0;
298  bin_err = 0;
299  }
300  meEtlPhiEff_[2]->setBinContent(ibin, eff);
301  meEtlPhiEff_[2]->setBinError(ibin, bin_err);
302  }
303 
304  for (int ibin = 1; ibin <= meETLTrackEffPhiTotZpos->getNbinsX(); ibin++) {
305  double eff = meETLTrackEffPhiMtdZposD2->getBinContent(ibin) / meETLTrackEffPhiTotZpos->getBinContent(ibin);
306  double bin_err =
307  sqrt((meETLTrackEffPhiMtdZposD2->getBinContent(ibin) *
308  (meETLTrackEffPhiTotZpos->getBinContent(ibin) - meETLTrackEffPhiMtdZposD2->getBinContent(ibin))) /
309  pow(meETLTrackEffPhiTotZpos->getBinContent(ibin), 3));
310  if (meETLTrackEffPhiTotZpos->getBinContent(ibin) == 0) {
311  eff = 0;
312  bin_err = 0;
313  }
314  meEtlPhiEff_[3]->setBinContent(ibin, eff);
315  meEtlPhiEff_[3]->setBinError(ibin, bin_err);
316  }
317 
318  for (int ibin = 1; ibin <= meETLTrackEffPtTotZneg->getNbinsX(); ibin++) {
319  double eff = meETLTrackEffPtMtdZnegD1->getBinContent(ibin) / meETLTrackEffPtTotZneg->getBinContent(ibin);
320  double bin_err =
321  sqrt((meETLTrackEffPtMtdZnegD1->getBinContent(ibin) *
322  (meETLTrackEffPtTotZneg->getBinContent(ibin) - meETLTrackEffPtMtdZnegD1->getBinContent(ibin))) /
323  pow(meETLTrackEffPtTotZneg->getBinContent(ibin), 3));
324  if (meETLTrackEffPtTotZneg->getBinContent(ibin) == 0) {
325  eff = 0;
326  bin_err = 0;
327  }
328  meEtlPtEff_[0]->setBinContent(ibin, eff);
329  meEtlPtEff_[0]->setBinError(ibin, bin_err);
330  }
331 
332  for (int ibin = 1; ibin <= meETLTrackEffPtTotZneg->getNbinsX(); ibin++) {
333  double eff = meETLTrackEffPtMtdZnegD2->getBinContent(ibin) / meETLTrackEffPtTotZneg->getBinContent(ibin);
334  double bin_err =
335  sqrt((meETLTrackEffPtMtdZnegD2->getBinContent(ibin) *
336  (meETLTrackEffPtTotZneg->getBinContent(ibin) - meETLTrackEffPtMtdZnegD2->getBinContent(ibin))) /
337  pow(meETLTrackEffPtTotZneg->getBinContent(ibin), 3));
338  if (meETLTrackEffPtTotZneg->getBinContent(ibin) == 0) {
339  eff = 0;
340  bin_err = 0;
341  }
342  meEtlPtEff_[1]->setBinContent(ibin, eff);
343  meEtlPtEff_[1]->setBinError(ibin, bin_err);
344  }
345 
346  for (int ibin = 1; ibin <= meETLTrackEffPtTotZpos->getNbinsX(); ibin++) {
347  double eff = meETLTrackEffPtMtdZposD1->getBinContent(ibin) / meETLTrackEffPtTotZpos->getBinContent(ibin);
348  double bin_err =
349  sqrt((meETLTrackEffPtMtdZposD1->getBinContent(ibin) *
350  (meETLTrackEffPtTotZpos->getBinContent(ibin) - meETLTrackEffPtMtdZposD1->getBinContent(ibin))) /
351  pow(meETLTrackEffPtTotZpos->getBinContent(ibin), 3));
352  if (meETLTrackEffPtTotZpos->getBinContent(ibin) == 0) {
353  eff = 0;
354  bin_err = 0;
355  }
356  meEtlPtEff_[2]->setBinContent(ibin, eff);
357  meEtlPtEff_[2]->setBinError(ibin, bin_err);
358  }
359 
360  for (int ibin = 1; ibin <= meETLTrackEffPtTotZpos->getNbinsX(); ibin++) {
361  double eff = meETLTrackEffPtMtdZposD2->getBinContent(ibin) / meETLTrackEffPtTotZpos->getBinContent(ibin);
362  double bin_err =
363  sqrt((meETLTrackEffPtMtdZposD2->getBinContent(ibin) *
364  (meETLTrackEffPtTotZpos->getBinContent(ibin) - meETLTrackEffPtMtdZposD2->getBinContent(ibin))) /
365  pow(meETLTrackEffPtTotZpos->getBinContent(ibin), 3));
366  if (meETLTrackEffPtTotZpos->getBinContent(ibin) == 0) {
367  eff = 0;
368  bin_err = 0;
369  }
370  meEtlPtEff_[3]->setBinContent(ibin, eff);
371  meEtlPtEff_[3]->setBinError(ibin, bin_err);
372  }
373 }
374 
375 // ------------ method fills 'descriptions' with the allowed parameters for the module ----------
378 
379  desc.add<std::string>("folder", "MTD/GlobalReco/");
380 
381  descriptions.add("MtdGlobalRecoPostProcessor", desc);
382 }
383 
DQMEDHarvester.h
MtdGlobalRecoHarvester::meBtlPtEff_
MonitorElement * meBtlPtEff_
Definition: MtdGlobalRecoHarvester.cc:29
mps_fire.i
i
Definition: mps_fire.py:428
MessageLogger.h
edm::ParameterSetDescription
Definition: ParameterSetDescription.h:52
MtdGlobalRecoHarvester
Definition: MtdGlobalRecoHarvester.cc:13
DQMStore.h
dqm::legacy::MonitorElement
Definition: MonitorElement.h:461
ETLDetId.h
MakerMacros.h
DEFINE_FWK_MODULE
#define DEFINE_FWK_MODULE(type)
Definition: MakerMacros.h:16
edm::ConfigurationDescriptions::add
void add(std::string const &label, ParameterSetDescription const &psetDescription)
Definition: ConfigurationDescriptions.cc:57
Service.h
mathSSE::sqrt
T sqrt(T t)
Definition: SSEVec.h:19
MtdGlobalRecoHarvester::meEtlPtEff_
MonitorElement * meEtlPtEff_[4]
Definition: MtdGlobalRecoHarvester.cc:32
dqm::implementation::NavigatorBase::cd
virtual void cd()
Definition: DQMStore.cc:29
dqm::legacy::MonitorElement::getTH1
virtual TH1 * getTH1() const
Definition: MonitorElement.h:474
MtdGlobalRecoHarvester::folder_
const std::string folder_
Definition: MtdGlobalRecoHarvester.cc:24
edm::ConfigurationDescriptions
Definition: ConfigurationDescriptions.h:28
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
folder_
std::string folder_
Definition: DQMEDAnalyzer.cc:60
MtdGlobalRecoHarvester::~MtdGlobalRecoHarvester
~MtdGlobalRecoHarvester() override
Definition: MtdGlobalRecoHarvester.cc:39
MtdGlobalRecoHarvester::meBtlEtaEff_
MonitorElement * meBtlEtaEff_
Definition: MtdGlobalRecoHarvester.cc:27
edm::ParameterSet
Definition: ParameterSet.h:47
MtdGlobalRecoHarvester::meEtlEtaEff_
MonitorElement * meEtlEtaEff_[4]
Definition: MtdGlobalRecoHarvester.cc:30
MtdGlobalRecoHarvester::MtdGlobalRecoHarvester
MtdGlobalRecoHarvester(const edm::ParameterSet &iConfig)
Definition: MtdGlobalRecoHarvester.cc:36
MtdGlobalRecoHarvester::fillDescriptions
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
Definition: MtdGlobalRecoHarvester.cc:376
edm::LogError
Log< level::Error, false > LogError
Definition: MessageLogger.h:123
MtdGlobalRecoHarvester::meBtlPhiEff_
MonitorElement * meBtlPhiEff_
Definition: MtdGlobalRecoHarvester.cc:28
DQMEDHarvester
Definition: DQMEDHarvester.py:1
dqm::impl::MonitorElement::setBinContent
virtual void setBinContent(int binx, double content)
set content of bin (1-D)
Definition: MonitorElement.cc:691
submitPVResolutionJobs.desc
string desc
Definition: submitPVResolutionJobs.py:251
std
Definition: JetResolutionObject.h:76
MtdGlobalRecoHarvester::meEtlPhiEff_
MonitorElement * meEtlPhiEff_[4]
Definition: MtdGlobalRecoHarvester.cc:31
dqm::implementation::IGetter
Definition: DQMStore.h:484
dqm::impl::MonitorElement::getNbinsX
virtual int getNbinsX() const
get # of bins in X-axis
Definition: MonitorElement.cc:574
dqm::impl::MonitorElement::setBinError
virtual void setBinError(int binx, double error)
set uncertainty on content of bin (1-D)
Definition: MonitorElement.cc:709
dqm::implementation::IGetter::get
virtual MonitorElement * get(std::string const &fullpath) const
Definition: DQMStore.cc:651
dqm::implementation::IBooker
Definition: DQMStore.h:43
funct::pow
Power< A, B >::type pow(const A &a, const B &b)
Definition: Power.h:29
MtdGlobalRecoHarvester::dqmEndJob
void dqmEndJob(DQMStore::IBooker &, DQMStore::IGetter &) override
Definition: MtdGlobalRecoHarvester.cc:42
ParameterSet.h
dqm::impl::MonitorElement::getBinContent
virtual double getBinContent(int binx) const
get content of bin (1-D)
Definition: MonitorElement.cc:592
dqm::implementation::IBooker::book1D
MonitorElement * book1D(TString const &name, TString const &title, int const nchX, double const lowX, double const highX, FUNC onbooking=NOOP())
Definition: DQMStore.h:98