CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Protected Member Functions | Private Attributes | Static Private Attributes
EBIntegrityTask Class Reference

#include <EBIntegrityTask.h>

Inheritance diagram for EBIntegrityTask:
edm::EDAnalyzer

Public Member Functions

 EBIntegrityTask (const edm::ParameterSet &ps)
 Constructor. More...
 
virtual ~EBIntegrityTask ()
 Destructor. More...
 
- Public Member Functions inherited from edm::EDAnalyzer
 EDAnalyzer ()
 
std::string workerType () const
 
virtual ~EDAnalyzer ()
 

Protected Member Functions

void analyze (const edm::Event &e, const edm::EventSetup &c)
 Analyze. More...
 
void beginJob (void)
 BeginJob. More...
 
void beginLuminosityBlock (const edm::LuminosityBlock &lumiBlock, const edm::EventSetup &iSetup)
 BeginLuminosityBlock. More...
 
void beginRun (const edm::Run &r, const edm::EventSetup &c)
 BeginRun. More...
 
void cleanup (void)
 Cleanup. More...
 
void endJob (void)
 EndJob. More...
 
void endLuminosityBlock (const edm::LuminosityBlock &lumiBlock, const edm::EventSetup &iSetup)
 EndLuminosityBlock. More...
 
void endRun (const edm::Run &r, const edm::EventSetup &c)
 EndRun. More...
 
void reset (void)
 Reset. More...
 
void setup (void)
 Setup. More...
 
- Protected Member Functions inherited from edm::EDAnalyzer
CurrentProcessingContext const * currentContext () const
 

Private Attributes

DQMStoredqmStore_
 
edm::InputTag EBDetIdCollection0_
 
edm::InputTag EBDetIdCollection1_
 
edm::InputTag EBDetIdCollection2_
 
edm::InputTag EBDetIdCollection3_
 
edm::InputTag EBDetIdCollection4_
 
edm::InputTag EcalElectronicsIdCollection1_
 
edm::InputTag EcalElectronicsIdCollection2_
 
edm::InputTag EcalElectronicsIdCollection3_
 
edm::InputTag EcalElectronicsIdCollection4_
 
edm::InputTag EcalElectronicsIdCollection5_
 
edm::InputTag EcalElectronicsIdCollection6_
 
bool enableCleanup_
 
int ievt_
 
bool init_
 
MonitorElementmeIntegrityChId [36]
 
MonitorElementmeIntegrityDCCSize
 
MonitorElementmeIntegrityErrorsByLumi
 
MonitorElementmeIntegrityGain [36]
 
MonitorElementmeIntegrityGainSwitch [36]
 
MonitorElementmeIntegrityMemChId [36]
 
MonitorElementmeIntegrityMemGain [36]
 
MonitorElementmeIntegrityMemTTBlockSize [36]
 
MonitorElementmeIntegrityMemTTId [36]
 
MonitorElementmeIntegrityTTBlockSize [36]
 
MonitorElementmeIntegrityTTId [36]
 
bool mergeRuns_
 
std::string prefixME_
 

Static Private Attributes

static const int chMemAbscissa [25]
 
static const int chMemOrdinate [25]
 

Additional Inherited Members

- Public Types inherited from edm::EDAnalyzer
typedef EDAnalyzer ModuleType
 
typedef WorkerT< EDAnalyzerWorkerType
 
- Static Public Member Functions inherited from edm::EDAnalyzer
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 

Detailed Description

Definition at line 21 of file EBIntegrityTask.h.

Constructor & Destructor Documentation

EBIntegrityTask::EBIntegrityTask ( const edm::ParameterSet ps)

Constructor.

Definition at line 28 of file EBIntegrityTask.cc.

References dqmStore_, EBDetIdCollection0_, EBDetIdCollection1_, EBDetIdCollection2_, EBDetIdCollection3_, EcalElectronicsIdCollection1_, EcalElectronicsIdCollection2_, EcalElectronicsIdCollection3_, EcalElectronicsIdCollection4_, EcalElectronicsIdCollection5_, EcalElectronicsIdCollection6_, enableCleanup_, edm::ParameterSet::getParameter(), edm::ParameterSet::getUntrackedParameter(), i, init_, meIntegrityChId, meIntegrityDCCSize, meIntegrityErrorsByLumi, meIntegrityGain, meIntegrityGainSwitch, meIntegrityMemChId, meIntegrityMemGain, meIntegrityMemTTBlockSize, meIntegrityMemTTId, meIntegrityTTBlockSize, meIntegrityTTId, mergeRuns_, cmsCodeRules.cppFunctionSkipper::operator, and prefixME_.

