#include <CSCALCTDigiValidation.h>
Public Member Functions | |
void | analyze (const edm::Event &, const edm::EventSetup &) |
CSCALCTDigiValidation (DQMStore *dbe, const edm::InputTag &inputTag) | |
void | endJob () |
~CSCALCTDigiValidation () | |
Private Attributes | |
MonitorElement * | theNDigisPerEventPlot |
MonitorElement * | theNDigisPerLayerPlots [10] |
MonitorElement * | theTimeBinPlots [10] |
Definition at line 9 of file CSCALCTDigiValidation.h.
CSCALCTDigiValidation::CSCALCTDigiValidation | ( | DQMStore * | dbe, |
const edm::InputTag & | inputTag | ||
) |
Definition at line 12 of file CSCALCTDigiValidation.cc.
References DQMStore::book1D(), CSCBaseValidation::dbe_, i, theNDigisPerLayerPlots, and theTimeBinPlots.
: CSCBaseValidation(dbe, inputTag), theTimeBinPlots(), theNDigisPerLayerPlots(), theNDigisPerEventPlot( dbe_->book1D("CSCALCTDigisPerEvent", "CSC ALCT Digis per event", 100, 0, 100) ) { for(int i = 0; i < 10; ++i) { char title1[200], title2[200]; sprintf(title1, "CSCALCTDigiTimeType%d", i+1); sprintf(title2, "CSCALCTDigisPerLayerType%d", i+1); theTimeBinPlots[i] = dbe_->book1D(title1, title1, 20, 0, 20); theNDigisPerLayerPlots[i] = dbe_->book1D(title2, title2, 100, 0, 20); } }
CSCALCTDigiValidation::~CSCALCTDigiValidation | ( | ) |
Definition at line 30 of file CSCALCTDigiValidation.cc.
{ // for(int i = 0; i < 10; ++i) // { // edm::LogInfo("CSCDigiValidation") << "Mean of " << theTimeBinPlots[i]->getName() // << " is " << theTimeBinPlots[i]->getMean() // << " +/- " << theTimeBinPlots[i]->getRMS(); // } }
void CSCALCTDigiValidation::analyze | ( | const edm::Event & | e, |
const edm::EventSetup & | |||
) | [virtual] |
Implements CSCBaseValidation.
Definition at line 41 of file CSCALCTDigiValidation.cc.
References edm::InputTag::encode(), MonitorElement::Fill(), edm::Event::getByLabel(), CSCDetId::iChamberType(), edm::HandleBase::isValid(), j, CSCBaseValidation::theInputTag, theNDigisPerLayerPlots, and theTimeBinPlots.
Referenced by CSCDigiValidation::analyze().
{ edm::Handle<CSCALCTDigiCollection> alcts; e.getByLabel(theInputTag, alcts); if (!alcts.isValid()) { edm::LogError("CSCDigiDump") << "Cannot get alcts by label " << theInputTag.encode(); } unsigned nDigisPerEvent = 0; for (CSCALCTDigiCollection::DigiRangeIterator j=alcts->begin(); j!=alcts->end(); j++) { std::vector<CSCALCTDigi>::const_iterator beginDigi = (*j).second.first; std::vector<CSCALCTDigi>::const_iterator endDigi = (*j).second.second; CSCDetId detId((*j).first.rawId()); int chamberType = detId.iChamberType(); int nDigis = endDigi-beginDigi; nDigisPerEvent += nDigis; theNDigisPerLayerPlots[chamberType-1]->Fill(nDigis); for( std::vector<CSCALCTDigi>::const_iterator digiItr = beginDigi; digiItr != endDigi; ++digiItr) { theTimeBinPlots[chamberType-1]->Fill(digiItr->getBX()); } } }
void CSCALCTDigiValidation::endJob | ( | void | ) | [inline] |
Definition at line 16 of file CSCALCTDigiValidation.h.
{}
Definition at line 21 of file CSCALCTDigiValidation.h.
MonitorElement* CSCALCTDigiValidation::theNDigisPerLayerPlots[10] [private] |
Definition at line 20 of file CSCALCTDigiValidation.h.
Referenced by analyze(), and CSCALCTDigiValidation().
MonitorElement* CSCALCTDigiValidation::theTimeBinPlots[10] [private] |
Definition at line 19 of file CSCALCTDigiValidation.h.
Referenced by analyze(), and CSCALCTDigiValidation().