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

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 ()
 

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
CurrentProcessingContext const * currentContext () const
 

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)
 

Detailed Description

Definition at line 20 of file EETestPulseTask.h.

Constructor & Destructor Documentation

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

Constructor.

Definition at line 32 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_, cmsCodeRules.cppFunctionSkipper::operator, and prefixME_.

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

72  {
73 
74 }

Member Function Documentation

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

Analyze.

Implements edm::EDAnalyzer.

Definition at line 320 of file EETestPulseTask.cc.

References ecalMGPA::adc(), EcalMGPASample::adc(), EcalEndcap, EcalPnDiodeDigiCollection_, EcalRawDataCollection_, EcalUncalibratedRecHitCollection_, EEDigiCollection_, MonitorElement::Fill(), EcalMGPASample::gainId(), 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_, ExpressReco_HICollisions_FallBack::runType, EcalDataFrame::sample(), setup(), Numbers::subDet(), EcalDCCHeaderBlock::TESTPULSE_GAP, and EcalDCCHeaderBlock::TESTPULSE_MGPA.

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

BeginJob.

Reimplemented from edm::EDAnalyzer.

Definition at line 76 of file EETestPulseTask.cc.

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

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

BeginRun.

Reimplemented from edm::EDAnalyzer.

Definition at line 87 of file EETestPulseTask.cc.

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

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

Cleanup.

Definition at line 237 of file EETestPulseTask.cc.

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

Referenced by endJob().

237  {
238 
239  if ( ! init_ ) return;
240 
241  if ( dqmStore_ ) {
242  dqmStore_->setCurrentFolder(prefixME_ + "/EETestPulseTask");
243 
244  if (find(MGPAGains_.begin(), MGPAGains_.end(), 1) != MGPAGains_.end() ) {
245 
246  dqmStore_->setCurrentFolder(prefixME_ + "/EETestPulseTask/Gain01");
247  for (int i = 0; i < 18; i++) {
249  meShapeMapG01_[i] = 0;
251  meAmplMapG01_[i] = 0;
252  }
253 
254  }
255 
256  if (find(MGPAGains_.begin(), MGPAGains_.end(), 6) != MGPAGains_.end() ) {
257 
258  dqmStore_->setCurrentFolder(prefixME_ + "/EETestPulseTask/Gain06");
259  for (int i = 0; i < 18; i++) {
261  meShapeMapG06_[i] = 0;
263  meAmplMapG06_[i] = 0;
264  }
265 
266  }
267 
268  if (find(MGPAGains_.begin(), MGPAGains_.end(), 12) != MGPAGains_.end() ) {
269 
270  dqmStore_->setCurrentFolder(prefixME_ + "/EETestPulseTask/Gain12");
271  for (int i = 0; i < 18; i++) {
273  meShapeMapG12_[i] = 0;
275  meAmplMapG12_[i] = 0;
276  }
277 
278  }
279 
280  dqmStore_->setCurrentFolder(prefixME_ + "/EETestPulseTask/PN");
281 
282  if (find(MGPAGainsPN_.begin(), MGPAGainsPN_.end(), 1) != MGPAGainsPN_.end() ) {
283 
284  dqmStore_->setCurrentFolder(prefixME_ + "/EETestPulseTask/PN/Gain01");
285  for (int i = 0; i < 18; i++) {
287  mePnAmplMapG01_[i] = 0;
289  mePnPedMapG01_[i] = 0;
290  }
291 
292  }
293 
294  if (find(MGPAGainsPN_.begin(), MGPAGainsPN_.end(), 16) != MGPAGainsPN_.end() ) {
295 
296  dqmStore_->setCurrentFolder(prefixME_ + "/EETestPulseTask/PN/Gain16");
297  for (int i = 0; i < 18; i++) {
299  mePnAmplMapG16_[i] = 0;
301  mePnPedMapG16_[i] = 0;
302  }
303 
304  }
305 
306  }
307 
308  init_ = false;
309 
310 }
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:2338
std::string prefixME_
DQMStore * dqmStore_
std::string getName(Reflex::Type &cc)
Definition: ClassFiller.cc:18
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:237
std::vector< int > MGPAGainsPN_
void EETestPulseTask::endJob ( void  )
protectedvirtual

EndJob.

Reimplemented from edm::EDAnalyzer.

Definition at line 312 of file EETestPulseTask.cc.

References cleanup(), enableCleanup_, and ievt_.

312  {
313 
314  edm::LogInfo("EETestPulseTask") << "analyzed " << ievt_ << " events";
315 
316  if ( enableCleanup_ ) this->cleanup();
317 
318 }
void cleanup(void)
Cleanup.
void EETestPulseTask::endRun ( const edm::Run r,
const edm::EventSetup c 
)
protectedvirtual

EndRun.

Reimplemented from edm::EDAnalyzer.

Definition at line 95 of file EETestPulseTask.cc.

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

Reset.

Definition at line 99 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().