28  {
29 
30  init_ = false;
31 
33 
34  prefixME_ = ps.getUntrackedParameter<std::string>("prefixME", "");
35 
36  enableCleanup_ = ps.getUntrackedParameter<bool>("enableCleanup", false);
37 
38  mergeRuns_ = ps.getUntrackedParameter<bool>("mergeRuns", false);
39 
40  EBDetIdCollection0_ = ps.getParameter<edm::InputTag>("EBDetIdCollection0");
41  EBDetIdCollection1_ = ps.getParameter<edm::InputTag>("EBDetIdCollection1");
42  EBDetIdCollection2_ = ps.getParameter<edm::InputTag>("EBDetIdCollection2");
43  EBDetIdCollection3_ = ps.getParameter<edm::InputTag>("EBDetIdCollection3");
44  EcalElectronicsIdCollection1_ = ps.getParameter<edm::InputTag>("EcalElectronicsIdCollection1");
45  EcalElectronicsIdCollection2_ = ps.getParameter<edm::InputTag>("EcalElectronicsIdCollection2");
46  EcalElectronicsIdCollection3_ = ps.getParameter<edm::InputTag>("EcalElectronicsIdCollection3");
47  EcalElectronicsIdCollection4_ = ps.getParameter<edm::InputTag>("EcalElectronicsIdCollection4");
48  EcalElectronicsIdCollection5_ = ps.getParameter<edm::InputTag>("EcalElectronicsIdCollection5");
49  EcalElectronicsIdCollection6_ = ps.getParameter<edm::InputTag>("EcalElectronicsIdCollection6");
50 
52  for (int i = 0; i < 36; i++) {
53  meIntegrityGain[i] = 0;
54  meIntegrityChId[i] = 0;
56  meIntegrityTTId[i] = 0;
58  meIntegrityMemChId[i] = 0;
59  meIntegrityMemGain[i] = 0;
60  meIntegrityMemTTId[i] = 0;
62  }
64 
65 }
T getParameter(std::string const &) const
T getUntrackedParameter(std::string const &, T const &) const
int i
Definition: DBlmapReader.cc:9
MonitorElement * meIntegrityTTBlockSize[36]
MonitorElement * meIntegrityMemTTBlockSize[36]
edm::InputTag EBDetIdCollection2_
edm::InputTag EBDetIdCollection3_
MonitorElement * meIntegrityGainSwitch[36]
MonitorElement * meIntegrityMemGain[36]
MonitorElement * meIntegrityGain[36]
std::string prefixME_
MonitorElement * meIntegrityErrorsByLumi
MonitorElement * meIntegrityMemTTId[36]
DQMStore * dqmStore_
edm::InputTag EBDetIdCollection1_
MonitorElement * meIntegrityMemChId[36]
edm::InputTag EcalElectronicsIdCollection6_
edm::InputTag EcalElectronicsIdCollection4_
MonitorElement * meIntegrityTTId[36]
edm::InputTag EBDetIdCollection0_
edm::InputTag EcalElectronicsIdCollection5_
edm::InputTag EcalElectronicsIdCollection3_
edm::InputTag EcalElectronicsIdCollection1_
MonitorElement * meIntegrityDCCSize
MonitorElement * meIntegrityChId[36]
edm::InputTag EcalElectronicsIdCollection2_
EBIntegrityTask::~EBIntegrityTask ( )
virtual

Destructor.

Definition at line 68 of file EBIntegrityTask.cc.

68  {
69 
70 }

Member Function Documentation

void EBIntegrityTask::analyze ( const edm::Event e,
const edm::EventSetup c 
)
protectedvirtual

Analyze.

Implements edm::EDAnalyzer.

Definition at line 327 of file EBIntegrityTask.cc.

References chMemAbscissa, chMemOrdinate, EBDetIdCollection0_, EBDetIdCollection1_, EBDetIdCollection2_, EBDetIdCollection3_, EcalBarrel, EcalElectronicsIdCollection1_, EcalElectronicsIdCollection2_, EcalElectronicsIdCollection3_, EcalElectronicsIdCollection4_, EcalElectronicsIdCollection5_, EcalElectronicsIdCollection6_, MonitorElement::Fill(), edm::Event::getByLabel(), EBDetId::ic(), ievt_, init_, ecalpyutils::ism(), Numbers::iSM(), meIntegrityChId, meIntegrityDCCSize, meIntegrityErrorsByLumi, meIntegrityGain, meIntegrityGainSwitch, meIntegrityMemChId, meIntegrityMemGain, meIntegrityMemTTBlockSize, meIntegrityMemTTId, meIntegrityTTBlockSize, meIntegrityTTId, setup(), and Numbers::subDet().

