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

#include <EETestPulseTask.h>

Inheritance diagram for EETestPulseTask:
edm::EDAnalyzer edm::EDConsumerBase

Public Member Functions

 EETestPulseTask (const edm::ParameterSet &ps)
 Constructor. More...
 
virtual ~EETestPulseTask ()
 Destructor. More...
 
- Public Member Functions inherited from edm::EDAnalyzer
 EDAnalyzer ()
 
std::string workerType () const
 
virtual ~EDAnalyzer ()
 
- Public Member Functions inherited from edm::EDConsumerBase
 EDConsumerBase ()
 
ProductHolderIndex indexFrom (EDGetToken, BranchType, TypeID const &) const
 
void itemsMayGet (BranchType, std::vector< ProductHolderIndex > &) const
 
void itemsToGet (BranchType, std::vector< ProductHolderIndex > &) const
 
void labelsForToken (EDGetToken iToken, Labels &oLabels) 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::EDAnalyzer
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
CurrentProcessingContext const * currentContext () const
 
- 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

float amplitudeThreshold_
 
DQMStoredqmStore_
 
edm::InputTag EcalPnDiodeDigiCollection_
 
edm::InputTag EcalRawDataCollection_
 
edm::InputTag EcalUncalibratedRecHitCollection_
 
edm::InputTag EEDigiCollection_
 
bool enableCleanup_
 
int ievt_
 
bool init_
 
MonitorElementmeAmplMapG01_ [18]
 
MonitorElementmeAmplMapG06_ [18]
 
MonitorElementmeAmplMapG12_ [18]
 
MonitorElementmePnAmplMapG01_ [18]
 
MonitorElementmePnAmplMapG16_ [18]
 
MonitorElementmePnPedMapG01_ [18]
 
MonitorElementmePnPedMapG16_ [18]
 
bool mergeRuns_
 
MonitorElementmeShapeMapG01_ [18]
 
MonitorElementmeShapeMapG06_ [18]
 
MonitorElementmeShapeMapG12_ [18]
 
std::vector< int > MGPAGains_
 
std::vector< int > MGPAGainsPN_
 
std::string prefixME_
 

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)
 
static void prevalidate (ConfigurationDescriptions &)
 

Detailed Description

Definition at line 20 of file EETestPulseTask.h.

Constructor & Destructor Documentation

EETestPulseTask::EETestPulseTask ( const edm::ParameterSet ps)

Constructor.

Definition at line 33 of file EETestPulseTask.cc.

References dqmStore_, EcalPnDiodeDigiCollection_, EcalRawDataCollection_, EcalUncalibratedRecHitCollection_, EEDigiCollection_, enableCleanup_, edm::ParameterSet::getParameter(), edm::ParameterSet::getUntrackedParameter(), i, init_, meAmplMapG01_, meAmplMapG06_, meAmplMapG12_, mePnAmplMapG01_, mePnAmplMapG16_, mePnPedMapG01_, mePnPedMapG16_, mergeRuns_, meShapeMapG01_, meShapeMapG06_, meShapeMapG12_, MGPAGains_, MGPAGainsPN_, cppFunctionSkipper::operator, prefixME_, and AlCaHLTBitMon_QueryRunRegistry::string.

33  {
34 
35  init_ = false;
36 
38 
39  prefixME_ = ps.getUntrackedParameter<std::string>("prefixME", "");
40 
41  enableCleanup_ = ps.getUntrackedParameter<bool>("enableCleanup", false);
42 
43  mergeRuns_ = ps.getUntrackedParameter<bool>("mergeRuns", false);
44 
45  EcalRawDataCollection_ = ps.getParameter<edm::InputTag>("EcalRawDataCollection");
46  EEDigiCollection_ = ps.getParameter<edm::InputTag>("EEDigiCollection");
47  EcalPnDiodeDigiCollection_ = ps.getParameter<edm::InputTag>("EcalPnDiodeDigiCollection");
48  EcalUncalibratedRecHitCollection_ = ps.getParameter<edm::InputTag>("EcalUncalibratedRecHitCollection");
49 
50  MGPAGains_.reserve(3);
51  for ( unsigned int i = 1; i <= 3; i++ ) MGPAGains_.push_back(i);
52  MGPAGains_ = ps.getUntrackedParameter<std::vector<int> >("MGPAGains", MGPAGains_);
53 
54  MGPAGainsPN_.reserve(2);
55  for ( unsigned int i = 1; i <= 3; i++ ) MGPAGainsPN_.push_back(i);
56  MGPAGainsPN_ = ps.getUntrackedParameter<std::vector<int> >("MGPAGainsPN", MGPAGainsPN_);
57 
58  for (int i = 0; i < 18; i++) {
59  meShapeMapG01_[i] = 0;
60  meAmplMapG01_[i] = 0;
61  meShapeMapG06_[i] = 0;
62  meAmplMapG06_[i] = 0;
63  meShapeMapG12_[i] = 0;
64  meAmplMapG12_[i] = 0;
65  mePnAmplMapG01_[i] = 0;
66  mePnPedMapG01_[i] = 0;
67  mePnAmplMapG16_[i] = 0;
68  mePnPedMapG16_[i] = 0;
69  }
70 
71 }
edm::InputTag EEDigiCollection_
T getParameter(std::string const &) const
T getUntrackedParameter(std::string const &, T const &) const
int i
Definition: DBlmapReader.cc:9
std::vector< int > MGPAGains_
MonitorElement * meShapeMapG06_[18]
MonitorElement * mePnAmplMapG01_[18]
MonitorElement * meAmplMapG01_[18]
MonitorElement * mePnAmplMapG16_[18]
std::string prefixME_
DQMStore * dqmStore_
edm::InputTag EcalUncalibratedRecHitCollection_
MonitorElement * meAmplMapG12_[18]
MonitorElement * meShapeMapG12_[18]
MonitorElement * mePnPedMapG01_[18]
edm::InputTag EcalRawDataCollection_
edm::InputTag EcalPnDiodeDigiCollection_
MonitorElement * meAmplMapG06_[18]
MonitorElement * meShapeMapG01_[18]
MonitorElement * mePnPedMapG16_[18]
std::vector< int > MGPAGainsPN_
EETestPulseTask::~EETestPulseTask ( )
virtual

