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
EELedTask Class Reference

#include <EELedTask.h>

Inheritance diagram for EELedTask:
edm::EDAnalyzer edm::EDConsumerBase

Public Member Functions

 EELedTask (const edm::ParameterSet &ps)
 Constructor. More...
 
virtual ~EELedTask ()
 Destructor. More...
 
- Public Member Functions inherited from edm::EDAnalyzer
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
 EDAnalyzer ()
 
ModuleDescription const & moduleDescription () const
 
std::string workerType () const
 
virtual ~EDAnalyzer ()
 
- Public Member Functions inherited from edm::EDConsumerBase
 EDConsumerBase ()
 
ProductHolderIndexAndSkipBit indexFrom (EDGetToken, BranchType, TypeID const &) const
 
void itemsMayGet (BranchType, std::vector< ProductHolderIndexAndSkipBit > &) const
 
void itemsToGet (BranchType, std::vector< ProductHolderIndexAndSkipBit > &) const
 
std::vector
< ProductHolderIndexAndSkipBit >
const & 
itemsToGetFromEvent () const
 
void labelsForToken (EDGetToken iToken, Labels &oLabels) const
 
bool registeredToConsume (ProductHolderIndex, bool, BranchType) const
 
bool registeredToConsumeMany (TypeID const &, BranchType) const
 
void updateLookup (BranchType iBranchType, ProductHolderIndexHelper const &)
 
virtual ~EDConsumerBase ()
 

Protected Member Functions

void analyze (const edm::Event &e, const edm::EventSetup &c)
 Analyze. More...
 
void beginJob (void)
 BeginJob. More...
 
void beginRun (const edm::Run &r, const edm::EventSetup &c)
 BeginRun. More...
 
void cleanup (void)
 Cleanup. More...
 
void endJob (void)
 EndJob. 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::EDConsumerBase
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > consumes (edm::InputTag const &tag)
 