327  {
328 
329  if ( ! init_ ) this->setup();
330 
331  ievt_++;
332 
333  // fill bin 0 with number of events in the lumi
335 
337 
338  if ( e.getByLabel(EBDetIdCollection0_, ids0) ) {
339 
340  for ( EBDetIdCollection::const_iterator idItr = ids0->begin(); idItr != ids0->end(); ++idItr ) {
341 
342  int ism = Numbers::iSM( *idItr );
343 
344  float xism = ism + 0.5;
345 
347 
348  }
349 
350  } else {
351 
352 // edm::LogWarning("EBIntegrityTask") << EBDetIdCollection0_ << " not available";
353 
354  }
355 
357 
358  if ( e.getByLabel(EBDetIdCollection1_, ids1) ) {
359 
360  for ( EBDetIdCollection::const_iterator idItr = ids1->begin(); idItr != ids1->end(); ++idItr ) {
361 
362  EBDetId id = (*idItr);
363 
364  int ic = id.ic();
365  int ie = (ic-1)/20 + 1;
366  int ip = (ic-1)%20 + 1;
367 
368  int ism = Numbers::iSM( id );
369  float xism = ism + 0.5;
370 
371  float xie = ie - 0.5;
372  float xip = ip - 0.5;
373 
374  if ( meIntegrityGain[ism-1] ) meIntegrityGain[ism-1]->Fill(xie, xip);
375  if ( meIntegrityErrorsByLumi ) meIntegrityErrorsByLumi->Fill(xism, 1./1700.);
376 
377  }
378 
379  } else {
380 
381  edm::LogWarning("EBIntegrityTask") << EBDetIdCollection1_ << " not available";
382 
383  }
384 
386 
387  if ( e.getByLabel(EBDetIdCollection2_, ids2) ) {
388 
389  for ( EBDetIdCollection::const_iterator idItr = ids2->begin(); idItr != ids2->end(); ++idItr ) {
390 
391  EBDetId id = (*idItr);
392 
393  int ic = id.ic();
394  int ie = (ic-1)/20 + 1;
395  int ip = (ic-1)%20 + 1;
396 
397  int ism = Numbers::iSM( id );
398  float xism = ism + 0.5;
399 
400  float xie = ie - 0.5;
401  float xip = ip - 0.5;
402 
403  if ( meIntegrityChId[ism-1] ) meIntegrityChId[ism-1]->Fill(xie, xip);
404  if ( meIntegrityErrorsByLumi ) meIntegrityErrorsByLumi->Fill(xism, 1./1700.);
405 
406  }
407 
408  } else {
409 
410  edm::LogWarning("EBIntegrityTask") << EBDetIdCollection2_ << " not available";
411 
412  }
413 
415 
416  if ( e.getByLabel(EBDetIdCollection3_, ids3) ) {
417 
418  for ( EBDetIdCollection::const_iterator idItr = ids3->begin(); idItr != ids3->end(); ++idItr ) {
419 
420  EBDetId id = (*idItr);
421 
422  int ic = id.ic();
423  int ie = (ic-1)/20 + 1;
424  int ip = (ic-1)%20 + 1;
425 
426  int ism = Numbers::iSM( id );
427  float xism = ism + 0.5;
428 
429  float xie = ie - 0.5;
430  float xip = ip - 0.5;
431 
432  if ( meIntegrityGainSwitch[ism-1] ) meIntegrityGainSwitch[ism-1]->Fill(xie, xip);
433  if ( meIntegrityErrorsByLumi ) meIntegrityErrorsByLumi->Fill(xism, 1./1700.);
434 
435  }
436 
437  } else {
438 
439  edm::LogWarning("EBIntegrityTask") << EBDetIdCollection3_ << " not available";
440 
441  }
442 
444 
445  if ( e.getByLabel(EcalElectronicsIdCollection1_, ids4) ) {
446 
447  for ( EcalElectronicsIdCollection::const_iterator idItr = ids4->begin(); idItr != ids4->end(); ++idItr ) {
448 
449  if ( Numbers::subDet( *idItr ) != EcalBarrel ) continue;
450 
451  int itt = idItr->towerId();
452 
453  int iet = (itt-1)/4 + 1;
454  int ipt = (itt-1)%4 + 1;
455 
456  int ismt = Numbers::iSM( *idItr );
457  float xismt = ismt + 0.5;
458 
459  float xiet = iet - 0.5;
460  float xipt = ipt - 0.5;
461 
462  if ( meIntegrityTTId[ismt-1] ) meIntegrityTTId[ismt-1]->Fill(xiet, xipt);
464 
465  }
466 
467  } else {
468 
469  edm::LogWarning("EBIntegrityTask") << EcalElectronicsIdCollection1_ << " not available";
470 
471  }
472 
474 
475  if ( e.getByLabel(EcalElectronicsIdCollection2_, ids5) ) {
476 
477  for ( EcalElectronicsIdCollection::const_iterator idItr = ids5->begin(); idItr != ids5->end(); ++idItr ) {
478 
479  if ( Numbers::subDet( *idItr ) != EcalBarrel ) continue;
480 
481  int itt = idItr->towerId();
482 
483  int iet = (itt-1)/4 + 1;
484  int ipt = (itt-1)%4 + 1;
485 
486  int ismt = Numbers::iSM( *idItr );
487  float xismt = ismt + 0.5;
488 
489  float xiet = iet - 0.5;
490  float xipt = ipt - 0.5;
491 
492  if ( meIntegrityTTBlockSize[ismt-1] ) meIntegrityTTBlockSize[ismt-1]->Fill(xiet, xipt);
494 
495  }
496 
497  } else {
498 
499  edm::LogWarning("EBIntegrityTask") << EcalElectronicsIdCollection2_ << " not available";
500 
501  }
502 
504 
505  if ( e.getByLabel(EcalElectronicsIdCollection3_, ids6) ) {
506 
507  for ( EcalElectronicsIdCollection::const_iterator idItr = ids6->begin(); idItr != ids6->end(); ++idItr ) {
508 
509  if ( Numbers::subDet( *idItr ) != EcalBarrel ) continue;
510 
511  int ism = Numbers::iSM( *idItr );
512 
513  int itt = idItr->towerId();
514  float iTt = itt + 0.5 - 69;
515 
516  if ( meIntegrityMemTTId[ism-1] ) meIntegrityMemTTId[ism-1]->Fill(iTt,0);
517 
518  }
519 
520  } else {
521 
522  edm::LogWarning("EBIntegrityTask") << EcalElectronicsIdCollection3_ << " not available";
523 
524  }
525 
527 
528  if ( e.getByLabel(EcalElectronicsIdCollection4_, ids7) ) {
529 
530  for ( EcalElectronicsIdCollection::const_iterator idItr = ids7->begin(); idItr != ids7->end(); ++idItr ) {
531 
532  if ( Numbers::subDet( *idItr ) != EcalBarrel ) continue;
533 
534  int ism = Numbers::iSM( *idItr );
535 
536  int itt = idItr->towerId();
537  float iTt = itt + 0.5 - 69;
538 
539  if ( meIntegrityMemTTBlockSize[ism-1] ) meIntegrityMemTTBlockSize[ism-1]->Fill(iTt,0);
540 
541  }
542 
543  } else {
544 
545  edm::LogWarning("EBIntegrityTask") << EcalElectronicsIdCollection4_ << " not available";
546 
547  }
548 
550 
551  if ( e.getByLabel(EcalElectronicsIdCollection5_, ids8) ) {
552 
553  for ( EcalElectronicsIdCollection::const_iterator idItr = ids8->begin(); idItr != ids8->end(); ++idItr ) {
554 
555  if ( Numbers::subDet( *idItr ) != EcalBarrel ) continue;
556 
557  int ism = Numbers::iSM( *idItr );
558 
559  int chid = idItr->channelId();
560  int ie = EBIntegrityTask::chMemAbscissa[chid-1];
561  int ip = EBIntegrityTask::chMemOrdinate[chid-1];
562 
563  int itt = idItr->towerId();
564  ie += (itt-69)*5;
565 
566  float xie = ie - 0.5;
567  float xip = ip - 0.5;
568 
569  if ( meIntegrityMemChId[ism-1] ) meIntegrityMemChId[ism-1]->Fill(xie,xip);
570 
571  }
572 
573  } else {
574 
575  edm::LogWarning("EBIntegrityTask") << EcalElectronicsIdCollection5_ << " not available";
576 
577  }
578 
580 
581  if ( e.getByLabel(EcalElectronicsIdCollection6_, ids9) ) {
582 
583  for ( EcalElectronicsIdCollection::const_iterator idItr = ids9->begin(); idItr != ids9->end(); ++idItr ) {
584 
585  if ( Numbers::subDet( *idItr ) != EcalBarrel ) continue;
586 
587  int ism = Numbers::iSM( *idItr );
588 
589  int chid = idItr->channelId();
590  int ie = EBIntegrityTask::chMemAbscissa[chid-1];
591  int ip = EBIntegrityTask::chMemOrdinate[chid-1];
592 
593  int itt = idItr->towerId();
594  ie += (itt-69)*5;
595 
596  float xie = ie - 0.5;
597  float xip = ip - 0.5;
598 
599  if ( meIntegrityMemGain[ism-1] ) meIntegrityMemGain[ism-1]->Fill(xie,xip);
600 
601  }
602 
603  } else {
604 
605  edm::LogWarning("EBIntegrityTask") << EcalElectronicsIdCollection6_ << " not available";
606 
607  }
608 
609 }// end analyze
MonitorElement * meIntegrityTTBlockSize[36]
MonitorElement * meIntegrityMemTTBlockSize[36]
edm::InputTag EBDetIdCollection2_
edm::InputTag EBDetIdCollection3_
MonitorElement * meIntegrityGainSwitch[36]
MonitorElement * meIntegrityMemGain[36]
static const int chMemAbscissa[25]
void Fill(long long x)
MonitorElement * meIntegrityGain[36]
void setup(void)
Setup.
MonitorElement * meIntegrityErrorsByLumi
static int iSM(const int ism, const EcalSubdetector subdet)
Definition: Numbers.cc:222
MonitorElement * meIntegrityMemTTId[36]
edm::InputTag EBDetIdCollection1_
MonitorElement * meIntegrityMemChId[36]
edm::InputTag EcalElectronicsIdCollection6_
edm::InputTag EcalElectronicsIdCollection4_
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
Definition: Event.h:355
int ic() const
get ECAL/crystal number inside SM
Definition: EBDetId.cc:94
MonitorElement * meIntegrityTTId[36]
edm::InputTag EBDetIdCollection0_
static const int chMemOrdinate[25]
edm::InputTag EcalElectronicsIdCollection5_
edm::InputTag EcalElectronicsIdCollection3_
edm::InputTag EcalElectronicsIdCollection1_
MonitorElement * meIntegrityDCCSize
MonitorElement * meIntegrityChId[36]
static EcalSubdetector subDet(const EBDetId &id)
Definition: Numbers.cc:136
int ism(int ieta, int iphi)
Definition: EcalPyUtils.cc:56
std::vector< T >::const_iterator const_iterator
Definition: EDCollection.h:20
edm::InputTag EcalElectronicsIdCollection2_
void EBIntegrityTask::beginJob ( void  )
protectedvirtual