Destructor.

Definition at line 73 of file EETestPulseTask.cc.

73  {
74 
75 }

Member Function Documentation

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

Analyze.

Implements edm::EDAnalyzer.

Definition at line 350 of file EETestPulseTask.cc.

References ecalMGPA::adc(), EcalMGPASample::adc(), EcalEndcap, EcalPnDiodeDigiCollection_, EcalRawDataCollection_, EcalUncalibratedRecHitCollection_, EEDigiCollection_, MonitorElement::Fill(), edm::Event::getByLabel(), i, Numbers::icEE(), ievt_, init_, ecalpyutils::ism(), Numbers::iSM(), EEDetId::ix(), LogDebug, meAmplMapG01_, meAmplMapG06_, meAmplMapG12_, mePnAmplMapG01_, mePnAmplMapG16_, mePnPedMapG01_, mePnPedMapG16_, meShapeMapG01_, meShapeMapG06_, meShapeMapG12_, environment_file_cff::runType, EcalDataFrame::sample(), setup(), Numbers::subDet(), EcalDCCHeaderBlock::TESTPULSE_GAP, and EcalDCCHeaderBlock::TESTPULSE_MGPA.

350  {
351 
352  bool enable = false;
353  int runType[18];
354  for (int i=0; i<18; i++) runType[i] = -1;
355  int mgpaGain[18];
356  for (int i=0; i<18; i++) mgpaGain[i] = -1;
357 
359 
360  if ( e.getByLabel(EcalRawDataCollection_, dcchs) ) {
361 
362  for ( EcalRawDataCollection::const_iterator dcchItr = dcchs->begin(); dcchItr != dcchs->end(); ++dcchItr ) {
363 
364  if ( Numbers::subDet( *dcchItr ) != EcalEndcap ) continue;
365 
366  int ism = Numbers::iSM( *dcchItr, EcalEndcap );
367 
368  runType[ism-1] = dcchItr->getRunType();
369  mgpaGain[ism-1] = dcchItr->getMgpaGain();
370 
371  if ( dcchItr->getRunType() == EcalDCCHeaderBlock::TESTPULSE_MGPA ||
372  dcchItr->getRunType() == EcalDCCHeaderBlock::TESTPULSE_GAP ) enable = true;
373 
374  }
375 
376  } else {
377 
378  edm::LogWarning("EETestPulseTask") << EcalRawDataCollection_ << " not available";
379 
380  }
381 
382  if ( ! enable ) return;
383 
384  if ( ! init_ ) this->setup();
385 
386  ievt_++;
387 
389 
390  if ( e.getByLabel(EEDigiCollection_, digis) ) {
391 
392  int need = digis->size();
393  LogDebug("EETestPulseTask") << "event " << ievt_ << " digi collection size " << need;
394 
395  for ( EEDigiCollection::const_iterator digiItr = digis->begin(); digiItr != digis->end(); ++digiItr ) {
396 
397  EEDetId id = digiItr->id();
398 
399  int ix = id.ix();
400  int iy = id.iy();
401 
402  int ism = Numbers::iSM( id );
403 
404  if ( ! ( runType[ism-1] == EcalDCCHeaderBlock::TESTPULSE_MGPA ||
405  runType[ism-1] == EcalDCCHeaderBlock::TESTPULSE_GAP ) ) continue;
406 
407  int ic = Numbers::icEE(ism, ix, iy);
408 
409  EEDataFrame dataframe = (*digiItr);
410 
411  for (int i = 0; i < 10; i++) {
412 
413  int adc = dataframe.sample(i).adc();
414 
415  MonitorElement* meShapeMap = 0;
416 
417  if ( mgpaGain[ism-1] == 3 ) meShapeMap = meShapeMapG01_[ism-1];
418  if ( mgpaGain[ism-1] == 2 ) meShapeMap = meShapeMapG06_[ism-1];
419  if ( mgpaGain[ism-1] == 1 ) meShapeMap = meShapeMapG12_[ism-1];
420 
421  float xval = float(adc);
422 
423  if ( meShapeMap ) meShapeMap->Fill(ic - 0.5, i + 0.5, xval);
424 
425  }
426 
427  }
428 
429  } else {
430 
431  edm::LogWarning("EETestPulseTask") << EEDigiCollection_ << " not available";
432 
433  }
434 
436 
438 
439  int neh = hits->size();
440  LogDebug("EETestPulseTask") << "event " << ievt_ << " hits collection size " << neh;
441 
442  for ( EcalUncalibratedRecHitCollection::const_iterator hitItr = hits->begin(); hitItr != hits->end(); ++hitItr ) {
443 
444  EEDetId id = hitItr->id();
445 
446  int ix = id.ix();
447  int iy = id.iy();
448 
449  int ism = Numbers::iSM( id );
450 
451  if ( ism >= 1 && ism <= 9 ) ix = 101 - ix;
452 
453  float xix = ix - 0.5;
454  float xiy = iy - 0.5;
455 
456  if ( ! ( runType[ism-1] == EcalDCCHeaderBlock::TESTPULSE_MGPA ||
457  runType[ism-1] == EcalDCCHeaderBlock::TESTPULSE_GAP ) ) continue;
458 
459  MonitorElement* meAmplMap = 0;
460 
461  if ( mgpaGain[ism-1] == 3 ) meAmplMap = meAmplMapG01_[ism-1];
462  if ( mgpaGain[ism-1] == 2 ) meAmplMap = meAmplMapG06_[ism-1];
463  if ( mgpaGain[ism-1] == 1 ) meAmplMap = meAmplMapG12_[ism-1];
464 
465  float xval = hitItr->amplitude();
466  if ( xval <= 0. ) xval = 0.0;
467 
468 // if ( mgpaGain[ism-1] == 3 ) xval = xval * 1./12.;
469 // if ( mgpaGain[ism-1] == 2 ) xval = xval * 1./ 2.;
470 // if ( mgpaGain[ism-1] == 1 ) xval = xval * 1./ 1.;
471 
472  if ( meAmplMap ) meAmplMap->Fill(xix, xiy, xval);
473 
474  }
475 
476  } else {
477 
478  edm::LogWarning("EETestPulseTask") << EcalUncalibratedRecHitCollection_ << " not available";
479 
480  }
481 
483 
484  if ( e.getByLabel(EcalPnDiodeDigiCollection_, pns) ) {
485 
486  int nep = pns->size();
487  LogDebug("EETestPulseTask") << "event " << ievt_ << " pns collection size " << nep;
488 
489  for ( EcalPnDiodeDigiCollection::const_iterator pnItr = pns->begin(); pnItr != pns->end(); ++pnItr ) {
490 
491  if ( Numbers::subDet( pnItr->id() ) != EcalEndcap ) continue;
492 
493  int ism = Numbers::iSM( pnItr->id() );
494 
495  int num = pnItr->id().iPnId();
496 
497  if ( ! ( runType[ism-1] == EcalDCCHeaderBlock::TESTPULSE_MGPA ||
498  runType[ism-1] == EcalDCCHeaderBlock::TESTPULSE_GAP ) ) continue;
499 
500  float xvalped = 0.;
501 
502  for (int i = 0; i < 4; i++) {
503 
504  int adc = pnItr->sample(i).adc();
505 
506  MonitorElement* mePNPed = 0;
507 
508  if ( pnItr->sample(i).gainId() == 0 ) mePNPed = mePnPedMapG01_[ism-1];
509  if ( pnItr->sample(i).gainId() == 1 ) mePNPed = mePnPedMapG16_[ism-1];
510 
511  float xval = float(adc);
512 
513  if ( mePNPed ) mePNPed->Fill(num - 0.5, xval);
514 
515  xvalped = xvalped + xval;
516 
517  }
518 
519  xvalped = xvalped / 4;
520 
521  float xvalmax = 0.;
522 
523  MonitorElement* mePN = 0;
524 
525  for (int i = 0; i < 50; i++) {
526 
527  int adc = pnItr->sample(i).adc();
528 
529  float xval = float(adc);
530 
531  if ( xval >= xvalmax ) xvalmax = xval;
532 
533  }
534 
535  xvalmax = xvalmax - xvalped;
536 
537  if ( pnItr->sample(0).gainId() == 0 ) mePN = mePnAmplMapG01_[ism-1];
538  if ( pnItr->sample(0).gainId() == 1 ) mePN = mePnAmplMapG16_[ism-1];
539 
540  if ( mePN ) mePN->Fill(num - 0.5, xvalmax);
541 
542  }
543 
544  } else {
545 
546  edm::LogWarning("EETestPulseTask") << EcalPnDiodeDigiCollection_ << " not available";
547 
548  }
549 
550 }
int adc(sample_type sample)
get the ADC sample (12 bits)
#define LogDebug(id)
edm::InputTag EEDigiCollection_
int i
Definition: DBlmapReader.cc:9
int ix() const
Definition: EEDetId.h:77
boost::transform_iterator< IterHelp, boost::counting_iterator< int > > const_iterator
static unsigned icEE(const unsigned ism, const unsigned ix, const unsigned iy)
Definition: Numbers.cc:739
std::vector< T >::const_iterator const_iterator
MonitorElement * meShapeMapG06_[18]
EcalMGPASample sample(int i) const
Definition: EcalDataFrame.h:30
MonitorElement * mePnAmplMapG01_[18]
MonitorElement * meAmplMapG01_[18]
void Fill(long long x)
void setup(void)
Setup.
MonitorElement * mePnAmplMapG16_[18]
edm::InputTag EcalUncalibratedRecHitCollection_
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
Definition: Event.h:361
MonitorElement * meAmplMapG12_[18]
MonitorElement * meShapeMapG12_[18]
long long int num
Definition: procUtils.cc:71
MonitorElement * mePnPedMapG01_[18]
edm::InputTag EcalRawDataCollection_
static unsigned iSM(const unsigned ism, const EcalSubdetector subdet)
Definition: Numbers.cc:246
edm::InputTag EcalPnDiodeDigiCollection_
MonitorElement * meAmplMapG06_[18]
MonitorElement * meShapeMapG01_[18]
MonitorElement * mePnPedMapG16_[18]
static EcalSubdetector subDet(const EBDetId &id)
Definition: Numbers.cc:145
int ism(int ieta, int iphi)
Definition: EcalPyUtils.cc:56
int adc() const
get the ADC sample (12 bits)
void EETestPulseTask::beginJob ( void  )
protectedvirtual

