CMS 3D CMS Logo

List of all members | Public Member Functions | Private Attributes
CSCALCTDigiValidation Class Reference

#include <CSCALCTDigiValidation.h>

Inheritance diagram for CSCALCTDigiValidation:
CSCBaseValidation

Public Member Functions

void analyze (const edm::Event &, const edm::EventSetup &) override
 
void bookHistograms (DQMStore::IBooker &)
 
 CSCALCTDigiValidation (const edm::InputTag &inputTag, edm::ConsumesCollector &&iC)
 
 ~CSCALCTDigiValidation () override
 
- Public Member Functions inherited from CSCBaseValidation
 CSCBaseValidation (const edm::InputTag &inputTag)
 
void setGeometry (const CSCGeometry *geom)
 
void setSimHitMap (const PSimHitMap *simHitMap)
 
virtual ~CSCBaseValidation ()
 

Private Attributes

edm::EDGetTokenT< CSCALCTDigiCollectionalcts_Token_
 
MonitorElementtheNDigisPerEventPlot
 
MonitorElementtheNDigisPerLayerPlots [10]
 
MonitorElementtheTimeBinPlots [10]
 

Additional Inherited Members

- Protected Member Functions inherited from CSCBaseValidation
const CSCLayerfindLayer (int detId) const
 
- Protected Attributes inherited from CSCBaseValidation
const CSCGeometrytheCSCGeometry
 
edm::InputTag theInputTag
 
const PSimHitMaptheSimHitMap
 

Detailed Description

Definition at line 12 of file CSCALCTDigiValidation.h.

Constructor & Destructor Documentation

CSCALCTDigiValidation::CSCALCTDigiValidation ( const edm::InputTag inputTag,
edm::ConsumesCollector &&  iC 
)

Definition at line 9 of file CSCALCTDigiValidation.cc.

References alcts_Token_, and HiClusterCompatibility_cfi::inputTag.

12 }
EDGetTokenT< ProductType > consumes(edm::InputTag const &tag)
MonitorElement * theTimeBinPlots[10]
CSCBaseValidation(const edm::InputTag &inputTag)
edm::EDGetTokenT< CSCALCTDigiCollection > alcts_Token_
MonitorElement * theNDigisPerLayerPlots[10]
CSCALCTDigiValidation::~CSCALCTDigiValidation ( )
override

Definition at line 14 of file CSCALCTDigiValidation.cc.

14 {}

Member Function Documentation

void CSCALCTDigiValidation::analyze ( const edm::Event e,
const edm::EventSetup  
)
overridevirtual

Implements CSCBaseValidation.

Definition at line 27 of file CSCALCTDigiValidation.cc.

References alcts_Token_, edm::InputTag::encode(), MonitorElement::Fill(), edm::Event::getByToken(), CSCDetId::iChamberType(), edm::HandleBase::isValid(), CSCBaseValidation::theInputTag, theNDigisPerLayerPlots, and theTimeBinPlots.

Referenced by CSCDigiValidation::analyze().

27  {
29 
30  e.getByToken(alcts_Token_, alcts);
31  if (!alcts.isValid()) {
32  edm::LogError("CSCDigiDump") << "Cannot get alcts by label " << theInputTag.encode();
33  }
34  unsigned nDigisPerEvent = 0;
35 
36  for (CSCALCTDigiCollection::DigiRangeIterator j = alcts->begin(); j != alcts->end(); j++) {
37  std::vector<CSCALCTDigi>::const_iterator beginDigi = (*j).second.first;
38  std::vector<CSCALCTDigi>::const_iterator endDigi = (*j).second.second;
39  CSCDetId detId((*j).first.rawId());
40  int chamberType = detId.iChamberType();
41  int nDigis = endDigi - beginDigi;
42  nDigisPerEvent += nDigis;
43  theNDigisPerLayerPlots[chamberType - 1]->Fill(nDigis);
44 
45  for (std::vector<CSCALCTDigi>::const_iterator digiItr = beginDigi; digiItr != endDigi; ++digiItr) {
46  theTimeBinPlots[chamberType - 1]->Fill(digiItr->getBX());
47  }
48  }
49 }
edm::InputTag theInputTag
MonitorElement * theTimeBinPlots[10]
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:517
std::string encode() const
Definition: InputTag.cc:159
void Fill(long long x)
edm::EDGetTokenT< CSCALCTDigiCollection > alcts_Token_
unsigned short iChamberType() const
Definition: CSCDetId.h:107
bool isValid() const
Definition: HandleBase.h:74
MonitorElement * theNDigisPerLayerPlots[10]
void CSCALCTDigiValidation::bookHistograms ( DQMStore::IBooker iBooker)

Definition at line 16 of file CSCALCTDigiValidation.cc.

References DQMStore::IBooker::book1D(), mps_fire::i, theNDigisPerEventPlot, theNDigisPerLayerPlots, and theTimeBinPlots.

Referenced by CSCDigiValidation::bookHistograms().

16  {
17  theNDigisPerEventPlot = iBooker.book1D("CSCALCTDigisPerEvent", "CSC ALCT Digis per event", 100, 0, 100);
18  for (int i = 0; i < 10; ++i) {
19  char title1[200], title2[200];
20  sprintf(title1, "CSCALCTDigiTimeType%d", i + 1);
21  sprintf(title2, "CSCALCTDigisPerLayerType%d", i + 1);
22  theTimeBinPlots[i] = iBooker.book1D(title1, title1, 20, 0, 20);
23  theNDigisPerLayerPlots[i] = iBooker.book1D(title2, title2, 100, 0, 20);
24  }
25 }
MonitorElement * theTimeBinPlots[10]
MonitorElement * book1D(Args &&...args)
Definition: DQMStore.h:106
MonitorElement * theNDigisPerLayerPlots[10]
MonitorElement * theNDigisPerEventPlot

Member Data Documentation

edm::EDGetTokenT<CSCALCTDigiCollection> CSCALCTDigiValidation::alcts_Token_
private

Definition at line 20 of file CSCALCTDigiValidation.h.

Referenced by analyze(), and CSCALCTDigiValidation().

MonitorElement* CSCALCTDigiValidation::theNDigisPerEventPlot
private

Definition at line 24 of file CSCALCTDigiValidation.h.

Referenced by bookHistograms().

MonitorElement* CSCALCTDigiValidation::theNDigisPerLayerPlots[10]
private

Definition at line 23 of file CSCALCTDigiValidation.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* CSCALCTDigiValidation::theTimeBinPlots[10]
private

Definition at line 22 of file CSCALCTDigiValidation.h.

Referenced by analyze(), and bookHistograms().