CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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 &)
 
 CSCALCTDigiValidation (DQMStore *dbe, const edm::InputTag &inputTag)
 
void endJob ()
 
 ~CSCALCTDigiValidation ()
 
- Public Member Functions inherited from CSCBaseValidation
 CSCBaseValidation (DQMStore *dbe, const edm::InputTag &inputTag)
 
void setGeometry (const CSCGeometry *geom)
 
void setSimHitMap (const PSimHitMap *simHitMap)
 
virtual ~CSCBaseValidation ()
 

Private Attributes

MonitorElementtheNDigisPerEventPlot
 
MonitorElementtheNDigisPerLayerPlots [10]
 
MonitorElementtheTimeBinPlots [10]
 

Additional Inherited Members

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

Detailed Description

Definition at line 9 of file CSCALCTDigiValidation.h.

Constructor & Destructor Documentation

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.

13 : CSCBaseValidation(dbe, inputTag),
16  theNDigisPerEventPlot( dbe_->book1D("CSCALCTDigisPerEvent", "CSC ALCT Digis per event", 100, 0, 100) )
17 {
18  for(int i = 0; i < 10; ++i)
19  {
20  char title1[200], title2[200];
21  sprintf(title1, "CSCALCTDigiTimeType%d", i+1);
22  sprintf(title2, "CSCALCTDigisPerLayerType%d", i+1);
23  theTimeBinPlots[i] = dbe_->book1D(title1, title1, 20, 0, 20);
24  theNDigisPerLayerPlots[i] = dbe_->book1D(title2, title2, 100, 0, 20);
25  }
26 }
int i
Definition: DBlmapReader.cc:9
MonitorElement * theTimeBinPlots[10]
MonitorElement * book1D(const char *name, const char *title, int nchX, double lowX, double highX)
Book 1D histogram.
Definition: DQMStore.cc:722
CSCBaseValidation(DQMStore *dbe, const edm::InputTag &inputTag)
MonitorElement * theNDigisPerLayerPlots[10]
MonitorElement * theNDigisPerEventPlot
CSCALCTDigiValidation::~CSCALCTDigiValidation ( )

Definition at line 30 of file CSCALCTDigiValidation.cc.

31 {
32 // for(int i = 0; i < 10; ++i)
33 // {
34 // edm::LogInfo("CSCDigiValidation") << "Mean of " << theTimeBinPlots[i]->getName()
35 // << " is " << theTimeBinPlots[i]->getMean()
36 // << " +/- " << theTimeBinPlots[i]->getRMS();
37 // }
38 }

Member Function Documentation

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

42 {
44 
45  e.getByLabel(theInputTag, alcts);
46  if (!alcts.isValid()) {
47  edm::LogError("CSCDigiDump") << "Cannot get alcts by label " << theInputTag.encode();
48  }
49  unsigned nDigisPerEvent = 0;
50 
51  for (CSCALCTDigiCollection::DigiRangeIterator j=alcts->begin(); j!=alcts->end(); j++) {
52  std::vector<CSCALCTDigi>::const_iterator beginDigi = (*j).second.first;
53  std::vector<CSCALCTDigi>::const_iterator endDigi = (*j).second.second;
54  CSCDetId detId((*j).first.rawId());
55  int chamberType = detId.iChamberType();
56  int nDigis = endDigi-beginDigi;
57  nDigisPerEvent += nDigis;
58  theNDigisPerLayerPlots[chamberType-1]->Fill(nDigis);
59 
60  for( std::vector<CSCALCTDigi>::const_iterator digiItr = beginDigi;
61  digiItr != endDigi; ++digiItr)
62  {
63  theTimeBinPlots[chamberType-1]->Fill(digiItr->getBX());
64  }
65  }
66 }
edm::InputTag theInputTag
MonitorElement * theTimeBinPlots[10]
std::string encode() const
Definition: InputTag.cc:164
void Fill(long long x)
int j
Definition: DBlmapReader.cc:9
bool isValid() const
Definition: HandleBase.h:76
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
Definition: Event.h:361
unsigned short iChamberType()
Definition: CSCDetId.h:109
MonitorElement * theNDigisPerLayerPlots[10]
void CSCALCTDigiValidation::endJob ( void  )
inline

Definition at line 16 of file CSCALCTDigiValidation.h.

16 {}

Member Data Documentation

MonitorElement* CSCALCTDigiValidation::theNDigisPerEventPlot
private

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