CMS 3D CMS Logo

CSCALCTDigiValidation.cc
Go to the documentation of this file.
4 
8 
10  : CSCBaseValidation(inputTag), theTimeBinPlots(), theNDigisPerLayerPlots() {
12 }
13 
15 
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 }
26 
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 }
Handle.h
mps_fire.i
i
Definition: mps_fire.py:428
CSCALCTDigiValidation::theNDigisPerEventPlot
MonitorElement * theNDigisPerEventPlot
Definition: CSCALCTDigiValidation.h:23
MessageLogger.h
CSCALCTDigiValidation::~CSCALCTDigiValidation
~CSCALCTDigiValidation() override
Definition: CSCALCTDigiValidation.cc:14
CSCALCTDigiValidation::alcts_Token_
edm::EDGetTokenT< CSCALCTDigiCollection > alcts_Token_
Definition: CSCALCTDigiValidation.h:19
CSCBaseValidation::theInputTag
edm::InputTag theInputTag
Definition: CSCBaseValidation.h:27
DQMStore.h
edm::Handle< CSCALCTDigiCollection >
CSCDetId::iChamberType
unsigned short iChamberType() const
Definition: CSCDetId.h:96
CSCALCTDigiValidation::bookHistograms
void bookHistograms(DQMStore::IBooker &)
Definition: CSCALCTDigiValidation.cc:16
CSCALCTDigiValidation::theTimeBinPlots
MonitorElement * theTimeBinPlots[10]
Definition: CSCALCTDigiValidation.h:21
CSCALCTDigiValidation.h
dqm::impl::MonitorElement::Fill
void Fill(long long x)
Definition: MonitorElement.h:290
CSCLayerGeometry.h
CSCALCTDigiValidation::CSCALCTDigiValidation
CSCALCTDigiValidation(const edm::InputTag &inputTag, edm::ConsumesCollector &&iC)
Definition: CSCALCTDigiValidation.cc:9
CSCDetId
Definition: CSCDetId.h:26
CSCALCTDigiCollection
edm::InputTag::encode
std::string encode() const
Definition: InputTag.cc:159
edm::EventSetup
Definition: EventSetup.h:57
edm::LogError
Log< level::Error, false > LogError
Definition: MessageLogger.h:123
CSCALCTDigiValidation::analyze
void analyze(const edm::Event &, const edm::EventSetup &) override
Definition: CSCALCTDigiValidation.cc:27
dqm::implementation::IBooker
Definition: DQMStore.h:43
CSCBaseValidation
Definition: CSCBaseValidation.h:14
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
CSCALCTDigiValidation::theNDigisPerLayerPlots
MonitorElement * theNDigisPerLayerPlots[10]
Definition: CSCALCTDigiValidation.h:22
DigiContainerIterator
Definition: MuonDigiCollection.h:30
edm::Event
Definition: Event.h:73
edm::InputTag
Definition: InputTag.h:15
edm::ConsumesCollector
Definition: ConsumesCollector.h:45
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
CSCGeometry.h
MillePedeFileConverter_cfg.e
e
Definition: MillePedeFileConverter_cfg.py:37