CMS 3D CMS Logo

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

#include <CSCCLCTDigiValidation.h>

Inheritance diagram for CSCCLCTDigiValidation:
CSCBaseValidation

Public Member Functions

void analyze (const edm::Event &, const edm::EventSetup &)
 
void bookHistograms (DQMStore::IBooker &)
 
 CSCCLCTDigiValidation (const edm::InputTag &inputTag, edm::ConsumesCollector &&iC)
 
 ~CSCCLCTDigiValidation ()
 
- 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< CSCCLCTDigiCollectionclcts_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 CSCCLCTDigiValidation.h.

Constructor & Destructor Documentation

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

Definition at line 9 of file CSCCLCTDigiValidation.cc.

References clcts_Token_, and HiClusterCompatibility_cfi::inputTag.

10  :
11  CSCBaseValidation(inputTag),
14 {
16 }
EDGetTokenT< ProductType > consumes(edm::InputTag const &tag)
MonitorElement * theNDigisPerLayerPlots[10]
CSCBaseValidation(const edm::InputTag &inputTag)
MonitorElement * theTimeBinPlots[10]
edm::EDGetTokenT< CSCCLCTDigiCollection > clcts_Token_
CSCCLCTDigiValidation::~CSCCLCTDigiValidation ( )

Definition at line 18 of file CSCCLCTDigiValidation.cc.

19 {
20 }

Member Function Documentation

void CSCCLCTDigiValidation::analyze ( const edm::Event e,
const edm::EventSetup  
)
virtual

Implements CSCBaseValidation.

Definition at line 35 of file CSCCLCTDigiValidation.cc.

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

Referenced by CSCDigiValidation::analyze().

36 {
38 
39  e.getByToken(clcts_Token_, clcts);
40  if (!clcts.isValid()) {
41  edm::LogError("CSCDigiDump") << "Cannot get clcts by label " << theInputTag.encode();
42  }
43 
44  unsigned nDigisPerEvent = 0;
45 
46  for (CSCCLCTDigiCollection::DigiRangeIterator j=clcts->begin(); j!=clcts->end(); j++) {
47  std::vector<CSCCLCTDigi>::const_iterator beginDigi = (*j).second.first;
48  std::vector<CSCCLCTDigi>::const_iterator endDigi = (*j).second.second;
49  CSCDetId detId((*j).first.rawId());
50  int chamberType = detId.iChamberType();
51 
52  int nDigis = endDigi-beginDigi;
53  nDigisPerEvent += nDigis;
54  theNDigisPerLayerPlots[chamberType-1]->Fill(nDigis);
55 
56  for( std::vector<CSCCLCTDigi>::const_iterator digiItr = beginDigi;
57  digiItr != endDigi; ++digiItr)
58  {
59  theTimeBinPlots[chamberType-1]->Fill(digiItr->getBX());
60  }
61 
62  }
63 }
edm::InputTag theInputTag
MonitorElement * theNDigisPerLayerPlots[10]
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:460
MonitorElement * theTimeBinPlots[10]
std::string encode() const
Definition: InputTag.cc:166
void Fill(long long x)
bool isValid() const
Definition: HandleBase.h:74
unsigned short iChamberType()
Definition: CSCDetId.h:107
edm::EDGetTokenT< CSCCLCTDigiCollection > clcts_Token_
void CSCCLCTDigiValidation::bookHistograms ( DQMStore::IBooker iBooker)

Definition at line 22 of file CSCCLCTDigiValidation.cc.

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

Referenced by CSCDigiValidation::bookHistograms().

23 {
24  theNDigisPerEventPlot = iBooker.book1D("CSCCLCTDigisPerEvent", "CSC CLCT Digis per event", 100, 0, 100);
25  for(int i = 0; i < 10; ++i)
26  {
27  char title1[200], title2[200];
28  sprintf(title1, "CSCCLCTDigiTimeType%d", i+1);
29  sprintf(title2, "CSCCLCTDigisPerLayerType%d", i+1);
30  theTimeBinPlots[i] = iBooker.book1D(title1, title1, 20, 0, 20);
31  theNDigisPerLayerPlots[i] = iBooker.book1D(title2, title2, 100, 0, 20);
32  }
33 }
MonitorElement * theNDigisPerLayerPlots[10]
MonitorElement * theTimeBinPlots[10]
MonitorElement * book1D(Args &&...args)
Definition: DQMStore.h:115
MonitorElement * theNDigisPerEventPlot

Member Data Documentation

edm::EDGetTokenT<CSCCLCTDigiCollection> CSCCLCTDigiValidation::clcts_Token_
private

Definition at line 22 of file CSCCLCTDigiValidation.h.

Referenced by analyze(), and CSCCLCTDigiValidation().

MonitorElement* CSCCLCTDigiValidation::theNDigisPerEventPlot
private

Definition at line 26 of file CSCCLCTDigiValidation.h.

Referenced by bookHistograms().

MonitorElement* CSCCLCTDigiValidation::theNDigisPerLayerPlots[10]
private

Definition at line 25 of file CSCCLCTDigiValidation.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* CSCCLCTDigiValidation::theTimeBinPlots[10]
private

Definition at line 24 of file CSCCLCTDigiValidation.h.

Referenced by analyze(), and bookHistograms().