CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
SiPixelRecHitsValid.cc
Go to the documentation of this file.
1 // SiPixelRecHitsValid.cc
2 // Description: see SiPixelRecHitsValid.h
3 // Author: Jason Shaev, JHU
4 // Created 6/7/06
5 //
6 // G. Giurgiu, JHU (ggiurgiu@pha.jhu.edu)
7 // added pull distributions (12/27/06)
8 //--------------------------------
9 
11 
23 
26 
33 
43 
46 
48 
49 #include <math.h>
50 
52  : outputFile_( ps.getUntrackedParameter<std::string>( "outputFile", "pixelrechitshisto.root" ) )
53  , dbe_(0)
54  , conf_(ps)
55  , siPixelRecHitCollectionToken_( consumes<SiPixelRecHitCollection>( ps.getParameter<edm::InputTag>( "src" ) ) ) {
56 
57 }
58 
60 }
61 
63 
64 }
65 
68  //dbe_->showDirStructure();
69  dbe_->setCurrentFolder("TrackerRecHitsV/TrackerRecHits/Pixel/clustBPIX");
70 
71  Char_t histo[200];
72 
73  // ---------------------------------------------------------------
74  // All histograms that depend on plaquette number have 7 indexes.
75  // The first 4 (0-3) correspond to Panel 1 plaquettes 1-4.
76  // The last 3 (4-6) correspond to Panel 2 plaquettes 1-3.
77  // ---------------------------------------------------------------
78 
79  //Cluster y-size by module number for barrel
80  for (int i=0; i<8; i++) {
81  sprintf(histo, "Clust_y_size_Module%d", i+1);
82  clustYSizeModule[i] = dbe_->book1D(histo,"Cluster y-size by Module", 20, 0.5, 20.5);
83  } // end for
84 
85  //Cluster x-size by layer for barrel
86  for (int i=0; i<3; i++) {
87  sprintf(histo, "Clust_x_size_Layer%d", i+1);
88  clustXSizeLayer[i] = dbe_->book1D(histo,"Cluster x-size by Layer", 20, 0.5, 20.5);
89  } // end for
90 
91  //Cluster charge by module for 3 layers of barrel
92  for (int i=0; i<8; i++) {
93  //Cluster charge by module for Layer1
94  sprintf(histo, "Clust_charge_Layer1_Module%d", i+1);
95  clustChargeLayer1Modules[i] = dbe_->book1D(histo, "Cluster charge Layer 1 by Module", 50, 0., 200000.);
96 
97  //Cluster charge by module for Layer2
98  sprintf(histo, "Clust_charge_Layer2_Module%d", i+1);
99  clustChargeLayer2Modules[i] = dbe_->book1D(histo, "Cluster charge Layer 2 by Module", 50, 0., 200000.);
100 
101  //Cluster charge by module for Layer3
102  sprintf(histo, "Clust_charge_Layer3_Module%d", i+1);
103  clustChargeLayer3Modules[i] = dbe_->book1D(histo, "Cluster charge Layer 3 by Module",50, 0., 200000.);
104  } // end for
105 
106  dbe_->setCurrentFolder("TrackerRecHitsV/TrackerRecHits/Pixel/clustFPIX");
107  //Cluster x-size, y-size, and charge by plaquette for Disks in Forward
108  for (int i=0; i<7; i++) {
109  //Cluster x-size for Disk1 by Plaquette
110  sprintf(histo, "Clust_x_size_Disk1_Plaquette%d", i+1);
111  clustXSizeDisk1Plaquettes[i] = dbe_->book1D(histo, "Cluster X-size for Disk1 by Plaquette", 20, 0.5, 20.5);
112 
113  //Cluster x-size for Disk2 by Plaquette
114  sprintf(histo, "Clust_x_size_Disk2_Plaquette%d", i+1);
115  clustXSizeDisk2Plaquettes[i] = dbe_->book1D(histo, "Cluster X-size for Disk2 by Plaquette", 20, 0.5, 20.5);
116 
117  //Cluster y-size for Disk1 by Plaquette
118  sprintf(histo, "Clust_y_size_Disk1_Plaquette%d", i+1);
119  clustYSizeDisk1Plaquettes[i] = dbe_->book1D(histo, "Cluster Y-size for Disk1 by Plaquette", 20, 0.5, 20.5);
120 
121  //Cluster y-size for Disk2 by Plaquette
122  sprintf(histo, "Clust_y_size_Disk2_Plaquette%d", i+1);
123  clustYSizeDisk2Plaquettes[i] = dbe_->book1D(histo, "Cluster Y-size for Disk2 by Plaquette", 20, 0.5, 20.5);
124 
125  //Cluster charge for Disk1 by Plaquette
126  sprintf(histo, "Clust_charge_Disk1_Plaquette%d", i+1);
127  clustChargeDisk1Plaquettes[i] = dbe_->book1D(histo, "Cluster charge for Disk1 by Plaquette", 50, 0., 200000.);
128 
129  //Cluster charge for Disk2 by Plaquette
130  sprintf(histo, "Clust_charge_Disk2_Plaquette%d", i+1);
131  clustChargeDisk2Plaquettes[i] = dbe_->book1D(histo, "Cluster charge for Disk2 by Plaquette", 50, 0., 200000.);
132  } // end for
133 
134 
135 
136  dbe_->setCurrentFolder("TrackerRecHitsV/TrackerRecHits/Pixel/recHitBPIX");
137  //RecHit X Resolution all barrel hits
138  recHitXResAllB = dbe_->book1D("RecHit_xres_b_All","RecHit X Res All Modules in Barrel", 100, -200., 200.);
139 
140  //RecHit Y Resolution all barrel hits
141  recHitYResAllB = dbe_->book1D("RecHit_yres_b_All","RecHit Y Res All Modules in Barrel", 100, -200., 200.);
142 
143  //RecHit X distribution for full modules for barrel
144  recHitXFullModules = dbe_->book1D("RecHit_x_FullModules", "RecHit X distribution for full modules", 100,-2., 2.);
145 
146  //RecHit X distribution for half modules for barrel
147  recHitXHalfModules = dbe_->book1D("RecHit_x_HalfModules", "RecHit X distribution for half modules", 100, -1., 1.);
148 
149  //RecHit Y distribution all modules for barrel
150  recHitYAllModules = dbe_->book1D("RecHit_y_AllModules", "RecHit Y distribution for all modules", 100, -4., 4.);
151 
152  //RecHit X resolution for flipped and unflipped ladders by layer for barrel
153  for (int i=0; i<3; i++) {
154  //RecHit X resolution for flipped ladders by layer
155  sprintf(histo, "RecHit_XRes_FlippedLadder_Layer%d", i+1);
156  recHitXResFlippedLadderLayers[i] = dbe_->book1D(histo, "RecHit XRes Flipped Ladders by Layer", 100, -200., 200.);
157 
158  //RecHit X resolution for unflipped ladders by layer
159  sprintf(histo, "RecHit_XRes_UnFlippedLadder_Layer%d", i+1);
160  recHitXResNonFlippedLadderLayers[i] = dbe_->book1D(histo, "RecHit XRes NonFlipped Ladders by Layer", 100, -200., 200.);
161  } // end for
162 
163  //RecHit Y resolutions for layers by module for barrel
164  for (int i=0; i<8; i++) {
165  //Rec Hit Y resolution by module for Layer1
166  sprintf(histo, "RecHit_YRes_Layer1_Module%d", i+1);
167  recHitYResLayer1Modules[i] = dbe_->book1D(histo, "RecHit YRes Layer1 by module", 100, -200., 200.);
168 
169  //RecHit Y resolution by module for Layer2
170  sprintf(histo, "RecHit_YRes_Layer2_Module%d", i+1);
171  recHitYResLayer2Modules[i] = dbe_->book1D(histo, "RecHit YRes Layer2 by module", 100, -200., 200.);
172 
173  //RecHit Y resolution by module for Layer3
174  sprintf(histo, "RecHit_YRes_Layer3_Module%d", i+1);
175  recHitYResLayer3Modules[i] = dbe_->book1D(histo, "RecHit YRes Layer3 by module", 100, -200., 200.);
176  } // end for
177 
178  dbe_->setCurrentFolder("TrackerRecHitsV/TrackerRecHits/Pixel/recHitFPIX");
179  //RecHit X resolution all plaquettes
180  recHitXResAllF = dbe_->book1D("RecHit_xres_f_All", "RecHit X Res All in Forward", 100, -200., 200.);
181 
182  //RecHit Y resolution all plaquettes
183  recHitYResAllF = dbe_->book1D("RecHit_yres_f_All", "RecHit Y Res All in Forward", 100, -200., 200.);
184 
185  //RecHit X distribution for plaquette with x-size 1 in forward
186  recHitXPlaquetteSize1 = dbe_->book1D("RecHit_x_Plaquette_xsize1", "RecHit X Distribution for plaquette x-size1", 100, -2., 2.);
187 
188  //RecHit X distribution for plaquette with x-size 2 in forward
189  recHitXPlaquetteSize2 = dbe_->book1D("RecHit_x_Plaquette_xsize2", "RecHit X Distribution for plaquette x-size2", 100, -2., 2.);
190 
191  //RecHit Y distribution for plaquette with y-size 2 in forward
192  recHitYPlaquetteSize2 = dbe_->book1D("RecHit_y_Plaquette_ysize2", "RecHit Y Distribution for plaquette y-size2", 100, -4., 4.);
193 
194  //RecHit Y distribution for plaquette with y-size 3 in forward
195  recHitYPlaquetteSize3 = dbe_->book1D("RecHit_y_Plaquette_ysize3", "RecHit Y Distribution for plaquette y-size3", 100, -4., 4.);
196 
197  //RecHit Y distribution for plaquette with y-size 4 in forward
198  recHitYPlaquetteSize4 = dbe_->book1D("RecHit_y_Plaquette_ysize4", "RecHit Y Distribution for plaquette y-size4", 100, -4., 4.);
199 
200  //RecHit Y distribution for plaquette with y-size 5 in forward
201  recHitYPlaquetteSize5 = dbe_->book1D("RecHit_y_Plaquette_ysize5", "RecHit Y Distribution for plaquette y-size5", 100, -4., 4.);
202 
203  //X and Y resolutions for both disks by plaquette in forward
204  for (int i=0; i<7; i++) {
205  //X resolution for Disk1 by plaquette
206  sprintf(histo, "RecHit_XRes_Disk1_Plaquette%d", i+1);
207  recHitXResDisk1Plaquettes[i] = dbe_->book1D(histo, "RecHit XRes Disk1 by plaquette", 100, -200., 200.);
208  //X resolution for Disk2 by plaquette
209  sprintf(histo, "RecHit_XRes_Disk2_Plaquette%d", i+1);
210  recHitXResDisk2Plaquettes[i] = dbe_->book1D(histo, "RecHit XRes Disk2 by plaquette", 100, -200., 200.);
211 
212  //Y resolution for Disk1 by plaquette
213  sprintf(histo, "RecHit_YRes_Disk1_Plaquette%d", i+1);
214  recHitYResDisk1Plaquettes[i] = dbe_->book1D(histo, "RecHit YRes Disk1 by plaquette", 100, -200., 200.);
215  //Y resolution for Disk2 by plaquette
216  sprintf(histo, "RecHit_YRes_Disk2_Plaquette%d", i+1);
217  recHitYResDisk2Plaquettes[i] = dbe_->book1D(histo, "RecHit YRes Disk2 by plaquette", 100, -200., 200.);
218 
219  }
220 
221 
222  dbe_->setCurrentFolder("TrackerRecHitsV/TrackerRecHits/Pixel/recHitPullsBPIX");
223  recHitXPullAllB = dbe_->book1D("RecHit_xres_b_All" , "RecHit X Pull All Modules in Barrel" , 100, -10.0, 10.0);
224  recHitYPullAllB = dbe_->book1D("RecHit_yres_b_All" , "RecHit Y Pull All Modules in Barrel" , 100, -10.0, 10.0);
225 
226  for (int i=0; i<3; i++)
227  {
228  sprintf(histo, "RecHit_XPull_FlippedLadder_Layer%d", i+1);
229  recHitXPullFlippedLadderLayers[i] = dbe_->book1D(histo, "RecHit XPull Flipped Ladders by Layer", 100, -10.0, 10.0);
230 
231  sprintf(histo, "RecHit_XPull_UnFlippedLadder_Layer%d", i+1);
232  recHitXPullNonFlippedLadderLayers[i] = dbe_->book1D(histo, "RecHit XPull NonFlipped Ladders by Layer", 100, -10.0, 10.0);
233  }
234 
235  for (int i=0; i<8; i++)
236  {
237  sprintf(histo, "RecHit_YPull_Layer1_Module%d", i+1);
238  recHitYPullLayer1Modules[i] = dbe_->book1D(histo, "RecHit YPull Layer1 by module", 100, -10.0, 10.0);
239 
240  sprintf(histo, "RecHit_YPull_Layer2_Module%d", i+1);
241  recHitYPullLayer2Modules[i] = dbe_->book1D(histo, "RecHit YPull Layer2 by module", 100, -10.0, 10.0);
242 
243  sprintf(histo, "RecHit_YPull_Layer3_Module%d", i+1);
244  recHitYPullLayer3Modules[i] = dbe_->book1D(histo, "RecHit YPull Layer3 by module", 100, -10.0, 10.0);
245  }
246 
247  dbe_->setCurrentFolder("TrackerRecHitsV/TrackerRecHits/Pixel/recHitPullsFPIX");
248  recHitXPullAllF = dbe_->book1D("RecHit_XPull_f_All", "RecHit X Pull All in Forward", 100, -10.0, 10.0);
249 
250  recHitYPullAllF = dbe_->book1D("RecHit_YPull_f_All", "RecHit Y Pull All in Forward", 100, -10.0, 10.0);
251 
252  for (int i=0; i<7; i++)
253  {
254  sprintf(histo, "RecHit_XPull_Disk1_Plaquette%d", i+1);
255  recHitXPullDisk1Plaquettes[i] = dbe_->book1D(histo, "RecHit XPull Disk1 by plaquette", 100, -10.0, 10.0);
256  sprintf(histo, "RecHit_XPull_Disk2_Plaquette%d", i+1);
257  recHitXPullDisk2Plaquettes[i] = dbe_->book1D(histo, "RecHit XPull Disk2 by plaquette", 100, -10.0, 10.0);
258 
259  sprintf(histo, "RecHit_YPull_Disk1_Plaquette%d", i+1);
260  recHitYPullDisk1Plaquettes[i] = dbe_->book1D(histo, "RecHit YPull Disk1 by plaquette", 100, -10.0, 10.0);
261 
262  sprintf(histo, "RecHit_YPull_Disk2_Plaquette%d", i+1);
263  recHitYPullDisk2Plaquettes[i] = dbe_->book1D(histo, "RecHit YPull Disk2 by plaquette", 100, -10.0, 10.0);
264  }
265 }
266 
268  if ( outputFile_.size() != 0 && dbe_ ) dbe_->save(outputFile_);
269 }
270 
272 {
273 
274  //Retrieve tracker topology from geometry
276  es.get<IdealGeometryRecord>().get(tTopoHand);
277  const TrackerTopology *tTopo=tTopoHand.product();
278 
279  edm::LogInfo("EventInfo") << " Run = " << e.id().run() << " Event = " << e.id().event();
280  if ( (int) e.id().event() % 1000 == 0 )
281  std::cout << " Run = " << e.id().run() << " Event = " << e.id().event() << std::endl;
282 
283  //Get RecHits
285  e.getByToken( siPixelRecHitCollectionToken_, recHitColl );
286 
287  //Get event setup
289  es.get<TrackerDigiGeometryRecord>().get(geom);
290  const TrackerGeometry& theTracker(*geom);
291 
292  TrackerHitAssociator associate( e, conf_ );
293 
294  //iterate over detunits
295  for (TrackerGeometry::DetContainer::const_iterator it = geom->dets().begin(); it != geom->dets().end(); it++)
296  {
297  DetId detId = ((*it)->geographicalId());
298  unsigned int subid=detId.subdetId();
299 
300  if (! ((subid==1) || (subid==2))) continue;
301 
302  const PixelGeomDetUnit * theGeomDet = dynamic_cast<const PixelGeomDetUnit*>(theTracker.idToDet(detId) );
303 
304  SiPixelRecHitCollection::const_iterator pixeldet = recHitColl->find(detId);
305  if (pixeldet == recHitColl->end()) continue;
306  SiPixelRecHitCollection::DetSet pixelrechitRange = *pixeldet;
307  SiPixelRecHitCollection::DetSet::const_iterator pixelrechitRangeIteratorBegin = pixelrechitRange.begin();
308  SiPixelRecHitCollection::DetSet::const_iterator pixelrechitRangeIteratorEnd = pixelrechitRange.end();
309  SiPixelRecHitCollection::DetSet::const_iterator pixeliter = pixelrechitRangeIteratorBegin;
310  std::vector<PSimHit> matched;
311 
312  //----Loop over rechits for this detId
313  for ( ; pixeliter != pixelrechitRangeIteratorEnd; pixeliter++)
314  {
315  matched.clear();
316  matched = associate.associateHit(*pixeliter);
317 
318  if ( !matched.empty() )
319  {
320  float closest = 9999.9;
321  std::vector<PSimHit>::const_iterator closestit = matched.begin();
322  LocalPoint lp = pixeliter->localPosition();
323  float rechit_x = lp.x();
324  float rechit_y = lp.y();
325 
326  //loop over sim hits and fill closet
327  for (std::vector<PSimHit>::const_iterator m = matched.begin(); m<matched.end(); m++)
328  {
329  float sim_x1 = (*m).entryPoint().x();
330  float sim_x2 = (*m).exitPoint().x();
331  float sim_xpos = 0.5*(sim_x1+sim_x2);
332 
333  float sim_y1 = (*m).entryPoint().y();
334  float sim_y2 = (*m).exitPoint().y();
335  float sim_ypos = 0.5*(sim_y1+sim_y2);
336 
337  float x_res = fabs(sim_xpos - rechit_x);
338  float y_res = fabs(sim_ypos - rechit_y);
339 
340  float dist = sqrt(x_res*x_res + y_res*y_res);
341 
342  if ( dist < closest )
343  {
344  closest = x_res;
345  closestit = m;
346  }
347  } // end sim hit loop
348 
349  if (subid==1)
350  { //<----------barrel
351  fillBarrel(*pixeliter, *closestit, detId, theGeomDet,tTopo);
352  } // end barrel
353  if (subid==2)
354  { // <-------forward
355  fillForward(*pixeliter, *closestit, detId, theGeomDet,tTopo);
356  }
357 
358  } // end matched emtpy
359  } // <-----end rechit loop
360  } // <------ end detunit loop
361 }
362 
363 void SiPixelRecHitsValid::fillBarrel(const SiPixelRecHit& recHit, const PSimHit& simHit,
364  DetId detId, const PixelGeomDetUnit* theGeomDet,
365  const TrackerTopology *tTopo)
366 {
367  const float cmtomicron = 10000.0;
368 
369  LocalPoint lp = recHit.localPosition();
370  float lp_y = lp.y();
371  float lp_x = lp.x();
372 
373  LocalError lerr = recHit.localPositionError();
374  float lerr_x = sqrt(lerr.xx());
375  float lerr_y = sqrt(lerr.yy());
376 
377  recHitYAllModules->Fill(lp_y);
378 
379  float sim_x1 = simHit.entryPoint().x();
380  float sim_x2 = simHit.exitPoint().x();
381  float sim_xpos = 0.5*(sim_x1 + sim_x2);
382  float res_x = (lp.x() - sim_xpos)*cmtomicron;
383 
384  recHitXResAllB->Fill(res_x);
385 
386  float sim_y1 = simHit.entryPoint().y();
387  float sim_y2 = simHit.exitPoint().y();
388  float sim_ypos = 0.5*(sim_y1 + sim_y2);
389  float res_y = (lp.y() - sim_ypos)*cmtomicron;
390 
391  recHitYResAllB->Fill(res_y);
392 
393  float pull_x = ( lp_x - sim_xpos ) / lerr_x;
394  float pull_y = ( lp_y - sim_ypos ) / lerr_y;
395 
396  recHitXPullAllB->Fill(pull_x);
397  recHitYPullAllB->Fill(pull_y);
398 
399  int rows = theGeomDet->specificTopology().nrows();
400 
401  if (rows == 160)
402  {
403  recHitXFullModules->Fill(lp_x);
404  }
405  else if (rows == 80)
406  {
407  recHitXHalfModules->Fill(lp_x);
408  }
409 
410  float tmp1 = theGeomDet->surface().toGlobal(Local3DPoint(0.,0.,0.)).perp();
411  float tmp2 = theGeomDet->surface().toGlobal(Local3DPoint(0.,0.,1.)).perp();
412 
413  if (tmp2<tmp1)
414  { // flipped
415  for (unsigned int i=0; i<3; i++)
416  {
417  if (tTopo->pxbLayer(detId) == i+1)
418  {
421  }
422  }
423  }
424  else
425  {
426  for (unsigned int i=0; i<3; i++)
427  {
428  if (tTopo->pxbLayer(detId) == i+1)
429  {
432  }
433  }
434  }
435 
436  //get cluster
437  SiPixelRecHit::ClusterRef const& clust = recHit.cluster();
438 
439  // fill module dependent info
440  for (unsigned int i=0; i<8; i++)
441  {
442  if (tTopo->pxbModule(detId) == i+1)
443  {
444  int sizeY = (*clust).sizeY();
445  clustYSizeModule[i]->Fill(sizeY);
446 
447  if (tTopo->pxbLayer(detId) == 1)
448  {
449  float charge = (*clust).charge();
450  clustChargeLayer1Modules[i]->Fill(charge);
451  recHitYResLayer1Modules[i]->Fill(res_y);
452  recHitYPullLayer1Modules[i]->Fill(pull_y);
453  }
454  else if (tTopo->pxbLayer(detId) == 2)
455  {
456  float charge = (*clust).charge();
457  clustChargeLayer2Modules[i]->Fill(charge);
458  recHitYResLayer2Modules[i]->Fill(res_y);
459  recHitYPullLayer2Modules[i]->Fill(pull_y);
460  }
461  else if (tTopo->pxbLayer(detId) == 3)
462  {
463  float charge = (*clust).charge();
464  clustChargeLayer3Modules[i]->Fill(charge);
465  recHitYResLayer3Modules[i]->Fill(res_y);
466  recHitYPullLayer3Modules[i]->Fill(pull_y);
467  }
468  }
469  }
470  int sizeX = (*clust).sizeX();
471  if (tTopo->pxbLayer(detId) == 1) clustXSizeLayer[0]->Fill(sizeX);
472  if (tTopo->pxbLayer(detId) == 2) clustXSizeLayer[1]->Fill(sizeX);
473  if (tTopo->pxbLayer(detId) == 3) clustXSizeLayer[2]->Fill(sizeX);
474 }
475 
476 void SiPixelRecHitsValid::fillForward(const SiPixelRecHit & recHit, const PSimHit & simHit,
477  DetId detId,const PixelGeomDetUnit * theGeomDet,
478  const TrackerTopology *tTopo)
479 {
480  int rows = theGeomDet->specificTopology().nrows();
481  int cols = theGeomDet->specificTopology().ncolumns();
482 
483  const float cmtomicron = 10000.0;
484 
485  LocalPoint lp = recHit.localPosition();
486  float lp_x = lp.x();
487  float lp_y = lp.y();
488 
489  LocalError lerr = recHit.localPositionError();
490  float lerr_x = sqrt(lerr.xx());
491  float lerr_y = sqrt(lerr.yy());
492 
493  float sim_x1 = simHit.entryPoint().x();
494  float sim_x2 = simHit.exitPoint().x();
495  float sim_xpos = 0.5*(sim_x1 + sim_x2);
496 
497  float sim_y1 = simHit.entryPoint().y();
498  float sim_y2 = simHit.exitPoint().y();
499  float sim_ypos = 0.5*(sim_y1 + sim_y2);
500 
501  float pull_x = ( lp_x - sim_xpos ) / lerr_x;
502  float pull_y = ( lp_y - sim_ypos ) / lerr_y;
503 
504 
505  if (rows == 80)
506  {
508  }
509  else if (rows == 160)
510  {
512  }
513 
514  if (cols == 104)
515  {
517  }
518  else if (cols == 156)
519  {
521  }
522  else if (cols == 208)
523  {
525  }
526  else if (cols == 260)
527  {
529  }
530 
531  float res_x = (lp.x() - sim_xpos)*cmtomicron;
532 
533  recHitXResAllF->Fill(res_x);
534  recHitXPullAllF->Fill(pull_x);
535 
536  float res_y = (lp.y() - sim_ypos)*cmtomicron;
537 
538  recHitYPullAllF->Fill(pull_y);
539 
540  // get cluster
541  SiPixelRecHit::ClusterRef const& clust = recHit.cluster();
542 
543  // fill plaquette dependent info
544  for (unsigned int i=0; i<7; i++)
545  {
546  if (tTopo->pxfModule(detId) == i+1)
547  {
548  if (tTopo->pxfDisk(detId) == 1)
549  {
550  int sizeX = (*clust).sizeX();
552 
553  int sizeY = (*clust).sizeY();
555 
556  float charge = (*clust).charge();
558 
561 
564  }
565  else
566  {
567  int sizeX = (*clust).sizeX();
569 
570  int sizeY = (*clust).sizeY();
572 
573  float charge = (*clust).charge();
575 
578 
581 
582  } // end else
583  } // end if module
584  else if (tTopo->pxfPanel(detId) == 2 && (tTopo->pxfModule(detId)+4) == i+1)
585  {
586  if (tTopo->pxfDisk(detId) == 1)
587  {
588  int sizeX = (*clust).sizeX();
590 
591  int sizeY = (*clust).sizeY();
593 
594  float charge = (*clust).charge();
596 
599 
602  }
603  else
604  {
605  int sizeX = (*clust).sizeX();
607 
608  int sizeY = (*clust).sizeY();
610 
611  float charge = (*clust).charge();
613 
616 
619 
620  } // end else
621  } // end else
622  } // end for
623 }
RunNumber_t run() const
Definition: EventID.h:42
GlobalPoint toGlobal(const Point2DBase< Scalar, LocalTag > lp) const
Definition: Surface.h:114
EventNumber_t event() const
Definition: EventID.h:44
int i
Definition: DBlmapReader.cc:9
MonitorElement * clustYSizeModule[8]
MonitorElement * clustXSizeDisk1Plaquettes[7]
float xx() const
Definition: LocalError.h:24
edm::ParameterSet conf_
boost::transform_iterator< IterHelp, const_IdIter > const_iterator
MonitorElement * recHitXPullDisk2Plaquettes[7]
MonitorElement * recHitXResFlippedLadderLayers[3]
MonitorElement * recHitXFullModules
MonitorElement * recHitXResAllF
T perp() const
Definition: PV3DBase.h:72
MonitorElement * recHitXHalfModules
MonitorElement * book1D(const char *name, const char *title, int nchX, double lowX, double highX)
Book 1D histogram.
Definition: DQMStore.cc:872
virtual int ncolumns() const =0
MonitorElement * recHitYPullAllF
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:434
MonitorElement * recHitXResDisk1Plaquettes[7]
MonitorElement * clustXSizeDisk2Plaquettes[7]
MonitorElement * recHitYResAllB
unsigned int pxfDisk(const DetId &id) const
MonitorElement * recHitYPullDisk2Plaquettes[7]
MonitorElement * clustXSizeLayer[3]
T y() const
Definition: PV3DBase.h:63
MonitorElement * clustChargeLayer1Modules[8]
virtual int nrows() const =0
MonitorElement * recHitYPlaquetteSize5
unsigned int pxbModule(const DetId &id) const
MonitorElement * recHitXPlaquetteSize1
MonitorElement * recHitXResDisk2Plaquettes[7]
const Plane & surface() const
The nominal surface of the GeomDet.
Definition: GeomDet.h:35
double charge(const std::vector< uint8_t > &Ampls)
MonitorElement * recHitXPullNonFlippedLadderLayers[3]
void Fill(long long x)
MonitorElement * recHitYPullDisk1Plaquettes[7]
MonitorElement * recHitXPullAllB
MonitorElement * recHitXResAllB
void beginRun(const edm::Run &r, const edm::EventSetup &c)
MonitorElement * clustChargeLayer2Modules[8]
MonitorElement * recHitYResDisk2Plaquettes[7]
Local3DPoint exitPoint() const
Exit point in the local Det frame.
Definition: PSimHit.h:38
MonitorElement * recHitXResNonFlippedLadderLayers[3]
MonitorElement * recHitYResDisk1Plaquettes[7]
MonitorElement * recHitYResLayer2Modules[8]
MonitorElement * recHitYPlaquetteSize2
float yy() const
Definition: LocalError.h:26
void Fill(HcalDetId &id, double val, std::vector< TH2F > &depth)
T sqrt(T t)
Definition: SSEVec.h:48
MonitorElement * recHitYPullLayer3Modules[8]
edm::EDGetTokenT< SiPixelRecHitCollection > siPixelRecHitCollectionToken_
MonitorElement * clustYSizeDisk1Plaquettes[7]
void save(const std::string &filename, const std::string &path="", const std::string &pattern="", const std::string &rewrite="", const uint32_t run=0, SaveReferenceTag ref=SaveWithReference, int minStatus=dqm::qstatus::STATUS_OK, const std::string &fileupdate="RECREATE")
Definition: DQMStore.cc:2296
void fillForward(const SiPixelRecHit &, const PSimHit &, DetId, const PixelGeomDetUnit *, const TrackerTopology *tTopo)
int subdetId() const
get the contents of the subdetector field (not cast into any detector&#39;s numbering enum) ...
Definition: DetId.h:37
virtual const GeomDet * idToDet(DetId) const
DQMStore * dbe_
unsigned int pxfModule(const DetId &id) const
virtual void analyze(const edm::Event &e, const edm::EventSetup &c)
MonitorElement * recHitXPlaquetteSize2
unsigned int pxbLayer(const DetId &id) const
Point3DBase< float, LocalTag > Local3DPoint
Definition: LocalPoint.h:9
MonitorElement * clustChargeLayer3Modules[8]
Definition: DetId.h:18
MonitorElement * recHitYResAllF
MonitorElement * recHitYResLayer3Modules[8]
const T & get() const
Definition: EventSetup.h:55
virtual const PixelTopology & specificTopology() const
Returns a reference to the pixel proxy topology.
T const * product() const
Definition: ESHandle.h:62
MonitorElement * recHitYPullLayer2Modules[8]
MonitorElement * clustYSizeDisk2Plaquettes[7]
edm::EventID id() const
Definition: EventBase.h:56
MonitorElement * recHitYPlaquetteSize4
iterator end()
Definition: DetSetNew.h:70
MonitorElement * recHitXPullFlippedLadderLayers[3]
std::vector< PSimHit > associateHit(const TrackingRecHit &thit)
MonitorElement * recHitYResLayer1Modules[8]
MonitorElement * recHitYPullLayer1Modules[8]
tuple cout
Definition: gather_cfg.py:121
MonitorElement * recHitXPullDisk1Plaquettes[7]
SiPixelRecHitsValid(const edm::ParameterSet &conf)
MonitorElement * recHitYPullAllB
T x() const
Definition: PV3DBase.h:62
MonitorElement * recHitXPullAllF
Local3DPoint entryPoint() const
Entry point in the local Det frame.
Definition: PSimHit.h:35
MonitorElement * recHitYPlaquetteSize3
MonitorElement * clustChargeDisk1Plaquettes[7]
unsigned int pxfPanel(const DetId &id) const
MonitorElement * clustChargeDisk2Plaquettes[7]
void setCurrentFolder(const std::string &fullpath)
Definition: DQMStore.cc:584
void fillBarrel(const SiPixelRecHit &, const PSimHit &, DetId, const PixelGeomDetUnit *, const TrackerTopology *tTopo)
Definition: Run.h:41
Pixel Reconstructed Hit.
MonitorElement * recHitYAllModules
iterator begin()
Definition: DetSetNew.h:67