BeginJob.

Reimplemented from edm::EDAnalyzer.

Definition at line 72 of file EBIntegrityTask.cc.

References dqmStore_, ievt_, prefixME_, DQMStore::rmdir(), and DQMStore::setCurrentFolder().

72  {
73 
74  ievt_ = 0;
75 
76  if ( dqmStore_ ) {
77  dqmStore_->setCurrentFolder(prefixME_ + "/EBIntegrityTask");
78  dqmStore_->rmdir(prefixME_ + "/EBIntegrityTask");
79  }
80 
81 }
void rmdir(const std::string &fullpath)
Definition: DQMStore.cc:2311
std::string prefixME_
DQMStore * dqmStore_
void setCurrentFolder(const std::string &fullpath)
Definition: DQMStore.cc:232
void EBIntegrityTask::beginLuminosityBlock ( const edm::LuminosityBlock lumiBlock,
const edm::EventSetup iSetup 
)
protectedvirtual

BeginLuminosityBlock.

Reimplemented from edm::EDAnalyzer.

Definition at line 83 of file EBIntegrityTask.cc.

References meIntegrityErrorsByLumi, and MonitorElement::Reset().

83  {
84 
86 
87 }
MonitorElement * meIntegrityErrorsByLumi
void Reset(void)
reset ME (ie. contents, errors, etc)
void EBIntegrityTask::beginRun ( const edm::Run r,
const edm::EventSetup c 
)
protectedvirtual

BeginRun.

Reimplemented from edm::EDAnalyzer.

Definition at line 92 of file EBIntegrityTask.cc.