99  {
100 
101  for (int i = 0; i < 18; i++) {
102  if (find(MGPAGains_.begin(), MGPAGains_.end(), 1) != MGPAGains_.end() ) {
103  if ( meShapeMapG01_[i] ) meShapeMapG01_[i]->Reset();
104  if ( meAmplMapG01_[i] ) meAmplMapG01_[i]->Reset();
105  }
106  if (find(MGPAGains_.begin(), MGPAGains_.end(), 6) != MGPAGains_.end() ) {
107  if ( meShapeMapG06_[i] ) meShapeMapG06_[i]->Reset();
108  if ( meAmplMapG06_[i] ) meAmplMapG06_[i]->Reset();
109  }
110  if (find(MGPAGains_.begin(), MGPAGains_.end(), 12) != MGPAGains_.end() ) {
111  if ( meShapeMapG12_[i] ) meShapeMapG12_[i]->Reset();
112  if ( meAmplMapG12_[i] ) meAmplMapG12_[i]->Reset();
113  }
114  if (find(MGPAGainsPN_.begin(), MGPAGainsPN_.end(), 1) != MGPAGainsPN_.end() ) {
115  if ( mePnAmplMapG01_[i] ) mePnAmplMapG01_[i]->Reset();
116  if ( mePnPedMapG01_[i] ) mePnPedMapG01_[i]->Reset();
117  }
118  if (find(MGPAGainsPN_.begin(), MGPAGainsPN_.end(), 16) != MGPAGainsPN_.end() ) {
119  if ( mePnAmplMapG16_[i] ) mePnAmplMapG16_[i]->Reset();
120  if ( mePnPedMapG16_[i] ) mePnPedMapG16_[i]->Reset();
121  }
122  }
123 
124 }
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 126 of file EETestPulseTask.cc.

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

Referenced by analyze().

