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 &) override
 
void bookHistograms (DQMStore::IBooker &)
 
 CSCCLCTDigiValidation (const edm::InputTag &inputTag, edm::ConsumesCollector &&iC)
 
 ~CSCCLCTDigiValidation () 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< CSCCLCTDigiCollectionclcts_Token_
 
MonitorElementtheNDigisPerEventPlot
 
MonitorElementtheNDigisPerLayerPlots [10]
 
MonitorElementtheTimeBinPlots [10]
 

Additional Inherited Members

- Public Types inherited from CSCBaseValidation
typedef dqm::legacy::DQMStore DQMStore
 
typedef dqm::legacy::MonitorElement MonitorElement
 
- 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 11 of file CSCCLCTDigiValidation.h.

Constructor & Destructor Documentation

◆ CSCCLCTDigiValidation()

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

◆ ~CSCCLCTDigiValidation()

CSCCLCTDigiValidation::~CSCCLCTDigiValidation ( )
override

Definition at line 14 of file CSCCLCTDigiValidation.cc.

14 {}

Member Function Documentation

◆ analyze()

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

Implements CSCBaseValidation.

Definition at line 27 of file CSCCLCTDigiValidation.cc.

27  {
29 
30  e.getByToken(clcts_Token_, clcts);
31  if (!clcts.isValid()) {
32  edm::LogError("CSCDigiDump") << "Cannot get clcts by label " << theInputTag.encode();
33  }
34 
35  unsigned nDigisPerEvent = 0;
36 
37  for (CSCCLCTDigiCollection::DigiRangeIterator j = clcts->begin(); j != clcts->end(); j++) {
38  std::vector<CSCCLCTDigi>::const_iterator beginDigi = (*j).second.first;
39  std::vector<CSCCLCTDigi>::const_iterator endDigi = (*j).second.second;
40  CSCDetId detId((*j).first.rawId());
41  int chamberType = detId.iChamberType();
42 
43  int nDigis = endDigi - beginDigi;
44  nDigisPerEvent += nDigis;
45  theNDigisPerLayerPlots[chamberType - 1]->Fill(nDigis);
46 
47  for (std::vector<CSCCLCTDigi>::const_iterator digiItr = beginDigi; digiItr != endDigi; ++digiItr) {
48  theTimeBinPlots[chamberType - 1]->Fill(digiItr->getBX());
49  }
50  }
51 }

References clcts_Token_, MillePedeFileConverter_cfg::e, edm::InputTag::encode(), dqm::impl::MonitorElement::Fill(), CSCDetId::iChamberType(), edm::HandleBase::isValid(), dqmiolumiharvest::j, CSCBaseValidation::theInputTag, theNDigisPerLayerPlots, and theTimeBinPlots.

◆ bookHistograms()

void CSCCLCTDigiValidation::bookHistograms ( DQMStore::IBooker iBooker)

Definition at line 16 of file CSCCLCTDigiValidation.cc.

16  {
17  theNDigisPerEventPlot = iBooker.book1D("CSCCLCTDigisPerEvent", "CSC CLCT Digis per event", 100, 0, 100);
18  for (int i = 0; i < 10; ++i) {
19  char title1[200], title2[200];
20  sprintf(title1, "CSCCLCTDigiTimeType%d", i + 1);
21  sprintf(title2, "CSCCLCTDigisPerLayerType%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 }

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

Member Data Documentation

◆ clcts_Token_

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

Definition at line 19 of file CSCCLCTDigiValidation.h.

Referenced by analyze(), and CSCCLCTDigiValidation().

◆ theNDigisPerEventPlot

MonitorElement* CSCCLCTDigiValidation::theNDigisPerEventPlot
private

Definition at line 23 of file CSCCLCTDigiValidation.h.

Referenced by bookHistograms().

◆ theNDigisPerLayerPlots

MonitorElement* CSCCLCTDigiValidation::theNDigisPerLayerPlots[10]
private

Definition at line 22 of file CSCCLCTDigiValidation.h.

Referenced by analyze(), and bookHistograms().

◆ theTimeBinPlots

MonitorElement* CSCCLCTDigiValidation::theTimeBinPlots[10]
private

Definition at line 21 of file CSCCLCTDigiValidation.h.

Referenced by analyze(), and bookHistograms().

mps_fire.i
i
Definition: mps_fire.py:428
CSCBaseValidation::theInputTag
edm::InputTag theInputTag
Definition: CSCBaseValidation.h:27
edm::Handle< CSCCLCTDigiCollection >
CSCDetId::iChamberType
unsigned short iChamberType() const
Definition: CSCDetId.h:96
CSCBaseValidation::CSCBaseValidation
CSCBaseValidation(const edm::InputTag &inputTag)
Definition: CSCBaseValidation.cc:4
dqm::impl::MonitorElement::Fill
void Fill(long long x)
Definition: MonitorElement.h:290
edm::ConsumesCollector::consumes
EDGetTokenT< ProductType > consumes(edm::InputTag const &tag)
Definition: ConsumesCollector.h:55
CSCCLCTDigiValidation::theNDigisPerEventPlot
MonitorElement * theNDigisPerEventPlot
Definition: CSCCLCTDigiValidation.h:23
CSCDetId
Definition: CSCDetId.h:26
CSCCLCTDigiValidation::theTimeBinPlots
MonitorElement * theTimeBinPlots[10]
Definition: CSCCLCTDigiValidation.h:21
edm::InputTag::encode
std::string encode() const
Definition: InputTag.cc:159
edm::LogError
Log< level::Error, false > LogError
Definition: MessageLogger.h:123
CSCCLCTDigiCollection
CSCCLCTDigiValidation::theNDigisPerLayerPlots
MonitorElement * theNDigisPerLayerPlots[10]
Definition: CSCCLCTDigiValidation.h:22
CSCCLCTDigiValidation::clcts_Token_
edm::EDGetTokenT< CSCCLCTDigiCollection > clcts_Token_
Definition: CSCCLCTDigiValidation.h:19
dqmiolumiharvest.j
j
Definition: dqmiolumiharvest.py:66
SimL1EmulatorRepack_Full_cff.inputTag
inputTag
Definition: SimL1EmulatorRepack_Full_cff.py:56
edm::HandleBase::isValid
bool isValid() const
Definition: HandleBase.h:70
DigiContainerIterator
Definition: MuonDigiCollection.h:30
dqm::implementation::IBooker::book1D
MonitorElement * book1D(TString const &name, TString const &title, int const nchX, double const lowX, double const highX, FUNC onbooking=NOOP())
Definition: DQMStore.h:98
MillePedeFileConverter_cfg.e
e
Definition: MillePedeFileConverter_cfg.py:37