BeginJob.

Reimplemented from edm::EDAnalyzer.

Definition at line 77 of file EETestPulseTask.cc.

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

77  {
78 
79  ievt_ = 0;
80 
81  if ( dqmStore_ ) {
82  dqmStore_->setCurrentFolder(prefixME_ + "/EETestPulseTask");
83  dqmStore_->rmdir(prefixME_ + "/EETestPulseTask");
84  }
85 
86 }
void rmdir(const std::string &fullpath)
Definition: DQMStore.cc:2535
std::string prefixME_
DQMStore * dqmStore_
void setCurrentFolder(const std::string &fullpath)
Definition: DQMStore.cc:434
void EETestPulseTask::beginRun ( const edm::Run r,
const edm::EventSetup c 
)
protectedvirtual

BeginRun.

Reimplemented from edm::EDAnalyzer.

Definition at line 88 of file EETestPulseTask.cc.

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

88  {
89 
90  Numbers::initGeometry(c, false);
91 
92  if ( ! mergeRuns_ ) this->reset();
93 
94 }
void reset(void)
Reset.
static void initGeometry(const edm::EventSetup &setup, bool verbose=false)
Definition: Numbers.cc:50
void EETestPulseTask::cleanup ( void  )
protected

Cleanup.

Definition at line 267 of file EETestPulseTask.cc.