References Numbers::initGeometry(), mergeRuns_, and reset().

92  {
93 
94  Numbers::initGeometry(c, false);
95 
96  if ( ! mergeRuns_ ) this->reset();
97 
98 }
void reset(void)
Reset.
static void initGeometry(const edm::EventSetup &setup, bool verbose=false)
Definition: Numbers.cc:45
void EBIntegrityTask::cleanup ( void  )
protected

Cleanup.

Definition at line 246 of file EBIntegrityTask.cc.

References dqmStore_, edm::getName(), MonitorElement::getName(), i, init_, meIntegrityChId, meIntegrityDCCSize, meIntegrityErrorsByLumi, meIntegrityGain, meIntegrityGainSwitch, meIntegrityMemChId, meIntegrityMemGain, meIntegrityMemTTBlockSize, meIntegrityMemTTId, meIntegrityTTBlockSize, meIntegrityTTId, prefixME_, DQMStore::removeElement(), and DQMStore::setCurrentFolder().

Referenced by endJob().

246  {
247 
248  if ( ! init_ ) return;
249 
250  if ( dqmStore_ ) {
251  dqmStore_->setCurrentFolder(prefixME_ + "/EBIntegrityTask");
252 
254  meIntegrityDCCSize = 0;
255 
258 
259  dqmStore_->setCurrentFolder(prefixME_ + "/EBIntegrityTask/Gain");
260  for (int i = 0; i < 36; i++) {
262  meIntegrityGain[i] = 0;
263  }
264 
265  dqmStore_->setCurrentFolder(prefixME_ + "/EBIntegrityTask/ChId");
266  for (int i = 0; i < 36; i++) {
268  meIntegrityChId[i] = 0;
269  }
270 
271  dqmStore_->setCurrentFolder(prefixME_ + "/EBIntegrityTask/GainSwitch");
272  for (int i = 0; i < 36; i++) {
275  }
276 
277  dqmStore_->setCurrentFolder(prefixME_ + "/EBIntegrityTask/TTId");
278  for (int i = 0; i < 36; i++) {
280  meIntegrityTTId[i] = 0;
281  }
282 
283  dqmStore_->setCurrentFolder(prefixME_ + "/EBIntegrityTask/TTBlockSize");
284  for (int i = 0; i < 36; i++) {
287  }
288 
289  dqmStore_->setCurrentFolder(prefixME_ + "/EBIntegrityTask/MemChId");
290  for (int i = 0; i < 36; i++) {
292  meIntegrityMemChId[i] = 0;
293  }
294 
295  dqmStore_->setCurrentFolder(prefixME_ + "/EBIntegrityTask/MemGain");
296  for (int i = 0; i < 36; i++) {
298  meIntegrityMemGain[i] = 0;
299  }
300 
301  dqmStore_->setCurrentFolder(prefixME_ + "/EBIntegrityTask/MemTTId");
302  for (int i = 0; i < 36; i++) {
304  meIntegrityMemTTId[i] = 0;
305  }
306 
307  dqmStore_->setCurrentFolder(prefixME_ + "/EBIntegrityTask/MemSize");
308  for (int i = 0; i < 36; i++) {
311  }
312 
313  }
314 
315  init_ = false;
316 
317 }
const std::string & getName(void) const
get name of ME
int i
Definition: DBlmapReader.cc:9
MonitorElement * meIntegrityTTBlockSize[36]
MonitorElement * meIntegrityMemTTBlockSize[36]
MonitorElement * meIntegrityGainSwitch[36]
MonitorElement * meIntegrityMemGain[36]
MonitorElement * meIntegrityGain[36]
std::string prefixME_
MonitorElement * meIntegrityErrorsByLumi
MonitorElement * meIntegrityMemTTId[36]
void removeElement(const std::string &name)
Definition: DQMStore.cc:2353
DQMStore * dqmStore_
MonitorElement * meIntegrityMemChId[36]
std::string getName(Reflex::Type &cc)
Definition: ClassFiller.cc:18
MonitorElement * meIntegrityTTId[36]
MonitorElement * meIntegrityDCCSize
MonitorElement * meIntegrityChId[36]
void setCurrentFolder(const std::string &fullpath)
Definition: DQMStore.cc:232
void EBIntegrityTask::endJob ( void  )
protectedvirtual

EndJob.

Reimplemented from edm::EDAnalyzer.

Definition at line 319 of file EBIntegrityTask.cc.

References cleanup(), enableCleanup_, and ievt_.

319  {
320 
321  edm::LogInfo("EBIntegrityTask") << "analyzed " << ievt_ << " events";
322 
323  if ( enableCleanup_ ) this->cleanup();
324 
325 }
void cleanup(void)
Cleanup.
void EBIntegrityTask::endLuminosityBlock ( const edm::LuminosityBlock lumiBlock,
const edm::EventSetup iSetup 
)
protectedvirtual

EndLuminosityBlock.

Reimplemented from edm::EDAnalyzer.

Definition at line 89 of file EBIntegrityTask.cc.

89  {
90 }
void EBIntegrityTask::endRun ( const edm::Run r,
const edm::EventSetup c 
)
protectedvirtual

EndRun.

Reimplemented from edm::EDAnalyzer.

Definition at line 100 of file EBIntegrityTask.cc.

100  {
101 
102 }
void EBIntegrityTask::reset ( void  )
protected

Reset.

Definition at line 104 of file EBIntegrityTask.cc.