126  {
127 
128  init_ = true;
129 
130  char histo[200];
131 
132  if ( dqmStore_ ) {
133  dqmStore_->setCurrentFolder(prefixME_ + "/EETestPulseTask");
134 
135  if (find(MGPAGains_.begin(), MGPAGains_.end(), 1) != MGPAGains_.end() ) {
136 
137  dqmStore_->setCurrentFolder(prefixME_ + "/EETestPulseTask/Gain01");
138  for (int i = 0; i < 18; i++) {
139  sprintf(histo, "EETPT shape %s G01", Numbers::sEE(i+1).c_str());
140  meShapeMapG01_[i] = dqmStore_->bookProfile2D(histo, histo, 850, 0., 850., 10, 0., 10., 4096, 0., 4096., "s");
141  meShapeMapG01_[i]->setAxisTitle("channel", 1);
142  meShapeMapG01_[i]->setAxisTitle("sample", 2);
143  meShapeMapG01_[i]->setAxisTitle("amplitude", 3);
144  dqmStore_->tag(meShapeMapG01_[i], i+1);
145  sprintf(histo, "EETPT amplitude %s G01", Numbers::sEE(i+1).c_str());
146  meAmplMapG01_[i] = dqmStore_->bookProfile2D(histo, histo, 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");
147  meAmplMapG01_[i]->setAxisTitle("ix", 1);
148  if ( i+1 >= 1 && i+1 <= 9 ) meAmplMapG01_[i]->setAxisTitle("101-ix", 1);
149  meAmplMapG01_[i]->setAxisTitle("iy", 2);
150  dqmStore_->tag(meAmplMapG01_[i], i+1);
151  }
152 
153  }
154 
155  if (find(MGPAGains_.begin(), MGPAGains_.end(), 6) != MGPAGains_.end() ) {
156 
157  dqmStore_->setCurrentFolder(prefixME_ + "/EETestPulseTask/Gain06");
158  for (int i = 0; i < 18; i++) {
159  sprintf(histo, "EETPT shape %s G06", Numbers::sEE(i+1).c_str());
160  meShapeMapG06_[i] = dqmStore_->bookProfile2D(histo, histo, 850, 0., 850., 10, 0., 10., 4096, 0., 4096., "s");
161  meShapeMapG06_[i]->setAxisTitle("channel", 1);
162  meShapeMapG06_[i]->setAxisTitle("sample", 2);
163  meShapeMapG06_[i]->setAxisTitle("amplitude", 3);
164  dqmStore_->tag(meShapeMapG06_[i], i+1);
165  sprintf(histo, "EETPT amplitude %s G06", Numbers::sEE(i+1).c_str());
166  meAmplMapG06_[i] = dqmStore_->bookProfile2D(histo, histo, 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");
167  meAmplMapG06_[i]->setAxisTitle("ix", 1);
168  if ( i+1 >= 1 && i+1 <= 9 ) meAmplMapG06_[i]->setAxisTitle("101-ix", 1);
169  meAmplMapG06_[i]->setAxisTitle("iy", 2);
170  dqmStore_->tag(meAmplMapG06_[i], i+1);
171  }
172 
173  }
174 
175  if (find(MGPAGains_.begin(), MGPAGains_.end(), 12) != MGPAGains_.end() ) {
176 
177  dqmStore_->setCurrentFolder(prefixME_ + "/EETestPulseTask/Gain12");
178  for (int i = 0; i < 18; i++) {
179  sprintf(histo, "EETPT shape %s G12", Numbers::sEE(i+1).c_str());
180  meShapeMapG12_[i] = dqmStore_->bookProfile2D(histo, histo, 850, 0., 850., 10, 0., 10., 4096, 0., 4096., "s");
181  meShapeMapG12_[i]->setAxisTitle("channel", 1);
182  meShapeMapG12_[i]->setAxisTitle("sample", 2);
183  meShapeMapG12_[i]->setAxisTitle("amplitude", 3);
184  dqmStore_->tag(meShapeMapG12_[i], i+1);
185  sprintf(histo, "EETPT amplitude %s G12", Numbers::sEE(i+1).c_str());
186  meAmplMapG12_[i] = dqmStore_->bookProfile2D(histo, histo, 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");
187  meAmplMapG12_[i]->setAxisTitle("ix", 1);
188  if ( i+1 >= 1 && i+1 <= 9 ) meAmplMapG12_[i]->setAxisTitle("101-ix", 1);
189  meAmplMapG12_[i]->setAxisTitle("iy", 2);
190  dqmStore_->tag(meAmplMapG12_[i], i+1);
191  }
192 
193  }
194 
195  dqmStore_->setCurrentFolder(prefixME_ + "/EETestPulseTask/PN");
196 
197  if (find(MGPAGainsPN_.begin(), MGPAGainsPN_.end(), 1) != MGPAGainsPN_.end() ) {
198 
199  dqmStore_->setCurrentFolder(prefixME_ + "/EETestPulseTask/PN/Gain01");
200  for (int i = 0; i < 18; i++) {
201  sprintf(histo, "EETPT PNs amplitude %s G01", Numbers::sEE(i+1).c_str());
202  mePnAmplMapG01_[i] = dqmStore_->bookProfile(histo, histo, 10, 0., 10., 4096, 0., 4096., "s");
203  mePnAmplMapG01_[i]->setAxisTitle("channel", 1);
204  mePnAmplMapG01_[i]->setAxisTitle("amplitude", 2);
205  dqmStore_->tag(mePnAmplMapG01_[i], i+1);
206  sprintf(histo, "EETPT PNs pedestal %s G01", Numbers::sEE(i+1).c_str());
207  mePnPedMapG01_[i] = dqmStore_->bookProfile(histo, histo, 10, 0., 10., 4096, 0., 4096., "s");
208  mePnPedMapG01_[i]->setAxisTitle("channel", 1);
209  mePnPedMapG01_[i]->setAxisTitle("pedestal", 2);
210  dqmStore_->tag(mePnPedMapG01_[i], i+1);
211  }
212 
213  }
214 
215  if (find(MGPAGainsPN_.begin(), MGPAGainsPN_.end(), 16) != MGPAGainsPN_.end() ) {
216 
217  dqmStore_->setCurrentFolder(prefixME_ + "/EETestPulseTask/PN/Gain16");
218  for (int i = 0; i < 18; i++) {
219  sprintf(histo, "EETPT PNs amplitude %s G16", Numbers::sEE(i+1).c_str());
220  mePnAmplMapG16_[i] = dqmStore_->bookProfile(histo, histo, 10, 0., 10., 4096, 0., 4096., "s");
221  mePnAmplMapG16_[i]->setAxisTitle("channel", 1);
222  mePnAmplMapG16_[i]->setAxisTitle("amplitude", 2);
223  dqmStore_->tag(mePnAmplMapG16_[i], i+1);
224  sprintf(histo, "EETPT PNs pedestal %s G16", Numbers::sEE(i+1).c_str());
225  mePnPedMapG16_[i] = dqmStore_->bookProfile(histo, histo, 10, 0., 10., 4096, 0., 4096., "s");
226  mePnPedMapG16_[i]->setAxisTitle("channel", 1);
227  mePnPedMapG16_[i]->setAxisTitle("pedestal", 2);
228  dqmStore_->tag(mePnPedMapG16_[i], i+1);
229  }
230 
231  }
232 
233  }
234 
235 }
int i
Definition: DBlmapReader.cc:9
static int iy0EE(const int ism)
Definition: Numbers.cc:964
static std::string sEE(const int ism)
Definition: Numbers.cc:199
std::vector< int > MGPAGains_
MonitorElement * meShapeMapG06_[18]
MonitorElement * mePnAmplMapG01_[18]
tuple histo
Definition: trackerHits.py:12
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
Definition: FindCaloHit.cc:7
MonitorElement * meAmplMapG01_[18]
void tag(MonitorElement *me, unsigned int myTag)
Definition: DQMStore.cc:1156
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:833
MonitorElement * meAmplMapG12_[18]
MonitorElement * meShapeMapG12_[18]
MonitorElement * mePnPedMapG01_[18]
static int ix0EE(const int ism)
Definition: Numbers.cc:946
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:237
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:977

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().