CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
DTOccupancyTest.cc
Go to the documentation of this file.
1 
2 
3 /*
4  * See header file for a description of this class.
5  *
6  * \author G. Cerminara - University and INFN Torino
7  */
8 
9 
12 
22 
23 #include "TMath.h"
24 
25 using namespace edm;
26 using namespace std;
27 
28 
29 
30 
32  LogVerbatim ("DTDQM|DTMonitorClient|DTOccupancyTest") << "[DTOccupancyTest]: Constructor";
33 
34  // Get the DQM service
35  dbe = Service<DQMStore>().operator->();
36 
37  lsCounter = 0;
38 
39  writeRootFile = ps.getUntrackedParameter<bool>("writeRootFile", false);
40  if(writeRootFile) {
41  rootFile = new TFile("DTOccupancyTest.root","RECREATE");
42  ntuple = new TNtuple("OccupancyNtuple", "OccupancyNtuple", "ls:wh:st:se:lay1MeanCell:lay1RMS:lay2MeanCell:lay2RMS:lay3MeanCell:lay3RMS:lay4MeanCell:lay4RMS:lay5MeanCell:lay5RMS:lay6MeanCell:lay6RMS:lay7MeanCell:lay7RMS:lay8MeanCell:lay8RMS:lay9MeanCell:lay9RMS:lay10MeanCell:lay10RMS:lay11MeanCell:lay11RMS:lay12MeanCell:lay12RMS");
43  }
44 
45  // switch on the mode for running on test pulses (different top folder)
46  tpMode = ps.getUntrackedParameter<bool>("testPulseMode", false);
47 
48  runOnAllHitsOccupancies = ps.getUntrackedParameter<bool>("runOnAllHitsOccupancies", true);
49  runOnNoiseOccupancies = ps.getUntrackedParameter<bool>("runOnNoiseOccupancies", false);
50  runOnInTimeOccupancies = ps.getUntrackedParameter<bool>("runOnInTimeOccupancies", false);
51  nMinEvts = ps.getUntrackedParameter<int>("nEventsCert", 5000);
52 
53 }
54 
55 
56 
57 
59  LogVerbatim ("DTDQM|DTMonitorClient|DTOccupancyTest") << " destructor called" << endl;
60 
61 
62 }
63 
64 
65 
66 
68  LogVerbatim ("DTDQM|DTMonitorClient|DTOccupancyTest") << "[DTOccupancyTest]: BeginJob";
69 
70  // Event counter
71  nevents = 0;
72 
73  // Book the summary histos
74  // - one summary per wheel
75  for(int wh = -2; wh <= 2; ++wh) { // loop over wheels
76  bookHistos(wh, string("Occupancies"), "OccupancySummary");
77  }
78 
79  dbe->setCurrentFolder(topFolder());
80  string title = "Occupancy Summary";
81  if(tpMode) {
82  title = "Test Pulse Occupancy Summary";
83  }
84  // - global summary with alarms
85  summaryHisto = dbe->book2D("OccupancySummary",title.c_str(),12,1,13,5,-2,3);
86  summaryHisto->setAxisTitle("sector",1);
87  summaryHisto->setAxisTitle("wheel",2);
88 
89  // - global summary with percentages
90  glbSummaryHisto = dbe->book2D("OccupancyGlbSummary",title.c_str(),12,1,13,5,-2,3);
91  glbSummaryHisto->setAxisTitle("sector",1);
92  glbSummaryHisto->setAxisTitle("wheel",2);
93 
94 
95  // assign the name of the input histogram
96  if(runOnAllHitsOccupancies) {
97  nameMonitoredHisto = "OccupancyAllHits_perCh";
98  } else if(runOnNoiseOccupancies) {
99  nameMonitoredHisto = "OccupancyNoise_perCh";
100  } else if(runOnInTimeOccupancies) {
101  nameMonitoredHisto = "OccupancyInTimeHits_perCh";
102  } else { // default is AllHits histo
103  nameMonitoredHisto = "OccupancyAllHits_perCh";
104  }
105 
106 }
107 
108 
109 
110 
111 void DTOccupancyTest::beginRun(const edm::Run& run, const EventSetup& context){
112 
113  LogVerbatim ("DTDQM|DTMonitorClient|DTOccupancyTest") << "[DTOccupancyTest]: BeginRun";
114 
115  // Get the geometry
116  context.get<MuonGeometryRecord>().get(muonGeom);
117 
118 }
119 
120 
121 
122 
124  LogVerbatim ("DTDQM|DTMonitorClient|DTOccupancyTest") <<"[DTOccupancyTest]: Begin of LS transition";
125 }
126 
127 
128 
129 
130 void DTOccupancyTest::analyze(const Event& e, const EventSetup& context) {
131  nevents++;
132 // if(nevents%1000)
133 // LogVerbatim ("DTDQM|DTMonitorClient|DTOccupancyTest") << "[DTOccupancyTest]: "<<nevents<<" events";
134 }
135 
136 
137 
138 
139 void DTOccupancyTest::endLuminosityBlock(LuminosityBlock const& lumiSeg, EventSetup const& context) {
140  LogVerbatim ("DTDQM|DTMonitorClient|DTOccupancyTest")
141  <<"[DTOccupancyTest]: End of LS transition, performing the DQM client operation";
142  lsCounter++;
143 
144 
145 
146  // Reset the global summary
147  summaryHisto->Reset();
148  glbSummaryHisto->Reset();
149 
150  // Get all the DT chambers
151  vector<DTChamber*> chambers = muonGeom->chambers();
152 
153  for(vector<DTChamber*>::const_iterator chamber = chambers.begin();
154  chamber != chambers.end(); ++chamber) { // Loop over all chambers
155  DTChamberId chId = (*chamber)->id();
156 
157  MonitorElement * chamberOccupancyHisto = dbe->get(getMEName(nameMonitoredHisto, chId));
158 
159  // Run the tests on the plot for the various granularities
160  if(chamberOccupancyHisto != 0) {
161  // Get the 2D histo
162  TH2F* histo = chamberOccupancyHisto->getTH2F();
163  float chamberPercentage = 1.;
164  int result = runOccupancyTest(histo, chId, chamberPercentage);
165  int sector = chId.sector();
166 
167  if(sector == 13) {
168  sector = 4;
169  float resultSect4 = wheelHistos[chId.wheel()]->getBinContent(sector, chId.station());
170  if(resultSect4 > result) {
171  result = (int)resultSect4;
172  }
173  } else if(sector == 14) {
174  sector = 10;
175  float resultSect10 = wheelHistos[chId.wheel()]->getBinContent(sector, chId.station());
176  if(resultSect10 > result) {
177  result = (int)resultSect10;
178  }
179  }
180 
181  // the 2 MB4 of Sect 4 and 10 count as half a chamber
182  if((sector == 4 || sector == 10) && chId.station() == 4)
183  chamberPercentage = chamberPercentage/2.;
184 
185  wheelHistos[chId.wheel()]->setBinContent(sector, chId.station(),result);
186  if(result > summaryHisto->getBinContent(sector, chId.wheel()+3)) {
187  summaryHisto->setBinContent(sector, chId.wheel()+3, result);
188  }
189  glbSummaryHisto->Fill(sector, chId.wheel(), chamberPercentage*1./4.);
190  } else {
191  LogVerbatim ("DTDQM|DTMonitorClient|DTOccupancyTest") << "[DTOccupancyTest] ME: "
192  << getMEName(nameMonitoredHisto, chId) << " not found!" << endl;
193  }
194 
195  }
196 
197  string nEvtsName = "DT/EventInfo/Counters/nProcessedEventsDigi";
198  MonitorElement * meProcEvts = dbe->get(nEvtsName);
199 
200  if (meProcEvts) {
201  int nProcEvts = meProcEvts->getFloatValue();
202  glbSummaryHisto->setEntries(nProcEvts < nMinEvts ? 10. : nProcEvts);
203  summaryHisto->setEntries(nProcEvts < nMinEvts ? 10. : nProcEvts);
204  } else {
205  glbSummaryHisto->setEntries(nMinEvts +1);
206  summaryHisto->setEntries(nMinEvts + 1);
207  LogVerbatim ("DTDQM|DTMonitorClient|DTOccupancyTest") << "[DTOccupancyTest] ME: "
208  << nEvtsName << " not found!" << endl;
209  }
210 
211  // Fill the global summary
212  // Check for entire sectors off and report them on the global summary
213  //FIXME: TODO
214 
215  if(writeRootFile) ntuple->AutoSave("SaveSelf");
216 
217 }
218 
219 
221 
222  LogVerbatim ("DTDQM|DTMonitorClient|DTOccupancyTest") << "[DTOccupancyTest] endjob called!";
223  if(writeRootFile) {
224  rootFile->cd();
225  ntuple->Write();
226  rootFile->Close();
227  }
228 }
229 
230 
231 
232 // --------------------------------------------------
233 void DTOccupancyTest::bookHistos(const int wheelId, string folder, string histoTag) {
234  // Set the current folder
235  stringstream wheel; wheel << wheelId;
236  dbe->setCurrentFolder(topFolder());
237 
238  // build the histo name
239  string histoName = histoTag + "_W" + wheel.str();
240 
241 
242  LogVerbatim ("DTDQM|DTMonitorClient|DTOccupancyTest") <<"[DTOccupancyTest]: booking wheel histo:"
243  << histoName
244  << " (tag "
245  << histoTag
246  << ") in: "
247  << topFolder() + "Wheel"+ wheel.str() + "/" + folder << endl;
248 
249  string histoTitle = "Occupancy summary WHEEL: "+wheel.str();
250  if(tpMode) {
251  histoTitle = "TP Occupancy summary WHEEL: "+wheel.str();
252  }
253  wheelHistos[wheelId] = dbe->book2D(histoName,histoTitle,12,1,13,4,1,5);
254  wheelHistos[wheelId]->setBinLabel(1,"MB1",2);
255  wheelHistos[wheelId]->setBinLabel(2,"MB2",2);
256  wheelHistos[wheelId]->setBinLabel(3,"MB3",2);
257  wheelHistos[wheelId]->setBinLabel(4,"MB4",2);
258  wheelHistos[wheelId]->setAxisTitle("sector",1);
259 }
260 
261 
262 
263 string DTOccupancyTest::getMEName(string histoTag, const DTChamberId& chId) {
264 
265  stringstream wheel; wheel << chId.wheel();
266  stringstream station; station << chId.station();
267  stringstream sector; sector << chId.sector();
268 
269 
270  string folderRoot = topFolder() + "Wheel" + wheel.str() +
271  "/Sector" + sector.str() +
272  "/Station" + station.str() + "/";
273 
274  string folder = "Occupancies/";
275 
276  // build the histo name
277  string histoName = histoTag
278  + "_W" + wheel.str()
279  + "_St" + station.str()
280  + "_Sec" + sector.str();
281 
282  string histoname = folderRoot + histoName;
283 
284  return histoname;
285 }
286 
287 
288 
289 
290 // Run a test on the occupancy of the chamber
291 // Return values:
292 // 0 -> all ok
293 // 1 -> # consecutive dead channels > N
294 // 2 -> dead layer
295 // 3 -> dead SL
296 // 4 -> dead chamber
298  float& chamberPercentage) {
299  int nBinsX = histo->GetNbinsX();
300 
301  // Reset the error flags
302  bool failSL = false;
303  bool failLayer = false;
304  bool failCells = false;
305 
306  // Check that the chamber has digis
307  if(histo->Integral() == 0) {
308  chamberPercentage = 0;
309  return 4;
310  }
311 
312  LogTrace("DTDQM|DTMonitorClient|DTOccupancyTest") << "--- Occupancy test for chamber: " << chId << endl;
313  // set the # of SLs
314  int nSL = 3;
315  if(chId.station() == 4) nSL = 2;
316 
317  //
318  float values[28];
319  if(writeRootFile) {
320  values[0] = lsCounter;
321  values[1] = chId.wheel();
322  values[2] = chId.station();
323  values[3] = chId.sector();
324  }
325 
326  // Compute the average occupancy per layer and its RMS
327  // we also look of the layer with the smallest RMS in order to find a reference value
328  // for the cell occupancy
329  double totalChamberOccupp = 0;
330  double squaredLayerOccupSum = 0;
331 
332  map<DTLayerId, pair<double, double> > averageCellOccupAndRMS;
333  map<DTLayerId, double> layerOccupancyMap;
334 
335  int index = 3;
336  for(int slay = 1; slay <= 3; ++slay) { // loop over SLs
337  // Skip layer 2 on MB4
338  if(chId.station() == 4 && slay == 2) {
339  if(writeRootFile) {
340  values[12] = -1;
341  values[13] = -1;
342  values[14] = -1;
343  values[15] = -1;
344  values[16] = -1;
345  values[17] = -1;
346  values[18] = -1;
347  values[19] = -1;
348  }
349  index = 19;
350  continue;
351  }
352  // check the SL occupancy
353  int binYlow = ((slay-1)*4)+1;
354  int binYhigh = binYlow+3;
355  double slInteg = histo->Integral(1,nBinsX,binYlow,binYhigh);
356  if(slInteg == 0) {
357  chamberPercentage = 1.-1./(float)nSL;
358  return 3;
359  }
360 
361  for(int lay = 1; lay <= 4; ++lay) { // loop over layers
362  DTLayerId layID(chId,slay,lay);
363 
364  int binY = binYlow+(lay-1);
365 
366  double layerInteg = histo->Integral(1,nBinsX,binY,binY);
367  squaredLayerOccupSum += layerInteg*layerInteg;
368  totalChamberOccupp+= layerInteg;
369 
370  layerOccupancyMap[layID] = layerInteg;
371 
372  // We look for the distribution of hits within the layer
373  int nWires = muonGeom->layer(layID)->specificTopology().channels();
374  int firstWire = muonGeom->layer(layID)->specificTopology().firstChannel();
375  double layerSquaredSum = 0;
376  // reset the alert bit in the plot (used by render plugins)
377  histo->SetBinContent(nBinsX+1,binY,0.);
378 
379  for(int cell = firstWire; cell != (nWires+firstWire); ++cell) { // loop over cells
380  double cellOccup = histo->GetBinContent(cell,binY);
381  layerSquaredSum+=cellOccup*cellOccup;
382  }
383 
384 
385 
386  // compute the average cell occpuancy and RMS
387  double averageCellOccup = layerInteg/nWires;
388  double averageSquaredCellOccup = layerSquaredSum/nWires;
389  double rmsCellOccup = sqrt(averageSquaredCellOccup - averageCellOccup*averageCellOccup);
390  averageCellOccupAndRMS[layID] = make_pair(averageCellOccup, rmsCellOccup);
391  LogTrace("DTDQM|DTMonitorClient|DTOccupancyTest") << " " << layID
392  << " average cell occ.: " << averageCellOccup
393  << " RMS: " << rmsCellOccup << endl;
394  if(writeRootFile) {
395  index++;
396  values[index] = averageCellOccup;
397  index++;
398  values[index] = rmsCellOccup;
399  }
400  }
401  }
402 
403 
404  if(writeRootFile) ntuple->Fill(values);
405 
406 // double averageLayerOcc = totalChamberOccupp/(nSL*4);
407 // double averageSquaredLayeroccup = squaredLayerOccupSum/(nSL*4);
408 // double layerOccupRMS = sqrt(averageSquaredLayeroccup - averageLayerOcc*averageLayerOcc);
409 
410  double minCellRMS = 99999999;
411  double referenceCellOccup = -1;
412 
414 
415  // find the cell reference value
416  for(map<DTLayerId, pair<double, double> >::const_iterator layAndValues = averageCellOccupAndRMS.begin();
417  layAndValues != averageCellOccupAndRMS.end(); layAndValues++) {
418  DTLayerId lid = (*layAndValues).first;
419 
420  double rms = (*layAndValues).second.second;
421  double lOcc = layerOccupancyMap[lid]; // FIXME: useless
422  double avCellOcc = (*layAndValues).second.first;
423  LogTrace("DTDQM|DTMonitorClient|DTOccupancyTest") << " " << lid << " tot. occ: " << lOcc
424  << " average cell occ: " << avCellOcc
425  << " RMS: " << rms << endl;
426 
427  if(avCellOcc != 0) {
428  DTOccupancyPoint point(avCellOcc, rms, lid);
429  builder.addPoint(point);
430  } else {
431  if(monitoredLayers.find(lid) == monitoredLayers.end()) monitoredLayers.insert(lid);
432  }
433  }
434 
435  builder.buildClusters();
436  referenceCellOccup = builder.getBestCluster().averageMean();
437  minCellRMS = builder.getBestCluster().averageRMS();
438 
439 // set<DTLayerId> bestLayers getLayerIDs()
440 
441  double safeFactor = 3.;
442 // if(minCellRMS > referenceCellOccup) safeFactor = 5;
443 
444  LogTrace("DTDQM|DTMonitorClient|DTOccupancyTest") << " Reference cell occup.: " << referenceCellOccup
445  << " RMS: " << minCellRMS << endl;
446 
447  // Set a warning for particularly high RMS: noise can "mask" dead channels
448 // bool rmsWarning = false;
449 // if(layerOccupRMS > averageLayerOcc) {
450 // cout << " Warning RMS is too big: monitoring all layers" << endl;
451 // rmsWarning = true;
452 // }
453 
454  int nFailingSLs = 0;
455 
456  // Check the layer occupancy
457  for(int slay = 1; slay <= 3; ++slay) { // loop over SLs
458  // Skip layer 2 on MB4
459  if(chId.station() == 4 && slay == 2) continue;
460 
461  int binYlow = ((slay-1)*4)+1;
462 // int binYhigh = binYlow+3;
463 
464 
465  int nFailingLayers = 0;
466 
467  for(int lay = 1; lay <= 4; ++lay) { // loop over layers
468  DTLayerId layID(chId,slay,lay);
469  int nWires = muonGeom->layer(layID)->specificTopology().channels();
470  int firstWire = muonGeom->layer(layID)->specificTopology().firstChannel();
471  int binY = binYlow+(lay-1);
472 
473  // compute the integral of the layer occupancy
474  double layerInteg = histo->Integral(1,nBinsX,binY,binY);
475 
476  LogTrace("DTDQM|DTMonitorClient|DTOccupancyTest") << " layer: " << layID << " integral: " << layerInteg << endl;
477 
478  // Check if in the list of layers which are monitored
479  bool alreadyMonitored = false;
480  if(monitoredLayers.find(layID) != monitoredLayers.end()) alreadyMonitored = true;
481 
482 
483  if(layerInteg == 0) { // layer is dead (no need to go further
484  LogTrace("DTDQM|DTMonitorClient|DTOccupancyTest") << " fail layer: no entries" << endl;
485  // Add it to the list of of monitored layers
486  if(!alreadyMonitored) monitoredLayers.insert(layID);
487  nFailingLayers++;
488  failLayer = true;
489  histo->SetBinContent(nBinsX+1,binY,-1.);
490  // go to next layer
491  continue;
492  }
493 
494 
495 
496 // double avCellOccInLayer = averageCellOccupAndRMS[layID].first;
497 // double cellOccupRMS = averageCellOccupAndRMS[layID].second;
498 // if(monitoredLayers.find(layID) != monitoredLayers.end() ||
499 // layerInteg == 0 ||
500 // layerInteg < (averageLayerOcc - 3*layerOccupRMS) ||
501 // cellOccupRMS > avCellOccInLayer ||
502 // avCellOccInLayer < referenceCellOccup/3.) { // check the layer
503 
504  if(alreadyMonitored || builder.isProblematic(layID)) { // check the layer
505 
506  // Add it to the list of of monitored layers
507  if(monitoredLayers.find(layID) == monitoredLayers.end()) monitoredLayers.insert(layID);
508 
509 // if(layerInteg != 0) { // check # of dead cells
510  int totalDeadCells = 0;
511  int nDeadCellsInARow = 1;
512  int nDeadCellsInARowMax = 0;
513  int nCellsZeroCount = 0;
514  bool previousIsDead = false;
515 
516  int interDeadCells = 0;
517  for(int cell = firstWire; cell != (nWires+firstWire); ++cell) { // loop over cells
518  double cellOccup = histo->GetBinContent(cell,binY);
519  LogTrace("DTDQM|DTMonitorClient|DTOccupancyTest") << " cell occup: " << cellOccup;
520  if(cellOccup == 0 || cellOccup < (referenceCellOccup-safeFactor*sqrt(referenceCellOccup))) {
521  if(cellOccup == 0) nCellsZeroCount++;
522  totalDeadCells++;
523  if(previousIsDead) nDeadCellsInARow++;
524  previousIsDead = true;
525  interDeadCells = 0;
526  LogTrace("DTDQM|DTMonitorClient|DTOccupancyTest") << " below reference" << endl;
527  } else {
528  previousIsDead = false;
529  interDeadCells++;
530 
531  // 3 cells not dead between a group of dead cells don't break the count
532  if(interDeadCells > 3) {
533  if(nDeadCellsInARow > nDeadCellsInARowMax) nDeadCellsInARowMax = nDeadCellsInARow;
534  nDeadCellsInARow = 1;
535  }
536  }
537  }
538  if(nDeadCellsInARow > nDeadCellsInARowMax) nDeadCellsInARowMax = nDeadCellsInARow;
539  LogTrace("DTDQM|DTMonitorClient|DTOccupancyTest") << " # wires: " << nWires
540  << " # cells 0 count: " << nCellsZeroCount
541  << " # dead cells in a row: " << nDeadCellsInARowMax
542  << " total # of dead cells: " << totalDeadCells;
543 
544 
545  // Count dead cells
546 // if(TMath::Erf(referenceCellOccup/sqrt(referenceCellOccup)) > 2./3. &&
547 // nDeadCellsInARowMax > nWires/3.
548 // && nDeadCellsInARowMax < 2*nWires/3.) {
549 // cout << " -> fail cells!" << endl;
550 
551 // failCells = true;
552 // histo->SetBinContent(nBinsX+1,binY,-1.);
553 // } else
554  if((TMath::Erfc(referenceCellOccup/sqrt(referenceCellOccup)) < 10./(double)nWires &&
555  nDeadCellsInARowMax>= 10.) ||
556  (TMath::Erfc(referenceCellOccup/sqrt(referenceCellOccup)) < 0.5 &&
557  totalDeadCells > nWires/2.)) {
558  LogTrace("DTDQM|DTMonitorClient|DTOccupancyTest") << " -> fail layer!" << endl;
559  nFailingLayers++;
560  failLayer = true;
561  histo->SetBinContent(nBinsX+1,binY,-1.);
562  } else if(referenceCellOccup > 10 &&
563  nCellsZeroCount > nWires/3. &&
564  (double)nCellsZeroCount/(double)nWires >
565  2.*TMath::Erfc(referenceCellOccup/sqrt(referenceCellOccup))) {
566  LogTrace("DTDQM|DTMonitorClient|DTOccupancyTest") << " -> would fail cells!" << endl;
567  LogTrace("DTDQM|DTMonitorClient|DTOccupancyTest") << " # of cells with 0 count: " << nCellsZeroCount
568  << " # wires: " << nWires
569  << " erfc: "
570  << TMath::Erfc(referenceCellOccup/sqrt(referenceCellOccup))
571  << endl;
572 // failCells = true;
573 // histo->SetBinContent(nBinsX+1,binY,-1.);
574  }
575 
576 // } else { // all layer is dead
577 // LogTrace("DTDQM|DTMonitorClient|DTOccupancyTest") << " fail layer: no entries" << endl;
578 // nFailingLayers++;
579 // failLayer = true;
580 // histo->SetBinContent(nBinsX+1,binY,-1.);
581 // }
582  }
583  }
584  // Check if the whole layer is off
585  if( nFailingLayers == 4) {
586  nFailingSLs++;
587  failSL = true;
588  }
589  }
590 
591  // All the chamber is off
592  if(nFailingSLs == nSL) {
593  chamberPercentage = 0;
594  return 4;
595  } else {
596  chamberPercentage = 1.-(float)nFailingSLs/(float)nSL;
597  }
598 
599  // FIXME add check on cells
600  if(failSL) return 3;
601  if(failLayer) return 2;
602  if(failCells) return 1;
603 
604  return 0;
605 }
606 
607 
609  if(tpMode) return string("DT/10-TestPulses/");
610  return string("DT/01-Digi/");
611 }
DTOccupancyCluster getBestCluster() const
get the cluster correspondig to &quot;normal&quot; cell occupancy.
T getUntrackedParameter(std::string const &, T const &) const
void analyze(const edm::Event &event, const edm::EventSetup &context)
Analyze.
int runOccupancyTest(TH2F *histo, const DTChamberId &chId, float &chamberPercentage)
static char chambers[TOTALCHAMBERS][20]
Definition: ReadPGInfo.cc:243
void beginJob()
BeginJob.
virtual ~DTOccupancyTest()
Destructor.
void beginLuminosityBlock(edm::LuminosityBlock const &lumiSeg, edm::EventSetup const &context)
void bookHistos()
Definition: Histogram.h:33
double averageRMS() const
average RMS of the cell occpuancy distributions of the layers in the cluster
DTOccupancyTest(const edm::ParameterSet &ps)
Constructor.
void endJob()
Endjob.
T sqrt(T t)
Definition: SSEVec.h:48
tuple result
Definition: query.py:137
std::string getMEName(std::string histoTag, const DTChamberId &chId)
Get the ME name.
void beginRun(edm::Run const &run, edm::EventSetup const &context)
BeginRun.
double getFloatValue(void) const
int nevents
void endLuminosityBlock(edm::LuminosityBlock const &lumiSeg, edm::EventSetup const &context)
DQM Client Diagnostic.
#define LogTrace(id)
double averageMean() const
average cell occupancy of the layers in the cluster
void addPoint(const DTOccupancyPoint &point)
Add an occupancy point for a given layer.
void buildClusters()
build the clusters
void bookHistos(const int wheelId, std::string folder, std::string histoTag)
book the summary histograms
const T & get() const
Definition: EventSetup.h:55
int sector() const
Definition: DTChamberId.h:61
bool isProblematic(DTLayerId layerId) const
std::string topFolder() const
int station() const
Return the station number.
Definition: DTChamberId.h:51
TH2F * getTH2F(void) const
int wheel() const
Return the wheel number.
Definition: DTChamberId.h:45
*vegas h *****************************************************used in the default bin number in original ***version of VEGAS is ***a higher bin number might help to derive a more precise ***grade subtle point
Definition: invegas.h:5
Definition: Run.h:41