References i, meIntegrityChId, meIntegrityDCCSize, meIntegrityErrorsByLumi, meIntegrityGain, meIntegrityGainSwitch, meIntegrityMemChId, meIntegrityMemGain, meIntegrityMemTTBlockSize, meIntegrityMemTTId, meIntegrityTTBlockSize, meIntegrityTTId, and MonitorElement::Reset().

Referenced by beginRun().

104  {
105 
107  for (int i = 0; i < 36; i++) {
109  if ( meIntegrityChId[i] ) meIntegrityChId[i]->Reset();
111  if ( meIntegrityTTId[i] ) meIntegrityTTId[i]->Reset();
117  }
119 
120 }
int i
Definition: DBlmapReader.cc:9
MonitorElement * meIntegrityTTBlockSize[36]
MonitorElement * meIntegrityMemTTBlockSize[36]
MonitorElement * meIntegrityGainSwitch[36]
MonitorElement * meIntegrityMemGain[36]
MonitorElement * meIntegrityGain[36]
MonitorElement * meIntegrityErrorsByLumi
MonitorElement * meIntegrityMemTTId[36]
MonitorElement * meIntegrityMemChId[36]
MonitorElement * meIntegrityTTId[36]
MonitorElement * meIntegrityDCCSize
MonitorElement * meIntegrityChId[36]
void Reset(void)
reset ME (ie. contents, errors, etc)
void EBIntegrityTask::setup ( void  )
protected

Setup.

Definition at line 122 of file EBIntegrityTask.cc.

References DQMStore::book1D(), DQMStore::book2D(), dqmStore_, i, init_, meIntegrityChId, meIntegrityDCCSize, meIntegrityErrorsByLumi, meIntegrityGain, meIntegrityGainSwitch, meIntegrityMemChId, meIntegrityMemGain, meIntegrityMemTTBlockSize, meIntegrityMemTTId, meIntegrityTTBlockSize, meIntegrityTTId, mergeVDriftHistosByStation::name, prefixME_, Numbers::sEB(), MonitorElement::setAxisTitle(), MonitorElement::setBinLabel(), DQMStore::setCurrentFolder(), MonitorElement::setLumiFlag(), and DQMStore::tag().

Referenced by analyze().

