CMS 3D CMS Logo

SiPixelPhase1ResidualsExtra.cc
Go to the documentation of this file.
1 // -*- C++ -*-
2 //
3 // Package: SiPixelPhase1ResidualsExtra
4 // Class: SiPixelPhase1ResidualsExtra
5 //
13 //
14 // Original Author: Alessandro Rossi
15 // Created: 25th May 2021
16 //
17 //
19 // Framework
23 // DQM Framework
26 // Geometry
32 // DataFormats
39 //
40 #include <string>
41 #include <cstdlib>
42 #include <iostream>
43 #include <fstream>
44 #include <sstream>
45 
46 using namespace std;
47 using namespace edm;
48 
50  : DQMEDHarvester(iConfig), conf_(iConfig) {
51  LogInfo("PixelDQM") << "SiPixelPhase1ResidualsExtra::SiPixelPhase1ResidualsExtra: Got DQM BackEnd interface" << endl;
52  topFolderName_ = conf_.getParameter<std::string>("TopFolderName");
53  minHits_ = conf_.getParameter<int>("MinHits");
54 }
55 
57  // do anything here that needs to be done at desctruction time
58  // (e.g. close files, deallocate resources etc.)
59  LogInfo("PixelDQM") << "SiPixelPhase1ResidualsExtra::~SiPixelPhase1ResidualsExtra: Destructor" << endl;
60 }
61 
63 
65  bookMEs(iBooker);
66  fillMEs(iBooker, iGetter);
67 }
68 
69 //------------------------------------------------------------------
70 // Used to book the MEs
71 //------------------------------------------------------------------
73  iBooker.cd();
74 
75  //New residual plots for the PXBarrel separated by inner and outer modules per layer
76  iBooker.setCurrentFolder(topFolderName_ + "/PXBarrel");
77 
78  for (std::string layer : {"1", "2", "3", "4"}) {
79  float mean_range = 100.;
80  float rms_range = 200.;
81  if (layer == "1") {
82  mean_range = 200.;
83  rms_range = 1000.;
84  }
85  residuals_["residual_mean_x_Inner_PXLayer_" + layer] =
86  iBooker.book1D("residual_mean_x_Inner_PXLayer_" + layer,
87  "Mean of Track Residuals X Inner Modules for Layer " + layer + ";mean(x_rec-x_pred)[#mum]",
88  100,
89  -1 * mean_range,
90  mean_range);
91  residuals_["residual_mean_x_Outer_PXLayer_" + layer] =
92  iBooker.book1D("residual_mean_x_Outer_PXLayer_" + layer,
93  "Mean of Track Residuals X Outer Modules for Layer " + layer + ";mean(x_rec-x_pred)[#mum]",
94  100,
95  -1 * mean_range,
96  mean_range);
97  residuals_["residual_mean_y_Inner_PXLayer_" + layer] =
98  iBooker.book1D("residual_mean_y_Inner_PXLayer_" + layer,
99  "Mean of Track Residuals Y Inner Modules for Layer " + layer + ";mean(y_rec-y_pred)[#mum]",
100  100,
101  -1 * mean_range,
102  mean_range);
103  residuals_["residual_mean_y_Outer_PXLayer_" + layer] =
104  iBooker.book1D("residual_mean_y_Outer_PXLayer_" + layer,
105  "Mean of Track Residuals Y Outer Modules for Layer " + layer + ";mean(y_rec-y_pred)[#mum]",
106  100,
107  -1 * mean_range,
108  mean_range);
109 
110  residuals_["residual_rms_x_Inner_PXLayer_" + layer] =
111  iBooker.book1D("residual_rms_x_Inner_PXLayer_" + layer,
112  "RMS of Track Residuals X Inner Modules for Layer " + layer + ";rms(x_rec-x_pred)[#mum]",
113  100,
114  0.,
115  rms_range);
116  residuals_["residual_rms_x_Outer_PXLayer_" + layer] =
117  iBooker.book1D("residual_rms_x_Outer_PXLayer_" + layer,
118  "RMS of Track Residuals X Outer Modules for Layer " + layer + ";rms(x_rec-x_pred)[#mum]",
119  100,
120  0.,
121  rms_range);
122  residuals_["residual_rms_y_Inner_PXLayer_" + layer] =
123  iBooker.book1D("residual_rms_y_Inner_PXLayer_" + layer,
124  "RMS of Track Residuals Y Inner Modules for Layer " + layer + ";rms(y_rec-y_pred)[#mum]",
125  100,
126  0.,
127  rms_range);
128  residuals_["residual_rms_y_Outer_PXLayer_" + layer] =
129  iBooker.book1D("residual_rms_y_Outer_PXLayer_" + layer,
130  "RMS of Track Residuals Y Outer Modules for Layer " + layer + ";rms(y_rec-y_pred)[#mum]",
131  100,
132  0.,
133  rms_range);
135  DRnR_["NormRes_mean_x_Inner_PXLayer_" + layer] = iBooker.book1D(
136  "NormRes_mean_x_Inner_PXLayer_" + layer,
137  "Mean of Normalized Track Residuals X Inner Modules for Layer " + layer + ";mean((x_rec-x_pred)/x_err)",
138  100,
139  -1 * 5,
140  5);
141  DRnR_["NormRes_mean_x_Outer_PXLayer_" + layer] = iBooker.book1D(
142  "NormRes_mean_x_Outer_PXLayer_" + layer,
143  "Mean of Normalized Track Residuals X Outer Modules for Layer " + layer + ";mean((x_rec-x_pred)/x_err)",
144  100,
145  -1 * 5,
146  5);
147  DRnR_["NormRes_mean_y_Inner_PXLayer_" + layer] = iBooker.book1D(
148  "NormRes_mean_y_Inner_PXLayer_" + layer,
149  "Mean of Normalized Track Residuals Y Inner Modules for Layer " + layer + ";mean((y_rec-y_pred)/y_err)",
150  100,
151  -1 * 5,
152  5);
153  DRnR_["NormRes_mean_y_Outer_PXLayer_" + layer] = iBooker.book1D(
154  "NormRes_mean_y_Outer_PXLayer_" + layer,
155  "Mean of Normalized Track Residuals Y Outer Modules for Layer " + layer + ";mean((y_rec-y_pred)/y_err)",
156  100,
157  -1 * 5,
158  5);
159 
160  DRnR_["DRnR_x_Inner_PXLayer_" + layer] = iBooker.book1D(
161  "DRnR_x_Inner_PXLayer_" + layer,
162  "RMS of Normalized Track Residuals X Inner Modules for Layer " + layer + ";rms((x_rec-x_pred)/x_err)",
163  100,
164  0.,
165  5);
166  DRnR_["DRnR_x_Outer_PXLayer_" + layer] = iBooker.book1D(
167  "DRnR_x_Outer_PXLayer_" + layer,
168  "RMS of Normalized Track Residuals X Outer Modules for Layer " + layer + ";rms((x_rec-x_pred)/x_err)",
169  100,
170  0.,
171  5);
172  DRnR_["DRnR_y_Inner_PXLayer_" + layer] = iBooker.book1D(
173  "DRnR_y_Inner_PXLayer_" + layer,
174  "RMS of Normalized Track Residuals Y Inner Modules for Layer " + layer + ";rms((y_rec-y_pred)/y_err)",
175  100,
176  0.,
177  5);
178  DRnR_["DRnR_y_Outer_PXLayer_" + layer] = iBooker.book1D(
179  "DRnR_y_Outer_PXLayer_" + layer,
180  "RMS of Normalized Track Residuals Y Outer Modules for Layer " + layer + ";rms((y_rec-y_pred)/y_err)",
181  100,
182  0.,
183  5);
184  }
185 
186  //New residual plots for the PXForward separated by inner and outer modules
187  iBooker.setCurrentFolder(topFolderName_ + "/PXForward");
188 
189  residuals_["residual_mean_x_Inner"] = iBooker.book1D(
190  "residual_mean_x_Inner", "Mean of Track Residuals X Inner Modules;mean(x_rec-x_pred)[#mum]", 100, -100., 100.);
191  residuals_["residual_mean_x_Outer"] = iBooker.book1D(
192  "residual_mean_x_Outer", "Mean of Track Residuals X Outer Modules;mean(x_rec-x_pred)[#mum]", 100, -100., 100.);
193  residuals_["residual_mean_y_Inner"] = iBooker.book1D(
194  "residual_mean_y_Inner", "Mean of Track Residuals Y Inner Modules;mean(y_rec-y_pred)[#mum]", 100, -100., 100.);
195  residuals_["residual_mean_y_Outer"] = iBooker.book1D(
196  "residual_mean_y_Outer", "Mean of Track Residuals Y Outer Modules;mean(y_rec-y_pred)[#mum]", 100, -100., 100.);
197 
198  residuals_["residual_rms_x_Inner"] = iBooker.book1D(
199  "residual_rms_x_Inner", "RMS of Track Residuals X Inner Modules;rms(x_rec-x_pred)[#mum]", 100, 0., 200.);
200  residuals_["residual_rms_x_Outer"] = iBooker.book1D(
201  "residual_rms_x_Outer", "RMS of Track Residuals X Outer Modules;rms(x_rec-x_pred)[#mum]", 100, 0., 200.);
202  residuals_["residual_rms_y_Inner"] = iBooker.book1D(
203  "residual_rms_y_Inner", "RMS of Track Residuals Y Inner Modules;rms(y_rec-y_pred)[#mum]", 100, 0., 200.);
204  residuals_["residual_rms_y_Outer"] = iBooker.book1D(
205  "residual_rms_y_Outer", "RMS of Track Residuals Y Outer Modules;rms(y_rec-y_pred)[#mum]", 100, 0., 200.);
206  //Normalize Residuals inner/outer
207  DRnR_["NormRes_mean_x_Inner"] =
208  iBooker.book1D("NormRes_mean_x_Inner",
209  "Mean of Normalized Track Residuals X Inner Modules;mean((x_rec-x_pred)/x_err)",
210  100,
211  -5.,
212  5.);
213  DRnR_["NormRes_mean_x_Outer"] =
214  iBooker.book1D("NormRes_mean_x_Outer",
215  "Mean of Normalized Track Residuals X Outer Modules;mean((x_rec-x_pred)/x_err)",
216  100,
217  -5.,
218  5.);
219  DRnR_["NormRes_mean_y_Inner"] =
220  iBooker.book1D("NormRes_mean_y_Inner",
221  "Mean of Normalized Track Residuals Y Inner Modules;mean((y_rec-y_pred)/y_err)",
222  100,
223  -5.,
224  5.);
225  DRnR_["NormRes_mean_y_Outer"] =
226  iBooker.book1D("NormRes_mean_y_Outer",
227  "Mean of Normalized Track Residuals Y Outer Modules;mean((y_rec-y_pred)/y_err)",
228  100,
229  -5.,
230  5.);
231 
232  DRnR_["DRnR_x_Inner"] = iBooker.book1D(
233  "DRnR_x_Inner", "RMS of Normalized Track Residuals X Inner Modules;rms((x_rec-x_pred)/x_err)", 100, 0., 5.);
234  DRnR_["DRnR_x_Outer"] = iBooker.book1D(
235  "DRnR_x_Outer", "RMS of Normalized Track Residuals X Outer Modules;rms((x_rec-x_pred)/x_err)", 100, 0., 5.);
236  DRnR_["DRnR_y_Inner"] = iBooker.book1D(
237  "DRnR_y_Inner", "RMS of Normalized Track Residuals Y Inner Modules;rms((y_rec-y_pred)/y_err)", 100, 0., 5.);
238  DRnR_["DRnR_y_Outer"] = iBooker.book1D(
239  "DRnR_y_Outer", "RMS of Normalized Track Residuals Y Outer Modules;rms((y_rec-y_pred)/y_err)", 100, 0., 5.);
240 
241  //New residual plots for the PXForward separated by positive and negative side
242  iBooker.setCurrentFolder(topFolderName_ + "/PXForward");
243 
244  residuals_["residual_mean_x_pos"] = iBooker.book1D(
245  "residual_mean_x_pos", "Mean of Track Residuals X pos. Side;mean(x_rec-x_pred)[#mum]", 100, -100., 100.);
246  residuals_["residual_mean_x_neg"] = iBooker.book1D(
247  "residual_mean_x_neg", "Mean of Track Residuals X neg. Side;mean(x_rec-x_pred)[#mum]", 100, -100., 100.);
248  residuals_["residual_mean_y_pos"] = iBooker.book1D(
249  "residual_mean_y_pos", "Mean of Track Residuals Y pos. Side;mean(y_rec-y_pred)[#mum]", 100, -100., 100.);
250  residuals_["residual_mean_y_neg"] = iBooker.book1D(
251  "residual_mean_y_neg", "Mean of Track Residuals Y neg. Side;mean(y_rec-y_pred)[#mum]", 100, -100., 100.);
252 
253  residuals_["residual_rms_x_pos"] =
254  iBooker.book1D("residual_rms_x_pos", "RMS of Track Residuals X pos. Side;rms(x_rec-x_pred)[#mum]", 100, 0., 200.);
255  residuals_["residual_rms_x_neg"] =
256  iBooker.book1D("residual_rms_x_neg", "RMS of Track Residuals X neg. Side;rms(x_rec-x_pred)[#mum]", 100, 0., 200.);
257  residuals_["residual_rms_y_pos"] =
258  iBooker.book1D("residual_rms_y_pos", "RMS of Track Residuals Y pos. Side;rms(y_rec-y_pred)[#mum]", 100, 0., 200.);
259  residuals_["residual_rms_y_neg"] =
260  iBooker.book1D("residual_rms_y_neg", "RMS of Track Residuals Y neg. Side;rms(y_rec-y_pred)[#mum]", 100, 0., 200.);
261  //Normalized Residuals pos/neg
262  DRnR_["NormRes_mean_x_pos"] = iBooker.book1D(
263  "NormRes_mean_x_pos", "Mean of Normalized Track Residuals X pos. Side;mean((x_rec-x_pred)/x_err)", 100, -5., 5.);
264  DRnR_["NormRes_mean_x_neg"] = iBooker.book1D(
265  "NormRes_mean_x_neg", "Mean of Normalized Track Residuals X neg. Side;mean((x_rec-x_pred)/x_err)", 100, -5., 5.);
266  DRnR_["NormRes_mean_y_pos"] = iBooker.book1D(
267  "NormRes_mean_y_pos", "Mean of Normalized Track Residuals Y pos. Side;mean((y_rec-y_pred)/y_err)", 100, -5., 5.);
268  DRnR_["NormRes_mean_y_neg"] = iBooker.book1D(
269  "NormRes_mean_y_neg", "Mean of Normalized Track Residuals Y neg. Side;mean((y_rec-y_pred)/y_err)", 100, -5., 5.);
270 
271  DRnR_["DRnR_x_pos"] = iBooker.book1D(
272  "DRnR_x_pos", "RMS of Normalized Track Residuals X pos. Side;rms((x_rec-x_pred)/x_err)", 100, 0., 5.);
273  DRnR_["DRnR_x_neg"] = iBooker.book1D(
274  "DRnR_x_neg", "RMS of Normalized Track Residuals X neg. Side;rms((x_rec-x_pred)/x_err)", 100, 0., 5.);
275  DRnR_["DRnR_y_pos"] = iBooker.book1D(
276  "DRnR_y_pos", "RMS of Normalized Track Residuals Y pos. Side;rms((y_rec-y_pred)/y_err)", 100, 0., 5.);
277  DRnR_["DRnR_y_neg"] = iBooker.book1D(
278  "DRnR_y_neg", "RMS of Normalized Track Residuals Y neg. Side;rms((y_rec-y_pred)/y_err)", 100, 0., 5.);
279 
280  //Reset the iBooker
281  iBooker.setCurrentFolder("PixelPhase1/");
282 }
283 
284 //------------------------------------------------------------------
285 // Fill the MEs
286 //------------------------------------------------------------------
288  //Fill additional residuals plots
289  //PXBarrel
290 
291  //constexpr int minHits_ = 30; //Miniminal number of hits needed for module to be filled in histograms
292 
293  for (std::string layer : {"1", "2", "3", "4"}) {
294  MonitorElement* me_x =
295  iGetter.get("PixelPhase1/Tracks/PXBarrel/residual_x_per_SignedModule_per_SignedLadder_PXLayer_" + layer);
296  MonitorElement* me_y =
297  iGetter.get("PixelPhase1/Tracks/PXBarrel/residual_y_per_SignedModule_per_SignedLadder_PXLayer_" + layer);
298  MonitorElement* me2_x = iGetter.get(
299  "PixelPhase1/Tracks/ResidualsExtra/PXBarrel/DRnR_x_per_SignedModule_per_SignedLadder_PXLayer_" + layer);
300  MonitorElement* me2_y = iGetter.get(
301  "PixelPhase1/Tracks/ResidualsExtra/PXBarrel/DRnR_y_per_SignedModule_per_SignedLadder_PXLayer_" + layer);
302 
303  for (int i = 1; i <= me_x->getNbinsY(); i++) {
304  if (i == (me_x->getNbinsY() / 2 + 1))
305  continue; //Middle bin of y axis is empty
306 
307  if (i <= me_x->getNbinsY() / 2) {
308  bool iAmInner = (i % 2 == 0); //Check whether current ladder is inner or outer ladder
309  if (iAmInner) {
310  for (int j : {1, 2, 3, 4, 6, 7, 8, 9}) {
311  if (me_x->getBinEntries(j, i) < minHits_) //Fill only if number of hits is above threshold
312  continue;
313  residuals_["residual_mean_x_Inner_PXLayer_" + layer]->Fill(me_x->getBinContent(j, i) * 1e4);
314  residuals_["residual_mean_y_Inner_PXLayer_" + layer]->Fill(me_y->getBinContent(j, i) * 1e4);
315  residuals_["residual_rms_x_Inner_PXLayer_" + layer]->Fill(me_x->getBinError(j, i) * 1e4);
316  residuals_["residual_rms_y_Inner_PXLayer_" + layer]->Fill(me_y->getBinError(j, i) * 1e4);
317  DRnR_["NormRes_mean_x_Inner_PXLayer_" + layer]->Fill(me2_x->getBinContent(j, i));
318  DRnR_["NormRes_mean_y_Inner_PXLayer_" + layer]->Fill(me2_y->getBinContent(j, i));
319  DRnR_["DRnR_x_Inner_PXLayer_" + layer]->Fill(me2_x->getBinError(j, i));
320  DRnR_["DRnR_y_Inner_PXLayer_" + layer]->Fill(me2_y->getBinError(j, i));
321  }
322  } else {
323  for (int j : {1, 2, 3, 4, 6, 7, 8, 9}) {
324  if (me_x->getBinEntries(j, i) < minHits_) //Fill only if number of hits is above threshold
325  continue;
326  residuals_["residual_mean_x_Outer_PXLayer_" + layer]->Fill(me_x->getBinContent(j, i) * 1e4);
327  residuals_["residual_mean_y_Outer_PXLayer_" + layer]->Fill(me_y->getBinContent(j, i) * 1e4);
328  residuals_["residual_rms_x_Outer_PXLayer_" + layer]->Fill(me_x->getBinError(j, i) * 1e4);
329  residuals_["residual_rms_y_Outer_PXLayer_" + layer]->Fill(me_y->getBinError(j, i) * 1e4);
330  DRnR_["NormRes_mean_x_Outer_PXLayer_" + layer]->Fill(me2_x->getBinContent(j, i));
331  DRnR_["NormRes_mean_y_Outer_PXLayer_" + layer]->Fill(me2_y->getBinContent(j, i));
332  DRnR_["DRnR_x_Outer_PXLayer_" + layer]->Fill(me2_x->getBinError(j, i));
333  DRnR_["DRnR_y_Outer_PXLayer_" + layer]->Fill(me2_y->getBinError(j, i));
334  }
335  }
336  } else {
337  bool iAmInner = (i % 2 == 1); //Check whether current ladder is inner or outer ladder
338  if (iAmInner) {
339  for (int j : {1, 2, 3, 4, 6, 7, 8, 9}) {
340  if (me_x->getBinEntries(j, i) < minHits_) //Fill only if number of hits is above threshold
341  continue;
342  residuals_["residual_mean_x_Inner_PXLayer_" + layer]->Fill(me_x->getBinContent(j, i) * 1e4);
343  residuals_["residual_mean_y_Inner_PXLayer_" + layer]->Fill(me_y->getBinContent(j, i) * 1e4);
344  residuals_["residual_rms_x_Inner_PXLayer_" + layer]->Fill(me_x->getBinError(j, i) * 1e4);
345  residuals_["residual_rms_y_Inner_PXLayer_" + layer]->Fill(me_y->getBinError(j, i) * 1e4);
346  DRnR_["NormRes_mean_x_Inner_PXLayer_" + layer]->Fill(me2_x->getBinContent(j, i));
347  DRnR_["NormRes_mean_y_Inner_PXLayer_" + layer]->Fill(me2_y->getBinContent(j, i));
348  DRnR_["DRnR_x_Inner_PXLayer_" + layer]->Fill(me2_x->getBinError(j, i));
349  DRnR_["DRnR_y_Inner_PXLayer_" + layer]->Fill(me2_y->getBinError(j, i));
350  }
351  } else {
352  for (int j : {1, 2, 3, 4, 6, 7, 8, 9}) {
353  if (me_x->getBinEntries(j, i) < minHits_) //Fill only if number of hits is above threshold
354  continue;
355  residuals_["residual_mean_x_Outer_PXLayer_" + layer]->Fill(me_x->getBinContent(j, i) * 1e4);
356  residuals_["residual_mean_y_Outer_PXLayer_" + layer]->Fill(me_y->getBinContent(j, i) * 1e4);
357  residuals_["residual_rms_x_Outer_PXLayer_" + layer]->Fill(me_x->getBinError(j, i) * 1e4);
358  residuals_["residual_rms_y_Outer_PXLayer_" + layer]->Fill(me_y->getBinError(j, i) * 1e4);
359  DRnR_["NormRes_mean_x_Outer_PXLayer_" + layer]->Fill(me2_x->getBinContent(j, i));
360  DRnR_["NormRes_mean_y_Outer_PXLayer_" + layer]->Fill(me2_y->getBinContent(j, i));
361  DRnR_["DRnR_x_Outer_PXLayer_" + layer]->Fill(me2_x->getBinError(j, i));
362  DRnR_["DRnR_y_Outer_PXLayer_" + layer]->Fill(me2_y->getBinError(j, i));
363  }
364  }
365  }
366  for (int j : {1, 2, 3, 4, 6, 7, 8, 9}) {
367  if (me_x->getBinEntries(j, i) < minHits_) {
368  me2_x->setBinContent(j, i, 0);
369  me2_y->setBinContent(j, i, 0);
370  me2_x->setBinEntries(me2_x->getBin(j, i), 0);
371  me2_y->setBinEntries(me2_y->getBin(j, i), 0);
372  } else {
373  me2_x->setBinContent(j, i, me2_x->getBinError(j, i));
374  me2_y->setBinContent(j, i, me2_y->getBinError(j, i));
375  me2_x->setBinEntries(me2_x->getBin(j, i), 1);
376  me2_y->setBinEntries(me2_y->getBin(j, i), 1);
377  }
378  }
379  }
380  }
381 
382  //PXForward separating outer and inner modules as well as positive and negative side
383  for (std::string ring : {"1", "2"}) {
384  MonitorElement* me_x =
385  iGetter.get("PixelPhase1/Tracks/PXForward/residual_x_per_PXDisk_per_SignedBladePanel_PXRing_" + ring);
386  MonitorElement* me_y =
387  iGetter.get("PixelPhase1/Tracks/PXForward/residual_y_per_PXDisk_per_SignedBladePanel_PXRing_" + ring);
388  MonitorElement* me2_x = iGetter.get(
389  "PixelPhase1/Tracks/ResidualsExtra/PXForward/DRnR_x_per_PXDisk_per_SignedBladePanel_PXRing_" + ring);
390  MonitorElement* me2_y = iGetter.get(
391  "PixelPhase1/Tracks/ResidualsExtra/PXForward/DRnR_y_per_PXDisk_per_SignedBladePanel_PXRing_" + ring);
392  bool posSide = false;
393  for (int j = 1; j <= me_x->getNbinsX(); j++) {
394  if (j == 4)
395  continue; //fourth x-bin in profile plots is empty
396 
397  if (j == 5)
398  posSide = true; //change to postive side
399 
400  for (int i = 1; i <= me_x->getNbinsY(); i++) {
401  if (i == me_x->getNbinsY() / 2)
402  continue; //Middle bins of y axis is empty
403  if (i == (me_x->getNbinsY() / 2) + 1)
404  continue;
405  if (me_x->getBinEntries(j, i) >= minHits_) { //Fill only if number of hits is above threshold
406 
407  bool iAmInner = (i % 2 == 0); //separate inner and outer modules
408  if (iAmInner) {
409  residuals_["residual_mean_x_Inner"]->Fill(me_x->getBinContent(j, i) * 1e4);
410  residuals_["residual_mean_y_Inner"]->Fill(me_y->getBinContent(j, i) * 1e4);
411  residuals_["residual_rms_x_Inner"]->Fill(me_x->getBinError(j, i) * 1e4);
412  residuals_["residual_rms_y_Inner"]->Fill(me_y->getBinError(j, i) * 1e4);
413  DRnR_["NormRes_mean_x_Inner"]->Fill(me2_x->getBinContent(j, i));
414  DRnR_["NormRes_mean_y_Inner"]->Fill(me2_y->getBinContent(j, i));
415  DRnR_["DRnR_x_Inner"]->Fill(me2_x->getBinError(j, i));
416  DRnR_["DRnR_y_Inner"]->Fill(me2_y->getBinError(j, i));
417  } else {
418  residuals_["residual_mean_x_Outer"]->Fill(me_x->getBinContent(j, i) * 1e4);
419  residuals_["residual_mean_y_Outer"]->Fill(me_y->getBinContent(j, i) * 1e4);
420  residuals_["residual_rms_x_Outer"]->Fill(me_x->getBinError(j, i) * 1e4);
421  residuals_["residual_rms_y_Outer"]->Fill(me_y->getBinError(j, i) * 1e4);
422  DRnR_["NormRes_mean_x_Outer"]->Fill(me2_x->getBinContent(j, i));
423  DRnR_["NormRes_mean_y_Outer"]->Fill(me2_y->getBinContent(j, i));
424  DRnR_["DRnR_x_Outer"]->Fill(me2_x->getBinError(j, i));
425  DRnR_["DRnR_y_Outer"]->Fill(me2_y->getBinError(j, i));
426  }
427 
428  if (!posSide) { //separate postive and negative side
429  residuals_["residual_mean_x_neg"]->Fill(me_x->getBinContent(j, i) * 1e4);
430  residuals_["residual_mean_y_neg"]->Fill(me_y->getBinContent(j, i) * 1e4);
431  residuals_["residual_rms_x_neg"]->Fill(me_x->getBinError(j, i) * 1e4);
432  residuals_["residual_rms_y_neg"]->Fill(me_y->getBinError(j, i) * 1e4);
433  DRnR_["NormRes_mean_x_neg"]->Fill(me2_x->getBinContent(j, i));
434  DRnR_["NormRes_mean_y_neg"]->Fill(me2_y->getBinContent(j, i));
435  DRnR_["DRnR_x_neg"]->Fill(me2_x->getBinError(j, i));
436  DRnR_["DRnR_y_neg"]->Fill(me2_y->getBinError(j, i));
437  } else {
438  residuals_["residual_mean_x_pos"]->Fill(me_x->getBinContent(j, i) * 1e4);
439  residuals_["residual_mean_y_pos"]->Fill(me_y->getBinContent(j, i) * 1e4);
440  residuals_["residual_rms_x_pos"]->Fill(me_x->getBinError(j, i) * 1e4);
441  residuals_["residual_rms_y_pos"]->Fill(me_y->getBinError(j, i) * 1e4);
442  DRnR_["NormRes_mean_x_pos"]->Fill(me2_x->getBinContent(j, i));
443  DRnR_["NormRes_mean_y_pos"]->Fill(me2_y->getBinContent(j, i));
444  DRnR_["DRnR_x_pos"]->Fill(me2_x->getBinError(j, i));
445  DRnR_["DRnR_y_pos"]->Fill(me2_y->getBinError(j, i));
446  }
447  me2_x->setBinContent(j, i, me2_x->getBinError(j, i));
448  me2_y->setBinContent(j, i, me2_y->getBinError(j, i));
449  me2_x->setBinEntries(me2_x->getBin(j, i), 1);
450  me2_y->setBinEntries(me2_y->getBin(j, i), 1);
451  } else {
452  me2_x->setBinContent(j, i, 0);
453  me2_y->setBinContent(j, i, 0);
454  me2_x->setBinEntries(me2_x->getBin(j, i), 0);
455  me2_y->setBinEntries(me2_y->getBin(j, i), 0);
456  }
457  }
458  }
459  }
460 }
461 
462 //define this as a plug-in
dqm::impl::MonitorElement::getBinEntries
virtual double getBinEntries(int bin) const
get # of bin entries (for profiles)
Definition: MonitorElement.cc:645
mps_fire.i
i
Definition: mps_fire.py:428
PixelSubdetector.h
PixelBarrelName.h
MessageLogger.h
TrackerGeometry.h
PixelTopology.h
SiPixelPhase1ResidualsExtra::topFolderName_
std::string topFolderName_
Definition: SiPixelPhase1ResidualsExtra.h:49
edm::Run
Definition: Run.h:45
SiPixelPhase1ResidualsExtra
Definition: SiPixelPhase1ResidualsExtra.h:36
edm
HLT enums.
Definition: AlignableModifier.h:19
dqm::implementation::NavigatorBase::setCurrentFolder
virtual void setCurrentFolder(std::string const &fullpath)
Definition: DQMStore.cc:32
DQMStore.h
dqm::legacy::MonitorElement
Definition: MonitorElement.h:462
SiPixelPhase1ResidualsExtra::fillMEs
void fillMEs(DQMStore::IBooker &iBooker, DQMStore::IGetter &iGetter)
Definition: SiPixelPhase1ResidualsExtra.cc:287
edm::LogInfo
Log< level::Info, false > LogInfo
Definition: MessageLogger.h:125
SiPixelPhase1ResidualsExtra::DRnR_
std::map< std::string, MonitorElement * > DRnR_
Definition: SiPixelPhase1ResidualsExtra.h:54
TrackerTopologyRcd.h
DEFINE_FWK_MODULE
#define DEFINE_FWK_MODULE(type)
Definition: MakerMacros.h:16
Service.h
dqm::implementation::NavigatorBase::cd
virtual void cd()
Definition: DQMStore.cc:29
phase1PixelTopology::layer
constexpr std::array< uint8_t, layerIndexSize > layer
Definition: phase1PixelTopology.h:99
TrackerDigiGeometryRecord.h
edm::ParameterSet
Definition: ParameterSet.h:47
dqm::impl::MonitorElement::getNbinsY
virtual int getNbinsY() const
get # of bins in Y-axis
Definition: MonitorElement.cc:580
SiPixelPhase1ResidualsExtra::SiPixelPhase1ResidualsExtra
SiPixelPhase1ResidualsExtra(const edm::ParameterSet &conf)
Definition: SiPixelPhase1ResidualsExtra.cc:49
SiPixelPhase1ResidualsExtra::dqmEndJob
void dqmEndJob(DQMStore::IBooker &iBooker, DQMStore::IGetter &iGetter) override
Definition: SiPixelPhase1ResidualsExtra.cc:64
dqm::impl::MonitorElement::setBinEntries
virtual void setBinEntries(int bin, double nentries)
set # of bin entries (to be used for profiles)
Definition: MonitorElement.cc:727
SiPixelPhase1ResidualsExtra.h
SiPixelPhase1ResidualsExtra::conf_
edm::ParameterSet conf_
Definition: SiPixelPhase1ResidualsExtra.h:51
edm::EventSetup
Definition: EventSetup.h:58
SiPixelPhase1ResidualsExtra::beginRun
void beginRun(edm::Run const &run, edm::EventSetup const &eSetup) override
Definition: SiPixelPhase1ResidualsExtra.cc:62
SiPixelPhase1ResidualsExtra::~SiPixelPhase1ResidualsExtra
~SiPixelPhase1ResidualsExtra() override
Definition: SiPixelPhase1ResidualsExtra.cc:56
AlCaHLTBitMon_QueryRunRegistry.string
string string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
SiPixelPhase1ResidualsExtra::residuals_
std::map< std::string, MonitorElement * > residuals_
Definition: SiPixelPhase1ResidualsExtra.h:53
SiPixelPhase1ResidualsExtra::bookMEs
void bookMEs(DQMStore::IBooker &iBooker)
Definition: SiPixelPhase1ResidualsExtra.cc:72
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
std
Definition: JetResolutionObject.h:76
writedatasetfile.run
run
Definition: writedatasetfile.py:27
SiPixelPhase1ResidualsExtra::minHits_
int minHits_
Definition: SiPixelPhase1ResidualsExtra.h:50
DetId.h
dqm::implementation::IGetter
Definition: DQMStore.h:484
dqm::impl::MonitorElement::getBin
virtual int getBin(int binx, int biny) const
get global bin number (for 2-D profiles)
Definition: MonitorElement.cc:634
dqm::impl::MonitorElement::getNbinsX
virtual int getNbinsX() const
get # of bins in X-axis
Definition: MonitorElement.cc:574
PixelGeomDetUnit.h
relativeConstraints.ring
ring
Definition: relativeConstraints.py:68
dqm::implementation::IGetter::get
virtual MonitorElement * get(std::string const &fullpath) const
Definition: DQMStore.cc:673
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
PixelEndcapNameUpgrade.h
dqm::implementation::IBooker
Definition: DQMStore.h:43
SiPixelFolderOrganizer.h
ParameterSet.h
dqmiolumiharvest.j
j
Definition: dqmiolumiharvest.py:66
dqm::impl::MonitorElement::getBinError
virtual double getBinError(int binx) const
get uncertainty on content of bin (1-D) - See TH1::GetBinError for details
Definition: MonitorElement.cc:610
PixelBarrelNameUpgrade.h
dqm::impl::MonitorElement::getBinContent
virtual double getBinContent(int binx) const
get content of bin (1-D)
Definition: MonitorElement.cc:592
vertexPlots.e4
e4
Definition: vertexPlots.py:64
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
PixelEndcapName.h