CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
EBSummaryClient.cc
Go to the documentation of this file.
1 /*
2  * \file EBSummaryClient.cc
3  *
4  * $Date: 2011/09/02 13:55:01 $
5  * $Revision: 1.222 $
6  * \author G. Della Ricca
7  *
8 */
9 
10 #include <memory>
11 #include <iostream>
12 #include <fstream>
13 #include <iomanip>
14 
16 
19 
20 #ifdef WITH_ECAL_COND_DB
23 #endif
24 
28 
40 
42 
44 
45  // cloneME switch
46  cloneME_ = ps.getUntrackedParameter<bool>("cloneME", true);
47 
48  // verbose switch
49  verbose_ = ps.getUntrackedParameter<bool>("verbose", true);
50 
51  // debug switch
52  debug_ = ps.getUntrackedParameter<bool>("debug", false);
53 
54  // prefixME path
55  prefixME_ = ps.getUntrackedParameter<std::string>("prefixME", "");
56 
57  // enableCleanup_ switch
58  enableCleanup_ = ps.getUntrackedParameter<bool>("enableCleanup", false);
59 
60  // vector of selected Super Modules (Defaults to all 36).
61  superModules_.reserve(36);
62  for ( unsigned int i = 1; i <= 36; i++ ) superModules_.push_back(i);
63  superModules_ = ps.getUntrackedParameter<std::vector<int> >("superModules", superModules_);
64 
65  laserWavelengths_.reserve(4);
66  for ( unsigned int i = 1; i <= 4; i++ ) laserWavelengths_.push_back(i);
67  laserWavelengths_ = ps.getUntrackedParameter<std::vector<int> >("laserWavelengths", laserWavelengths_);
68 
69  MGPAGains_.reserve(3);
70  for ( unsigned int i = 1; i <= 3; i++ ) MGPAGains_.push_back(i);
71  MGPAGains_ = ps.getUntrackedParameter<std::vector<int> >("MGPAGains", MGPAGains_);
72 
73  MGPAGainsPN_.reserve(2);
74  for ( unsigned int i = 1; i <= 3; i++ ) MGPAGainsPN_.push_back(i);
75  MGPAGainsPN_ = ps.getUntrackedParameter<std::vector<int> >("MGPAGainsPN", MGPAGainsPN_);
76 
77  // summary maps
78  meIntegrity_ = 0;
79  meIntegrityPN_ = 0;
80  meOccupancy_ = 0;
81  meOccupancyPN_ = 0;
82  meStatusFlags_ = 0;
87 
88  meLaserL1_ = 0;
89  meLaserL1PN_ = 0;
90  meLaserL1Ampl_ = 0;
91  meLaserL1Timing_ = 0;
93 
94  meLaserL2_ = 0;
95  meLaserL2PN_ = 0;
96  meLaserL2Ampl_ = 0;
97  meLaserL2Timing_ = 0;
99 
100  meLaserL3_ = 0;
101  meLaserL3PN_ = 0;
102  meLaserL3Ampl_ = 0;
103  meLaserL3Timing_ = 0;
105 
106  meLaserL4_ = 0;
107  meLaserL4PN_ = 0;
108  meLaserL4Ampl_ = 0;
109  meLaserL4Timing_ = 0;
111 
112  mePedestalG01_ = 0;
113  mePedestalG06_ = 0;
114  mePedestalG12_ = 0;
115  mePedestalPNG01_ = 0;
116  mePedestalPNG16_ = 0;
117  meTestPulseG01_ = 0;
118  meTestPulseG06_ = 0;
119  meTestPulseG12_ = 0;
120  meTestPulsePNG01_ = 0;
121  meTestPulsePNG16_ = 0;
125  meGlobalSummary_ = 0;
126 
127  meRecHitEnergy_ = 0;
128  meTiming_ = 0;
129  meTimingMean1D_ = 0;
130  meTimingRMS1D_ = 0;
131  meTimingMean_ = 0;
132  meTimingRMS_ = 0;
133  meTriggerTowerEt_ = 0;
137 
138  // summary errors
139  meIntegrityErr_ = 0;
140  meOccupancy1D_ = 0;
141  meStatusFlagsErr_ = 0;
143  meLaserL1Err_ = 0;
144  meLaserL1PNErr_ = 0;
145  meLaserL2Err_ = 0;
146  meLaserL2PNErr_ = 0;
147  meLaserL3Err_ = 0;
148  meLaserL3PNErr_ = 0;
149  meLaserL4Err_ = 0;
150  meLaserL4PNErr_ = 0;
151 
152  // additional histograms from tasks
153  for ( unsigned int i=0; i<superModules_.size(); i++ ) {
154 
155  int ism = superModules_[i];
156 
157  hpot01_[ism-1] = 0;
158  httt01_[ism-1] = 0;
159  htmt01_[ism-1] = 0;
160 
161  }
162 
163  synchErrorThreshold_ = 0.0;
164 
165 }
166 
168 
169 }
170 
172 
174 
175  if ( debug_ ) std::cout << "EBSummaryClient: beginJob" << std::endl;
176 
177  ievt_ = 0;
178  jevt_ = 0;
179 
180 }
181 
183 
184  if ( debug_ ) std::cout << "EBSummaryClient: beginRun" << std::endl;
185 
186  jevt_ = 0;
187 
188  this->setup();
189 
190 }
191 
193 
194  if ( debug_ ) std::cout << "EBSummaryClient: endJob, ievt = " << ievt_ << std::endl;
195 
196  this->cleanup();
197 
198 }
199 
201 
202  if ( debug_ ) std::cout << "EBSummaryClient: endRun, jevt = " << jevt_ << std::endl;
203 
204  this->cleanup();
205 
206 }
207 
209 
210  std::string name;
211 
212  dqmStore_->setCurrentFolder( prefixME_ + "/EBSummaryClient" );
213 
215  name = "EBIT integrity quality summary";
216  meIntegrity_ = dqmStore_->book2D(name, name, 360, 0., 360., 170, -85., 85.);
217  meIntegrity_->setAxisTitle("jphi", 1);
218  meIntegrity_->setAxisTitle("jeta", 2);
219 
221  name = "EBIT integrity quality errors summary";
222  meIntegrityErr_ = dqmStore_->book1D(name, name, 36, 1, 37);
223  for (int i = 0; i < 36; i++) {
224  meIntegrityErr_->setBinLabel(i+1, Numbers::sEB(i+1).c_str(), 1);
225  }
226 
228  name = "EBIT PN integrity quality summary";
229  meIntegrityPN_ = dqmStore_->book2D(name, name, 90, 0., 90., 20, -10., 10.);
230  meIntegrityPN_->setAxisTitle("jchannel", 1);
231  meIntegrityPN_->setAxisTitle("jpseudo-strip", 2);
232 
234  name = "EBOT digi occupancy summary";
235  meOccupancy_ = dqmStore_->book2D(name, name, 360, 0., 360., 170, -85., 85.);
236  meOccupancy_->setAxisTitle("jphi", 1);
237  meOccupancy_->setAxisTitle("jeta", 2);
238 
240  name = "EBOT digi occupancy summary 1D";
241  meOccupancy1D_ = dqmStore_->book1D(name, name, 36, 1, 37);
242  for (int i = 0; i < 36; i++) {
243  meOccupancy1D_->setBinLabel(i+1, Numbers::sEB(i+1).c_str(), 1);
244  }
245 
247  name = "EBOT PN digi occupancy summary";
248  meOccupancyPN_ = dqmStore_->book2D(name, name, 90, 0., 90., 20, -10., 10.);
249  meOccupancyPN_->setAxisTitle("jchannel", 1);
250  meOccupancyPN_->setAxisTitle("jpseudo-strip", 2);
251 
253  name = "EBSFT front-end status summary";
254  meStatusFlags_ = dqmStore_->book2D(name, name, 72, 0., 72., 34, -17., 17.);
255  meStatusFlags_->setAxisTitle("jphi'", 1);
256  meStatusFlags_->setAxisTitle("jeta'", 2);
257 
259  name = "EBSFT front-end status errors summary";
260  meStatusFlagsErr_ = dqmStore_->book1D(name, name, 36, 1, 37);
261  for (int i = 0; i < 36; i++) {
262  meStatusFlagsErr_->setBinLabel(i+1, Numbers::sEB(i+1).c_str(), 1);
263  }
264 
266  name = "EBPOT pedestal quality summary G12";
267  mePedestalOnline_ = dqmStore_->book2D(name, name, 360, 0., 360., 170, -85., 85.);
268  mePedestalOnline_->setAxisTitle("jphi", 1);
269  mePedestalOnline_->setAxisTitle("jeta", 2);
270 
272  name = "EBPOT pedestal quality errors summary G12";
273  mePedestalOnlineErr_ = dqmStore_->book1D(name, name, 36, 1, 37);
274  for (int i = 0; i < 36; i++) {
275  mePedestalOnlineErr_->setBinLabel(i+1, Numbers::sEB(i+1).c_str(), 1);
276  }
277 
279  name = "EBPOT pedestal G12 RMS map";
280  mePedestalOnlineRMSMap_ = dqmStore_->book2D(name, name, 360, 0., 360., 170, -85., 85.);
283 
285  name = "EBPOT pedestal G12 mean";
286  mePedestalOnlineMean_ = dqmStore_->bookProfile(name, name, 36, 1, 37, 100, 150., 250.);
287  for (int i = 0; i < 36; i++) {
288  mePedestalOnlineMean_->setBinLabel(i+1, Numbers::sEB(i+1).c_str(), 1);
289  }
290 
292  name = "EBPOT pedestal G12 rms";
293  mePedestalOnlineRMS_ = dqmStore_->bookProfile(name, name, 36, 1, 37, 100, 0., 10.);
294  for (int i = 0; i < 36; i++) {
295  mePedestalOnlineRMS_->setBinLabel(i+1, Numbers::sEB(i+1).c_str(), 1);
296  }
297 
298  if ( find(laserWavelengths_.begin(), laserWavelengths_.end(), 1) != laserWavelengths_.end() ) {
299 
301  name = "EBLT laser quality summary L1";
302  meLaserL1_ = dqmStore_->book2D(name, name, 360, 0., 360., 170, -85., 85.);
303  meLaserL1_->setAxisTitle("jphi", 1);
304  meLaserL1_->setAxisTitle("jeta", 2);
305 
307  name = "EBLT laser quality errors summary L1";
308  meLaserL1Err_ = dqmStore_->book1D(name, name, 36, 1, 37);
309  for (int i = 0; i < 36; i++) {
310  meLaserL1Err_->setBinLabel(i+1, Numbers::sEB(i+1).c_str(), 1);
311  }
312 
314  name = "EBLT PN laser quality summary L1";
315  meLaserL1PN_ = dqmStore_->book2D(name, name, 90, 0., 90., 20, -10., 10.);
316  meLaserL1PN_->setAxisTitle("jchannel", 1);
317  meLaserL1PN_->setAxisTitle("jpseudo-strip", 2);
318 
320  name = "EBLT PN laser quality errors summary L1";
321  meLaserL1PNErr_ = dqmStore_->book1D(name, name, 36, 1, 37);
322  for (int i = 0; i < 36; i++) {
323  meLaserL1PNErr_->setBinLabel(i+1, Numbers::sEB(i+1).c_str(), 1);
324  }
325 
327  name = "EBLT laser L1 amplitude summary";
328  meLaserL1Ampl_ = dqmStore_->bookProfile(name, name, 36, 1, 37, 4096, 0., 4096., "s");
329  for (int i = 0; i < 36; i++) {
330  meLaserL1Ampl_->setBinLabel(i+1, Numbers::sEB(i+1).c_str(), 1);
331  }
332 
334  name = "EBLT laser L1 timing summary";
335  meLaserL1Timing_ = dqmStore_->bookProfile(name, name, 36, 1, 37, 100, 0., 10., "s");
336  for (int i = 0; i < 36; i++) {
337  meLaserL1Timing_->setBinLabel(i+1, Numbers::sEB(i+1).c_str(), 1);
338  }
339 
341  name = "EBLT laser L1 amplitude over PN summary";
342  meLaserL1AmplOverPN_ = dqmStore_->bookProfile(name, name, 36, 1, 37, 4096, 0., 4096.*12., "s");
343  for (int i = 0; i < 36; i++) {
344  meLaserL1AmplOverPN_->setBinLabel(i+1, Numbers::sEB(i+1).c_str(), 1);
345  }
346 
347  }
348 
349  if ( find(laserWavelengths_.begin(), laserWavelengths_.end(), 2) != laserWavelengths_.end() ) {
350 
352  name = "EBLT laser quality summary L2";
353  meLaserL2_ = dqmStore_->book2D(name, name, 360, 0., 360., 170, -85., 85.);
354  meLaserL2_->setAxisTitle("jphi", 1);
355  meLaserL2_->setAxisTitle("jeta", 2);
356 
358  name = "EBLT laser quality errors summary L2";
359  meLaserL2Err_ = dqmStore_->book1D(name, name, 36, 1, 37);
360  for (int i = 0; i < 36; i++) {
361  meLaserL2Err_->setBinLabel(i+1, Numbers::sEB(i+1).c_str(), 1);
362  }
363 
365  name = "EBLT PN laser quality summary L2";
366  meLaserL2PN_ = dqmStore_->book2D(name, name, 90, 0., 90., 20, -10., 10.);
367  meLaserL2PN_->setAxisTitle("jchannel", 1);
368  meLaserL2PN_->setAxisTitle("jpseudo-strip", 2);
369 
371  name = "EBLT PN laser quality errors summary L2";
372  meLaserL2PNErr_ = dqmStore_->book1D(name, name, 36, 1, 37);
373  for (int i = 0; i < 36; i++) {
374  meLaserL2PNErr_->setBinLabel(i+1, Numbers::sEB(i+1).c_str(), 1);
375  }
376 
378  name = "EBLT laser L2 amplitude summary";
379  meLaserL2Ampl_ = dqmStore_->bookProfile(name, name, 36, 1, 37, 4096, 0., 4096., "s");
380  for (int i = 0; i < 36; i++) {
381  meLaserL2Ampl_->setBinLabel(i+1, Numbers::sEB(i+1).c_str(), 1);
382  }
383 
385  name = "EBLT laser L2 timing summary";
386  meLaserL2Timing_ = dqmStore_->bookProfile(name, name, 36, 1, 37, 100, 0., 10., "s");
387  for (int i = 0; i < 36; i++) {
388  meLaserL2Timing_->setBinLabel(i+1, Numbers::sEB(i+1).c_str(), 1);
389  }
390 
392  name = "EBLT laser L2 amplitude over PN summary";
393  meLaserL2AmplOverPN_ = dqmStore_->bookProfile(name, name, 36, 1, 37, 4096, 0., 4096.*12., "s");
394  for (int i = 0; i < 36; i++) {
395  meLaserL2AmplOverPN_->setBinLabel(i+1, Numbers::sEB(i+1).c_str(), 1);
396  }
397 
398  }
399 
400  if ( find(laserWavelengths_.begin(), laserWavelengths_.end(), 3) != laserWavelengths_.end() ) {
401 
403  name = "EBLT laser quality summary L3";
404  meLaserL3_ = dqmStore_->book2D(name, name, 360, 0., 360., 170, -85., 85.);
405  meLaserL3_->setAxisTitle("jphi", 1);
406  meLaserL3_->setAxisTitle("jeta", 2);
407 
409  name = "EBLT laser quality errors summary L3";
410  meLaserL3Err_ = dqmStore_->book1D(name, name, 36, 1, 37);
411  for (int i = 0; i < 36; i++) {
412  meLaserL3Err_->setBinLabel(i+1, Numbers::sEB(i+1).c_str(), 1);
413  }
414 
416  name = "EBLT PN laser quality summary L3";
417  meLaserL3PN_ = dqmStore_->book2D(name, name, 90, 0., 90., 20, -10., 10.);
418  meLaserL3PN_->setAxisTitle("jchannel", 1);
419  meLaserL3PN_->setAxisTitle("jpseudo-strip", 2);
420 
422  name = "EBLT PN laser quality errors summary L3";
423  meLaserL3PNErr_ = dqmStore_->book1D(name, name, 36, 1, 37);
424  for (int i = 0; i < 36; i++) {
425  meLaserL3PNErr_->setBinLabel(i+1, Numbers::sEB(i+1).c_str(), 1);
426  }
427 
429  name = "EBLT laser L3 amplitude summary";
430  meLaserL3Ampl_ = dqmStore_->bookProfile(name, name, 36, 1, 37, 4096, 0., 4096., "s");
431  for (int i = 0; i < 36; i++) {
432  meLaserL3Ampl_->setBinLabel(i+1, Numbers::sEB(i+1).c_str(), 1);
433  }
434 
436  name = "EBLT laser L3 timing summary";
437  meLaserL3Timing_ = dqmStore_->bookProfile(name, name, 36, 1, 37, 100, 0., 10., "s");
438  for (int i = 0; i < 36; i++) {
439  meLaserL3Timing_->setBinLabel(i+1, Numbers::sEB(i+1).c_str(), 1);
440  }
441 
443  name = "EBLT laser L3 amplitude over PN summary";
444  meLaserL3AmplOverPN_ = dqmStore_->bookProfile(name, name, 36, 1, 37, 4096, 0., 4096.*12., "s");
445  for (int i = 0; i < 36; i++) {
446  meLaserL3AmplOverPN_->setBinLabel(i+1, Numbers::sEB(i+1).c_str(), 1);
447  }
448 
449  }
450 
451  if ( find(laserWavelengths_.begin(), laserWavelengths_.end(), 4) != laserWavelengths_.end() ) {
452 
454  name = "EBLT laser quality summary L4";
455  meLaserL4_ = dqmStore_->book2D(name, name, 360, 0., 360., 170, -85., 85.);
456  meLaserL4_->setAxisTitle("jphi", 1);
457  meLaserL4_->setAxisTitle("jeta", 2);
458 
460  name = "EBLT laser quality errors summary L4";
461  meLaserL4Err_ = dqmStore_->book1D(name, name, 36, 1, 37);
462  for (int i = 0; i < 36; i++) {
463  meLaserL4Err_->setBinLabel(i+1, Numbers::sEB(i+1).c_str(), 1);
464  }
465 
467  name = "EBLT PN laser quality summary L4";
468  meLaserL4PN_ = dqmStore_->book2D(name, name, 90, 0., 90., 20, -10., 10.);
469  meLaserL4PN_->setAxisTitle("jchannel", 1);
470  meLaserL4PN_->setAxisTitle("jpseudo-strip", 2);
471 
473  name = "EBLT PN laser quality errors summary L4";
474  meLaserL4PNErr_ = dqmStore_->book1D(name, name, 36, 1, 37);
475  for (int i = 0; i < 36; i++) {
476  meLaserL4PNErr_->setBinLabel(i+1, Numbers::sEB(i+1).c_str(), 1);
477  }
478 
480  name = "EBLT laser L4 amplitude summary";
481  meLaserL4Ampl_ = dqmStore_->bookProfile(name, name, 36, 1, 37, 4096, 0., 4096., "s");
482  for (int i = 0; i < 36; i++) {
483  meLaserL4Ampl_->setBinLabel(i+1, Numbers::sEB(i+1).c_str(), 1);
484  }
485 
487  name = "EBLT laser L4 timing summary";
488  meLaserL4Timing_ = dqmStore_->bookProfile(name, name, 36, 1, 37, 100, 0., 10., "s");
489  for (int i = 0; i < 36; i++) {
490  meLaserL4Timing_->setBinLabel(i+1, Numbers::sEB(i+1).c_str(), 1);
491  }
492 
494  name = "EBLT laser L4 amplitude over PN summary";
495  meLaserL4AmplOverPN_ = dqmStore_->bookProfile(name, name, 36, 1, 37, 4096, 0., 4096.*12., "s");
496  for (int i = 0; i < 36; i++) {
497  meLaserL4AmplOverPN_->setBinLabel(i+1, Numbers::sEB(i+1).c_str(), 1);
498  }
499 
500  }
501 
502  if (find(MGPAGains_.begin(), MGPAGains_.end(), 1) != MGPAGains_.end() ) {
503 
505  name = "EBPT pedestal quality G01 summary";
506  mePedestalG01_ = dqmStore_->book2D(name, name, 360, 0., 360., 170, -85., 85.);
507  mePedestalG01_->setAxisTitle("jphi", 1);
508  mePedestalG01_->setAxisTitle("jeta", 2);
509 
510  }
511 
512  if (find(MGPAGains_.begin(), MGPAGains_.end(), 6) != MGPAGains_.end() ) {
513 
515  name = "EBPT pedestal quality G06 summary";
516  mePedestalG06_ = dqmStore_->book2D(name, name, 360, 0., 360., 170, -85., 85.);
517  mePedestalG06_->setAxisTitle("jphi", 1);
518  mePedestalG06_->setAxisTitle("jeta", 2);
519 
520  }
521 
522  if (find(MGPAGains_.begin(), MGPAGains_.end(), 12) != MGPAGains_.end() ) {
523 
525  name = "EBPT pedestal quality G12 summary";
526  mePedestalG12_ = dqmStore_->book2D(name, name, 360, 0., 360., 170, -85., 85.);
527  mePedestalG12_->setAxisTitle("jphi", 1);
528  mePedestalG12_->setAxisTitle("jeta", 2);
529 
530  }
531 
532  if (find(MGPAGainsPN_.begin(), MGPAGainsPN_.end(), 1) != MGPAGainsPN_.end() ) {
533 
535  name = "EBPT PN pedestal quality G01 summary";
536  mePedestalPNG01_ = dqmStore_->book2D(name, name, 90, 0., 90., 20, -10, 10.);
537  mePedestalPNG01_->setAxisTitle("jchannel", 1);
538  mePedestalPNG01_->setAxisTitle("jpseudo-strip", 2);
539 
540  }
541 
542  if (find(MGPAGainsPN_.begin(), MGPAGainsPN_.end(), 16) != MGPAGainsPN_.end() ) {
543 
545  name = "EBPT PN pedestal quality G16 summary";
546  mePedestalPNG16_ = dqmStore_->book2D(name, name, 90, 0., 90., 20, -10, 10.);
547  mePedestalPNG16_->setAxisTitle("jchannel", 1);
548  mePedestalPNG16_->setAxisTitle("jpseudo-strip", 2);
549 
550  }
551 
552  if (find(MGPAGains_.begin(), MGPAGains_.end(), 1) != MGPAGains_.end() ) {
553 
555  name = "EBTPT test pulse quality G01 summary";
556  meTestPulseG01_ = dqmStore_->book2D(name, name, 360, 0., 360., 170, -85., 85.);
557  meTestPulseG01_->setAxisTitle("jphi", 1);
558  meTestPulseG01_->setAxisTitle("jeta", 2);
559 
560  }
561 
562  if (find(MGPAGains_.begin(), MGPAGains_.end(), 6) != MGPAGains_.end() ) {
563 
565  name = "EBTPT test pulse quality G06 summary";
566  meTestPulseG06_ = dqmStore_->book2D(name, name, 360, 0., 360., 170, -85., 85.);
567  meTestPulseG06_->setAxisTitle("jphi", 1);
568  meTestPulseG06_->setAxisTitle("jeta", 2);
569 
570  }
571 
572  if (find(MGPAGains_.begin(), MGPAGains_.end(), 12) != MGPAGains_.end() ) {
573 
575  name = "EBTPT test pulse quality G12 summary";
576  meTestPulseG12_ = dqmStore_->book2D(name, name, 360, 0., 360., 170, -85., 85.);
577  meTestPulseG12_->setAxisTitle("jphi", 1);
578  meTestPulseG12_->setAxisTitle("jeta", 2);
579 
580  }
581 
582  if (find(MGPAGainsPN_.begin(), MGPAGainsPN_.end(), 1) != MGPAGainsPN_.end() ) {
583 
585  name = "EBTPT PN test pulse quality G01 summary";
586  meTestPulsePNG01_ = dqmStore_->book2D(name, name, 90, 0., 90., 20, -10., 10.);
587  meTestPulsePNG01_->setAxisTitle("jchannel", 1);
588  meTestPulsePNG01_->setAxisTitle("jpseudo-strip", 2);
589 
590  }
591 
592  if (find(MGPAGainsPN_.begin(), MGPAGainsPN_.end(), 16) != MGPAGainsPN_.end() ) {
593 
595  name = "EBTPT PN test pulse quality G16 summary";
596  meTestPulsePNG16_ = dqmStore_->book2D(name, name, 90, 0., 90., 20, -10., 10.);
597  meTestPulsePNG16_->setAxisTitle("jchannel", 1);
598  meTestPulsePNG16_->setAxisTitle("jpseudo-strip", 2);
599 
600  }
601 
602  if (find(MGPAGains_.begin(), MGPAGains_.end(), 1) != MGPAGains_.end() ) {
603 
605  name = "EBTPT test pulse amplitude G01 summary";
606  meTestPulseAmplG01_ = dqmStore_->bookProfile(name, name, 36, 1, 37, 4096, 0., 4096.*12., "s");
607  for (int i = 0; i < 36; i++) {
608  meTestPulseAmplG01_->setBinLabel(i+1, Numbers::sEB(i+1).c_str(), 1);
609  }
610 
611  }
612 
613  if (find(MGPAGains_.begin(), MGPAGains_.end(), 6) != MGPAGains_.end() ) {
614 
616  name = "EBTPT test pulse amplitude G06 summary";
617  meTestPulseAmplG06_ = dqmStore_->bookProfile(name, name, 36, 1, 37, 4096, 0., 4096.*12., "s");
618  for (int i = 0; i < 36; i++) {
619  meTestPulseAmplG06_->setBinLabel(i+1, Numbers::sEB(i+1).c_str(), 1);
620  }
621 
622  }
623 
624  if (find(MGPAGains_.begin(), MGPAGains_.end(), 12) != MGPAGains_.end() ) {
625 
627  name = "EBTPT test pulse amplitude G12 summary";
628  meTestPulseAmplG12_ = dqmStore_->bookProfile(name, name, 36, 1, 37, 4096, 0., 4096.*12., "s");
629  for (int i = 0; i < 36; i++) {
630  meTestPulseAmplG12_->setBinLabel(i+1, Numbers::sEB(i+1).c_str(), 1);
631  }
632 
633  }
634 
636  name = "EBOT energy summary";
637  meRecHitEnergy_ = dqmStore_->book2D(name, name, 360, 0., 360., 170, -85., 85.);
638  meRecHitEnergy_->setAxisTitle("jphi", 1);
639  meRecHitEnergy_->setAxisTitle("jeta", 2);
640 
642  name = "EBTMT timing quality summary";
643  meTiming_ = dqmStore_->book2D(name, name, 72, 0., 360., 34, -85., 85.);
644  meTiming_->setAxisTitle("jphi", 1);
645  meTiming_->setAxisTitle("jeta", 2);
646 
648  name = "EBTMT timing mean 1D summary";
649  meTimingMean1D_ = dqmStore_->book1D(name, name, 100, -25., 25.);
650  meTimingMean1D_->setAxisTitle("mean (ns)", 1);
651 
653  name = "EBTMT timing rms 1D summary";
654  meTimingRMS1D_ = dqmStore_->book1D(name, name, 100, 0.0, 10.0);
655  meTimingRMS1D_->setAxisTitle("rms (ns)", 1);
656 
658  name = "EBTMT timing mean";
659  meTimingMean_ = dqmStore_->bookProfile(name, name, 36, 1, 37, -20., 20.,"");
660  for (int i = 0; i < 36; i++) {
661  meTimingMean_->setBinLabel(i+1, Numbers::sEB(i+1).c_str(), 1);
662  }
663  meTimingMean_->setAxisTitle("mean (ns)", 2);
664 
666  name = "EBTMT timing rms";
667  meTimingRMS_ = dqmStore_->bookProfile(name, name, 36, 1, 37, 100, 0., 10.,"");
668  for (int i = 0; i < 36; i++) {
669  meTimingRMS_->setBinLabel(i+1, Numbers::sEB(i+1).c_str(), 1);
670  }
671  meTimingRMS_->setAxisTitle("rms (ns)", 2);
672 
674  name = "EBTTT Et trigger tower summary";
675  meTriggerTowerEt_ = dqmStore_->book2D(name, name, 72, 0., 72., 34, -17., 17.);
676  meTriggerTowerEt_->setAxisTitle("jphi'", 1);
677  meTriggerTowerEt_->setAxisTitle("jeta'", 2);
678 
680  name = "EBTTT emulator error quality summary";
681  meTriggerTowerEmulError_ = dqmStore_->book2D(name, name, 72, 0., 72., 34, -17., 17.);
684 
686  name = "EBTTT Trigger Primitives Timing summary";
687  meTriggerTowerTiming_ = dqmStore_->book2D(name, name, 72, 0., 72., 34, -17., 17.);
688  meTriggerTowerTiming_->setAxisTitle("jphi'", 1);
689  meTriggerTowerTiming_->setAxisTitle("jeta'", 2);
690  meTriggerTowerTiming_->setAxisTitle("TP data matching emulator", 3);
691 
693  name = "EBTTT Trigger Primitives Non Single Timing summary";
694  meTriggerTowerNonSingleTiming_ = dqmStore_->book2D(name, name, 72, 0., 72., 34, -17., 17.);
698 
700  name = "EB global summary";
701  meGlobalSummary_ = dqmStore_->book2D(name, name, 360, 0., 360., 170, -85., 85.);
702  meGlobalSummary_->setAxisTitle("jphi", 1);
703  meGlobalSummary_->setAxisTitle("jeta", 2);
704 
705 }
706 
708 
709  if ( ! enableCleanup_ ) return;
710 
711  for ( unsigned int i=0; i<superModules_.size(); i++ ) {
712 
713  int ism = superModules_[i];
714 
715  if ( cloneME_ ) {
716  if ( hpot01_[ism-1] ) delete hpot01_[ism-1];
717  if ( httt01_[ism-1] ) delete httt01_[ism-1];
718  }
719 
720  hpot01_[ism-1] = 0;
721  httt01_[ism-1] = 0;
722 
723  }
724 
725  dqmStore_->setCurrentFolder( prefixME_ + "/EBSummaryClient" );
726 
728  meIntegrity_ = 0;
729 
731  meIntegrityErr_ = 0;
732 
734  meIntegrityPN_ = 0;
735 
737  meOccupancy_ = 0;
738 
740  meOccupancy1D_ = 0;
741 
743  meOccupancyPN_ = 0;
744 
746  meStatusFlags_ = 0;
747 
749  meStatusFlagsErr_ = 0;
750 
752  mePedestalOnline_ = 0;
753 
756 
759 
762 
765 
767  meLaserL1_ = 0;
768 
770  meLaserL1Err_ = 0;
771 
773  meLaserL1Ampl_ = 0;
774 
776  meLaserL1Timing_ = 0;
777 
780 
782  meLaserL1PN_ = 0;
783 
785  meLaserL1PNErr_ = 0;
786 
788  meLaserL2_ = 0;
789 
791  meLaserL2Err_ = 0;
792 
794  meLaserL2Ampl_ = 0;
795 
797  meLaserL2Timing_ = 0;
798 
801 
803  meLaserL2PN_ = 0;
804 
806  meLaserL2PNErr_ = 0;
807 
809  meLaserL3_ = 0;
810 
812  meLaserL3Err_ = 0;
813 
815  meLaserL3Ampl_ = 0;
816 
818  meLaserL3Timing_ = 0;
819 
822 
824  meLaserL3PN_ = 0;
825 
827  meLaserL3PNErr_ = 0;
828 
830  meLaserL4_ = 0;
831 
833  meLaserL4Err_ = 0;
834 
836  meLaserL4Ampl_ = 0;
837 
839  meLaserL4Timing_ = 0;
840 
843 
845  meLaserL4PN_ = 0;
846 
848  meLaserL4PNErr_ = 0;
849 
851  mePedestalG01_ = 0;
852 
854  mePedestalG06_ = 0;
855 
857  mePedestalG12_ = 0;
858 
860  meTestPulseG01_ = 0;
861 
863  meTestPulseG06_ = 0;
864 
866  meTestPulseG12_ = 0;
867 
869  meTestPulseG01_ = 0;
870 
873 
876 
879 
881  meRecHitEnergy_ = 0;
882 
884  meTiming_ = 0;
885 
887  meTimingMean1D_ = 0;
888 
890  meTimingRMS1D_ = 0;
891 
893  meTimingMean_ = 0;
894 
896  meTimingRMS_ = 0;
897 
899  meTriggerTowerEt_ = 0;
900 
903 
906 
909 
911  meGlobalSummary_ = 0;
912 
913 }
914 
915 #ifdef WITH_ECAL_COND_DB
916 bool EBSummaryClient::writeDb(EcalCondDBInterface* econn, RunIOV* runiov, MonRunIOV* moniov, bool& status) {
917 
918  status = true;
919 
920  return true;
921 
922 }
923 #endif
924 
926 
927  ievt_++;
928  jevt_++;
929  if ( ievt_ % 10 == 0 ) {
930  if ( debug_ ) std::cout << "EBSummaryClient: ievt/jevt = " << ievt_ << "/" << jevt_ << std::endl;
931  }
932 
933  uint32_t chWarnBit = 1 << EcalDQMStatusHelper::PHYSICS_BAD_CHANNEL_WARNING;
934 
935  for ( int iex = 1; iex <= 170; iex++ ) {
936  for ( int ipx = 1; ipx <= 360; ipx++ ) {
937 
938  if ( meIntegrity_ ) meIntegrity_->setBinContent( ipx, iex, 6. );
939  if ( meOccupancy_ ) meOccupancy_->setBinContent( ipx, iex, 0. );
940  if ( meStatusFlags_ ) meStatusFlags_->setBinContent( ipx, iex, 6. );
941  if ( mePedestalOnline_ ) mePedestalOnline_->setBinContent( ipx, iex, 6. );
943  if ( meLaserL1_ ) meLaserL1_->setBinContent( ipx, iex, 6. );
944  if ( meLaserL2_ ) meLaserL2_->setBinContent( ipx, iex, 6. );
945  if ( meLaserL3_ ) meLaserL3_->setBinContent( ipx, iex, 6. );
946  if ( meLaserL4_ ) meLaserL4_->setBinContent( ipx, iex, 6. );
947  if ( mePedestalG01_ ) mePedestalG01_->setBinContent( ipx, iex, 6. );
948  if ( mePedestalG06_ ) mePedestalG06_->setBinContent( ipx, iex, 6. );
949  if ( mePedestalG12_ ) mePedestalG12_->setBinContent( ipx, iex, 6. );
950  if ( meTestPulseG01_ ) meTestPulseG01_->setBinContent( ipx, iex, 6. );
951  if ( meTestPulseG06_ ) meTestPulseG06_->setBinContent( ipx, iex, 6. );
952  if ( meTestPulseG12_ ) meTestPulseG12_->setBinContent( ipx, iex, 6. );
953 
954  if ( meRecHitEnergy_ ) meRecHitEnergy_->setBinContent( ipx, iex, 0. );
955 
956  if ( meGlobalSummary_ ) meGlobalSummary_->setBinContent( ipx, iex, 6. );
957 
958  }
959  }
960 
961  for ( int iex = 1; iex <= 20; iex++ ) {
962  for ( int ipx = 1; ipx <= 90; ipx++ ) {
963 
964  if ( meIntegrityPN_ ) meIntegrityPN_->setBinContent( ipx, iex, 6. );
965  if ( meOccupancyPN_ ) meOccupancyPN_->setBinContent( ipx, iex, 0. );
966  if ( meLaserL1PN_ ) meLaserL1PN_->setBinContent( ipx, iex, 6. );
967  if ( meLaserL2PN_ ) meLaserL2PN_->setBinContent( ipx, iex, 6. );
968  if ( meLaserL3PN_ ) meLaserL3PN_->setBinContent( ipx, iex, 6. );
969  if ( meLaserL4PN_ ) meLaserL4PN_->setBinContent( ipx, iex, 6. );
970  if ( mePedestalPNG01_ ) mePedestalPNG01_->setBinContent( ipx, iex, 6. );
971  if ( mePedestalPNG16_ ) mePedestalPNG16_->setBinContent( ipx, iex, 6. );
972  if ( meTestPulsePNG01_ ) meTestPulsePNG01_->setBinContent( ipx, iex, 6. );
973  if ( meTestPulsePNG16_ ) meTestPulsePNG16_->setBinContent( ipx, iex, 6. );
974 
975  }
976  }
977 
978  for ( int iex = 1; iex <= 34; iex++ ) {
979  for ( int ipx = 1; ipx <= 72; ipx++ ) {
980  if ( meTriggerTowerEt_ ) meTriggerTowerEt_->setBinContent( ipx, iex, 0. );
984  if ( meTiming_ ) meTiming_->setBinContent( ipx, iex, 6. );
985  }
986  }
987 
988  if ( meIntegrity_ ) meIntegrity_->setEntries( 0 );
991  if ( meOccupancy_ ) meOccupancy_->setEntries( 0 );
1001 
1002  if ( meLaserL1_ ) meLaserL1_->setEntries( 0 );
1003  if ( meLaserL1Err_ ) meLaserL1Err_->Reset();
1007  if ( meLaserL1PN_ ) meLaserL1PN_->setEntries( 0 );
1009 
1010  if ( meLaserL2_ ) meLaserL2_->setEntries( 0 );
1011  if ( meLaserL2Err_ ) meLaserL2Err_->Reset();
1015  if ( meLaserL2PN_ ) meLaserL2PN_->setEntries( 0 );
1017 
1018  if ( meLaserL3_ ) meLaserL3_->setEntries( 0 );
1019  if ( meLaserL3Err_ ) meLaserL3Err_->Reset();
1023  if ( meLaserL3PN_ ) meLaserL3PN_->setEntries( 0 );
1025 
1026  if ( meLaserL4_ ) meLaserL4_->setEntries( 0 );
1027  if ( meLaserL4Err_ ) meLaserL4Err_->Reset();
1031  if ( meLaserL4PN_ ) meLaserL4PN_->setEntries( 0 );
1033 
1047 
1049  if ( meTiming_ ) meTiming_->setEntries( 0 );
1052  if ( meTimingMean_ ) meTimingMean_->Reset();
1053  if ( meTimingRMS_ ) meTimingRMS_->Reset();
1058 
1060 
1061  for ( unsigned int i=0; i<clients_.size(); i++ ) {
1062 
1063  EBIntegrityClient* ebic = dynamic_cast<EBIntegrityClient*>(clients_[i]);
1064  EBStatusFlagsClient* ebsfc = dynamic_cast<EBStatusFlagsClient*>(clients_[i]);
1065  EBPedestalOnlineClient* ebpoc = dynamic_cast<EBPedestalOnlineClient*>(clients_[i]);
1066 
1067  EBLaserClient* eblc = dynamic_cast<EBLaserClient*>(clients_[i]);
1068  EBPedestalClient* ebpc = dynamic_cast<EBPedestalClient*>(clients_[i]);
1069  EBTestPulseClient* ebtpc = dynamic_cast<EBTestPulseClient*>(clients_[i]);
1070 
1071  EBTimingClient* ebtmc = dynamic_cast<EBTimingClient*>(clients_[i]);
1072  EBTriggerTowerClient* ebtttc = dynamic_cast<EBTriggerTowerClient*>(clients_[i]);
1073 
1074  MonitorElement *me;
1075  MonitorElement *me_01, *me_02, *me_03;
1076  MonitorElement *me_04, *me_05;
1077  // MonitorElement *me_f[6], *me_fg[2];
1078  TH2F* h2;
1079  TH2F* h3;
1080 
1081  for ( unsigned int i=0; i<superModules_.size(); i++ ) {
1082 
1083  int ism = superModules_[i];
1084 
1085  me = dqmStore_->get( prefixME_ + "/EBOccupancyTask/EBOT rec hit energy " + Numbers::sEB(ism) );
1086  hot01_[ism-1] = UtilsClient::getHisto( me, cloneME_, hot01_[ism-1] );
1087 
1088  me = dqmStore_->get( prefixME_ + "/EBPedestalOnlineTask/Gain12/EBPOT pedestal " + Numbers::sEB(ism) + " G12" );
1089  hpot01_[ism-1] = UtilsClient::getHisto( me, cloneME_, hpot01_[ism-1] );
1090 
1091  me = dqmStore_->get( prefixME_ + "/EBTriggerTowerTask/EBTTT Et map Real Digis " + Numbers::sEB(ism) );
1092  httt01_[ism-1] = UtilsClient::getHisto( me, cloneME_, httt01_[ism-1] );
1093 
1094  me = dqmStore_->get( prefixME_ + "/EBTimingTask/EBTMT timing " + Numbers::sEB(ism) );
1095  htmt01_[ism-1] = UtilsClient::getHisto( me, cloneME_, htmt01_[ism-1] );
1096 
1097  me = dqmStore_->get( prefixME_ + "/EcalInfo/EBMM DCC" );
1099 
1100  me = dqmStore_->get( prefixME_ + "/EBRawDataTask/EBRDT L1A FE errors" );
1102 
1103  for ( int ie = 1; ie <= 85; ie++ ) {
1104  for ( int ip = 1; ip <= 20; ip++ ) {
1105 
1106  if ( ebic ) {
1107 
1108  me = ebic->meg01_[ism-1];
1109 
1110  if ( me ) {
1111 
1112  float xval = me->getBinContent( ie, ip );
1113 
1114  int iex;
1115  int ipx;
1116 
1117  if ( ism <= 18 ) {
1118  iex = 1+(85-ie);
1119  ipx = ip+20*(ism-1);
1120  } else {
1121  iex = 85+ie;
1122  ipx = 1+(20-ip)+20*(ism-19);
1123  }
1124 
1125  meIntegrity_->setBinContent( ipx, iex, xval );
1126  if( xval == 0 ) meIntegrityErr_->Fill( ism );
1127 
1128  }
1129 
1130  h2 = ebic->h_[ism-1];
1131 
1132  if ( h2 ) {
1133 
1134  float xval = h2->GetBinContent( ie, ip );
1135 
1136  int iex;
1137  int ipx;
1138 
1139  if ( ism <= 18 ) {
1140  iex = 1+(85-ie);
1141  ipx = ip+20*(ism-1);
1142  } else {
1143  iex = 85+ie;
1144  ipx = 1+(20-ip)+20*(ism-19);
1145  }
1146 
1147  meOccupancy_->setBinContent( ipx, iex, xval );
1148  if ( xval != 0 ) meOccupancy1D_->Fill( ism, xval );
1149 
1150  }
1151 
1152  }
1153 
1154  if ( ebpoc ) {
1155 
1156  me = ebpoc->meg03_[ism-1];
1157 
1158  if ( me ) {
1159 
1160  int iex;
1161  int ipx;
1162 
1163  if ( ism <= 18 ) {
1164  iex = 1+(85-ie);
1165  ipx = ip+20*(ism-1);
1166  } else {
1167  iex = 85+ie;
1168  ipx = 1+(20-ip)+20*(ism-19);
1169  }
1170 
1171  float xval = me->getBinContent( ie, ip );
1172 
1173  mePedestalOnline_->setBinContent( ipx, iex, xval );
1174  if ( xval == 0 ) mePedestalOnlineErr_->Fill( ism );
1175 
1176  }
1177 
1178  float num01, mean01, rms01;
1179  bool update01 = UtilsClient::getBinStatistics(hpot01_[ism-1], ie, ip, num01, mean01, rms01);
1180 
1181  if ( update01 ) {
1182 
1183  int iex;
1184  int ipx;
1185 
1186  if ( ism <= 18 ) {
1187  iex = 1+(85-ie);
1188  ipx = ip+20*(ism-1);
1189  } else {
1190  iex = 85+ie;
1191  ipx = 1+(20-ip)+20*(ism-19);
1192  }
1193 
1194  mePedestalOnlineRMSMap_->setBinContent( ipx, iex, rms01 );
1195 
1196  mePedestalOnlineRMS_->Fill( ism, rms01 );
1197 
1198  mePedestalOnlineMean_->Fill( ism, mean01 );
1199 
1200  }
1201 
1202  }
1203 
1204  if ( eblc ) {
1205 
1206  int iex;
1207  int ipx;
1208 
1209  if ( ism <= 18 ) {
1210  iex = 1+(85-ie);
1211  ipx = ip+20*(ism-1);
1212  } else {
1213  iex = 85+ie;
1214  ipx = 1+(20-ip)+20*(ism-19);
1215  }
1216 
1217  if ( find(laserWavelengths_.begin(), laserWavelengths_.end(), 1) != laserWavelengths_.end() ) {
1218 
1219  me = eblc->meg01_[ism-1];
1220 
1221  if ( me ) {
1222 
1223  float xval = me->getBinContent( ie, ip );
1224 
1225  if ( me->getEntries() != 0 ) {
1226  meLaserL1_->setBinContent( ipx, iex, xval );
1227  if ( xval == 0 ) meLaserL1Err_->Fill( ism );
1228  }
1229 
1230  }
1231 
1232  }
1233 
1234  if ( find(laserWavelengths_.begin(), laserWavelengths_.end(), 2) != laserWavelengths_.end() ) {
1235 
1236  me = eblc->meg02_[ism-1];
1237 
1238  if ( me ) {
1239 
1240  float xval = me->getBinContent( ie, ip );
1241 
1242  if ( me->getEntries() != 0 ) {
1243  meLaserL2_->setBinContent( ipx, iex, xval );
1244  if ( xval == 0 ) meLaserL2Err_->Fill( ism );
1245  }
1246 
1247  }
1248 
1249  }
1250 
1251  if ( find(laserWavelengths_.begin(), laserWavelengths_.end(), 3) != laserWavelengths_.end() ) {
1252 
1253  me = eblc->meg03_[ism-1];
1254 
1255  if ( me ) {
1256 
1257  float xval = me->getBinContent( ie, ip );
1258 
1259  if ( me->getEntries() != 0 ) {
1260  meLaserL3_->setBinContent( ipx, iex, xval );
1261  if ( xval == 0 ) meLaserL3Err_->Fill( ism );
1262  }
1263 
1264  }
1265 
1266  }
1267 
1268  if ( find(laserWavelengths_.begin(), laserWavelengths_.end(), 4) != laserWavelengths_.end() ) {
1269 
1270  me = eblc->meg04_[ism-1];
1271 
1272  if ( me ) {
1273 
1274  float xval = me->getBinContent( ie, ip );
1275 
1276  if ( me->getEntries() != 0 ) {
1277  meLaserL4_->setBinContent( ipx, iex, xval );
1278  if ( xval == 0 ) meLaserL4Err_->Fill( ism );
1279  }
1280 
1281  }
1282 
1283  }
1284 
1285  }
1286 
1287  if ( ebpc ) {
1288 
1289  me_01 = ebpc->meg01_[ism-1];
1290  me_02 = ebpc->meg02_[ism-1];
1291  me_03 = ebpc->meg03_[ism-1];
1292 
1293  int iex;
1294  int ipx;
1295 
1296  if ( ism <= 18 ) {
1297  iex = 1+(85-ie);
1298  ipx = ip+20*(ism-1);
1299  } else {
1300  iex = 85+ie;
1301  ipx = 1+(20-ip)+20*(ism-19);
1302  }
1303 
1304  if ( me_01 ) {
1305  float val_01=me_01->getBinContent(ie,ip);
1306  if ( me_01->getEntries() != 0 ) mePedestalG01_->setBinContent( ipx, iex, val_01 );
1307  }
1308  if ( me_02 ) {
1309  float val_02=me_02->getBinContent(ie,ip);
1310  if ( me_02->getEntries() != 0 ) mePedestalG06_->setBinContent( ipx, iex, val_02 );
1311  }
1312  if ( me_03 ) {
1313  float val_03=me_03->getBinContent(ie,ip);
1314  if ( me_03->getEntries() != 0 ) mePedestalG12_->setBinContent( ipx, iex, val_03 );
1315  }
1316 
1317  }
1318 
1319  if ( ebtpc ) {
1320 
1321  me_01 = ebtpc->meg01_[ism-1];
1322  me_02 = ebtpc->meg02_[ism-1];
1323  me_03 = ebtpc->meg03_[ism-1];
1324 
1325  int iex;
1326  int ipx;
1327 
1328  if ( ism <= 18 ) {
1329  iex = 1+(85-ie);
1330  ipx = ip+20*(ism-1);
1331  } else {
1332  iex = 85+ie;
1333  ipx = 1+(20-ip)+20*(ism-19);
1334  }
1335 
1336  if ( me_01 ) {
1337 
1338  float val_01=me_01->getBinContent(ie,ip);
1339 
1340  if ( me_01->getEntries() != 0 ) meTestPulseG01_->setBinContent( ipx, iex, val_01 );
1341 
1342  }
1343  if ( me_02 ) {
1344 
1345  float val_02=me_02->getBinContent(ie,ip);
1346 
1347  if ( me_02->getEntries() != 0 ) meTestPulseG06_->setBinContent( ipx, iex, val_02 );
1348 
1349  }
1350  if ( me_03 ) {
1351 
1352  float val_03=me_03->getBinContent(ie,ip);
1353 
1354  if ( me_03->getEntries() != 0 ) meTestPulseG12_->setBinContent( ipx, iex, val_03 );
1355 
1356  }
1357 
1358 
1359  }
1360 
1361  if ( hot01_[ism-1] ) {
1362 
1363  float xval = hot01_[ism-1]->GetBinContent( ie, ip );
1364 
1365  int iex;
1366  int ipx;
1367 
1368  if ( ism <= 18 ) {
1369  iex = 1+(85-ie);
1370  ipx = ip+20*(ism-1);
1371  } else {
1372  iex = 85+ie;
1373  ipx = 1+(20-ip)+20*(ism-19);
1374  }
1375 
1376  meRecHitEnergy_->setBinContent( ipx, iex, xval );
1377 
1378  }
1379 
1380  if ( ebtmc ) {
1381 
1382  float num02, mean02, rms02;
1383 
1384  bool update02 = UtilsClient::getBinStatistics(htmt01_[ism-1], ie, ip, num02, mean02, rms02, 3.);
1385 
1386  if ( update02 ) {
1387 
1388  mean02 -= 50.;
1389 
1390  meTimingMean1D_->Fill(mean02);
1391 
1392  meTimingRMS1D_->Fill(rms02);
1393 
1394  meTimingMean_->Fill( ism, mean02 );
1395 
1396  meTimingRMS_->Fill( ism, rms02 );
1397 
1398  }
1399 
1400  }
1401 
1402  }
1403  }
1404 
1405  for (int ie = 1; ie <= 17; ie++ ) {
1406  for (int ip = 1; ip <= 4; ip++ ) {
1407 
1408  int iex;
1409  int ipx;
1410 
1411  if ( ism <= 18 ) {
1412  iex = 1+(17-ie);
1413  ipx = ip+4*(ism-1);
1414  } else {
1415  iex = 17+ie;
1416  ipx = 1+(4-ip)+4*(ism-19);
1417  }
1418 
1419  if ( ebsfc ) {
1420 
1421  me = dqmStore_->get(prefixME_ + "/EcalInfo/EBMM DCC");
1422 
1423  float xval = 6;
1424 
1425  if ( me ) {
1426 
1427  xval = 2;
1428  if ( me->getBinContent( ism ) > 0 ) xval = 1;
1429 
1430  }
1431 
1432  me = ebsfc->meh01_[ism-1];
1433 
1434  if ( me ) {
1435 
1436  if ( me->getBinContent( ie, ip ) > 0 ) xval = 0;
1437 
1438  meStatusFlags_->setBinContent( ipx, iex, xval );
1439 
1440  if ( me->getBinError( ie, ip ) > 0 && me->getBinError( ie, ip ) < 0.1 ) UtilsClient::maskBinContent( meStatusFlags_, ipx, iex );
1441 
1442  if ( xval == 0 ) meStatusFlagsErr_->Fill( ism );
1443 
1444  }
1445 
1446  }
1447 
1448  if ( ebtttc ) {
1449 
1450  float mean01 = 0;
1451  bool hadNonZeroInterest = false;
1452 
1453  if ( httt01_[ism-1] ) {
1454 
1455  mean01 = httt01_[ism-1]->GetBinContent( ie, ip );
1456 
1457  if ( mean01 != 0. ) {
1458  if ( meTriggerTowerEt_ ) meTriggerTowerEt_->setBinContent( ipx, iex, mean01 );
1459  }
1460 
1461  }
1462 
1463  me = ebtttc->me_o01_[ism-1];
1464 
1465  if ( me ) {
1466 
1467  float xval = me->getBinContent( ie, ip );
1468 
1469  if ( xval != 0. ) {
1470  meTriggerTowerTiming_->setBinContent( ipx, iex, xval );
1471  hadNonZeroInterest = true;
1472  }
1473 
1474  }
1475 
1476  me = ebtttc->me_o02_[ism-1];
1477 
1478  if ( me ) {
1479 
1480  float xval = me->getBinContent( ie, ip );
1481 
1482  if ( xval != 0. ) {
1483  meTriggerTowerNonSingleTiming_->setBinContent( ipx, iex, xval );
1484  }
1485 
1486  }
1487 
1488  float xval = 2;
1489  if( mean01 > 0. ) {
1490 
1491  h2 = ebtttc->l01_[ism-1];
1492  h3 = ebtttc->l02_[ism-1];
1493 
1494  if ( h2 && h3 ) {
1495 
1496  // float emulErrorVal = h2->GetBinContent( ie, ip ) + h3->GetBinContent( ie, ip );
1497  float emulErrorVal = h2->GetBinContent( ie, ip );
1498 
1499  if( emulErrorVal!=0 && hadNonZeroInterest ) xval = 0;
1500 
1501  }
1502 
1503  if ( xval!=0 && hadNonZeroInterest ) xval = 1;
1504 
1505  }
1506 
1507  meTriggerTowerEmulError_->setBinContent( ipx, iex, xval );
1508 
1509  }
1510 
1511  if ( ebtmc ) {
1512 
1513  if( htmt01_[ism-1] ){
1514 
1515  float ent, cont, err;
1516  float num, sum, sumw2;
1517  num = sum = sumw2 = 0.;
1518  bool mask = false;
1519 
1520  for(int ce=1; ce<=5; ce++){
1521  for(int cp=1; cp<=5; cp++){
1522 
1523  int scie = (ie - 1) * 5 + ce;
1524  int scip = (ip - 1) * 5 + cp;
1525  int bin = htmt01_[ism-1]->GetBin( scie, scip );
1526 
1527  // htmt01_ are booked with option "s" -> error = RMS not RMS/sqrt(N)
1528  ent = htmt01_[ism-1]->GetBinEntries( bin );
1529  cont = htmt01_[ism-1]->GetBinContent( bin ) - 50.;
1530  err = htmt01_[ism-1]->GetBinError( bin );
1531 
1532  num += ent;
1533  sum += cont * ent;
1534  sumw2 += (err * err + cont * cont) * ent;
1535 
1536  if( ent > 3. && (std::abs(cont) > 2. || err > 6.) && Masks::maskChannel(ism, scie, scip, chWarnBit, EcalBarrel) ) mask = true;
1537  }
1538  }
1539 
1540  float xval = 2.;
1541  if( num > 10. ){
1542 
1543  float mean = sum / num;
1544  float rms = std::sqrt( sumw2 / num - mean * mean );
1545 
1546  if( std::abs(mean) > 2. || rms > 6. ) xval = 0.;
1547  else xval = 1.;
1548 
1549  }
1550 
1551  meTiming_->setBinContent( ipx, iex, xval );
1552  if ( mask ) UtilsClient::maskBinContent( meTiming_, ipx, iex );
1553 
1554  }
1555 
1556  }
1557 
1558  }
1559  }
1560 
1561  // PN's summaries
1562  for( int i = 1; i <= 10; i++ ) {
1563  for( int j = 1; j <= 5; j++ ) {
1564 
1565  int ichanx;
1566  int ipseudostripx;
1567 
1568  if(ism<=18) {
1569  ichanx = i;
1570  ipseudostripx = j+5*(ism-1);
1571  } else {
1572  ichanx = i+10;
1573  ipseudostripx = j+5*(ism-19);
1574  }
1575 
1576  if ( ebic ) {
1577 
1578  me_04 = ebic->meg02_[ism-1];
1579  h2 = ebic->hmem_[ism-1];
1580 
1581  if( me_04 ) {
1582 
1583  float xval = me_04->getBinContent(i,j);
1584  meIntegrityPN_->setBinContent( ipseudostripx, ichanx, xval );
1585 
1586  }
1587 
1588  if ( h2 ) {
1589 
1590  float xval = h2->GetBinContent(i,1);
1591  meOccupancyPN_->setBinContent( ipseudostripx, ichanx, xval );
1592 
1593  }
1594 
1595  }
1596 
1597  if ( ebpc ) {
1598 
1599  me_04 = ebpc->meg04_[ism-1];
1600  me_05 = ebpc->meg05_[ism-1];
1601 
1602  if( me_04 ) {
1603  float val_04=me_04->getBinContent(i,1);
1604  mePedestalPNG01_->setBinContent( ipseudostripx, ichanx, val_04 );
1605  }
1606  if( me_05 ) {
1607  float val_05=me_05->getBinContent(i,1);
1608  mePedestalPNG16_->setBinContent( ipseudostripx, ichanx, val_05 );
1609  }
1610 
1611  }
1612 
1613  if ( ebtpc ) {
1614 
1615  me_04 = ebtpc->meg04_[ism-1];
1616  me_05 = ebtpc->meg05_[ism-1];
1617 
1618  if( me_04 ) {
1619  float val_04=me_04->getBinContent(i,1);
1620  meTestPulsePNG01_->setBinContent( ipseudostripx, ichanx, val_04 );
1621  }
1622  if( me_05 ) {
1623  float val_05=me_05->getBinContent(i,1);
1624  meTestPulsePNG16_->setBinContent( ipseudostripx, ichanx, val_05 );
1625  }
1626 
1627  }
1628 
1629  if ( eblc ) {
1630 
1631  if ( find(laserWavelengths_.begin(), laserWavelengths_.end(), 1) != laserWavelengths_.end() ) {
1632 
1633  me = eblc->meg09_[ism-1];
1634 
1635  if( me ) {
1636 
1637  float xval = me->getBinContent(i,1);
1638 
1639  if ( me->getEntries() != 0 && me->getEntries() != 0 ) {
1640  meLaserL1PN_->setBinContent( ipseudostripx, ichanx, xval );
1641  if ( xval == 0 ) meLaserL1PNErr_->Fill( ism );
1642  }
1643 
1644  }
1645 
1646  }
1647 
1648  if ( find(laserWavelengths_.begin(), laserWavelengths_.end(), 2) != laserWavelengths_.end() ) {
1649 
1650  me = eblc->meg10_[ism-1];
1651 
1652  if( me ) {
1653 
1654  float xval = me->getBinContent(i,1);
1655 
1656  if ( me->getEntries() != 0 && me->getEntries() != 0 ) {
1657  meLaserL2PN_->setBinContent( ipseudostripx, ichanx, xval );
1658  if ( xval == 0 ) meLaserL2PNErr_->Fill( ism );
1659  }
1660 
1661  }
1662 
1663  }
1664 
1665  if ( find(laserWavelengths_.begin(), laserWavelengths_.end(), 3) != laserWavelengths_.end() ) {
1666 
1667  me = eblc->meg11_[ism-1];
1668 
1669  if( me ) {
1670 
1671  float xval = me->getBinContent(i,1);
1672 
1673  if ( me->getEntries() != 0 && me->getEntries() != 0 ) {
1674  meLaserL3PN_->setBinContent( ipseudostripx, ichanx, xval );
1675  if ( xval == 0 ) meLaserL3PNErr_->Fill( ism );
1676  }
1677 
1678  }
1679 
1680  }
1681 
1682  if ( find(laserWavelengths_.begin(), laserWavelengths_.end(), 4) != laserWavelengths_.end() ) {
1683 
1684  me = eblc->meg12_[ism-1];
1685 
1686  if( me ) {
1687 
1688  float xval = me->getBinContent(i,1);
1689 
1690  if ( me->getEntries() != 0 && me->getEntries() != 0 ) {
1691  meLaserL4PN_->setBinContent( ipseudostripx, ichanx, xval );
1692  if ( xval == 0 ) meLaserL4PNErr_->Fill( ism );
1693  }
1694 
1695  }
1696 
1697  }
1698 
1699  }
1700 
1701  }
1702  }
1703 
1704  for(int chan=0; chan<1700; chan++) {
1705 
1706  int ie = (chan)/20 + 1;
1707  int ip = (chan)%20 + 1;
1708 
1709  // laser 1D summaries
1710  if ( eblc ) {
1711 
1712  if ( find(laserWavelengths_.begin(), laserWavelengths_.end(), 1) != laserWavelengths_.end() ) {
1713 
1714  MonitorElement *meg = eblc->meg01_[ism-1];
1715 
1716  float xval = 2;
1717  if ( meg ) xval = meg->getBinContent( ie, ip );
1718 
1719  // exclude channels without laser data (yellow in the quality map)
1720  if( xval != 2 && xval != 5 ) {
1721 
1722  MonitorElement* mea01 = eblc->mea01_[ism-1];
1723  MonitorElement* met01 = eblc->met01_[ism-1];
1724  MonitorElement* meaopn01 = eblc->meaopn01_[ism-1];
1725 
1726  if( mea01 && met01 && meaopn01 ) {
1727  meLaserL1Ampl_->Fill( ism, mea01->getBinContent( chan+1 ) );
1728  if( met01->getBinContent( chan+1 ) > 0. ) meLaserL1Timing_->Fill( ism, met01->getBinContent( chan+1 ) );
1729  meLaserL1AmplOverPN_->Fill( ism, meaopn01->getBinContent( chan+1 ) );
1730  }
1731 
1732  }
1733 
1734  }
1735 
1736  if ( find(laserWavelengths_.begin(), laserWavelengths_.end(), 2) != laserWavelengths_.end() ) {
1737 
1738  MonitorElement *meg = eblc->meg02_[ism-1];
1739 
1740  float xval = 2;
1741  if ( meg ) xval = meg->getBinContent( ie, ip );
1742 
1743  // exclude channels without laser data (yellow in the quality map)
1744  if( xval != 2 && xval != 5 ) {
1745 
1746  MonitorElement* mea02 = eblc->mea02_[ism-1];
1747  MonitorElement* met02 = eblc->met02_[ism-1];
1748  MonitorElement* meaopn02 = eblc->meaopn02_[ism-1];
1749 
1750  if( mea02 && met02 && meaopn02 ) {
1751  meLaserL2Ampl_->Fill( ism, mea02->getBinContent( chan+1 ) );
1752  if( met02->getBinContent( chan+1 ) > 0. ) meLaserL2Timing_->Fill( ism, met02->getBinContent( chan+1 ) );
1753  meLaserL2AmplOverPN_->Fill( ism, meaopn02->getBinContent( chan+1 ) );
1754  }
1755 
1756  }
1757 
1758  }
1759 
1760  if ( find(laserWavelengths_.begin(), laserWavelengths_.end(), 3) != laserWavelengths_.end() ) {
1761 
1762  MonitorElement *meg = eblc->meg03_[ism-1];
1763 
1764  float xval = 2;
1765  if ( meg ) xval = meg->getBinContent( ie, ip );
1766 
1767  // exclude channels without laser data (yellow in the quality map)
1768  if( xval != 2 && xval != 5 ) {
1769 
1770  MonitorElement* mea03 = eblc->mea03_[ism-1];
1771  MonitorElement* met03 = eblc->met03_[ism-1];
1772  MonitorElement* meaopn03 = eblc->meaopn03_[ism-1];
1773 
1774  if( mea03 && met03 && meaopn03 ) {
1775  meLaserL3Ampl_->Fill( ism, mea03->getBinContent( chan+1 ) );
1776  if( met03->getBinContent( chan+1 ) > 0. ) meLaserL3Timing_->Fill( ism, met03->getBinContent( chan+1 ) );
1777  meLaserL3AmplOverPN_->Fill( ism, meaopn03->getBinContent( chan+1 ) );
1778  }
1779 
1780  }
1781 
1782  }
1783 
1784  if ( find(laserWavelengths_.begin(), laserWavelengths_.end(), 4) != laserWavelengths_.end() ) {
1785 
1786  MonitorElement *meg = eblc->meg04_[ism-1];
1787 
1788  float xval = 2;
1789  if ( meg ) xval = meg->getBinContent( ie, ip );
1790 
1791  // exclude channels without laser data (yellow in the quality map)
1792  if( xval != 2 && xval != 5 ) {
1793 
1794  MonitorElement* mea04 = eblc->mea04_[ism-1];
1795  MonitorElement* met04 = eblc->met04_[ism-1];
1796  MonitorElement* meaopn04 = eblc->meaopn04_[ism-1];
1797 
1798  if( mea04 && met04 && meaopn04 ) {
1799  meLaserL4Ampl_->Fill( ism, mea04->getBinContent( chan+1 ) );
1800  if( met04->getBinContent( chan+1 ) > 0. ) meLaserL4Timing_->Fill( ism, met04->getBinContent( chan+1 ) );
1801  meLaserL4AmplOverPN_->Fill( ism, meaopn04->getBinContent( chan+1 ) );
1802  }
1803 
1804  }
1805 
1806  }
1807 
1808  }
1809 
1810  if ( ebtpc ) {
1811 
1812  MonitorElement *meg01 = ebtpc->meg01_[ism-1];
1813  MonitorElement *meg02 = ebtpc->meg02_[ism-1];
1814  MonitorElement *meg03 = ebtpc->meg03_[ism-1];
1815 
1816  if ( meg01 ) {
1817 
1818  float xval01 = meg01->getBinContent(ie,ip);
1819 
1820  if ( xval01 != 2 && xval01 != 5 ) {
1821 
1822  me = ebtpc->mea01_[ism-1];
1823 
1824  if ( me ) {
1825 
1826  meTestPulseAmplG01_->Fill( ism, me->getBinContent( chan+1 ) );
1827 
1828  }
1829 
1830  }
1831 
1832  }
1833 
1834  if ( meg02 ) {
1835 
1836  float xval02 = meg02->getBinContent(ie,ip);
1837 
1838  if ( xval02 != 2 && xval02 != 5 ) {
1839 
1840  me = ebtpc->mea02_[ism-1];
1841 
1842  if ( me ) {
1843 
1844  meTestPulseAmplG06_->Fill( ism, me->getBinContent( chan+1 ) );
1845 
1846  }
1847 
1848  }
1849 
1850  }
1851 
1852  if ( meg03 ) {
1853 
1854  float xval03 = meg03->getBinContent(ie,ip);
1855 
1856  if ( xval03 != 2 && xval03 != 5 ) {
1857 
1858  me = ebtpc->mea03_[ism-1];
1859 
1860  if ( me ) {
1861 
1862  meTestPulseAmplG12_->Fill( ism, me->getBinContent( chan+1 ) );
1863 
1864  }
1865 
1866  }
1867 
1868  }
1869 
1870  }
1871 
1872  } // loop on channels
1873 
1874  } // loop on SM
1875 
1876  } // loop on clients
1877 
1878  // The global-summary
1879  int nGlobalErrors = 0;
1880  int nGlobalErrorsEB[36];
1881  int nValidChannels = 0;
1882  int nValidChannelsEB[36];
1883 
1884  for (int i = 0; i < 36; i++) {
1885  nGlobalErrorsEB[i] = 0;
1886  nValidChannelsEB[i] = 0;
1887  }
1888 
1889  for ( int iex = 1; iex <= 170; iex++ ) {
1890  for ( int ipx = 1; ipx <= 360; ipx++ ) {
1891 
1893 
1894  int ism = (ipx-1)/20 + 1 ;
1895  if ( iex>85 ) ism+=18;
1896 
1897  int iet = (iex-1)/5 + 1;
1898  int ipt = (ipx-1)/5 + 1;
1899 
1900  float xval = 6;
1901  float val_in = meIntegrity_->getBinContent(ipx,iex);
1902  float val_po = mePedestalOnline_->getBinContent(ipx,iex);
1903  float val_tm = meTiming_->getBinContent(ipt,iet);
1904  float val_sf = meStatusFlags_->getBinContent((ipx-1)/5+1,(iex-1)/5+1);
1905  // float val_ee = meTriggerTowerEmulError_->getBinContent((ipx-1)/5+1,(iex-1)/5+1); // removed from the global summary temporarily
1906  float val_ee = 1;
1907 
1908  // combine all the available wavelenghts in unique laser status
1909  // for each laser turn dark color and yellow into bright green
1910  float val_ls_1=2, val_ls_2=2, val_ls_3=2, val_ls_4=2;
1911  if ( find(laserWavelengths_.begin(), laserWavelengths_.end(), 1) != laserWavelengths_.end() ) {
1912  if ( meLaserL1_ ) val_ls_1 = meLaserL1_->getBinContent(ipx,iex);
1913  if(val_ls_1==2 || val_ls_1==3 || val_ls_1==4 || val_ls_1==5) val_ls_1=1;
1914  }
1915  if ( find(laserWavelengths_.begin(), laserWavelengths_.end(), 2) != laserWavelengths_.end() ) {
1916  if ( meLaserL2_ ) val_ls_2 = meLaserL2_->getBinContent(ipx,iex);
1917  if(val_ls_2==2 || val_ls_2==3 || val_ls_2==4 || val_ls_2==5) val_ls_2=1;
1918  }
1919  if ( find(laserWavelengths_.begin(), laserWavelengths_.end(), 3) != laserWavelengths_.end() ) {
1920  if ( meLaserL3_ ) val_ls_3 = meLaserL3_->getBinContent(ipx,iex);
1921  if(val_ls_3==2 || val_ls_3==3 || val_ls_3==4 || val_ls_3==5) val_ls_3=1;
1922  }
1923  if ( find(laserWavelengths_.begin(), laserWavelengths_.end(), 4) != laserWavelengths_.end() ) {
1924  if ( meLaserL4_ ) val_ls_4 = meLaserL4_->getBinContent(ipx,iex);
1925  if(val_ls_4==2 || val_ls_4==3 || val_ls_4==4 || val_ls_4==5) val_ls_4=1;
1926  }
1927 
1928  float val_ls = 1;
1929  if (val_ls_1 == 0 || val_ls_2==0 || val_ls_3==0 || val_ls_4==0) val_ls=0;
1930 
1931  // DO NOT CONSIDER CALIBRATION EVENTS IN THE REPORT SUMMARY UNTIL LHC COLLISIONS
1932  val_ls = 1;
1933 
1934  // turn each dark color (masked channel) to bright green
1935  // for laser & timing & trigger turn also yellow into bright green
1936  // for pedestal online too because is not computed in calibration events
1937 
1938  // 0/3 = red/dark red
1939  // 1/4 = green/dark green
1940  // 2/5 = yellow/dark yellow
1941  // 6 = unknown
1942 
1943  if( val_in==3 || val_in==4 || val_in==5) val_in=1;
1944  if(val_po==2 || val_po==3 || val_po==4 || val_po==5) val_po=1;
1945  if(val_tm==2 || val_tm==3 || val_tm==4 || val_tm==5) val_tm=1;
1946  if( val_sf==3 || val_sf==4 || val_sf==5) val_sf=1;
1947  if(val_ee==2 || val_ee==3 || val_ee==4 || val_ee==5) val_ee=1;
1948 
1949  if(val_in==6) xval=6;
1950  else if(val_in==0) xval=0;
1951  else if(val_po==0 || val_ls==0 || val_tm==0 || val_sf==0 || val_ee==0) xval=0;
1952  else if(val_po==2 || val_ls==2 || val_tm==2 || val_sf==2 || val_ee==2) xval=2;
1953  else xval=1;
1954 
1955  // if the SM is entirely not read, the masked channels
1956  // are reverted back to yellow
1957  float iEntries=0;
1958 
1959  if(norm01_ && synch01_) {
1960  float frac_synch_errors = 0.;
1961  float norm = norm01_->GetBinContent(ism);
1962  if(norm > 0) frac_synch_errors = float(synch01_->GetBinContent(ism))/float(norm);
1963  float val_sy = (frac_synch_errors <= synchErrorThreshold_);
1964  if(val_sy==0) xval=0;
1965  }
1966 
1967  std::vector<int>::iterator iter = find(superModules_.begin(), superModules_.end(), ism);
1968  if (iter != superModules_.end()) {
1969  for ( unsigned int i=0; i<clients_.size(); i++ ) {
1970  EBIntegrityClient* ebic = dynamic_cast<EBIntegrityClient*>(clients_[i]);
1971  if ( ebic ) {
1972  TH2F* h2 = ebic->h_[ism-1];
1973  if ( h2 ) {
1974  iEntries = h2->GetEntries();
1975  }
1976  }
1977  }
1978  }
1979 
1980  if ( iEntries==0 ) {
1981  xval=2;
1982  }
1983 
1984  meGlobalSummary_->setBinContent( ipx, iex, xval );
1985 
1986  if ( xval >= 0 && xval <= 5 ) {
1987  if ( xval != 2 && xval != 5 ) ++nValidChannels;
1988  if ( iex <= 85 ) {
1989  if ( xval != 2 && xval != 5 ) ++nValidChannelsEB[(ipx-1)/20];
1990  } else {
1991  if ( xval != 2 && xval != 5 ) ++nValidChannelsEB[18+(ipx-1)/20];
1992  }
1993  if ( xval == 0 ) ++nGlobalErrors;
1994  if ( iex <= 85 ) {
1995  if ( xval == 0 ) ++nGlobalErrorsEB[(ipx-1)/20];
1996  } else {
1997  if ( xval == 0 ) ++nGlobalErrorsEB[18+(ipx-1)/20];
1998  }
1999  }
2000 
2001  }
2002 
2003  }
2004  }
2005 
2006  MonitorElement* me;
2007 
2008  float reportSummary = -1.0;
2009  if ( nValidChannels != 0 )
2010  reportSummary = 1.0 - float(nGlobalErrors)/float(nValidChannels);
2011  me = dqmStore_->get(prefixME_ + "/EventInfo/reportSummary");
2012  if ( me ) me->Fill(reportSummary);
2013 
2014  for (int i = 0; i < 36; i++) {
2015  float reportSummaryEB = -1.0;
2016  if ( nValidChannelsEB[i] != 0 )
2017  reportSummaryEB = 1.0 - float(nGlobalErrorsEB[i])/float(nValidChannelsEB[i]);
2018  me = dqmStore_->get(prefixME_ + "/EventInfo/reportSummaryContents/EcalBarrel_" + Numbers::sEB(i+1));
2019  if ( me ) me->Fill(reportSummaryEB);
2020  }
2021 
2022  me = dqmStore_->get(prefixME_ + "/EventInfo/reportSummaryMap");
2023  if ( me ) {
2024 
2025  int nValidChannelsTT[72][34];
2026  int nGlobalErrorsTT[72][34];
2027  for ( int iettx = 0; iettx < 34; iettx++ ) {
2028  for ( int ipttx = 0; ipttx < 72; ipttx++ ) {
2029  nValidChannelsTT[ipttx][iettx] = 0;
2030  nGlobalErrorsTT[ipttx][iettx] = 0;
2031  }
2032  }
2033 
2034  for ( int iex = 1; iex <= 170; iex++ ) {
2035  for ( int ipx = 1; ipx <= 360; ipx++ ) {
2036 
2037  int iettx = (iex-1)/5+1;
2038  int ipttx = (ipx-1)/5+1;
2039 
2040  float xval = meGlobalSummary_->getBinContent( ipx, iex );
2041 
2042  if ( xval >= 0 && xval <= 5 ) {
2043  if ( xval != 2 && xval != 5 ) ++nValidChannelsTT[ipttx-1][iettx-1];
2044  if ( xval == 0 ) ++nGlobalErrorsTT[ipttx-1][iettx-1];
2045  }
2046 
2047  }
2048  }
2049 
2050  for ( int iettx = 0; iettx < 34; iettx++ ) {
2051  for ( int ipttx = 0; ipttx < 72; ipttx++ ) {
2052 
2053  float xval = -1.0;
2054  if ( nValidChannelsTT[ipttx][iettx] != 0 )
2055  xval = 1.0 - float(nGlobalErrorsTT[ipttx][iettx])/float(nValidChannelsTT[ipttx][iettx]);
2056 
2057  me->setBinContent( ipttx+1, iettx+1, xval );
2058 
2059  }
2060  }
2061 
2062  }
2063 
2064 }
2065 
MonitorElement * mea02_[36]
MonitorElement * meg12_[36]
MonitorElement * mePedestalOnlineRMS_
MonitorElement * meLaserL4PNErr_
T getUntrackedParameter(std::string const &, T const &) const
const std::string & getName(void) const
get name of ME
int i
Definition: DBlmapReader.cc:9
MonitorElement * meOccupancyPN_
MonitorElement * meRecHitEnergy_
MonitorElement * meg09_[36]
MonitorElement * meTriggerTowerEt_
void setBinContent(int binx, double content)
set content of bin (1-D)
virtual ~EBSummaryClient()
Destructor.
static bool maskChannel(int ism, int i1, int i2, uint32_t bits, const EcalSubdetector subdet)
Definition: Masks.cc:60
static std::string sEB(const int ism)
Definition: Numbers.cc:87
MonitorElement * meLaserL3_
void cleanup(void)
Cleanup.
MonitorElement * meTestPulseAmplG01_
MonitorElement * meg03_[36]
MonitorElement * me_o02_[36]
TProfile2D * hot01_[36]
MonitorElement * meg02_[36]
TProfile2D * httt01_[36]
MonitorElement * meg05_[36]
MonitorElement * meTestPulseG12_
static const int PHYSICS_BAD_CHANNEL_WARNING
MonitorElement * book1D(const char *name, const char *title, int nchX, double lowX, double highX)
Book 1D histogram.
Definition: DQMStore.cc:514
MonitorElement * meLaserL4AmplOverPN_
MonitorElement * meg04_[36]
static T getHisto(const MonitorElement *me, bool clone=false, T ret=0)
Returns the histogram contained by the Monitor Element.
Definition: UtilsClient.h:91
MonitorElement * mePedestalPNG01_
MonitorElement * met02_[36]
MonitorElement * meLaserL1Timing_
MonitorElement * meTimingMean_
Some &quot;id&quot; conversions.
MonitorElement * meStatusFlagsErr_
MonitorElement * meLaserL1_
MonitorElement * meg02_[36]
MonitorElement * meg03_[36]
void endRun(void)
EndRun.
MonitorElement * mea01_[36]
MonitorElement * meIntegrity_
MonitorElement * meg02_[36]
void setBinLabel(int bin, const std::string &label, int axis=1)
set bin label for x, y or z axis (axis=1, 2, 3 respectively)
#define abs(x)
Definition: mlp_lapack.h:159
MonitorElement * meg01_[36]
MonitorElement * mePedestalOnlineErr_
MonitorElement * mePedestalG06_
MonitorElement * meOccupancy_
MonitorElement * meTestPulseAmplG12_
MonitorElement * meLaserL3Timing_
std::vector< int > superModules_
std::vector< int > laserWavelengths_
double getEntries(void) const
get # of entries
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
Definition: FindCaloHit.cc:7
static void maskBinContent(const MonitorElement *me, const int ix, const int iy)
Mask the bin content.
Definition: UtilsClient.cc:231
MonitorElement * mea03_[36]
MonitorElement * met04_[36]
MonitorElement * meLaserL2Err_
MonitorElement * meLaserL2_
MonitorElement * meg04_[36]
void Fill(long long x)
MonitorElement * meLaserL3Ampl_
MonitorElement * meTestPulsePNG16_
MonitorElement * mea02_[36]
MonitorElement * mePedestalG01_
MonitorElement * meg10_[36]
MonitorElement * meIntegrityErr_
void beginJob(void)
BeginJob.
MonitorElement * meLaserL3PNErr_
MonitorElement * meg01_[36]
MonitorElement * meLaserL2PN_
MonitorElement * meTestPulsePNG01_
MonitorElement * meLaserL4Timing_
T sqrt(T t)
Definition: SSEVec.h:28
tuple norm
Definition: lumiNorm.py:78
MonitorElement * meLaserL2AmplOverPN_
void removeElement(const std::string &name)
Definition: DQMStore.cc:2353
MonitorElement * meTimingRMS_
channel masking
std::string prefixME_
EBSummaryClient(const edm::ParameterSet &ps)
Constructor.
MonitorElement * meIntegrityPN_
int j
Definition: DBlmapReader.cc:9
void setup(void)
Setup.
MonitorElement * mea04_[36]
TProfile2D * hpot01_[36]
MonitorElement * meLaserL3Err_
MonitorElement * meLaserL4Err_
MonitorElement * bookProfile(const char *name, const char *title, int nchX, double lowX, double highX, int nchY, double lowY, double highY, const char *option="s")
Definition: DQMStore.cc:828
MonitorElement * meh01_[36]
MonitorElement * meg04_[36]
MonitorElement * meTimingRMS1D_
MonitorElement * meOccupancy1D_
void setEntries(double nentries)
set # of entries
MonitorElement * meTriggerTowerEmulError_
MonitorElement * get(const std::string &path) const
get ME from full pathname (e.g. &quot;my/long/dir/my_histo&quot;)
Definition: DQMStore.cc:1265
MonitorElement * met03_[36]
MonitorElement * meTriggerTowerTiming_
Ecal Monitor Utils for Client.
static bool getBinStatistics(TH1 *histo, const int ix, const int iy, float &num, float &mean, float &rms, float minEntries=1.)
Returns true if the bin contains good statistical data.
Definition: UtilsClient.cc:74
DQMStore * dqmStore_
MonitorElement * meLaserL3PN_
MonitorElement * meLaserL3AmplOverPN_
MonitorElement * meaopn04_[36]
MonitorElement * meLaserL4PN_
MonitorElement * meLaserL2Timing_
MonitorElement * meaopn01_[36]
MonitorElement * meTimingMean1D_
MonitorElement * me_o01_[36]
MonitorElement * meTiming_
double getBinError(int binx) const
get uncertainty on content of bin (1-D) - See TH1::GetBinError for details
MonitorElement * meg03_[36]
long long int num
Definition: procUtils.cc:71
MonitorElement * meLaserL1AmplOverPN_
MonitorElement * mePedestalOnlineRMSMap_
MonitorElement * meg11_[36]
MonitorElement * meLaserL4Ampl_
MonitorElement * meLaserL1Err_
MonitorElement * mea01_[36]
MonitorElement * mea03_[36]
int cont
MonitorElement * meLaserL4_
MonitorElement * meg01_[36]
MonitorElement * meTestPulseAmplG06_
double getBinContent(int binx) const
get content of bin (1-D)
MonitorElement * mePedestalOnline_
MonitorElement * meGlobalSummary_
void endJob(void)
EndJob.
std::vector< int > MGPAGainsPN_
MonitorElement * meStatusFlags_
MonitorElement * meLaserL1PN_
MonitorElement * meLaserL2PNErr_
MonitorElement * meTestPulseG06_
MonitorElement * meTestPulseG01_
tuple cout
Definition: gather_cfg.py:41
MonitorElement * meLaserL1Ampl_
MonitorElement * meg05_[36]
float synchErrorThreshold_
MonitorElement * meLaserL1PNErr_
MonitorElement * meg02_[36]
MonitorElement * meg03_[36]
tuple status
Definition: ntuplemaker.py:245
MonitorElement * book2D(const char *name, const char *title, int nchX, double lowX, double highX, int nchY, double lowY, double highY)
Book 2D histogram.
Definition: DQMStore.cc:642
MonitorElement * meg01_[36]
std::vector< int > MGPAGains_
Definition: RunIOV.h:13
MonitorElement * meaopn02_[36]
int ism(int ieta, int iphi)
Definition: EcalPyUtils.cc:56
MonitorElement * meaopn03_[36]
void setAxisTitle(const std::string &title, int axis=1)
set x-, y- or z-axis title (axis=1, 2, 3 respectively)
void Reset(void)
reset ME (ie. contents, errors, etc)
MonitorElement * meLaserL2Ampl_
std::vector< EBClient * > clients_
void analyze(void)
Analyze.
void beginRun(void)
BeginRun.
MonitorElement * mePedestalG12_
TProfile2D * htmt01_[36]
void setCurrentFolder(const std::string &fullpath)
Definition: DQMStore.cc:232
MonitorElement * met01_[36]
MonitorElement * meTriggerTowerNonSingleTiming_
MonitorElement * mePedestalOnlineMean_
MonitorElement * mePedestalPNG16_