122  {
123 
124  init_ = true;
125 
126  std::string name;
127 
128  if ( dqmStore_ ) {
129  dqmStore_->setCurrentFolder(prefixME_ + "/EBIntegrityTask");
130 
131  // checking when number of towers in data different than expected from header
132  name = "EBIT DCC size error";
133  meIntegrityDCCSize = dqmStore_->book1D(name, name, 36, 1., 37.);
134  for (int i = 0; i < 36; i++) {
136  }
137 
138  // checking the number of integrity errors in each DCC for each lumi
139  // crystal integrity error is weighted by 1/1700
140  // tower integrity error is weighted by 1/68
141  // bin 0 contains the number of processed events in the lumi (for normalization)
142  name = "EBIT weighted integrity errors by lumi";
143  meIntegrityErrorsByLumi = dqmStore_->book1D(name, name, 36, 1., 37.);
145  for (int i = 0; i < 36; i++) {
147  }
148 
149  // checking when the gain is 0
150  dqmStore_->setCurrentFolder(prefixME_ + "/EBIntegrityTask/Gain");
151  for (int i = 0; i < 36; i++) {
152  name = "EBIT gain " + Numbers::sEB(i+1);
153  meIntegrityGain[i] = dqmStore_->book2D(name, name, 85, 0., 85., 20, 0., 20.);
154  meIntegrityGain[i]->setAxisTitle("ieta", 1);
155  meIntegrityGain[i]->setAxisTitle("iphi", 2);
156  dqmStore_->tag(meIntegrityGain[i], i+1);
157  }
158 
159  // checking when channel has unexpected or invalid ID
160  dqmStore_->setCurrentFolder(prefixME_ + "/EBIntegrityTask/ChId");
161  for (int i = 0; i < 36; i++) {
162  name = "EBIT ChId " + Numbers::sEB(i+1);
163  meIntegrityChId[i] = dqmStore_->book2D(name, name, 85, 0., 85., 20, 0., 20.);
164  meIntegrityChId[i]->setAxisTitle("ieta", 1);
165  meIntegrityChId[i]->setAxisTitle("iphi", 2);
166  dqmStore_->tag(meIntegrityChId[i], i+1);
167  }
168 
169  // checking when channel has unexpected or invalid ID
170  dqmStore_->setCurrentFolder(prefixME_ + "/EBIntegrityTask/GainSwitch");
171  for (int i = 0; i < 36; i++) {
172  name = "EBIT gain switch " + Numbers::sEB(i+1);
173  meIntegrityGainSwitch[i] = dqmStore_->book2D(name, name, 85, 0., 85., 20, 0., 20.);
174  meIntegrityGainSwitch[i]->setAxisTitle("ieta", 1);
175  meIntegrityGainSwitch[i]->setAxisTitle("iphi", 2);
177  }
178 
179  // checking when trigger tower has unexpected or invalid ID
180  dqmStore_->setCurrentFolder(prefixME_ + "/EBIntegrityTask/TTId");
181  for (int i = 0; i < 36; i++) {
182  name = "EBIT TTId " + Numbers::sEB(i+1);
183  meIntegrityTTId[i] = dqmStore_->book2D(name, name, 17, 0., 17., 4, 0., 4.);
184  meIntegrityTTId[i]->setAxisTitle("ieta'", 1);
185  meIntegrityTTId[i]->setAxisTitle("iphi'", 2);
186  dqmStore_->tag(meIntegrityTTId[i], i+1);
187  }
188 
189  // checking when trigger tower has unexpected or invalid size
190  dqmStore_->setCurrentFolder(prefixME_ + "/EBIntegrityTask/TTBlockSize");
191  for (int i = 0; i < 36; i++) {
192  name = "EBIT TTBlockSize " + Numbers::sEB(i+1);
193  meIntegrityTTBlockSize[i] = dqmStore_->book2D(name, name, 17, 0., 17., 4, 0., 4.);
194  meIntegrityTTBlockSize[i]->setAxisTitle("ieta'", 1);
195  meIntegrityTTBlockSize[i]->setAxisTitle("iphi'", 2);
197  }
198 
199  // checking when mem channels have unexpected ID
200  dqmStore_->setCurrentFolder(prefixME_ + "/EBIntegrityTask/MemChId");
201  for (int i = 0; i < 36; i++) {
202  name = "EBIT MemChId " + Numbers::sEB(i+1);
203  meIntegrityMemChId[i] = dqmStore_->book2D(name, name, 10, 0., 10., 5, 0., 5.);
204  meIntegrityMemChId[i]->setAxisTitle("pseudo-strip", 1);
205  meIntegrityMemChId[i]->setAxisTitle("channel", 2);
207  }
208 
209  // checking when mem samples have second bit encoding the gain different from 0
210  // note: strictly speaking, this does not corrupt the mem sample gain value (since only first bit is considered)
211  // but indicates that data are not completely correct
212  dqmStore_->setCurrentFolder(prefixME_ + "/EBIntegrityTask/MemGain");
213  for (int i = 0; i < 36; i++) {
214  name = "EBIT MemGain " + Numbers::sEB(i+1);
215  meIntegrityMemGain[i] = dqmStore_->book2D(name, name, 10, 0., 10., 5, 0., 5.);
216  meIntegrityMemGain[i]->setAxisTitle("pseudo-strip", 1);
217  meIntegrityMemGain[i]->setAxisTitle("channel", 2);
219  }
220 
221  // checking when mem tower block has unexpected ID
222  dqmStore_->setCurrentFolder(prefixME_ + "/EBIntegrityTask/MemTTId");
223  for (int i = 0; i < 36; i++) {
224  name = "EBIT MemTTId " + Numbers::sEB(i+1);
225  meIntegrityMemTTId[i] = dqmStore_->book2D(name, name, 2, 0., 2., 1, 0., 1.);
226  meIntegrityMemTTId[i]->setAxisTitle("pseudo-strip", 1);
227  meIntegrityMemTTId[i]->setAxisTitle("channel", 2);
229  }
230 
231  // checking when mem tower block has invalid size
232  dqmStore_->setCurrentFolder(prefixME_ + "/EBIntegrityTask/MemSize");
233  for (int i = 0; i < 36; i++) {
234  name = "EBIT MemSize " + Numbers::sEB(i+1);
235  meIntegrityMemTTBlockSize[i] = dqmStore_->book2D(name, name, 2, 0., 2., 1, 0., 1.);
236  meIntegrityMemTTBlockSize[i]->setAxisTitle("pseudo-strip", 1);
237  meIntegrityMemTTBlockSize[i]->setAxisTitle("pseudo-strip", 1);
238  meIntegrityMemTTBlockSize[i]->setAxisTitle("channel", 2);
240  }
241 
242  }
243 
244 }
int i
Definition: DBlmapReader.cc:9
static std::string sEB(const int ism)
Definition: Numbers.cc:87
MonitorElement * meIntegrityTTBlockSize[36]
MonitorElement * meIntegrityMemTTBlockSize[36]
MonitorElement * book1D(const char *name, const char *title, int nchX, double lowX, double highX)
Book 1D histogram.
Definition: DQMStore.cc:514
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)
MonitorElement * meIntegrityGainSwitch[36]
MonitorElement * meIntegrityMemGain[36]
void tag(MonitorElement *me, unsigned int myTag)
Definition: DQMStore.cc:1151
MonitorElement * meIntegrityGain[36]
std::string prefixME_
MonitorElement * meIntegrityErrorsByLumi
MonitorElement * meIntegrityMemTTId[36]
DQMStore * dqmStore_
MonitorElement * meIntegrityMemChId[36]
MonitorElement * meIntegrityTTId[36]
MonitorElement * meIntegrityDCCSize
MonitorElement * meIntegrityChId[36]
void setLumiFlag(void)
this ME is meant to be stored for each luminosity section
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
void setAxisTitle(const std::string &title, int axis=1)
set x-, y- or z-axis title (axis=1, 2, 3 respectively)
void setCurrentFolder(const std::string &fullpath)
Definition: DQMStore.cc:232

Member Data Documentation

const int EBIntegrityTask::chMemAbscissa
staticprivate
Initial value:
= {
1, 1, 1, 1, 1,
2, 2, 2, 2, 2,
3, 3, 3, 3, 3,
4, 4, 4, 4, 4,
5, 5, 5, 5, 5
}

Definition at line 101 of file EBIntegrityTask.h.

Referenced by analyze().

const int EBIntegrityTask::chMemOrdinate
staticprivate
Initial value:
= {
1, 2, 3, 4, 5,
5, 4, 3, 2, 1,
1, 2, 3, 4, 5,
5, 4, 3, 2, 1,
1, 2, 3, 4, 5
}

Definition at line 102 of file EBIntegrityTask.h.

Referenced by analyze().

DQMStore* EBIntegrityTask::dqmStore_
private

Definition at line 67 of file EBIntegrityTask.h.

Referenced by beginJob(), cleanup(), EBIntegrityTask(), and setup().