References dqmStore_, spr::find(), i, init_, meAmplMapG01_, meAmplMapG06_, meAmplMapG12_, mePnAmplMapG01_, mePnAmplMapG16_, mePnPedMapG01_, mePnPedMapG16_, meShapeMapG01_, meShapeMapG06_, meShapeMapG12_, MGPAGains_, MGPAGainsPN_, prefixME_, DQMStore::removeElement(), and DQMStore::setCurrentFolder().

Referenced by endJob().

267  {
268 
269  if ( ! init_ ) return;
270 
271  if ( dqmStore_ ) {
272  dqmStore_->setCurrentFolder(prefixME_ + "/EETestPulseTask");
273 
274  if (find(MGPAGains_.begin(), MGPAGains_.end(), 1) != MGPAGains_.end() ) {
275 
276  dqmStore_->setCurrentFolder(prefixME_ + "/EETestPulseTask/Gain01");
277  for (int i = 0; i < 18; i++) {
278  if ( meShapeMapG01_[i] ) dqmStore_->removeElement( meShapeMapG01_[i]->getName() );
279  meShapeMapG01_[i] = 0;
280  if ( meAmplMapG01_[i] ) dqmStore_->removeElement( meAmplMapG01_[i]->getName() );
281  meAmplMapG01_[i] = 0;
282  }
283 
284  }
285 
286  if (find(MGPAGains_.begin(), MGPAGains_.end(), 6) != MGPAGains_.end() ) {
287 
288  dqmStore_->setCurrentFolder(prefixME_ + "/EETestPulseTask/Gain06");
289  for (int i = 0; i < 18; i++) {
290  if ( meShapeMapG06_[i] ) dqmStore_->removeElement( meShapeMapG06_[i]->getName() );
291  meShapeMapG06_[i] = 0;
292  if ( meAmplMapG06_[i] ) dqmStore_->removeElement( meAmplMapG06_[i]->getName() );
293  meAmplMapG06_[i] = 0;
294  }
295 
296  }
297 
298  if (find(MGPAGains_.begin(), MGPAGains_.end(), 12) != MGPAGains_.end() ) {
299 
300  dqmStore_->setCurrentFolder(prefixME_ + "/EETestPulseTask/Gain12");
301  for (int i = 0; i < 18; i++) {
302  if ( meShapeMapG12_[i] ) dqmStore_->removeElement( meShapeMapG12_[i]->getName() );
303  meShapeMapG12_[i] = 0;
304  if ( meAmplMapG12_[i] ) dqmStore_->removeElement( meAmplMapG12_[i]->getName() );
305  meAmplMapG12_[i] = 0;
306  }
307 
308  }
309 
310  dqmStore_->setCurrentFolder(prefixME_ + "/EETestPulseTask/PN");
311 
312  if (find(MGPAGainsPN_.begin(), MGPAGainsPN_.end(), 1) != MGPAGainsPN_.end() ) {
313 
314  dqmStore_->setCurrentFolder(prefixME_ + "/EETestPulseTask/PN/Gain01");
315  for (int i = 0; i < 18; i++) {
316  if ( mePnAmplMapG01_[i] ) dqmStore_->removeElement( mePnAmplMapG01_[i]->getName() );
317  mePnAmplMapG01_[i] = 0;
318  if ( mePnPedMapG01_[i] ) dqmStore_->removeElement( mePnPedMapG01_[i]->getName() );
319  mePnPedMapG01_[i] = 0;
320  }
321 
322  }
323 
324  if (find(MGPAGainsPN_.begin(), MGPAGainsPN_.end(), 16) != MGPAGainsPN_.end() ) {
325 
326  dqmStore_->setCurrentFolder(prefixME_ + "/EETestPulseTask/PN/Gain16");
327  for (int i = 0; i < 18; i++) {
328  if ( mePnAmplMapG16_[i] ) dqmStore_->removeElement( mePnAmplMapG16_[i]->getName() );
329  mePnAmplMapG16_[i] = 0;
330  if ( mePnPedMapG16_[i] ) dqmStore_->removeElement( mePnPedMapG16_[i]->getName() );
331  mePnPedMapG16_[i] = 0;
332  }
333 
334  }
335 
336  }
337 
338  init_ = false;
339 
340 }
int i
Definition: DBlmapReader.cc:9
std::vector< int > MGPAGains_
MonitorElement * meShapeMapG06_[18]
MonitorElement * mePnAmplMapG01_[18]
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
Definition: FindCaloHit.cc:7
MonitorElement * meAmplMapG01_[18]
MonitorElement * mePnAmplMapG16_[18]
void removeElement(const std::string &name)
Definition: DQMStore.cc:2577
std::string prefixME_
DQMStore * dqmStore_
MonitorElement * meAmplMapG12_[18]
MonitorElement * meShapeMapG12_[18]
MonitorElement * mePnPedMapG01_[18]
MonitorElement * meAmplMapG06_[18]
MonitorElement * meShapeMapG01_[18]
MonitorElement * mePnPedMapG16_[18]
void setCurrentFolder(const std::string &fullpath)
Definition: DQMStore.cc:434
std::vector< int > MGPAGainsPN_
void EETestPulseTask::endJob ( void  )
protectedvirtual

