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