EDGetToken consumes (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken consumes (TypeToGet const &id, edm::InputTag const &tag)
 
ConsumesCollector consumesCollector ()
 Use a ConsumesCollector to gather consumes information from helper functions. More...
 
template<typename ProductType , BranchType B = InEvent>
void consumesMany ()
 
void consumesMany (const TypeToGet &id)
 
template<BranchType B>
void consumesMany (const TypeToGet &id)
 
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > mayConsume (edm::InputTag const &tag)
 
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 

Private Attributes

DQMStoredqmStore_
 
edm::EDGetTokenT
< EcalPnDiodeDigiCollection
EcalPnDiodeDigiCollection_
 
edm::EDGetTokenT
< EcalRawDataCollection
EcalRawDataCollection_
 
edm::EDGetTokenT
< EcalUncalibratedRecHitCollection
EcalUncalibratedRecHitCollection_
 
edm::EDGetTokenT
< EEDigiCollection
EEDigiCollection_
 
bool enableCleanup_
 
int ievt_
 
bool init_
 
std::vector< int > ledWavelengths_
 
MonitorElementmeAmplMapL1_ [18]
 
MonitorElementmeAmplMapL2_ [18]
 
MonitorElementmeAmplPNMapL1_ [18]
 
MonitorElementmeAmplPNMapL2_ [18]
 
MonitorElementmePnAmplMapG01L1_ [18]
 
MonitorElementmePnAmplMapG01L2_ [18]
 
MonitorElementmePnAmplMapG16L1_ [18]
 
MonitorElementmePnAmplMapG16L2_ [18]
 
MonitorElementmePnPedMapG01L1_ [18]
 
MonitorElementmePnPedMapG01L2_ [18]
 
MonitorElementmePnPedMapG16L1_ [18]
 
MonitorElementmePnPedMapG16L2_ [18]
 
bool mergeRuns_
 
MonitorElementmeShapeMapL1_ [18]
 
MonitorElementmeShapeMapL2_ [18]
 
MonitorElementmeTimeMapL1_ [18]
 
MonitorElementmeTimeMapL2_ [18]
 
std::string prefixME_
 

Additional Inherited Members

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

Detailed Description

Definition at line 22 of file EELedTask.h.

Constructor & Destructor Documentation

EELedTask::EELedTask ( const edm::ParameterSet ps)

Constructor.

Definition at line 31 of file EELedTask.cc.

References dqmStore_, EcalPnDiodeDigiCollection_, EcalRawDataCollection_, EcalUncalibratedRecHitCollection_, EEDigiCollection_, enableCleanup_, edm::ParameterSet::getParameter(), edm::ParameterSet::getUntrackedParameter(), i, init_, ledWavelengths_, meAmplMapL1_, meAmplMapL2_, meAmplPNMapL1_, meAmplPNMapL2_, mePnAmplMapG01L1_, mePnAmplMapG01L2_, mePnAmplMapG16L1_, mePnAmplMapG16L2_, mePnPedMapG01L1_, mePnPedMapG01L2_, mePnPedMapG16L1_, mePnPedMapG16L2_, mergeRuns_, meShapeMapL1_, meShapeMapL2_, meTimeMapL1_, meTimeMapL2_, cppFunctionSkipper::operator, prefixME_, and AlCaHLTBitMon_QueryRunRegistry::string.

31  {
32 
33  init_ = false;
34 
36 
37  prefixME_ = ps.getUntrackedParameter<std::string>("prefixME", "");
38 
39  enableCleanup_ = ps.getUntrackedParameter<bool>("enableCleanup", false);
40 
41  mergeRuns_ = ps.getUntrackedParameter<bool>("mergeRuns", false);
42 
43  EcalRawDataCollection_ = consumes<EcalRawDataCollection>(ps.getParameter<edm::InputTag>("EcalRawDataCollection"));
44  EEDigiCollection_ = consumes<EEDigiCollection>(ps.getParameter<edm::InputTag>("EEDigiCollection"));
45  EcalPnDiodeDigiCollection_ = consumes<EcalPnDiodeDigiCollection>(ps.getParameter<edm::InputTag>("EcalPnDiodeDigiCollection"));
46  EcalUncalibratedRecHitCollection_ = consumes<EcalUncalibratedRecHitCollection>(ps.getParameter<edm::InputTag>("EcalUncalibratedRecHitCollection"));
47 
48  // vector of enabled wavelengths (Default to all 2)
49  ledWavelengths_.reserve(2);
50  for ( unsigned int i = 1; i <= 2; i++ ) ledWavelengths_.push_back(i);
51  ledWavelengths_ = ps.getUntrackedParameter<std::vector<int> >("ledWavelengths", ledWavelengths_);
52 
53  for (int i = 0; i < 18; i++) {
54  meShapeMapL1_[i] = 0;
55  meAmplMapL1_[i] = 0;
56  meTimeMapL1_[i] = 0;
57  meAmplPNMapL1_[i] = 0;
58  mePnAmplMapG01L1_[i] = 0;
59  mePnPedMapG01L1_[i] = 0;
60  mePnAmplMapG16L1_[i] = 0;
61  mePnPedMapG16L1_[i] = 0;
62 
63  meShapeMapL2_[i] = 0;
64  meAmplMapL2_[i] = 0;
65  meTimeMapL2_[i] = 0;
66  meAmplPNMapL2_[i] = 0;
67  mePnAmplMapG01L2_[i] = 0;
68  mePnPedMapG01L2_[i] = 0;
69  mePnAmplMapG16L2_[i] = 0;
70  mePnPedMapG16L2_[i] = 0;
71  }
72 
73 }
T getParameter(std::string const &) const
edm::EDGetTokenT< EcalUncalibratedRecHitCollection > EcalUncalibratedRecHitCollection_
Definition: EELedTask.h:73
T getUntrackedParameter(std::string const &, T const &) const
int i
Definition: DBlmapReader.cc:9
MonitorElement * mePnPedMapG01L2_[18]
Definition: EELedTask.h:90
MonitorElement * meAmplPNMapL2_[18]
Definition: EELedTask.h:88
MonitorElement * mePnAmplMapG01L2_[18]
Definition: EELedTask.h:89
edm::EDGetTokenT< EcalRawDataCollection > EcalRawDataCollection_
Definition: EELedTask.h:70
MonitorElement * meAmplPNMapL1_[18]
Definition: EELedTask.h:79
edm::EDGetTokenT< EEDigiCollection > EEDigiCollection_
Definition: EELedTask.h:71
bool mergeRuns_
Definition: EELedTask.h:68
MonitorElement * mePnPedMapG01L1_[18]
Definition: EELedTask.h:81
MonitorElement * meTimeMapL1_[18]
Definition: EELedTask.h:78
edm::EDGetTokenT< EcalPnDiodeDigiCollection > EcalPnDiodeDigiCollection_
Definition: EELedTask.h:72
std::vector< int > ledWavelengths_
Definition: EELedTask.h:74
MonitorElement * meAmplMapL1_[18]
Definition: EELedTask.h:77
MonitorElement * meShapeMapL1_[18]
Definition: EELedTask.h:76
MonitorElement * mePnAmplMapG16L1_[18]
Definition: EELedTask.h:82
MonitorElement * meTimeMapL2_[18]
Definition: EELedTask.h:87
std::string prefixME_
Definition: EELedTask.h:64
MonitorElement * meShapeMapL2_[18]
Definition: EELedTask.h:85
MonitorElement * mePnPedMapG16L2_[18]
Definition: EELedTask.h:92
MonitorElement * meAmplMapL2_[18]
Definition: EELedTask.h:86
bool init_
Definition: EELedTask.h:94
MonitorElement * mePnAmplMapG01L1_[18]
Definition: EELedTask.h:80
bool enableCleanup_
Definition: EELedTask.h:66
DQMStore * dqmStore_
Definition: EELedTask.h:62
MonitorElement * mePnPedMapG16L1_[18]
Definition: EELedTask.h:83
MonitorElement * mePnAmplMapG16L2_[18]
Definition: EELedTask.h:91
EELedTask::~EELedTask ( )
virtual

Destructor.

Definition at line 75 of file EELedTask.cc.

75  {
76 
77 }

Member Function Documentation

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

Analyze.

Implements edm::EDAnalyzer.

Definition at line 395 of file EELedTask.cc.

References ecalMGPA::adc(), EcalMGPASample::adc(), EcalEndcap, EcalPnDiodeDigiCollection_, EcalRawDataCollection_, EcalUncalibratedRecHitCollection_, EEDigiCollection_, MonitorElement::Fill(), edm::Event::getByToken(), Numbers::getElectronicsMapping(), NumbersPn::getPNs(), i, Numbers::icEE(), ievt_, init_, NumbersPn::ipnEE(), ecalpyutils::ism(), Numbers::iSM(), EEDetId::ix(), EcalDCCHeaderBlock::LED_GAP, EcalDCCHeaderBlock::LED_STD, LogDebug, max(), meAmplMapL1_, meAmplMapL2_, meAmplPNMapL1_, meAmplPNMapL2_, mePnAmplMapG01L1_, mePnAmplMapG01L2_, mePnAmplMapG16L1_, mePnAmplMapG16L2_, mePnPedMapG01L1_, mePnPedMapG01L2_, mePnPedMapG16L1_, mePnPedMapG16L2_, meShapeMapL1_, meShapeMapL2_, meTimeMapL1_, meTimeMapL2_, bookConverter::min, pileupDistInMC::num, Numbers::RtHalf(), environment_file_cff::runType, EcalDataFrame::sample(), setup(), Numbers::subDet(), dtDQMClient_cfg::threshold, and EcalElectronicsId::towerId().

395  {
396 
397  bool enable = false;
398  int runType[18];
399  for (int i=0; i<18; i++) runType[i] = -1;
400  unsigned rtHalf[18];
401  for (int i=0; i<18; i++) rtHalf[i] = -1;
402  int waveLength[18];
403  for (int i=0; i<18; i++) waveLength[i] = -1;
404 
406 
407  if ( e.getByToken(EcalRawDataCollection_, dcchs) ) {
408 
409  for ( EcalRawDataCollection::const_iterator dcchItr = dcchs->begin(); dcchItr != dcchs->end(); ++dcchItr ) {
410 
411  if ( Numbers::subDet( *dcchItr ) != EcalEndcap ) continue;
412 
413  int ism = Numbers::iSM( *dcchItr, EcalEndcap );
414 
415  runType[ism-1] = dcchItr->getRunType();
416  rtHalf[ism-1] = dcchItr->getRtHalf();
417  waveLength[ism-1] = dcchItr->getEventSettings().wavelength;
418 
419  if ( dcchItr->getRunType() == EcalDCCHeaderBlock::LED_STD ||
420  dcchItr->getRunType() == EcalDCCHeaderBlock::LED_GAP ) enable = true;
421 
422  }
423 
424  } else {
425 
426  edm::LogWarning("EELedTask") << "EcalRawDataCollection not available";
427 
428  }
429 
430  if ( ! enable ) return;
431 
432  if ( ! init_ ) this->setup();
433 
434  ievt_++;
435 
436  bool numPN[80];
437  float adcPN[80];
438  for ( int i = 0; i < 80; i++ ) {
439  numPN[i] = false;
440  adcPN[i] = 0.;
441  }
442 
443  std::vector<int> PNs;
444  PNs.reserve(12);
445 
447 
448  if ( e.getByToken(EEDigiCollection_, digis) ) {
449 
450  int maxpos[10];
451  for(int i(0); i < 10; i++)
452  maxpos[i] = 0;
453  int nReadouts(0);
454 
455  for ( EEDigiCollection::const_iterator digiItr = digis->begin(); digiItr != digis->end(); ++digiItr ) {
456 
457  EEDetId id = digiItr->id();
458 
459  int ism = Numbers::iSM( id );
460 
461  if ( ! ( runType[ism-1] == EcalDCCHeaderBlock::LED_STD ||
462  runType[ism-1] == EcalDCCHeaderBlock::LED_GAP ) ) continue;
463 
464  if ( rtHalf[ism-1] != Numbers::RtHalf(id) ) continue;
465 
466  nReadouts++;
467 
468  EEDataFrame dataframe = (*digiItr);
469 
470  int iMax(-1);
471  float max(0.);
472  float min(4096.);
473  for (int i = 0; i < 10; i++) {
474  int adc = dataframe.sample(i).adc();
475  if(adc > max){
476  max = adc;
477  iMax = i;
478  }
479  if(adc < min)
480  min = adc;
481  }
482  if(iMax >= 0 && max - min > 20.)
483  maxpos[iMax] += 1;
484 
485  }
486 
487  int threshold(nReadouts / 2);
488  enable = false;
489  for(int i(0); i < 10; i++){
490  if(maxpos[i] > threshold){
491  enable = true;
492  break;
493  }
494  }
495 
496  if(!enable) return;
497 
498  int need = digis->size();
499  LogDebug("EELedTask") << "event " << ievt_ << " digi collection size " << need;
500 
501  for ( EEDigiCollection::const_iterator digiItr = digis->begin(); digiItr != digis->end(); ++digiItr ) {
502 
503  EEDetId id = digiItr->id();
504 
505  int ix = id.ix();
506  int iy = id.iy();
507 
508  int ism = Numbers::iSM( id );
509 
510  if ( ! ( runType[ism-1] == EcalDCCHeaderBlock::LED_STD ||
511  runType[ism-1] == EcalDCCHeaderBlock::LED_GAP ) ) continue;
512 
513  if ( runType[ism-1] == EcalDCCHeaderBlock::LED_GAP &&
514  rtHalf[ism-1] != Numbers::RtHalf(id) ) continue;
515 
516  int ic = Numbers::icEE(ism, ix, iy);
517 
518  EEDataFrame dataframe = (*digiItr);
519 
520  for (int i = 0; i < 10; i++) {
521 
522  int adc = dataframe.sample(i).adc();
523 
524  MonitorElement* meShapeMap = 0;
525 
526  if ( Numbers::RtHalf(id) == 0 || Numbers::RtHalf(id) == 1 ) {
527 
528  if ( waveLength[ism-1] == 0 ) meShapeMap = meShapeMapL1_[ism-1];
529  if ( waveLength[ism-1] == 2 ) meShapeMap = meShapeMapL2_[ism-1];
530 
531  } else {
532 
533  edm::LogWarning("EELedTask") << " RtHalf = " << Numbers::RtHalf(id);
534 
535  }
536 
537  float xval = float(adc);
538 
539  if ( meShapeMap ) meShapeMap->Fill(ic - 0.5, i + 0.5, xval);
540 
541  }
542 
543  NumbersPn::getPNs( ism, ix, iy, PNs );
544 
545  for (unsigned int i=0; i<PNs.size(); i++) {
546  int ipn = PNs[i];
547  if ( ipn >= 0 && ipn < 80 ) numPN[ipn] = true;
548  }
549 
550  }
551 
552  } else {
553 
554  edm::LogWarning("EELedTask") << "EEDigiCollection not available";
555 
556  }
557 
559 
560  if ( e.getByToken(EcalPnDiodeDigiCollection_, pns) ) {
561 
562  int nep = pns->size();
563  LogDebug("EELedTask") << "event " << ievt_ << " pns collection size " << nep;
564 
565  for ( EcalPnDiodeDigiCollection::const_iterator pnItr = pns->begin(); pnItr != pns->end(); ++pnItr ) {
566 
567  if ( Numbers::subDet( pnItr->id() ) != EcalEndcap ) continue;
568 
569  int ism = Numbers::iSM( pnItr->id() );
570 
571  int num = pnItr->id().iPnId();
572 
573  if ( ! ( runType[ism-1] == EcalDCCHeaderBlock::LED_STD ||
574  runType[ism-1] == EcalDCCHeaderBlock::LED_GAP ) ) continue;
575 
576  int ipn = NumbersPn::ipnEE( ism, num );
577 
578  if ( ipn >= 0 && ipn < 80 && numPN[ipn] == false ) continue;
579 
580  float xvalped = 0.;
581 
582  for (int i = 0; i < 4; i++) {
583 
584  int adc = pnItr->sample(i).adc();
585 
586  MonitorElement* mePNPed = 0;
587 
588  if ( pnItr->sample(i).gainId() == 0 ) {
589  if ( waveLength[ism-1] == 0 ) mePNPed = mePnPedMapG01L1_[ism-1];
590  if ( waveLength[ism-1] == 2 ) mePNPed = mePnPedMapG01L2_[ism-1];
591  }
592  if ( pnItr->sample(i).gainId() == 1 ) {
593  if ( waveLength[ism-1] == 0 ) mePNPed = mePnPedMapG16L1_[ism-1];
594  if ( waveLength[ism-1] == 2 ) mePNPed = mePnPedMapG16L2_[ism-1];
595  }
596 
597  float xval = float(adc);
598 
599  if ( mePNPed ) mePNPed->Fill(num - 0.5, xval);
600 
601  xvalped = xvalped + xval;
602 
603  }
604 
605  xvalped = xvalped / 4;
606 
607  float xvalmax = 0.;
608 
609  MonitorElement* mePN = 0;
610 
611  for (int i = 0; i < 50; i++) {
612 
613  int adc = pnItr->sample(i).adc();
614 
615  float xval = float(adc);
616 
617  if ( xval >= xvalmax ) xvalmax = xval;
618 
619  }
620 
621  xvalmax = xvalmax - xvalped;
622 
623  if ( pnItr->sample(0).gainId() == 0 ) {
624  if ( waveLength[ism-1] == 0 ) mePN = mePnAmplMapG01L1_[ism-1];
625  if ( waveLength[ism-1] == 2 ) mePN = mePnAmplMapG01L2_[ism-1];
626  }
627  if ( pnItr->sample(0).gainId() == 1 ) {
628  if ( waveLength[ism-1] == 0 ) mePN = mePnAmplMapG16L1_[ism-1];
629  if ( waveLength[ism-1] == 2 ) mePN = mePnAmplMapG16L2_[ism-1];
630  }
631 
632  if ( mePN ) mePN->Fill(num - 0.5, xvalmax);
633 
634  if ( ipn >= 0 && ipn < 80 ) adcPN[ipn] = xvalmax;
635 
636  }
637 
638  } else {
639 
640  edm::LogWarning("EELedTask") << "EcalPnDiodeDigiCollection not available";
641 
642  }
643 
645 
647 
648  int neh = hits->size();
649  LogDebug("EELedTask") << "event " << ievt_ << " hits collection size " << neh;
650 
651  for ( EcalUncalibratedRecHitCollection::const_iterator hitItr = hits->begin(); hitItr != hits->end(); ++hitItr ) {
652 
653  EEDetId id = hitItr->id();
654 
655  int ix = id.ix();
656  int iy = id.iy();
657 
658  int ism = Numbers::iSM( id );
659 
660  if ( ism >= 1 && ism <= 9 ) ix = 101 - ix;
661 
662  float xix = ix - 0.5;
663  float xiy = iy - 0.5;
664 
665  if ( ! ( runType[ism-1] == EcalDCCHeaderBlock::LED_STD ||
666  runType[ism-1] == EcalDCCHeaderBlock::LED_GAP ) ) continue;
667 
668  if ( runType[ism-1] == EcalDCCHeaderBlock::LED_GAP &&
669  rtHalf[ism-1] != Numbers::RtHalf(id) ) continue;
670 
671  MonitorElement* meAmplMap = 0;
672  MonitorElement* meTimeMap = 0;
673  MonitorElement* meAmplPNMap = 0;
674 
675  // Temporary measure to remove broken LED boxes for L1
676  if(waveLength[ism - 1] == 0){
677  if(ism == 14){
678  EcalElectronicsId eid(Numbers::getElectronicsMapping()->getElectronicsId(id));
679  int tower(eid.towerId());
680  if(tower == 1 || tower == 2 || tower == 3 || tower == 4 || tower == 5 || tower == 6 || tower == 9 || tower == 15) continue;
681  }
682  else if(ism == 15){
683  EcalElectronicsId eid(Numbers::getElectronicsMapping()->getElectronicsId(id));
684  int tower(eid.towerId());
685  if(tower == 3 || tower == 4 || tower == 10 || tower == 11 || tower == 12 || tower == 18 || tower == 19 || tower == 25) continue;
686  }
687  }
688 
689  if ( Numbers::RtHalf(id) == 0 || Numbers::RtHalf(id) == 1 ) {
690 
691  if ( waveLength[ism-1] == 0 ) {
692  meAmplMap = meAmplMapL1_[ism-1];
693  meTimeMap = meTimeMapL1_[ism-1];
694  meAmplPNMap = meAmplPNMapL1_[ism-1];
695  }
696  if ( waveLength[ism-1] == 2 ) {
697  meAmplMap = meAmplMapL2_[ism-1];
698  meTimeMap = meTimeMapL2_[ism-1];
699  meAmplPNMap = meAmplPNMapL2_[ism-1];
700  }
701 
702  } else {
703 
704  edm::LogWarning("EELedTask") << " RtHalf = " << Numbers::RtHalf(id);
705 
706  }
707 
708  float xval = hitItr->amplitude();
709  if ( xval <= 0. ) xval = 0.0;
710  float yval = hitItr->jitter() + 6.0;
711  if ( yval <= 0. ) yval = 0.0;
712  float zval = hitItr->pedestal();
713  if ( zval <= 0. ) zval = 0.0;
714 
715  if ( meAmplMap ) meAmplMap->Fill(xix, xiy, xval);
716 
717  if ( xval > 16. ) {
718  if ( meTimeMap ) meTimeMap->Fill(xix, xiy, yval);
719  }
720 
721  float wval = 0.;
722 
723  NumbersPn::getPNs( ism, ix, iy, PNs );
724 
725  if ( PNs.size() > 0 ) {
726  int ipn = PNs[0];
727  if ( ipn >= 0 && ipn < 80 ) {
728  if ( adcPN[ipn] != 0. ) wval = xval / adcPN[ipn];
729  }
730  }
731 
732  if ( meAmplPNMap ) meAmplPNMap->Fill(xix, xiy, wval);
733 
734  }
735 
736  } else {
737 
738  edm::LogWarning("EELedTask") << "EcalUncalibratedRecHitCollection not available";
739 
740  }
741 
742 }
#define LogDebug(id)
int adc(sample_type sample)
get the ADC sample (12 bits)
edm::EDGetTokenT< EcalUncalibratedRecHitCollection > EcalUncalibratedRecHitCollection_
Definition: EELedTask.h:73
int i
Definition: DBlmapReader.cc:9
static int ipnEE(const int ism, const int ipnid)
Definition: NumbersPn.cc:18
int ix() const
Definition: EEDetId.h:76
boost::transform_iterator< IterHelp, boost::counting_iterator< int > > const_iterator
MonitorElement * mePnPedMapG01L2_[18]
Definition: EELedTask.h:90
static unsigned icEE(const unsigned ism, const unsigned ix, const unsigned iy)
Definition: Numbers.cc:736
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:434
Ecal readout channel identification [32:20] Unused (so far) [19:13] DCC id [12:6] tower [5:3] strip [...
std::vector< EcalDCCHeaderBlock >::const_iterator const_iterator
EcalMGPASample sample(int i) const
Definition: EcalDataFrame.h:29
MonitorElement * meAmplPNMapL2_[18]
Definition: EELedTask.h:88
MonitorElement * mePnAmplMapG01L2_[18]
Definition: EELedTask.h:89
edm::EDGetTokenT< EcalRawDataCollection > EcalRawDataCollection_
Definition: EELedTask.h:70
MonitorElement * meAmplPNMapL1_[18]
Definition: EELedTask.h:79
static const EcalElectronicsMapping * getElectronicsMapping()
Definition: Numbers.cc:916
edm::EDGetTokenT< EEDigiCollection > EEDigiCollection_
Definition: EELedTask.h:71
void Fill(long long x)
MonitorElement * mePnPedMapG01L1_[18]
Definition: EELedTask.h:81
MonitorElement * meTimeMapL1_[18]
Definition: EELedTask.h:78
edm::EDGetTokenT< EcalPnDiodeDigiCollection > EcalPnDiodeDigiCollection_
Definition: EELedTask.h:72
const T & max(const T &a, const T &b)
void setup(void)
Setup.
Definition: EELedTask.cc:138
MonitorElement * meAmplMapL1_[18]
Definition: EELedTask.h:77
MonitorElement * meShapeMapL1_[18]
Definition: EELedTask.h:76
MonitorElement * mePnAmplMapG16L1_[18]
Definition: EELedTask.h:82
MonitorElement * meTimeMapL2_[18]
Definition: EELedTask.h:87
MonitorElement * meShapeMapL2_[18]
Definition: EELedTask.h:85
MonitorElement * mePnPedMapG16L2_[18]
Definition: EELedTask.h:92
static unsigned iSM(const unsigned ism, const EcalSubdetector subdet)
Definition: Numbers.cc:243
MonitorElement * meAmplMapL2_[18]
Definition: EELedTask.h:86
bool init_
Definition: EELedTask.h:94
MonitorElement * mePnAmplMapG01L1_[18]
Definition: EELedTask.h:80
static void getPNs(const int ism, const int ix, const int iy, std::vector< int > &PNsInLM)
Definition: NumbersPn.cc:48
static unsigned RtHalf(const EBDetId &id)
Definition: Numbers.cc:605
static EcalSubdetector subDet(const EBDetId &id)
Definition: Numbers.cc:142
int ism(int ieta, int iphi)
Definition: EcalPyUtils.cc:56
int adc() const
get the ADC sample (12 bits)
MonitorElement * mePnPedMapG16L1_[18]
Definition: EELedTask.h:83
MonitorElement * mePnAmplMapG16L2_[18]
Definition: EELedTask.h:91
int ievt_
Definition: EELedTask.h:60
void EELedTask::beginJob ( void  )
protectedvirtual

BeginJob.

Reimplemented from edm::EDAnalyzer.

Definition at line 79 of file EELedTask.cc.

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

79  {
80 
81  ievt_ = 0;
82 
83  if ( dqmStore_ ) {
84  dqmStore_->setCurrentFolder(prefixME_ + "/EELedTask");
85  dqmStore_->rmdir(prefixME_ + "/EELedTask");
86  }
87 
88 }
void rmdir(const std::string &fullpath)
Definition: DQMStore.cc:2730
std::string prefixME_
Definition: EELedTask.h:64
DQMStore * dqmStore_
Definition: EELedTask.h:62
void setCurrentFolder(const std::string &fullpath)
Definition: DQMStore.cc:584
int ievt_
Definition: EELedTask.h:60
void EELedTask::beginRun ( const edm::Run r,
const edm::EventSetup c 
)
protectedvirtual

BeginRun.

Reimplemented from edm::EDAnalyzer.

Definition at line 90 of file EELedTask.cc.

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

90  {
91 
92  Numbers::initGeometry(c, false);
93 
94  if ( ! mergeRuns_ ) this->reset();
95 
96 }
bool mergeRuns_
Definition: EELedTask.h:68
static void initGeometry(const edm::EventSetup &setup, bool verbose=false)
Definition: Numbers.cc:47
void reset(void)
Reset.
Definition: EELedTask.cc:134
void EELedTask::cleanup ( void  )
protected

Cleanup.

Definition at line 298 of file EELedTask.cc.

References dqmStore_, spr::find(), i, init_, ledWavelengths_, meAmplMapL1_, meAmplMapL2_, meAmplPNMapL1_, meAmplPNMapL2_, mePnAmplMapG01L1_, mePnAmplMapG01L2_, mePnAmplMapG16L1_, mePnAmplMapG16L2_, mePnPedMapG01L1_, mePnPedMapG01L2_, mePnPedMapG16L1_, mePnPedMapG16L2_, meShapeMapL1_, meShapeMapL2_, meTimeMapL1_, meTimeMapL2_, prefixME_, DQMStore::removeElement(), and DQMStore::setCurrentFolder().

Referenced by endJob().

298  {
299 
300  if ( ! init_ ) return;
301 
302  if ( dqmStore_ ) {
303  dqmStore_->setCurrentFolder(prefixME_ + "/EELedTask");
304 
305  if ( find(ledWavelengths_.begin(), ledWavelengths_.end(), 1) != ledWavelengths_.end() ) {
306 
307  dqmStore_->setCurrentFolder(prefixME_ + "/EELedTask/Led1");
308  for (int i = 0; i < 18; i++) {
309  if ( meShapeMapL1_[i] ) dqmStore_->removeElement( meShapeMapL1_[i]->getName() );
310  meShapeMapL1_[i] = 0;
311  if ( meAmplMapL1_[i] ) dqmStore_->removeElement( meAmplMapL1_[i]->getName() );
312  meAmplMapL1_[i] = 0;
313  if ( meTimeMapL1_[i] ) dqmStore_->removeElement( meTimeMapL1_[i]->getName() );
314  meTimeMapL1_[i] = 0;
315  if ( meAmplPNMapL1_[i] ) dqmStore_->removeElement( meAmplPNMapL1_[i]->getName() );
316  meAmplPNMapL1_[i] = 0;
317  }
318 
319  }
320 
321  if ( find(ledWavelengths_.begin(), ledWavelengths_.end(), 2) != ledWavelengths_.end() ) {
322 
323  dqmStore_->setCurrentFolder(prefixME_ + "/EELedTask/Led2");
324  for (int i = 0; i < 18; i++) {
325  if ( meShapeMapL2_[i] ) dqmStore_->removeElement( meShapeMapL2_[i]->getName() );
326  meShapeMapL2_[i] = 0;
327  if ( meAmplMapL2_[i] ) dqmStore_->removeElement( meAmplMapL2_[i]->getName() );
328  meAmplMapL2_[i] = 0;
329  if ( meTimeMapL2_[i] ) dqmStore_->removeElement( meTimeMapL2_[i]->getName() );
330  meTimeMapL2_[i] = 0;
331  if ( meAmplPNMapL2_[i] ) dqmStore_->removeElement( meAmplPNMapL2_[i]->getName() );
332  meAmplPNMapL2_[i] = 0;
333  }
334 
335  }
336 
337  if ( find(ledWavelengths_.begin(), ledWavelengths_.end(), 1) != ledWavelengths_.end() ) {
338 
339  dqmStore_->setCurrentFolder(prefixME_ + "/EELedTask/Led1/PN");
340 
341  dqmStore_->setCurrentFolder(prefixME_ + "/EELedTask/Led1/PN/Gain01");
342  for (int i = 0; i < 18; i++) {
343  if ( mePnAmplMapG01L1_[i] ) dqmStore_->removeElement( mePnAmplMapG01L1_[i]->getName() );
344  mePnAmplMapG01L1_[i] = 0;
345  if ( mePnPedMapG01L1_[i] ) dqmStore_->removeElement( mePnPedMapG01L1_[i]->getName() );
346  mePnPedMapG01L1_[i] = 0;
347  }
348 
349  dqmStore_->setCurrentFolder(prefixME_ + "/EELedTask/Led1/PN/Gain16");
350  for (int i = 0; i < 18; i++) {
351  if ( mePnAmplMapG16L1_[i] ) dqmStore_->removeElement( mePnAmplMapG16L1_[i]->getName() );
352  mePnAmplMapG16L1_[i] = 0;
353  if ( mePnPedMapG16L1_[i] ) dqmStore_->removeElement( mePnPedMapG16L1_[i]->getName() );
354  mePnPedMapG16L1_[i] = 0;
355  }
356 
357  }
358 
359  if ( find(ledWavelengths_.begin(), ledWavelengths_.end(), 2) != ledWavelengths_.end() ) {
360 
361  dqmStore_->setCurrentFolder(prefixME_ + "/EELedTask/Led2/PN");
362 
363  dqmStore_->setCurrentFolder(prefixME_ + "/EELedTask/Led2/PN/Gain01");
364  for (int i = 0; i < 18; i++) {
365  if ( mePnAmplMapG01L2_[i] ) dqmStore_->removeElement( mePnAmplMapG01L2_[i]->getName() );
366  mePnAmplMapG01L2_[i] = 0;
367  if ( mePnPedMapG01L2_[i] ) dqmStore_->removeElement( mePnPedMapG01L2_[i]->getName() );
368  mePnPedMapG01L2_[i] = 0;
369  }
370 
371  dqmStore_->setCurrentFolder(prefixME_ + "/EELedTask/Led2/PN/Gain16");
372  for (int i = 0; i < 18; i++) {
373  if ( mePnAmplMapG16L2_[i] ) dqmStore_->removeElement( mePnAmplMapG16L2_[i]->getName() );
374  mePnAmplMapG16L2_[i] = 0;
375  if ( mePnPedMapG16L2_[i] ) dqmStore_->removeElement( mePnPedMapG16L2_[i]->getName() );
376  mePnPedMapG16L2_[i] = 0;
377  }
378 
379  }
380 
381  }
382 
383  init_ = false;
384 
385 }
int i
Definition: DBlmapReader.cc:9
MonitorElement * mePnPedMapG01L2_[18]
Definition: EELedTask.h:90
MonitorElement * meAmplPNMapL2_[18]
Definition: EELedTask.h:88
MonitorElement * mePnAmplMapG01L2_[18]
Definition: EELedTask.h:89
MonitorElement * meAmplPNMapL1_[18]
Definition: EELedTask.h:79
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
Definition: FindCaloHit.cc:7
MonitorElement * mePnPedMapG01L1_[18]
Definition: EELedTask.h:81
MonitorElement * meTimeMapL1_[18]
Definition: EELedTask.h:78
std::vector< int > ledWavelengths_
Definition: EELedTask.h:74
void removeElement(const std::string &name)
Definition: DQMStore.cc:2772
MonitorElement * meAmplMapL1_[18]
Definition: EELedTask.h:77
MonitorElement * meShapeMapL1_[18]
Definition: EELedTask.h:76
MonitorElement * mePnAmplMapG16L1_[18]
Definition: EELedTask.h:82
MonitorElement * meTimeMapL2_[18]
Definition: EELedTask.h:87
std::string prefixME_
Definition: EELedTask.h:64
MonitorElement * meShapeMapL2_[18]
Definition: EELedTask.h:85
MonitorElement * mePnPedMapG16L2_[18]
Definition: EELedTask.h:92
MonitorElement * meAmplMapL2_[18]
Definition: EELedTask.h:86
bool init_
Definition: EELedTask.h:94
MonitorElement * mePnAmplMapG01L1_[18]
Definition: EELedTask.h:80
DQMStore * dqmStore_
Definition: EELedTask.h:62
void setCurrentFolder(const std::string &fullpath)
Definition: DQMStore.cc:584
MonitorElement * mePnPedMapG16L1_[18]
Definition: EELedTask.h:83
MonitorElement * mePnAmplMapG16L2_[18]
Definition: EELedTask.h:91
void EELedTask::endJob ( void  )
protectedvirtual

EndJob.

Reimplemented from edm::EDAnalyzer.

Definition at line 387 of file EELedTask.cc.

References cleanup(), enableCleanup_, and ievt_.

387  {
388 
389  edm::LogInfo("EELedTask") << "analyzed " << ievt_ << " events";
390 
391  if ( enableCleanup_ ) this->cleanup();
392 
393 }
void cleanup(void)
Cleanup.
Definition: EELedTask.cc:298
bool enableCleanup_
Definition: EELedTask.h:66
int ievt_
Definition: EELedTask.h:60
void EELedTask::endRun ( const edm::Run r,
const edm::EventSetup c 
)
protectedvirtual

EndRun.

Reimplemented from edm::EDAnalyzer.

Definition at line 98 of file EELedTask.cc.

References spr::find(), i, ledWavelengths_, meAmplMapL1_, meAmplMapL2_, meAmplPNMapL1_, meAmplPNMapL2_, mePnAmplMapG01L1_, mePnAmplMapG01L2_, mePnAmplMapG16L1_, mePnAmplMapG16L2_, mePnPedMapG01L1_, mePnPedMapG01L2_, mePnPedMapG16L1_, mePnPedMapG16L2_, meShapeMapL1_, meShapeMapL2_, meTimeMapL1_, meTimeMapL2_, and MonitorElement::Reset().

98  {
99 
100  for (int i = 0; i < 18; i++) {
101  if ( find(ledWavelengths_.begin(), ledWavelengths_.end(), 1) != ledWavelengths_.end() ) {
102  if ( meShapeMapL1_[i] ) meShapeMapL1_[i]->Reset();
103  if ( meAmplMapL1_[i] ) meAmplMapL1_[i]->Reset();
104  if ( meTimeMapL1_[i] ) meTimeMapL1_[i]->Reset();
105  if ( meAmplPNMapL1_[i] ) meAmplPNMapL1_[i]->Reset();
106  }
107 
108  if ( find(ledWavelengths_.begin(), ledWavelengths_.end(), 2) != ledWavelengths_.end() ) {
109  if ( meShapeMapL2_[i] ) meShapeMapL2_[i]->Reset();
110  if ( meAmplMapL2_[i] ) meAmplMapL2_[i]->Reset();
111  if ( meTimeMapL2_[i] ) meTimeMapL2_[i]->Reset();
112  if ( meAmplPNMapL2_[i] ) meAmplPNMapL2_[i]->Reset();
113  }
114 
115  if ( find(ledWavelengths_.begin(), ledWavelengths_.end(), 1) != ledWavelengths_.end() ) {
118 
121  }
122 
123  if ( find(ledWavelengths_.begin(), ledWavelengths_.end(), 2) != ledWavelengths_.end() ) {
126 
129  }
130  }
131 
132 }
int i
Definition: DBlmapReader.cc:9
MonitorElement * mePnPedMapG01L2_[18]
Definition: EELedTask.h:90
MonitorElement * meAmplPNMapL2_[18]
Definition: EELedTask.h:88
MonitorElement * mePnAmplMapG01L2_[18]
Definition: EELedTask.h:89
MonitorElement * meAmplPNMapL1_[18]
Definition: EELedTask.h:79
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
Definition: FindCaloHit.cc:7
MonitorElement * mePnPedMapG01L1_[18]
Definition: EELedTask.h:81
MonitorElement * meTimeMapL1_[18]
Definition: EELedTask.h:78
std::vector< int > ledWavelengths_
Definition: EELedTask.h:74
MonitorElement * meAmplMapL1_[18]
Definition: EELedTask.h:77
MonitorElement * meShapeMapL1_[18]
Definition: EELedTask.h:76
MonitorElement * mePnAmplMapG16L1_[18]
Definition: EELedTask.h:82
MonitorElement * meTimeMapL2_[18]
Definition: EELedTask.h:87
MonitorElement * meShapeMapL2_[18]
Definition: EELedTask.h:85
MonitorElement * mePnPedMapG16L2_[18]
Definition: EELedTask.h:92
MonitorElement * meAmplMapL2_[18]
Definition: EELedTask.h:86
MonitorElement * mePnAmplMapG01L1_[18]
Definition: EELedTask.h:80
void Reset(void)
reset ME (ie. contents, errors, etc)
MonitorElement * mePnPedMapG16L1_[18]
Definition: EELedTask.h:83
MonitorElement * mePnAmplMapG16L2_[18]
Definition: EELedTask.h:91
void EELedTask::reset ( void  )
protected

Reset.

Definition at line 134 of file EELedTask.cc.

Referenced by beginRun().

134  {
135 
136 }
void EELedTask::setup ( void  )
protected

Setup.

Definition at line 138 of file EELedTask.cc.

References DQMStore::bookProfile(), DQMStore::bookProfile2D(), dqmStore_, spr::find(), i, init_, Numbers::ix0EE(), Numbers::iy0EE(), ledWavelengths_, meAmplMapL1_, meAmplMapL2_, meAmplPNMapL1_, meAmplPNMapL2_, mePnAmplMapG01L1_, mePnAmplMapG01L2_, mePnAmplMapG16L1_, mePnAmplMapG16L2_, mePnPedMapG01L1_, mePnPedMapG01L2_, mePnPedMapG16L1_, mePnPedMapG16L2_, meShapeMapL1_, meShapeMapL2_, meTimeMapL1_, meTimeMapL2_, mergeVDriftHistosByStation::name, prefixME_, Numbers::sEE(), MonitorElement::setAxisTitle(), DQMStore::setCurrentFolder(), AlCaHLTBitMon_QueryRunRegistry::string, and DQMStore::tag().

Referenced by analyze().

138  {
139 
140  init_ = true;
141 
143  std::stringstream LedN, LN;
144 
145  if ( dqmStore_ ) {
146  dqmStore_->setCurrentFolder(prefixME_ + "/EELedTask");
147 
148  if ( find(ledWavelengths_.begin(), ledWavelengths_.end(), 1) != ledWavelengths_.end() ) {
149 
150  LedN.str("");
151  LedN << "Led" << 1;
152  LN.str("");
153  LN << "L" << 1;
154 
155  dqmStore_->setCurrentFolder(prefixME_ + "/EELedTask/" + LedN.str());
156  for (int i = 0; i < 18; i++) {
157  name = "EELDT shape " + Numbers::sEE(i+1) + " " + LN.str();
158  meShapeMapL1_[i] = dqmStore_->bookProfile2D(name, name, 850, 0., 850., 10, 0., 10., 4096, 0., 4096., "s");
159  meShapeMapL1_[i]->setAxisTitle("channel", 1);
160  meShapeMapL1_[i]->setAxisTitle("sample", 2);
161  meShapeMapL1_[i]->setAxisTitle("amplitude", 3);
162  dqmStore_->tag(meShapeMapL1_[i], i+1);
163 
164  name = "EELDT amplitude " + Numbers::sEE(i+1) + " " + LN.str();
165  meAmplMapL1_[i] = dqmStore_->bookProfile2D(name, name, 50, Numbers::ix0EE(i+1)+0., Numbers::ix0EE(i+1)+50., 50, Numbers::iy0EE(i+1)+0., Numbers::iy0EE(i+1)+50., 4096, 0., 4096.*12., "s");
166  meAmplMapL1_[i]->setAxisTitle("ix", 1);
167  if ( i+1 >= 1 && i+1 <= 9 ) meAmplMapL1_[i]->setAxisTitle("101-ix", 1);
168  meAmplMapL1_[i]->setAxisTitle("iy", 2);
169  dqmStore_->tag(meAmplMapL1_[i], i+1);
170 
171  name = "EELDT timing " + Numbers::sEE(i+1) + " " + LN.str();
172  meTimeMapL1_[i] = dqmStore_->bookProfile2D(name, name, 50, Numbers::ix0EE(i+1)+0., Numbers::ix0EE(i+1)+50., 50, Numbers::iy0EE(i+1)+0., Numbers::iy0EE(i+1)+50., 250, 0., 10., "s");
173  meTimeMapL1_[i]->setAxisTitle("ix", 1);
174  if ( i+1 >= 1 && i+1 <= 9 ) meTimeMapL1_[i]->setAxisTitle("101-ix", 1);
175  meTimeMapL1_[i]->setAxisTitle("iy", 2);
176  dqmStore_->tag(meTimeMapL1_[i], i+1);
177 
178  name = "EELDT amplitude over PN " + Numbers::sEE(i+1) + " " + LN.str();
179  meAmplPNMapL1_[i] = dqmStore_->bookProfile2D(name, name, 50, Numbers::ix0EE(i+1)+0., Numbers::ix0EE(i+1)+50., 50, Numbers::iy0EE(i+1)+0., Numbers::iy0EE(i+1)+50., 4096, 0., 4096.*12., "s");
180  meAmplPNMapL1_[i]->setAxisTitle("ix", 1);
181  if ( i+1 >= 1 && i+1 <= 9 ) meAmplPNMapL1_[i]->setAxisTitle("101-ix", 1);
182  meAmplPNMapL1_[i]->setAxisTitle("iy", 2);
183  dqmStore_->tag(meAmplPNMapL1_[i], i+1);
184  }
185 
186  dqmStore_->setCurrentFolder(prefixME_ + "/EELedTask/" + LedN.str() + "/PN");
187 
188  dqmStore_->setCurrentFolder(prefixME_ + "/EELedTask/" + LedN.str() + "/PN/Gain01");
189  for (int i = 0; i < 18; i++) {
190  name = "EELDT PNs amplitude " + Numbers::sEE(i+1) + " G01 " + LN.str();
191  mePnAmplMapG01L1_[i] = dqmStore_->bookProfile(name, name, 10, 0., 10., 4096, 0., 4096., "s");
192  mePnAmplMapG01L1_[i]->setAxisTitle("channel", 1);
193  mePnAmplMapG01L1_[i]->setAxisTitle("amplitude", 2);
194  dqmStore_->tag(mePnAmplMapG01L1_[i], i+1);
195 
196  name = "EELDT PNs pedestal " + Numbers::sEE(i+1) + " G01 " + LN.str();
197  mePnPedMapG01L1_[i] = dqmStore_->bookProfile(name, name, 10, 0., 10., 4096, 0., 4096., "s");
198  mePnPedMapG01L1_[i]->setAxisTitle("channel", 1);
199  mePnPedMapG01L1_[i]->setAxisTitle("pedestal", 2);
200  dqmStore_->tag(mePnPedMapG01L1_[i], i+1);
201  }
202 
203  dqmStore_->setCurrentFolder(prefixME_ + "/EELedTask/" + LedN.str() + "/PN/Gain16");
204 
205  for (int i = 0; i < 18; i++) {
206  name = "EELDT PNs amplitude " + Numbers::sEE(i+1) + " G16 " + LN.str();
207  mePnAmplMapG16L1_[i] = dqmStore_->bookProfile(name, name, 10, 0., 10., 4096, 0., 4096., "s");
208  mePnAmplMapG16L1_[i]->setAxisTitle("channel", 1);
209  mePnAmplMapG16L1_[i]->setAxisTitle("amplitude", 2);
210  dqmStore_->tag(mePnAmplMapG16L1_[i], i+1);
211 
212  name = "EELDT PNs pedestal " + Numbers::sEE(i+1) + " G16 " + LN.str();
213  mePnPedMapG16L1_[i] = dqmStore_->bookProfile(name, name, 10, 0., 10., 4096, 0., 4096., "s");
214  mePnPedMapG16L1_[i]->setAxisTitle("channel", 1);
215  mePnPedMapG16L1_[i]->setAxisTitle("pedestal", 2);
216  dqmStore_->tag(mePnPedMapG16L1_[i], i+1);
217  }
218 
219  }
220 
221  if ( find(ledWavelengths_.begin(), ledWavelengths_.end(), 2) != ledWavelengths_.end() ) {
222 
223  LedN.str("");
224  LedN << "Led" << 2;
225  LN.str("");
226  LN << "L" << 2;
227 
228  dqmStore_->setCurrentFolder(prefixME_ + "/EELedTask/" + LedN.str());
229  for (int i = 0; i < 18; i++) {
230  name = "EELDT shape " + Numbers::sEE(i+1) + " " + LN.str();
231  meShapeMapL2_[i] = dqmStore_->bookProfile2D(name, name, 850, 0., 850., 10, 0., 10., 4096, 0., 4096., "s");
232  meShapeMapL2_[i]->setAxisTitle("channel", 1);
233  meShapeMapL2_[i]->setAxisTitle("sample", 2);
234  meShapeMapL2_[i]->setAxisTitle("amplitude", 3);
235  dqmStore_->tag(meShapeMapL2_[i], i+1);
236 
237  name = "EELDT amplitude " + Numbers::sEE(i+1) + " " + LN.str();
238  meAmplMapL2_[i] = dqmStore_->bookProfile2D(name, name, 50, Numbers::ix0EE(i+1)+0., Numbers::ix0EE(i+1)+50., 50, Numbers::iy0EE(i+1)+0., Numbers::iy0EE(i+1)+50., 4096, 0., 4096.*12., "s");
239  meAmplMapL2_[i]->setAxisTitle("ix", 1);
240  if ( i+1 >= 1 && i+1 <= 9 ) meAmplMapL2_[i]->setAxisTitle("101-ix", 1);
241  meAmplMapL2_[i]->setAxisTitle("iy", 2);
242  dqmStore_->tag(meAmplMapL2_[i], i+1);
243 
244  name = "EELDT timing " + Numbers::sEE(i+1) + " " + LN.str();
245  meTimeMapL2_[i] = dqmStore_->bookProfile2D(name, name, 50, Numbers::ix0EE(i+1)+0., Numbers::ix0EE(i+1)+50., 50, Numbers::iy0EE(i+1)+0., Numbers::iy0EE(i+1)+50., 250, 0., 10., "s");
246  meTimeMapL2_[i]->setAxisTitle("ix", 1);
247  if ( i+1 >= 1 && i+1 <= 9 ) meTimeMapL2_[i]->setAxisTitle("101-ix", 1);
248  meTimeMapL2_[i]->setAxisTitle("iy", 2);
249  dqmStore_->tag(meTimeMapL2_[i], i+1);
250 
251  name = "EELDT amplitude over PN " + Numbers::sEE(i+1) + " " + LN.str();
252  meAmplPNMapL2_[i] = dqmStore_->bookProfile2D(name, name, 50, Numbers::ix0EE(i+1)+0., Numbers::ix0EE(i+1)+50., 50, Numbers::iy0EE(i+1)+0., Numbers::iy0EE(i+1)+50., 4096, 0., 4096.*12., "s");
253  meAmplPNMapL2_[i]->setAxisTitle("ix", 1);
254  if ( i+1 >= 1 && i+1 <= 9 ) meAmplPNMapL2_[i]->setAxisTitle("101-ix", 1);
255  meAmplPNMapL2_[i]->setAxisTitle("iy", 2);
256  dqmStore_->tag(meAmplPNMapL2_[i], i+1);
257  }
258 
259  dqmStore_->setCurrentFolder(prefixME_ + "/EELedTask/" + LedN.str() + "/PN");
260 
261  dqmStore_->setCurrentFolder(prefixME_ + "/EELedTask/" + LedN.str() + "/PN/Gain01");
262  for (int i = 0; i < 18; i++) {
263  name = "EELDT PNs amplitude " + Numbers::sEE(i+1) + " G01 " + LN.str();
264  mePnAmplMapG01L2_[i] = dqmStore_->bookProfile(name, name, 10, 0., 10., 4096, 0., 4096., "s");
265  mePnAmplMapG01L2_[i]->setAxisTitle("channel", 1);
266  mePnAmplMapG01L2_[i]->setAxisTitle("amplitude", 2);
267  dqmStore_->tag(mePnAmplMapG01L2_[i], i+1);
268 
269  name = "EELDT PNs pedestal " + Numbers::sEE(i+1) + " G01 " + LN.str();
270  mePnPedMapG01L2_[i] = dqmStore_->bookProfile(name, name, 10, 0., 10., 4096, 0., 4096., "s");
271  mePnPedMapG01L2_[i]->setAxisTitle("channel", 1);
272  mePnPedMapG01L2_[i]->setAxisTitle("pedestal", 2);
273  dqmStore_->tag(mePnPedMapG01L2_[i], i+1);
274  }
275 
276  dqmStore_->setCurrentFolder(prefixME_ + "/EELedTask/" + LedN.str() + "/PN/Gain16");
277 
278  for (int i = 0; i < 18; i++) {
279  name = "EELDT PNs amplitude " + Numbers::sEE(i+1) + " G16 " + LN.str();
280  mePnAmplMapG16L2_[i] = dqmStore_->bookProfile(name, name, 10, 0., 10., 4096, 0., 4096., "s");
281  mePnAmplMapG16L2_[i]->setAxisTitle("channel", 1);
282  mePnAmplMapG16L2_[i]->setAxisTitle("amplitude", 2);
283  dqmStore_->tag(mePnAmplMapG16L2_[i], i+1);
284 
285  name = "EELDT PNs pedestal " + Numbers::sEE(i+1) + " G16 " + LN.str();
286  mePnPedMapG16L2_[i] = dqmStore_->bookProfile(name, name, 10, 0., 10., 4096, 0., 4096., "s");
287  mePnPedMapG16L2_[i]->setAxisTitle("channel", 1);
288  mePnPedMapG16L2_[i]->setAxisTitle("pedestal", 2);
289  dqmStore_->tag(mePnPedMapG16L2_[i], i+1);
290  }
291 
292  }
293 
294  }
295 
296 }
static std::string sEE(const unsigned ism)
Definition: Numbers.cc:223
int i
Definition: DBlmapReader.cc:9
MonitorElement * mePnPedMapG01L2_[18]
Definition: EELedTask.h:90
MonitorElement * meAmplPNMapL2_[18]
Definition: EELedTask.h:88
MonitorElement * mePnAmplMapG01L2_[18]
Definition: EELedTask.h:89
MonitorElement * meAmplPNMapL1_[18]
Definition: EELedTask.h:79
static int ix0EE(const unsigned ism)
Definition: Numbers.cc:770
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
Definition: FindCaloHit.cc:7
static int iy0EE(const unsigned ism)
Definition: Numbers.cc:809
void tag(MonitorElement *me, unsigned int myTag)
Definition: DQMStore.cc:1509
MonitorElement * mePnPedMapG01L1_[18]
Definition: EELedTask.h:81
MonitorElement * meTimeMapL1_[18]
Definition: EELedTask.h:78
std::vector< int > ledWavelengths_
Definition: EELedTask.h:74
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:1186
MonitorElement * meAmplMapL1_[18]
Definition: EELedTask.h:77
MonitorElement * meShapeMapL1_[18]
Definition: EELedTask.h:76
MonitorElement * mePnAmplMapG16L1_[18]
Definition: EELedTask.h:82
MonitorElement * meTimeMapL2_[18]
Definition: EELedTask.h:87
std::string prefixME_
Definition: EELedTask.h:64
MonitorElement * meShapeMapL2_[18]
Definition: EELedTask.h:85
MonitorElement * mePnPedMapG16L2_[18]
Definition: EELedTask.h:92
MonitorElement * meAmplMapL2_[18]
Definition: EELedTask.h:86
bool init_
Definition: EELedTask.h:94
MonitorElement * mePnAmplMapG01L1_[18]
Definition: EELedTask.h:80
DQMStore * dqmStore_
Definition: EELedTask.h:62
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:584
MonitorElement * mePnPedMapG16L1_[18]
Definition: EELedTask.h:83
MonitorElement * bookProfile2D(const char *name, const char *title, int nchX, double lowX, double highX, int nchY, double lowY, double highY, int nchZ, double lowZ, double highZ, const char *option="s")
Definition: DQMStore.cc:1330
MonitorElement * mePnAmplMapG16L2_[18]
Definition: EELedTask.h:91

Member Data Documentation

DQMStore* EELedTask::dqmStore_
private

Definition at line 62 of file EELedTask.h.

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

edm::EDGetTokenT<EcalPnDiodeDigiCollection> EELedTask::EcalPnDiodeDigiCollection_
private

Definition at line 72 of file EELedTask.h.

Referenced by analyze(), and EELedTask().

edm::EDGetTokenT<EcalRawDataCollection> EELedTask::EcalRawDataCollection_
private

Definition at line 70 of file EELedTask.h.

Referenced by analyze(), and EELedTask().

edm::EDGetTokenT<EcalUncalibratedRecHitCollection> EELedTask::EcalUncalibratedRecHitCollection_
private

Definition at line 73 of file EELedTask.h.

Referenced by analyze(), and EELedTask().

edm::EDGetTokenT<EEDigiCollection> EELedTask::EEDigiCollection_
private

Definition at line 71 of file EELedTask.h.

Referenced by analyze(), and EELedTask().

bool EELedTask::enableCleanup_
private

Definition at line 66 of file EELedTask.h.

Referenced by EELedTask(), and endJob().

int EELedTask::ievt_
private

Definition at line 60 of file EELedTask.h.

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

bool EELedTask::init_
private

Definition at line 94 of file EELedTask.h.

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

std::vector<int> EELedTask::ledWavelengths_
private

Definition at line 74 of file EELedTask.h.

Referenced by cleanup(), EELedTask(), endRun(), and setup().

MonitorElement* EELedTask::meAmplMapL1_[18]
private

Definition at line 77 of file EELedTask.h.

Referenced by analyze(), cleanup(), EELedTask(), endRun(), and setup().

MonitorElement* EELedTask::meAmplMapL2_[18]
private

Definition at line 86 of file EELedTask.h.

Referenced by analyze(), cleanup(), EELedTask(), endRun(), and setup().

MonitorElement* EELedTask::meAmplPNMapL1_[18]
private

Definition at line 79 of file EELedTask.h.

Referenced by analyze(), cleanup(), EELedTask(), endRun(), and setup().

MonitorElement* EELedTask::meAmplPNMapL2_[18]
private

Definition at line 88 of file EELedTask.h.

Referenced by analyze(), cleanup(), EELedTask(), endRun(), and setup().

MonitorElement* EELedTask::mePnAmplMapG01L1_[18]
private

Definition at line 80 of file EELedTask.h.

Referenced by analyze(), cleanup(), EELedTask(), endRun(), and setup().

MonitorElement* EELedTask::mePnAmplMapG01L2_[18]
private

Definition at line 89 of file EELedTask.h.

Referenced by analyze(), cleanup(), EELedTask(), endRun(), and setup().

MonitorElement* EELedTask::mePnAmplMapG16L1_[18]
private

Definition at line 82 of file EELedTask.h.

Referenced by analyze(), cleanup(), EELedTask(), endRun(), and setup().

MonitorElement* EELedTask::mePnAmplMapG16L2_[18]
private

Definition at line 91 of file EELedTask.h.

Referenced by analyze(), cleanup(), EELedTask(), endRun(), and setup().

MonitorElement* EELedTask::mePnPedMapG01L1_[18]
private

Definition at line 81 of file EELedTask.h.

Referenced by analyze(), cleanup(), EELedTask(), endRun(), and setup().

MonitorElement* EELedTask::mePnPedMapG01L2_[18]
private

Definition at line 90 of file EELedTask.h.

Referenced by analyze(), cleanup(), EELedTask(), endRun(), and setup().

MonitorElement* EELedTask::mePnPedMapG16L1_[18]
private

Definition at line 83 of file EELedTask.h.

Referenced by analyze(), cleanup(), EELedTask(), endRun(), and setup().

MonitorElement* EELedTask::mePnPedMapG16L2_[18]
private

Definition at line 92 of file EELedTask.h.

Referenced by analyze(), cleanup(), EELedTask(), endRun(), and setup().

bool EELedTask::mergeRuns_
private

Definition at line 68 of file EELedTask.h.

Referenced by beginRun(), and EELedTask().

MonitorElement* EELedTask::meShapeMapL1_[18]
private

Definition at line 76 of file EELedTask.h.

Referenced by analyze(), cleanup(), EELedTask(), endRun(), and setup().

MonitorElement* EELedTask::meShapeMapL2_[18]
private

Definition at line 85 of file EELedTask.h.

Referenced by analyze(), cleanup(), EELedTask(), endRun(), and setup().

MonitorElement* EELedTask::meTimeMapL1_[18]
private

Definition at line 78 of file EELedTask.h.

Referenced by analyze(), cleanup(), EELedTask(), endRun(), and setup().

MonitorElement* EELedTask::meTimeMapL2_[18]
private

Definition at line 87 of file EELedTask.h.

Referenced by analyze(), cleanup(), EELedTask(), endRun(), and setup().

std::string EELedTask::prefixME_
private

Definition at line 64 of file EELedTask.h.

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