EndJob.

Reimplemented from edm::EDAnalyzer.

Definition at line 342 of file EETestPulseTask.cc.

References cleanup(), enableCleanup_, and ievt_.

342  {
343 
344  edm::LogInfo("EETestPulseTask") << "analyzed " << ievt_ << " events";
345 
346  if ( enableCleanup_ ) this->cleanup();
347 
348 }
void cleanup(void)
Cleanup.
void EETestPulseTask::endRun ( const edm::Run r,
const edm::EventSetup c 
)
protectedvirtual

EndRun.

Reimplemented from edm::EDAnalyzer.

Definition at line 96 of file EETestPulseTask.cc.

96  {
97 
98 }
void EETestPulseTask::reset ( void  )
protected

Reset.

Definition at line 100 of file EETestPulseTask.cc.

References spr::find(), i, meAmplMapG01_, meAmplMapG06_, meAmplMapG12_, mePnAmplMapG01_, mePnAmplMapG16_, mePnPedMapG01_, mePnPedMapG16_, meShapeMapG01_, meShapeMapG06_, meShapeMapG12_, MGPAGains_, MGPAGainsPN_, and MonitorElement::Reset().

Referenced by beginRun().

100  {
101 
102  for (int i = 0; i < 18; i++) {
103  if (find(MGPAGains_.begin(), MGPAGains_.end(), 1) != MGPAGains_.end() ) {
104  if ( meShapeMapG01_[i] ) meShapeMapG01_[i]->Reset();
105  if ( meAmplMapG01_[i] ) meAmplMapG01_[i]->Reset();
106  }
107  if (find(MGPAGains_.begin(), MGPAGains_.end(), 6) != MGPAGains_.end() ) {
108  if ( meShapeMapG06_[i] ) meShapeMapG06_[i]->Reset();
109  if ( meAmplMapG06_[i] ) meAmplMapG06_[i]->Reset();
110  }
111  if (find(MGPAGains_.begin(), MGPAGains_.end(), 12) != MGPAGains_.end() ) {
112  if ( meShapeMapG12_[i] ) meShapeMapG12_[i]->Reset();
113  if ( meAmplMapG12_[i] ) meAmplMapG12_[i]->Reset();
114  }
115  if (find(MGPAGainsPN_.begin(), MGPAGainsPN_.end(), 1) != MGPAGainsPN_.end() ) {
116  if ( mePnAmplMapG01_[i] ) mePnAmplMapG01_[i]->Reset();
117  if ( mePnPedMapG01_[i] ) mePnPedMapG01_[i]->Reset();
118  }
119  if (find(MGPAGainsPN_.begin(), MGPAGainsPN_.end(), 16) != MGPAGainsPN_.end() ) {
120  if ( mePnAmplMapG16_[i] ) mePnAmplMapG16_[i]->Reset();
121  if ( mePnPedMapG16_[i] ) mePnPedMapG16_[i]->Reset();
122  }
123  }
124 
125 }
int i
Definition: DBlmapReader.cc:9
std::vector< int > MGPAGains_
MonitorElement * meShapeMapG06_[18]
MonitorElement * mePnAmplMapG01_[18]
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
Definition: FindCaloHit.cc:7
MonitorElement * meAmplMapG01_[18]
MonitorElement * mePnAmplMapG16_[18]
MonitorElement * meAmplMapG12_[18]
MonitorElement * meShapeMapG12_[18]
MonitorElement * mePnPedMapG01_[18]
MonitorElement * meAmplMapG06_[18]
MonitorElement * meShapeMapG01_[18]
MonitorElement * mePnPedMapG16_[18]
void Reset(void)
reset ME (ie. contents, errors, etc)
std::vector< int > MGPAGainsPN_
void EETestPulseTask::setup ( void  )
protected

