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