CMS 3D CMS Logo

SiPixelTrackResidualModule.cc
Go to the documentation of this file.
1 // Package: SiPixelMonitorTrack
2 // Class: SiPixelTrackResidualModule
3 //
4 // class SiPixelTrackResidualModule SiPixelTrackResidualModule.cc
5 // DQM/SiPixelMonitorTrack/src/SiPixelTrackResidualModule.cc
6 //
7 // Description: SiPixel hit-to-track residual data quality monitoring modules
8 // Implementation: prototype -> improved -> never final - end of the 1st step
9 //
10 // Original Author: Shan-Huei Chuang
11 // Created: Fri Mar 23 18:41:42 CET 2007
12 
13 #include <iostream>
14 #include <string>
15 
25 
26 // Data Formats
33 
34 using namespace std;
35 using namespace edm;
36 
38 
40 
42 
44  edm::EventSetup const &iSetup,
45  DQMStore::IBooker &iBooker,
46  bool reducedSet,
47  int type,
48  bool isUpgrade) {
50  iSetup.get<TrackerTopologyRcd>().get(tTopoHandle);
51  const TrackerTopology *pTT = tTopoHandle.product();
52 
53  bool barrel = DetId(id_).subdetId() == static_cast<int>(PixelSubdetector::PixelBarrel);
54  bool endcap = DetId(id_).subdetId() == static_cast<int>(PixelSubdetector::PixelEndcap);
55  bool isHalfModule = false;
56  if (barrel) {
57  isHalfModule = PixelBarrelName(DetId(id_), pTT, isUpgrade).isHalfModule();
58  }
59 
60  edm::InputTag src = iConfig.getParameter<edm::InputTag>("src");
61  std::string hisID;
62 
63  if (type == 0) {
64  SiPixelHistogramId *theHistogramId = new SiPixelHistogramId(src.label());
65  hisID = theHistogramId->setHistoId("residualX", id_);
66  meResidualX_ = iBooker.book1D(hisID, "Hit-to-Track Residual in r-phi", 100, -150, 150);
67  meResidualX_->setAxisTitle("hit-to-track residual in r-phi (um)", 1);
68  hisID = theHistogramId->setHistoId("residualY", id_);
69  meResidualY_ = iBooker.book1D(hisID, "Hit-to-Track Residual in Z", 100, -300, 300);
70  meResidualY_->setAxisTitle("hit-to-track residual in z (um)", 1);
71  // Number of clusters
72  hisID = theHistogramId->setHistoId("nclusters_OnTrack", id_);
73  meNClusters_onTrack_ = iBooker.book1D(hisID, "Number of Clusters (on Track)", 10, 0., 10.);
74  meNClusters_onTrack_->setAxisTitle("Number of Clusters on Track", 1);
75  // Total cluster charge in ke
76  hisID = theHistogramId->setHistoId("charge_OnTrack", id_);
77  meCharge_onTrack_ = iBooker.book1D(hisID, "Normalized Cluster charge (on Track)", 100, 0., 200.);
78  meCharge_onTrack_->setAxisTitle("Charge [kilo electrons]", 1);
79  // Total cluster size (in pixels)
80  hisID = theHistogramId->setHistoId("size_OnTrack", id_);
81  meSize_onTrack_ = iBooker.book1D(hisID, "Total cluster size (on Track)", 30, 0., 30.);
82  meSize_onTrack_->setAxisTitle("Cluster size [number of pixels]", 1);
83  // Number of clusters
84  hisID = theHistogramId->setHistoId("nclusters_OffTrack", id_);
85  meNClusters_offTrack_ = iBooker.book1D(hisID, "Number of Clusters (off Track)", 35, 0., 35.);
86  meNClusters_offTrack_->setAxisTitle("Number of Clusters off Track", 1);
87  // Total cluster charge in ke
88  hisID = theHistogramId->setHistoId("charge_OffTrack", id_);
89  meCharge_offTrack_ = iBooker.book1D(hisID, "Cluster charge (off Track)", 100, 0., 200.);
90  meCharge_offTrack_->setAxisTitle("Charge [kilo electrons]", 1);
91  // Total cluster size (in pixels)
92  hisID = theHistogramId->setHistoId("size_OffTrack", id_);
93  meSize_offTrack_ = iBooker.book1D(hisID, "Total cluster size (off Track)", 30, 0., 30.);
94  meSize_offTrack_->setAxisTitle("Cluster size [number of pixels]", 1);
95  if (!reducedSet) {
96  // Cluster width on the x-axis
97  hisID = theHistogramId->setHistoId("sizeX_OnTrack", id_);
98  meSizeX_onTrack_ = iBooker.book1D(hisID, "Cluster x-width (rows) (on Track)", 10, 0., 10.);
99  meSizeX_onTrack_->setAxisTitle("Cluster x-size [rows]", 1);
100  // Cluster width on the y-axis
101  hisID = theHistogramId->setHistoId("sizeY_OnTrack", id_);
102  meSizeY_onTrack_ = iBooker.book1D(hisID, "Cluster y-width (columns) (on Track)", 15, 0., 15.);
103  meSizeY_onTrack_->setAxisTitle("Cluster y-size [columns]", 1);
104  // Cluster width on the x-axis
105  hisID = theHistogramId->setHistoId("sizeX_OffTrack", id_);
106  meSizeX_offTrack_ = iBooker.book1D(hisID, "Cluster x-width (rows) (off Track)", 10, 0., 10.);
107  meSizeX_offTrack_->setAxisTitle("Cluster x-size [rows]", 1);
108  // Cluster width on the y-axis
109  hisID = theHistogramId->setHistoId("sizeY_OffTrack", id_);
110  meSizeY_offTrack_ = iBooker.book1D(hisID, "Cluster y-width (columns) (off Track)", 15, 0., 15.);
111  meSizeY_offTrack_->setAxisTitle("Cluster y-size [columns]", 1);
112  }
113  delete theHistogramId;
114  }
115 
116  if (type == 1 && barrel) {
117  uint32_t DBladder;
118  DBladder = PixelBarrelName(DetId(id_), pTT, isUpgrade).ladderName();
119  char sladder[80];
120  sprintf(sladder, "Ladder_%02i", DBladder);
121  hisID = src.label() + "_" + sladder;
122  if (isHalfModule)
123  hisID += "H";
124  else
125  hisID += "F";
126  meResidualXLad_ = iBooker.book1D("residualX_" + hisID, "Hit-to-Track Residual in r-phi", 100, -150, 150);
127  meResidualXLad_->setAxisTitle("hit-to-track residual in r-phi (um)", 1);
128  meResidualYLad_ = iBooker.book1D("residualY_" + hisID, "Hit-to-Track Residual in Z", 100, -300, 300);
129  meResidualYLad_->setAxisTitle("hit-to-track residual in z (um)", 1);
130  // Number of clusters
132  iBooker.book1D("nclusters_OnTrack_" + hisID, "Number of Clusters (on Track)", 10, 0., 10.);
133  meNClusters_onTrackLad_->setAxisTitle("Number of Clusters on Track", 1);
134  // Total cluster charge in MeV
136  iBooker.book1D("charge_OnTrack_" + hisID, "Normalized Cluster charge (on Track)", 100, 0., 200.);
137  meCharge_onTrackLad_->setAxisTitle("Charge [kilo electrons]", 1);
138  // Total cluster size (in pixels)
139  meSize_onTrackLad_ = iBooker.book1D("size_OnTrack_" + hisID, "Total cluster size (on Track)", 30, 0., 30.);
140  meSize_onTrackLad_->setAxisTitle("Cluster size [number of pixels]", 1);
141  // Number of clusters
143  iBooker.book1D("nclusters_OffTrack_" + hisID, "Number of Clusters (off Track)", 35, 0., 35.);
144  meNClusters_offTrackLad_->setAxisTitle("Number of Clusters off Track", 1);
145  // Total cluster charge in MeV
146  meCharge_offTrackLad_ = iBooker.book1D("charge_OffTrack_" + hisID, "Cluster charge (off Track)", 100, 0., 200.);
147  meCharge_offTrackLad_->setAxisTitle("Charge [kilo electrons]", 1);
148  // Total cluster size (in pixels)
149  meSize_offTrackLad_ = iBooker.book1D("size_OffTrack_" + hisID, "Total cluster size (off Track)", 30, 0., 30.);
150  meSize_offTrackLad_->setAxisTitle("Cluster size [number of pixels]", 1);
151  if (!reducedSet) {
152  // Cluster width on the x-axis
154  iBooker.book1D("sizeX_OffTrack_" + hisID, "Cluster x-width (rows) (off Track)", 10, 0., 10.);
155  meSizeX_offTrackLad_->setAxisTitle("Cluster x-size [rows]", 1);
156  // Cluster width on the y-axis
158  iBooker.book1D("sizeY_OffTrack_" + hisID, "Cluster y-width (columns) (off Track)", 15, 0., 15.);
159  meSizeY_offTrackLad_->setAxisTitle("Cluster y-size [columns]", 1);
160  // Cluster width on the x-axis
161  meSizeX_onTrackLad_ = iBooker.book1D("sizeX_OnTrack_" + hisID, "Cluster x-width (rows) (on Track)", 10, 0., 10.);
162  meSizeX_onTrackLad_->setAxisTitle("Cluster x-size [rows]", 1);
163  // Cluster width on the y-axis
165  iBooker.book1D("sizeY_OnTrack_" + hisID, "Cluster y-width (columns) (on Track)", 15, 0., 15.);
166  meSizeY_onTrackLad_->setAxisTitle("Cluster y-size [columns]", 1);
167  }
168  }
169 
170  if (type == 2 && barrel) {
171  uint32_t DBlayer;
172  DBlayer = PixelBarrelName(DetId(id_), pTT, isUpgrade).layerName();
173  char slayer[80];
174  sprintf(slayer, "Layer_%i", DBlayer);
175  hisID = src.label() + "_" + slayer;
176  meResidualXLay_ = iBooker.book1D("residualX_" + hisID, "Hit-to-Track Residual in r-phi", 100, -150, 150);
177  meResidualXLay_->setAxisTitle("hit-to-track residual in r-phi (um)", 1);
178  meResidualYLay_ = iBooker.book1D("residualY_" + hisID, "Hit-to-Track Residual in Z", 100, -300, 300);
179  meResidualYLay_->setAxisTitle("hit-to-track residual in z (um)", 1);
180  // Number of clusters
182  iBooker.book1D("nclusters_OnTrack_" + hisID, "Number of Clusters (on Track)", 10, 0., 10.);
183  meNClusters_onTrackLay_->setAxisTitle("Number of Clusters on Track", 1);
184  // Total cluster charge in MeV
186  iBooker.book1D("charge_OnTrack_" + hisID, "Normalized Cluster charge (on Track)", 100, 0., 200.);
187  meCharge_onTrackLay_->setAxisTitle("Charge [kilo electrons]", 1);
188  // Total cluster size (in pixels)
189  meSize_onTrackLay_ = iBooker.book1D("size_OnTrack_" + hisID, "Total cluster size (on Track)", 30, 0., 30.);
190  meSize_onTrackLay_->setAxisTitle("Cluster size [number of pixels]", 1);
191  // Number of clusters
193  iBooker.book1D("nclusters_OffTrack_" + hisID, "Number of Clusters (off Track)", 35, 0., 35.);
194  meNClusters_offTrackLay_->setAxisTitle("Number of Clusters off Track", 1);
195  // Total cluster charge in MeV
196  meCharge_offTrackLay_ = iBooker.book1D("charge_OffTrack_" + hisID, "Cluster charge (off Track)", 100, 0., 200.);
197  meCharge_offTrackLay_->setAxisTitle("Charge [kilo electrons]", 1);
198  // Total cluster size (in pixels)
199  meSize_offTrackLay_ = iBooker.book1D("size_OffTrack_" + hisID, "Total cluster size (off Track)", 30, 0., 30.);
200  meSize_offTrackLay_->setAxisTitle("Cluster size [number of pixels]", 1);
201  if (!reducedSet) {
202  // Cluster width on the x-axis
203  meSizeX_onTrackLay_ = iBooker.book1D("sizeX_OnTrack_" + hisID, "Cluster x-width (rows) (on Track)", 10, 0., 10.);
204  meSizeX_onTrackLay_->setAxisTitle("Cluster x-size [rows]", 1);
205  // Cluster width on the y-axis
207  iBooker.book1D("sizeY_OnTrack_" + hisID, "Cluster y-width (columns) (on Track)", 15, 0., 15.);
208  meSizeY_onTrackLay_->setAxisTitle("Cluster y-size [columns]", 1);
209  // Cluster width on the x-axis
211  iBooker.book1D("sizeX_OffTrack_" + hisID, "Cluster x-width (rows) (off Track)", 10, 0., 10.);
212  meSizeX_offTrackLay_->setAxisTitle("Cluster x-size [rows]", 1);
213  // Cluster width on the y-axis
215  iBooker.book1D("sizeY_OffTrack_" + hisID, "Cluster y-width (columns) (off Track)", 15, 0., 15.);
216  meSizeY_offTrackLay_->setAxisTitle("Cluster y-size [columns]", 1);
217  }
218  }
219 
220  if (type == 3 && barrel) {
221  uint32_t DBmodule;
222  DBmodule = PixelBarrelName(DetId(id_), pTT, isUpgrade).moduleName();
223  char smodule[80];
224  sprintf(smodule, "Ring_%i", DBmodule);
225  hisID = src.label() + "_" + smodule;
226  meResidualXPhi_ = iBooker.book1D("residualX_" + hisID, "Hit-to-Track Residual in r-phi", 100, -150, 150);
227  meResidualXPhi_->setAxisTitle("hit-to-track residual in r-phi (um)", 1);
228  meResidualYPhi_ = iBooker.book1D("residualY_" + hisID, "Hit-to-Track Residual in Z", 100, -300, 300);
229  meResidualYPhi_->setAxisTitle("hit-to-track residual in z (um)", 1);
230  // Number of clusters
232  iBooker.book1D("nclusters_OnTrack_" + hisID, "Number of Clusters (on Track)", 10, 0., 10.);
233  meNClusters_onTrackPhi_->setAxisTitle("Number of Clusters on Track", 1);
234  // Total cluster charge in MeV
236  iBooker.book1D("charge_OnTrack_" + hisID, "Normalized Cluster charge (on Track)", 100, 0., 200.);
237  meCharge_onTrackPhi_->setAxisTitle("Charge [kilo electrons]", 1);
238  // Total cluster size (in pixels)
239  meSize_onTrackPhi_ = iBooker.book1D("size_OnTrack_" + hisID, "Total cluster size (on Track)", 30, 0., 30.);
240  meSize_onTrackPhi_->setAxisTitle("Cluster size [number of pixels]", 1);
241  // Number of clusters
243  iBooker.book1D("nclusters_OffTrack_" + hisID, "Number of Clusters (off Track)", 35, 0., 35.);
244  meNClusters_offTrackPhi_->setAxisTitle("Number of Clusters off Track", 1);
245  // Total cluster charge in MeV
246  meCharge_offTrackPhi_ = iBooker.book1D("charge_OffTrack_" + hisID, "Cluster charge (off Track)", 100, 0., 200.);
247  meCharge_offTrackPhi_->setAxisTitle("Charge [kilo electrons]", 1);
248  // Total cluster size (in pixels)
249  meSize_offTrackPhi_ = iBooker.book1D("size_OffTrack_" + hisID, "Total cluster size (off Track)", 30, 0., 30.);
250  meSize_offTrackPhi_->setAxisTitle("Cluster size [number of pixels]", 1);
251  if (!reducedSet) {
252  // Cluster width on the x-axis
253  meSizeX_onTrackPhi_ = iBooker.book1D("sizeX_OnTrack_" + hisID, "Cluster x-width (rows) (on Track)", 10, 0., 10.);
254  meSizeX_onTrackPhi_->setAxisTitle("Cluster x-size [rows]", 1);
255  // Cluster width on the y-axis
257  iBooker.book1D("sizeY_OnTrack_" + hisID, "Cluster y-width (columns) (on Track)", 15, 0., 15.);
258  meSizeY_onTrackPhi_->setAxisTitle("Cluster y-size [columns]", 1);
259  // Cluster width on the x-axis
261  iBooker.book1D("sizeX_OffTrack_" + hisID, "Cluster x-width (rows) (off Track)", 10, 0., 10.);
262  meSizeX_offTrackPhi_->setAxisTitle("Cluster x-size [rows]", 1);
263  // Cluster width on the y-axis
265  iBooker.book1D("sizeY_OffTrack_" + hisID, "Cluster y-width (columns) (off Track)", 15, 0., 15.);
266  meSizeY_offTrackPhi_->setAxisTitle("Cluster y-size [columns]", 1);
267  }
268  }
269 
270  if (type == 4 && endcap) {
271  uint32_t blade;
272  blade = PixelEndcapName(DetId(id_), pTT, isUpgrade).bladeName();
273  char sblade[80];
274  sprintf(sblade, "Blade_%02i", blade);
275  hisID = src.label() + "_" + sblade;
276  meResidualXBlade_ = iBooker.book1D("residualX_" + hisID, "Hit-to-Track Residual in r-phi", 100, -150, 150);
277  meResidualXBlade_->setAxisTitle("hit-to-track residual in r-phi (um)", 1);
278  meResidualYBlade_ = iBooker.book1D("residualY_" + hisID, "Hit-to-Track Residual in Z", 100, -300, 300);
279  meResidualYBlade_->setAxisTitle("hit-to-track residual in z (um)", 1);
280  // Number of clusters
282  iBooker.book1D("nclusters_OnTrack_" + hisID, "Number of Clusters (on Track)", 10, 0., 10.);
283  meNClusters_onTrackBlade_->setAxisTitle("Number of Clusters on Track", 1);
284  // Total cluster charge in MeV
286  iBooker.book1D("charge_OnTrack_" + hisID, "Normalized Cluster charge (on Track)", 100, 0., 200.);
287  meCharge_onTrackBlade_->setAxisTitle("Charge [kilo electrons]", 1);
288  // Total cluster size (in pixels)
289  meSize_onTrackBlade_ = iBooker.book1D("size_OnTrack_" + hisID, "Total cluster size (on Track)", 30, 0., 30.);
290  meSize_onTrackBlade_->setAxisTitle("Cluster size [number of pixels]", 1);
291  // Number of clusters
293  iBooker.book1D("nclusters_OffTrack_" + hisID, "Number of Clusters (off Track)", 35, 0., 35.);
294  meNClusters_offTrackBlade_->setAxisTitle("Number of Clusters off Track", 1);
295  // Total cluster charge in MeV
296  meCharge_offTrackBlade_ = iBooker.book1D("charge_OffTrack_" + hisID, "Cluster charge (off Track)", 100, 0., 200.);
297  meCharge_offTrackBlade_->setAxisTitle("Charge [kilo electrons]", 1);
298  // Total cluster size (in pixels)
299  meSize_offTrackBlade_ = iBooker.book1D("size_OffTrack_" + hisID, "Total cluster size (off Track)", 30, 0., 30.);
300  meSize_offTrackBlade_->setAxisTitle("Cluster size [number of pixels]", 1);
301  if (!reducedSet) {
302  // Cluster width on the x-axis
304  iBooker.book1D("sizeX_OnTrack_" + hisID, "Cluster x-width (rows) (on Track)", 10, 0., 10.);
305  meSizeX_onTrackBlade_->setAxisTitle("Cluster x-size [rows]", 1);
306  // Cluster width on the y-axis
308  iBooker.book1D("sizeY_OnTrack_" + hisID, "Cluster y-width (columns) (on Track)", 15, 0., 15.);
309  meSizeY_onTrackBlade_->setAxisTitle("Cluster y-size [columns]", 1);
310  // Cluster width on the x-axis
312  iBooker.book1D("sizeX_OffTrack_" + hisID, "Cluster x-width (rows) (off Track)", 10, 0., 10.);
313  meSizeX_offTrackBlade_->setAxisTitle("Cluster x-size [rows]", 1);
314  // Cluster width on the y-axis
316  iBooker.book1D("sizeY_OffTrack_" + hisID, "Cluster y-width (columns) (off Track)", 15, 0., 15.);
317  meSizeY_offTrackBlade_->setAxisTitle("Cluster y-size [columns]", 1);
318  }
319  }
320 
321  if (type == 5 && endcap) {
322  uint32_t disk;
323  disk = PixelEndcapName(DetId(id_), pTT, isUpgrade).diskName();
324 
325  char sdisk[80];
326  sprintf(sdisk, "Disk_%i", disk);
327  hisID = src.label() + "_" + sdisk;
328  meResidualXDisk_ = iBooker.book1D("residualX_" + hisID, "Hit-to-Track Residual in r-phi", 100, -150, 150);
329  meResidualXDisk_->setAxisTitle("hit-to-track residual in r-phi (um)", 1);
330  meResidualYDisk_ = iBooker.book1D("residualY_" + hisID, "Hit-to-Track Residual in Z", 100, -300, 300);
331  meResidualYDisk_->setAxisTitle("hit-to-track residual in z (um)", 1);
332  // Number of clusters
334  iBooker.book1D("nclusters_OnTrack_" + hisID, "Number of Clusters (on Track)", 10, 0., 10.);
335  meNClusters_onTrackDisk_->setAxisTitle("Number of Clusters on Track", 1);
336  // Total cluster charge in MeV
338  iBooker.book1D("charge_OnTrack_" + hisID, "Normalized Cluster charge (on Track)", 100, 0., 200.);
339  meCharge_onTrackDisk_->setAxisTitle("Charge [kilo electrons]", 1);
340  // Total cluster size (in pixels)
341  meSize_onTrackDisk_ = iBooker.book1D("size_OnTrack_" + hisID, "Total cluster size (on Track)", 30, 0., 30.);
342  meSize_onTrackDisk_->setAxisTitle("Cluster size [number of pixels]", 1);
343  // Number of clusters
345  iBooker.book1D("nclusters_OffTrack_" + hisID, "Number of Clusters (off Track)", 35, 0., 35.);
346  meNClusters_offTrackDisk_->setAxisTitle("Number of Clusters off Track", 1);
347  // Total cluster charge in MeV
348  meCharge_offTrackDisk_ = iBooker.book1D("charge_OffTrack_" + hisID, "Cluster charge (off Track)", 100, 0., 200.);
349  meCharge_offTrackDisk_->setAxisTitle("Charge [kilo electrons]", 1);
350  // Total cluster size (in pixels)
351  meSize_offTrackDisk_ = iBooker.book1D("size_OffTrack_" + hisID, "Total cluster size (off Track)", 30, 0., 30.);
352  meSize_offTrackDisk_->setAxisTitle("Cluster size [number of pixels]", 1);
353  if (!reducedSet) {
354  // Cluster width on the x-axis
355  meSizeX_onTrackDisk_ = iBooker.book1D("sizeX_OnTrack_" + hisID, "Cluster x-width (rows) (on Track)", 10, 0., 10.);
356  meSizeX_onTrackDisk_->setAxisTitle("Cluster x-size [rows]", 1);
357  // Cluster width on the y-axis
359  iBooker.book1D("sizeY_OnTrack_" + hisID, "Cluster y-width (columns) (on Track)", 15, 0., 15.);
360  meSizeY_onTrackDisk_->setAxisTitle("Cluster y-size [columns]", 1);
361  // Cluster width on the x-axis
363  iBooker.book1D("sizeX_OffTrack_" + hisID, "Cluster x-width (rows) (off Track)", 10, 0., 10.);
364  meSizeX_offTrackDisk_->setAxisTitle("Cluster x-size [rows]", 1);
365  // Cluster width on the y-axis
367  iBooker.book1D("sizeY_OffTrack_" + hisID, "Cluster y-width (columns) (off Track)", 15, 0., 15.);
368  meSizeY_offTrackDisk_->setAxisTitle("Cluster y-size [columns]", 1);
369  }
370  }
371 
372  if (type == 6 && endcap) {
373  uint32_t panel;
374  uint32_t module;
375  panel = PixelEndcapName(DetId(id_), pTT, isUpgrade).pannelName();
376  module = PixelEndcapName(DetId(id_), pTT, isUpgrade).plaquetteName();
377 
378  char slab[80];
379  sprintf(slab, "Panel_%i_Ring_%i", panel, module);
380  hisID = src.label() + "_" + slab;
381  meResidualXRing_ = iBooker.book1D("residualX_" + hisID, "Hit-to-Track Residual in r-phi", 100, -150, 150);
382  meResidualXRing_->setAxisTitle("hit-to-track residual in r-phi (um)", 1);
383  meResidualYRing_ = iBooker.book1D("residualY_" + hisID, "Hit-to-Track Residual in Z", 100, -300, 300);
384  meResidualYRing_->setAxisTitle("hit-to-track residual in z (um)", 1);
385  // Number of clusters
387  iBooker.book1D("nclusters_OnTrack_" + hisID, "Number of Clusters (on Track)", 10, 0., 10.);
388  meNClusters_onTrackRing_->setAxisTitle("Number of Clusters on Track", 1);
389  // Total cluster charge in MeV
391  iBooker.book1D("charge_OnTrack_" + hisID, "Normalized Cluster charge (on Track)", 100, 0., 200.);
392  meCharge_onTrackRing_->setAxisTitle("Charge [kilo electrons]", 1);
393  // Total cluster size (in pixels)
394  meSize_onTrackRing_ = iBooker.book1D("size_OnTrack_" + hisID, "Total cluster size (on Track)", 30, 0., 30.);
395  meSize_onTrackRing_->setAxisTitle("Cluster size [number of pixels]", 1);
396  // Number of clusters
398  iBooker.book1D("nclusters_OffTrack_" + hisID, "Number of Clusters (off Track)", 35, 0., 35.);
399  meNClusters_offTrackRing_->setAxisTitle("Number of Clusters off Track", 1);
400  // Total cluster charge in MeV
401  meCharge_offTrackRing_ = iBooker.book1D("charge_OffTrack_" + hisID, "Cluster charge (off Track)", 100, 0., 200.);
402  meCharge_offTrackRing_->setAxisTitle("Charge [kilo electrons]", 1);
403  // Total cluster size (in pixels)
404  meSize_offTrackRing_ = iBooker.book1D("size_OffTrack_" + hisID, "Total cluster size (off Track)", 30, 0., 30.);
405  meSize_offTrackRing_->setAxisTitle("Cluster size [number of pixels]", 1);
406  if (!reducedSet) {
407  // Cluster width on the x-axis
408  meSizeX_onTrackRing_ = iBooker.book1D("sizeX_OnTrack_" + hisID, "Cluster x-width (rows) (on Track)", 10, 0., 10.);
409  meSizeX_onTrackRing_->setAxisTitle("Cluster x-size [rows]", 1);
410  // Cluster width on the y-axis
412  iBooker.book1D("sizeY_OnTrack_" + hisID, "Cluster y-width (columns) (on Track)", 15, 0., 15.);
413  meSizeY_onTrackRing_->setAxisTitle("Cluster y-size [columns]", 1);
414  // Cluster width on the x-axis
416  iBooker.book1D("sizeX_OffTrack_" + hisID, "Cluster x-width (rows) (off Track)", 10, 0., 10.);
417  meSizeX_offTrackRing_->setAxisTitle("Cluster x-size [rows]", 1);
418  // Cluster width on the y-axis
420  iBooker.book1D("sizeY_OffTrack_" + hisID, "Cluster y-width (columns) (off Track)", 15, 0., 15.);
421  meSizeY_offTrackRing_->setAxisTitle("Cluster y-size [columns]", 1);
422  }
423  }
424 }
425 
427  bool reducedSet,
428  bool modon,
429  bool ladon,
430  bool layon,
431  bool phion,
432  bool bladeon,
433  bool diskon,
434  bool ringon) {
435  bool barrel = DetId(id_).subdetId() == static_cast<int>(PixelSubdetector::PixelBarrel);
436  bool endcap = DetId(id_).subdetId() == static_cast<int>(PixelSubdetector::PixelEndcap);
437 
438  if (modon) {
439  (meResidualX_)->Fill(residual.x());
440  (meResidualY_)->Fill(residual.y());
441  }
442 
443  if (ladon && barrel) {
444  (meResidualXLad_)->Fill(residual.x());
445  (meResidualYLad_)->Fill(residual.y());
446  }
447 
448  if (layon && barrel) {
449  (meResidualXLay_)->Fill(residual.x());
450  (meResidualYLay_)->Fill(residual.y());
451  }
452  if (phion && barrel) {
453  (meResidualXPhi_)->Fill(residual.x());
454  (meResidualYPhi_)->Fill(residual.y());
455  }
456 
457  if (bladeon && endcap) {
458  (meResidualXBlade_)->Fill(residual.x());
459  (meResidualYBlade_)->Fill(residual.y());
460  }
461 
462  if (diskon && endcap) {
463  (meResidualXDisk_)->Fill(residual.x());
464  (meResidualYDisk_)->Fill(residual.y());
465  }
466 
467  if (ringon && endcap) {
468  (meResidualXRing_)->Fill(residual.x());
469  (meResidualYRing_)->Fill(residual.y());
470  }
471 }
472 
474  bool onTrack,
475  double corrCharge,
476  bool reducedSet,
477  bool modon,
478  bool ladon,
479  bool layon,
480  bool phion,
481  bool bladeon,
482  bool diskon,
483  bool ringon) {
484  bool barrel = DetId(id_).subdetId() == static_cast<int>(PixelSubdetector::PixelBarrel);
485  bool endcap = DetId(id_).subdetId() == static_cast<int>(PixelSubdetector::PixelEndcap);
486 
487  float charge = 0.001 * (clust.charge()); // total charge of cluster
488  if (onTrack)
489  charge = corrCharge; // corrected cluster charge
490  int size = clust.size(); // total size of cluster (in pixels)
491  int sizeX = clust.sizeX(); // size of cluster in x-clustrection
492  int sizeY = clust.sizeY(); // size of cluster in y-direction
493 
494  if (onTrack) {
495  if (modon) {
496  (meCharge_onTrack_)->Fill((float)charge);
497  (meSize_onTrack_)->Fill((int)size);
498  if (!reducedSet) {
499  (meSizeX_onTrack_)->Fill((int)sizeX);
500  (meSizeY_onTrack_)->Fill((int)sizeY);
501  }
502  }
503  if (barrel && ladon) {
504  (meCharge_onTrackLad_)->Fill((float)charge);
505  (meSize_onTrackLad_)->Fill((int)size);
506  if (!reducedSet) {
507  (meSizeX_onTrackLad_)->Fill((int)sizeX);
508  (meSizeY_onTrackLad_)->Fill((int)sizeY);
509  }
510  }
511  if (barrel && layon) {
512  (meCharge_onTrackLay_)->Fill((float)charge);
513  (meSize_onTrackLay_)->Fill((int)size);
514  if (!reducedSet) {
515  (meSizeX_onTrackLay_)->Fill((int)sizeX);
516  (meSizeY_onTrackLay_)->Fill((int)sizeY);
517  }
518  }
519  if (barrel && phion) {
520  (meCharge_onTrackPhi_)->Fill((float)charge);
521  (meSize_onTrackPhi_)->Fill((int)size);
522  if (!reducedSet) {
523  (meSizeX_onTrackPhi_)->Fill((int)sizeX);
524  (meSizeY_onTrackPhi_)->Fill((int)sizeY);
525  }
526  }
527  if (endcap && bladeon) {
529  (meSize_onTrackBlade_)->Fill((int)size);
530  if (!reducedSet) {
533  }
534  }
535  if (endcap && diskon) {
536  (meCharge_onTrackDisk_)->Fill((float)charge);
537  (meSize_onTrackDisk_)->Fill((int)size);
538  if (!reducedSet) {
541  }
542  }
543  if (endcap && ringon) {
544  (meCharge_onTrackRing_)->Fill((float)charge);
545  (meSize_onTrackRing_)->Fill((int)size);
546  if (!reducedSet) {
549  }
550  }
551  }
552 
553  if (!onTrack) {
554  if (modon) {
555  (meCharge_offTrack_)->Fill((float)charge);
556  (meSize_offTrack_)->Fill((int)size);
557  if (!reducedSet) {
558  (meSizeX_offTrack_)->Fill((int)sizeX);
559  (meSizeY_offTrack_)->Fill((int)sizeY);
560  }
561  }
562  if (barrel && ladon) {
563  (meCharge_offTrackLad_)->Fill((float)charge);
564  (meSize_offTrackLad_)->Fill((int)size);
565  if (!reducedSet) {
568  }
569  }
570  if (barrel && layon) {
571  (meCharge_offTrackLay_)->Fill((float)charge);
572  (meSize_offTrackLay_)->Fill((int)size);
573  if (!reducedSet) {
576  }
577  }
578  if (barrel && phion) {
579  (meCharge_offTrackPhi_)->Fill((float)charge);
580  (meSize_offTrackPhi_)->Fill((int)size);
581  if (!reducedSet) {
584  }
585  }
586  if (endcap && bladeon) {
589  if (!reducedSet) {
592  }
593  }
594  if (endcap && diskon) {
596  (meSize_offTrackDisk_)->Fill((int)size);
597  if (!reducedSet) {
600  }
601  }
602  if (endcap && ringon) {
604  (meSize_offTrackRing_)->Fill((int)size);
605  if (!reducedSet) {
608  }
609  }
610  }
611 }
612 
614  int offTrack,
615  bool reducedSet,
616  bool modon,
617  bool ladon,
618  bool layon,
619  bool phion,
620  bool bladeon,
621  bool diskon,
622  bool ringon) {
623  bool barrel = DetId(id_).subdetId() == static_cast<int>(PixelSubdetector::PixelBarrel);
624  bool endcap = DetId(id_).subdetId() == static_cast<int>(PixelSubdetector::PixelEndcap);
625  bool fillOn = false;
626  if (onTrack > 0)
627  fillOn = true;
628  bool fillOff = false;
629  if (offTrack > 0)
630  fillOff = true;
631 
632  if (modon) {
633  if (fillOn)
634  meNClusters_onTrack_->Fill(onTrack);
635  if (fillOff)
636  meNClusters_offTrack_->Fill(offTrack);
637  }
638  if (ladon && barrel) {
639  if (fillOn)
640  meNClusters_onTrackLad_->Fill(onTrack);
641  if (fillOff)
642  meNClusters_offTrackLad_->Fill(offTrack);
643  }
644 
645  if (layon && barrel) {
646  if (fillOn)
647  meNClusters_onTrackLay_->Fill(onTrack);
648  if (fillOff)
649  meNClusters_offTrackLay_->Fill(offTrack);
650  }
651  if (phion && barrel) {
652  if (fillOn)
653  meNClusters_onTrackPhi_->Fill(onTrack);
654  if (fillOff)
655  meNClusters_offTrackPhi_->Fill(offTrack);
656  }
657  if (bladeon && endcap) {
658  if (fillOn)
660  if (fillOff)
661  meNClusters_offTrackBlade_->Fill(offTrack);
662  }
663  if (diskon && endcap) {
664  if (fillOn)
665  meNClusters_onTrackDisk_->Fill(onTrack);
666  if (fillOff)
667  meNClusters_offTrackDisk_->Fill(offTrack);
668  }
669  if (ringon && endcap) {
670  if (fillOn)
671  meNClusters_onTrackRing_->Fill(onTrack);
672  if (fillOff)
673  meNClusters_offTrackRing_->Fill(offTrack);
674  }
675 }
int plaquetteName() const
plaquetteId (in pannel)
size
Write out results.
type
Definition: HCALResponse.h:21
MonitorElement * book1D(TString const &name, TString const &title, int const nchX, double const lowX, double const highX)
Definition: DQMStore.cc:239
T getParameter(std::string const &) const
T y() const
Definition: PV2DBase.h:44
int moduleName() const
module id (index in z)
int charge() const
void Fill(long long x)
int bladeName() const
blade id
void nfill(int onTrack, int offTrack, bool reducedSet, bool modon, bool ladon, bool layon, bool phion, bool bladeon, bool diskon, bool ringon)
bool isHalfModule() const
full or half module
void Fill(HcalDetId &id, double val, std::vector< TH2F > &depth)
constexpr int subdetId() const
get the contents of the subdetector field (not cast into any detector&#39;s numbering enum) ...
Definition: DetId.h:48
void fill(const Measurement2DVector &, bool reducedSet=true, bool modon=true, bool ladon=true, bool layon=true, bool phion=true, bool bladeon=true, bool diskon=true, bool ringon=true)
std::string setHistoId(std::string variable, uint32_t &rawId)
Set Histogram Id.
Definition: DetId.h:17
int ladderName() const
ladder id (index in phi)
int layerName() const
layer id
std::string const & label() const
Definition: InputTag.h:36
int sizeY() const
Pixel cluster – collection of neighboring pixels above threshold.
HLT enums.
void book(const edm::ParameterSet &, edm::EventSetup const &, DQMStore::IBooker &, bool reducedSet=true, int type=0, bool isUpgrade=false)
int pannelName() const
pannel id
T get() const
Definition: EventSetup.h:73
int diskName() const
disk id
T x() const
Definition: PV2DBase.h:43
int sizeX() const
T const * product() const
Definition: ESHandle.h:86
Definition: vlib.h:198
int size() const
virtual void setAxisTitle(const std::string &title, int axis=1)
set x-, y- or z-axis title (axis=1, 2, 3 respectively)