Setup.

Definition at line 127 of file EETestPulseTask.cc.

References DQMStore::bookProfile(), DQMStore::bookProfile2D(), dqmStore_, spr::find(), i, init_, Numbers::ix0EE(), Numbers::iy0EE(), meAmplMapG01_, meAmplMapG06_, meAmplMapG12_, mePnAmplMapG01_, mePnAmplMapG16_, mePnPedMapG01_, mePnPedMapG16_, meShapeMapG01_, meShapeMapG06_, meShapeMapG12_, MGPAGains_, MGPAGainsPN_, mergeVDriftHistosByStation::name, prefixME_, Numbers::sEE(), MonitorElement::setAxisTitle(), DQMStore::setCurrentFolder(), AlCaHLTBitMon_QueryRunRegistry::string, and DQMStore::tag().

Referenced by analyze().

127  {
128 
129  init_ = true;
130 
132  std::stringstream GainN, GN;
133 
134  if ( dqmStore_ ) {
135  dqmStore_->setCurrentFolder(prefixME_ + "/EETestPulseTask");
136 
137  if (find(MGPAGains_.begin(), MGPAGains_.end(), 1) != MGPAGains_.end() ) {
138 
139  GainN.str("");
140  GainN << "Gain" << std::setw(2) << std::setfill('0') << 1;
141  GN.str("");
142  GN << "G" << std::setw(2) << std::setfill('0') << 1;
143 
144  dqmStore_->setCurrentFolder(prefixME_ + "/EETestPulseTask/" + GainN.str());
145  for (int i = 0; i < 18; i++) {
146  name = "EETPT shape " + Numbers::sEE(i+1) + " " + GN.str();
147  meShapeMapG01_[i] = dqmStore_->bookProfile2D(name, name, 850, 0., 850., 10, 0., 10., 4096, 0., 4096., "s");
148  meShapeMapG01_[i]->setAxisTitle("channel", 1);
149  meShapeMapG01_[i]->setAxisTitle("sample", 2);
150  meShapeMapG01_[i]->setAxisTitle("amplitude", 3);
151  dqmStore_->tag(meShapeMapG01_[i], i+1);
152 
153  name = "EETPT amplitude " + Numbers::sEE(i+1) + " " + GN.str();
154  meAmplMapG01_[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");
155  meAmplMapG01_[i]->setAxisTitle("ix", 1);
156  if ( i+1 >= 1 && i+1 <= 9 ) meAmplMapG01_[i]->setAxisTitle("101-ix", 1);
157  meAmplMapG01_[i]->setAxisTitle("iy", 2);
158  dqmStore_->tag(meAmplMapG01_[i], i+1);
159  }
160 
161  }
162 
163  if (find(MGPAGains_.begin(), MGPAGains_.end(), 6) != MGPAGains_.end() ) {
164 
165  GainN.str("");
166  GainN << "Gain" << std::setw(2) << std::setfill('0') << 6;
167  GN.str("");
168  GN << "G" << std::setw(2) << std::setfill('0') << 6;
169 
170  dqmStore_->setCurrentFolder(prefixME_ + "/EETestPulseTask/" + GainN.str());
171  for (int i = 0; i < 18; i++) {
172  name = "EETPT shape " + Numbers::sEE(i+1) + " " + GN.str();
173  meShapeMapG06_[i] = dqmStore_->bookProfile2D(name, name, 850, 0., 850., 10, 0., 10., 4096, 0., 4096., "s");
174  meShapeMapG06_[i]->setAxisTitle("channel", 1);
175  meShapeMapG06_[i]->setAxisTitle("sample", 2);
176  meShapeMapG06_[i]->setAxisTitle("amplitude", 3);
177  dqmStore_->tag(meShapeMapG06_[i], i+1);
178 
179  name = "EETPT amplitude " + Numbers::sEE(i+1) + " " + GN.str();
180  meAmplMapG06_[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");
181  meAmplMapG06_[i]->setAxisTitle("ix", 1);
182  if ( i+1 >= 1 && i+1 <= 9 ) meAmplMapG06_[i]->setAxisTitle("101-ix", 1);
183  meAmplMapG06_[i]->setAxisTitle("iy", 2);
184  dqmStore_->tag(meAmplMapG06_[i], i+1);
185  }
186 
187  }
188 
189  if (find(MGPAGains_.begin(), MGPAGains_.end(), 12) != MGPAGains_.end() ) {
190 
191  GainN.str("");
192  GainN << "Gain" << std::setw(2) << std::setfill('0') << 12;
193  GN.str("");
194  GN << "G" << std::setw(2) << std::setfill('0') << 12;
195 
196  dqmStore_->setCurrentFolder(prefixME_ + "/EETestPulseTask/" + GainN.str());
197  for (int i = 0; i < 18; i++) {
198  name = "EETPT shape " + Numbers::sEE(i+1) + " " + GN.str();
199  meShapeMapG12_[i] = dqmStore_->bookProfile2D(name, name, 850, 0., 850., 10, 0., 10., 4096, 0., 4096., "s");
200  meShapeMapG12_[i]->setAxisTitle("channel", 1);
201  meShapeMapG12_[i]->setAxisTitle("sample", 2);
202  meShapeMapG12_[i]->setAxisTitle("amplitude", 3);
203  dqmStore_->tag(meShapeMapG12_[i], i+1);
204 
205  name = "EETPT amplitude " + Numbers::sEE(i+1) + " " + GN.str();
206  meAmplMapG12_[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");
207  meAmplMapG12_[i]->setAxisTitle("ix", 1);
208  if ( i+1 >= 1 && i+1 <= 9 ) meAmplMapG12_[i]->setAxisTitle("101-ix", 1);
209  meAmplMapG12_[i]->setAxisTitle("iy", 2);
210  dqmStore_->tag(meAmplMapG12_[i], i+1);
211  }
212 
213  }
214 
215  dqmStore_->setCurrentFolder(prefixME_ + "/EETestPulseTask/PN");
216 
217  if (find(MGPAGainsPN_.begin(), MGPAGainsPN_.end(), 1) != MGPAGainsPN_.end() ) {
218 
219  GainN.str("");
220  GainN << "Gain" << std::setw(2) << std::setfill('0') << 1;
221  GN.str("");
222  GN << "G" << std::setw(2) << std::setfill('0') << 1;
223 
224  dqmStore_->setCurrentFolder(prefixME_ + "/EETestPulseTask/PN/" + GainN.str());
225  for (int i = 0; i < 18; i++) {
226  name = "EETPT PNs amplitude " + Numbers::sEE(i+1) + " " + GN.str();
227  mePnAmplMapG01_[i] = dqmStore_->bookProfile(name, name, 10, 0., 10., 4096, 0., 4096., "s");
228  mePnAmplMapG01_[i]->setAxisTitle("channel", 1);
229  mePnAmplMapG01_[i]->setAxisTitle("amplitude", 2);
230  dqmStore_->tag(mePnAmplMapG01_[i], i+1);
231  name = "EETPT PNs pedestal " + Numbers::sEE(i+1) + " " + GN.str();
232  mePnPedMapG01_[i] = dqmStore_->bookProfile(name, name, 10, 0., 10., 4096, 0., 4096., "s");
233  mePnPedMapG01_[i]->setAxisTitle("channel", 1);
234  mePnPedMapG01_[i]->setAxisTitle("pedestal", 2);
235  dqmStore_->tag(mePnPedMapG01_[i], i+1);
236  }
237 
238  }
239 
240  if (find(MGPAGainsPN_.begin(), MGPAGainsPN_.end(), 16) != MGPAGainsPN_.end() ) {
241 
242  GainN.str("");
243  GainN << "Gain" << std::setw(2) << std::setfill('0') << 16;
244  GN.str("");
245  GN << "G" << std::setw(2) << std::setfill('0') << 16;
246 
247  dqmStore_->setCurrentFolder(prefixME_ + "/EETestPulseTask/PN/" + GainN.str());
248  for (int i = 0; i < 18; i++) {
249  name = "EETPT PNs amplitude " + Numbers::sEE(i+1) + " " + GN.str();
250  mePnAmplMapG16_[i] = dqmStore_->bookProfile(name, name, 10, 0., 10., 4096, 0., 4096., "s");
251  mePnAmplMapG16_[i]->setAxisTitle("channel", 1);
252  mePnAmplMapG16_[i]->setAxisTitle("amplitude", 2);
253  dqmStore_->tag(mePnAmplMapG16_[i], i+1);
254  name = "EETPT PNs pedestal " + Numbers::sEE(i+1) + " " + GN.str();
255  mePnPedMapG16_[i] = dqmStore_->bookProfile(name, name, 10, 0., 10., 4096, 0., 4096., "s");
256  mePnPedMapG16_[i]->setAxisTitle("channel", 1);
257  mePnPedMapG16_[i]->setAxisTitle("pedestal", 2);
258  dqmStore_->tag(mePnPedMapG16_[i], i+1);
259  }
260 
261  }
262 
263  }
264 
265 }
static std::string sEE(const unsigned ism)
Definition: Numbers.cc:226
int i
Definition: DBlmapReader.cc:9
std::vector< int > MGPAGains_
MonitorElement * meShapeMapG06_[18]
MonitorElement * mePnAmplMapG01_[18]
static int ix0EE(const unsigned ism)
Definition: Numbers.cc:773
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:812
MonitorElement * meAmplMapG01_[18]
void tag(MonitorElement *me, unsigned int myTag)
Definition: DQMStore.cc:1359
MonitorElement * mePnAmplMapG16_[18]
std::string prefixME_
DQMStore * dqmStore_
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:1036
MonitorElement * meAmplMapG12_[18]
MonitorElement * meShapeMapG12_[18]
MonitorElement * mePnPedMapG01_[18]
MonitorElement * meAmplMapG06_[18]
MonitorElement * meShapeMapG01_[18]
MonitorElement * mePnPedMapG16_[18]
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:434
std::vector< int > MGPAGainsPN_
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:1180

Member Data Documentation

float EETestPulseTask::amplitudeThreshold_
private

Definition at line 91 of file EETestPulseTask.h.

DQMStore* EETestPulseTask::dqmStore_
private

Definition at line 60 of file EETestPulseTask.h.

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

edm::InputTag EETestPulseTask::EcalPnDiodeDigiCollection_
private

Definition at line 70 of file EETestPulseTask.h.

Referenced by analyze(), and EETestPulseTask().

edm::InputTag EETestPulseTask::EcalRawDataCollection_
private

Definition at line 68 of file EETestPulseTask.h.

Referenced by analyze(), and EETestPulseTask().

edm::InputTag EETestPulseTask::EcalUncalibratedRecHitCollection_
private

Definition at line 71 of file EETestPulseTask.h.

Referenced by analyze(), and EETestPulseTask().

edm::InputTag EETestPulseTask::EEDigiCollection_
private

Definition at line 69 of file EETestPulseTask.h.

Referenced by analyze(), and EETestPulseTask().

bool EETestPulseTask::enableCleanup_
private

Definition at line 64 of file EETestPulseTask.h.

Referenced by EETestPulseTask(), and endJob().

int EETestPulseTask::ievt_
private

Definition at line 58 of file EETestPulseTask.h.

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

bool EETestPulseTask::init_
private

Definition at line 93 of file EETestPulseTask.h.

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

MonitorElement* EETestPulseTask::meAmplMapG01_[18]
private

Definition at line 79 of file EETestPulseTask.h.

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

MonitorElement* EETestPulseTask::meAmplMapG06_[18]
private

Definition at line 80 of file EETestPulseTask.h.

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

MonitorElement* EETestPulseTask::meAmplMapG12_[18]
private

Definition at line 81 of file EETestPulseTask.h.

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

MonitorElement* EETestPulseTask::mePnAmplMapG01_[18]
private

Definition at line 83 of file EETestPulseTask.h.

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

MonitorElement* EETestPulseTask::mePnAmplMapG16_[18]
private

Definition at line 84 of file EETestPulseTask.h.

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

MonitorElement* EETestPulseTask::mePnPedMapG01_[18]
private

Definition at line 86 of file EETestPulseTask.h.

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

MonitorElement* EETestPulseTask::mePnPedMapG16_[18]
private

Definition at line 87 of file EETestPulseTask.h.

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

bool EETestPulseTask::mergeRuns_
private

Definition at line 66 of file EETestPulseTask.h.

Referenced by beginRun(), and EETestPulseTask().

MonitorElement* EETestPulseTask::meShapeMapG01_[18]
private

Definition at line 75 of file EETestPulseTask.h.

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

MonitorElement* EETestPulseTask::meShapeMapG06_[18]
private

Definition at line 76 of file EETestPulseTask.h.

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

MonitorElement* EETestPulseTask::meShapeMapG12_[18]
private

Definition at line 77 of file EETestPulseTask.h.

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

std::vector<int> EETestPulseTask::MGPAGains_
private

Definition at line 72 of file EETestPulseTask.h.

Referenced by cleanup(), EETestPulseTask(), reset(), and setup().

std::vector<int> EETestPulseTask::MGPAGainsPN_
private

Definition at line 73 of file EETestPulseTask.h.

Referenced by cleanup(), EETestPulseTask(), reset(), and setup().

std::string EETestPulseTask::prefixME_
private

Definition at line 62 of file EETestPulseTask.h.

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