edm::InputTag EBIntegrityTask::EBDetIdCollection0_
private

Definition at line 75 of file EBIntegrityTask.h.

Referenced by analyze(), and EBIntegrityTask().

edm::InputTag EBIntegrityTask::EBDetIdCollection1_
private

Definition at line 76 of file EBIntegrityTask.h.

Referenced by analyze(), and EBIntegrityTask().

edm::InputTag EBIntegrityTask::EBDetIdCollection2_
private

Definition at line 77 of file EBIntegrityTask.h.

Referenced by analyze(), and EBIntegrityTask().

edm::InputTag EBIntegrityTask::EBDetIdCollection3_
private

Definition at line 78 of file EBIntegrityTask.h.

Referenced by analyze(), and EBIntegrityTask().

edm::InputTag EBIntegrityTask::EBDetIdCollection4_
private

Definition at line 79 of file EBIntegrityTask.h.

edm::InputTag EBIntegrityTask::EcalElectronicsIdCollection1_
private

Definition at line 80 of file EBIntegrityTask.h.

Referenced by analyze(), and EBIntegrityTask().

edm::InputTag EBIntegrityTask::EcalElectronicsIdCollection2_
private

Definition at line 81 of file EBIntegrityTask.h.

Referenced by analyze(), and EBIntegrityTask().

edm::InputTag EBIntegrityTask::EcalElectronicsIdCollection3_
private

Definition at line 82 of file EBIntegrityTask.h.

Referenced by analyze(), and EBIntegrityTask().

edm::InputTag EBIntegrityTask::EcalElectronicsIdCollection4_
private

Definition at line 83 of file EBIntegrityTask.h.

Referenced by analyze(), and EBIntegrityTask().

edm::InputTag EBIntegrityTask::EcalElectronicsIdCollection5_
private

Definition at line 84 of file EBIntegrityTask.h.

Referenced by analyze(), and EBIntegrityTask().

edm::InputTag EBIntegrityTask::EcalElectronicsIdCollection6_
private

Definition at line 85 of file EBIntegrityTask.h.

Referenced by analyze(), and EBIntegrityTask().

bool EBIntegrityTask::enableCleanup_
private

Definition at line 71 of file EBIntegrityTask.h.

Referenced by EBIntegrityTask(), and endJob().

int EBIntegrityTask::ievt_
private

Definition at line 65 of file EBIntegrityTask.h.

Referenced by analyze(), beginJob(), and endJob().

bool EBIntegrityTask::init_
private

Definition at line 99 of file EBIntegrityTask.h.

Referenced by analyze(), cleanup(), EBIntegrityTask(), and setup().

MonitorElement* EBIntegrityTask::meIntegrityChId[36]
private

Definition at line 87 of file EBIntegrityTask.h.

Referenced by analyze(), cleanup(), EBIntegrityTask(), reset(), and setup().

MonitorElement* EBIntegrityTask::meIntegrityDCCSize
private

Definition at line 96 of file EBIntegrityTask.h.

Referenced by analyze(), cleanup(), EBIntegrityTask(), reset(), and setup().

MonitorElement* EBIntegrityTask::meIntegrityErrorsByLumi
private

Definition at line 97 of file EBIntegrityTask.h.

Referenced by analyze(), beginLuminosityBlock(), cleanup(), EBIntegrityTask(), reset(), and setup().

MonitorElement* EBIntegrityTask::meIntegrityGain[36]
private

Definition at line 88 of file EBIntegrityTask.h.

Referenced by analyze(), cleanup(), EBIntegrityTask(), reset(), and setup().

MonitorElement* EBIntegrityTask::meIntegrityGainSwitch[36]
private

Definition at line 89 of file EBIntegrityTask.h.

Referenced by analyze(), cleanup(), EBIntegrityTask(), reset(), and setup().

MonitorElement* EBIntegrityTask::meIntegrityMemChId[36]
private

Definition at line 92 of file EBIntegrityTask.h.

Referenced by analyze(), cleanup(), EBIntegrityTask(), reset(), and setup().

MonitorElement* EBIntegrityTask::meIntegrityMemGain[36]
private

Definition at line 93 of file EBIntegrityTask.h.

Referenced by analyze(), cleanup(), EBIntegrityTask(), reset(), and setup().

MonitorElement* EBIntegrityTask::meIntegrityMemTTBlockSize[36]
private

Definition at line 95 of file EBIntegrityTask.h.

Referenced by analyze(), cleanup(), EBIntegrityTask(), reset(), and setup().

MonitorElement* EBIntegrityTask::meIntegrityMemTTId[36]
private

Definition at line 94 of file EBIntegrityTask.h.

Referenced by analyze(), cleanup(), EBIntegrityTask(), reset(), and setup().

MonitorElement* EBIntegrityTask::meIntegrityTTBlockSize[36]
private

Definition at line 91 of file EBIntegrityTask.h.

Referenced by analyze(), cleanup(), EBIntegrityTask(), reset(), and setup().

MonitorElement* EBIntegrityTask::meIntegrityTTId[36]
private

Definition at line 90 of file EBIntegrityTask.h.

Referenced by analyze(), cleanup(), EBIntegrityTask(), reset(), and setup().

bool EBIntegrityTask::mergeRuns_
private

Definition at line 73 of file EBIntegrityTask.h.

Referenced by beginRun(), and EBIntegrityTask().

std::string EBIntegrityTask::prefixME_
private

Definition at line 69 of file EBIntegrityTask.h.

Referenced by beginJob(), cleanup(), EBIntegrityTask(), and setup().