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::ParameterSet &ps, edm::ConsumesCollector &&iC)
 
 ~CSCALCTDigiValidation () override
 
- Public Member Functions inherited from CSCBaseValidation
 CSCBaseValidation (const edm::ParameterSet &ps)
 
void setGeometry (const CSCGeometry *geom)
 
void setSimHitMap (const PSimHitMap *simHitMap)
 
virtual ~CSCBaseValidation ()
 

Private Attributes

edm::EDGetTokenT< CSCALCTDigiCollectionalcts_Token_
 
edm::InputTag inputTag_
 
MonitorElementtheNDigisPerChamberPlots [10]
 
MonitorElementtheNDigisPerEventPlot
 
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
bool doSim_
 
const CSCGeometrytheCSCGeometry
 
const PSimHitMaptheSimHitMap
 

Detailed Description

Definition at line 11 of file CSCALCTDigiValidation.h.

Constructor & Destructor Documentation

◆ CSCALCTDigiValidation()

CSCALCTDigiValidation::CSCALCTDigiValidation ( const edm::ParameterSet ps,
edm::ConsumesCollector &&  iC 
)

Definition at line 9 of file CSCALCTDigiValidation.cc.

11  const auto &pset = ps.getParameterSet("cscALCT");
12  inputTag_ = pset.getParameter<edm::InputTag>("inputTag");
14 }

References alcts_Token_, edm::ParameterSet::getParameterSet(), inputTag_, and muonDTDigis_cfi::pset.

◆ ~CSCALCTDigiValidation()

CSCALCTDigiValidation::~CSCALCTDigiValidation ( )
override

Definition at line 16 of file CSCALCTDigiValidation.cc.

16 {}

Member Function Documentation

◆ analyze()

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

Implements CSCBaseValidation.

Definition at line 30 of file CSCALCTDigiValidation.cc.

30  {
32  e.getByToken(alcts_Token_, alcts);
33  if (!alcts.isValid()) {
34  edm::LogError("CSCALCTDigiValidation") << "Cannot get ALCTs by label " << inputTag_.encode();
35  }
36  unsigned nDigisPerEvent = 0;
37 
38  for (auto j = alcts->begin(); j != alcts->end(); j++) {
39  auto beginDigi = (*j).second.first;
40  auto endDigi = (*j).second.second;
41  CSCDetId detId((*j).first.rawId());
42  int chamberType = detId.iChamberType();
43  int nDigis = endDigi - beginDigi;
44  nDigisPerEvent += nDigis;
45  theNDigisPerChamberPlots[chamberType - 1]->Fill(nDigis);
46 
47  for (auto digiItr = beginDigi; digiItr != endDigi; ++digiItr) {
48  theTimeBinPlots[chamberType - 1]->Fill(digiItr->getBX());
49  }
50  }
51  theNDigisPerEventPlot->Fill(nDigisPerEvent);
52 }

References alcts_Token_, MillePedeFileConverter_cfg::e, edm::InputTag::encode(), dqm::impl::MonitorElement::Fill(), CSCDetId::iChamberType(), inputTag_, edm::HandleBase::isValid(), dqmiolumiharvest::j, theNDigisPerChamberPlots, theNDigisPerEventPlot, and theTimeBinPlots.

◆ bookHistograms()

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

Definition at line 18 of file CSCALCTDigiValidation.cc.

18  {
19  theNDigisPerEventPlot = iBooker.book1D(
20  "CSCALCTDigisPerEvent", "ALCT trigger primitives per event; Number of ALCTs; Entries", 100, 0, 100);
21  for (int i = 1; i <= 10; ++i) {
22  const std::string t1("CSCALCTDigiTime_" + CSCDetId::chamberName(i));
23  const std::string t2("CSCALCTDigisPerChamber_" + CSCDetId::chamberName(i));
24  theTimeBinPlots[i - 1] = iBooker.book1D(t1, "ALCT BX " + CSCDetId::chamberName(i) + ";ALCT BX; Entries", 16, 0, 16);
25  theNDigisPerChamberPlots[i - 1] = iBooker.book1D(
26  t2, "Number of ALCTs per chamber " + CSCDetId::chamberName(i) + ";Number of ALCTs per chamber;Entries", 4, 0, 4);
27  }
28 }

References dqm::implementation::IBooker::book1D(), CSCDetId::chamberName(), mps_fire::i, AlCaHLTBitMon_QueryRunRegistry::string, RandomServiceHelper::t1, RandomServiceHelper::t2, theNDigisPerChamberPlots, theNDigisPerEventPlot, and theTimeBinPlots.

Member Data Documentation

◆ alcts_Token_

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

Definition at line 19 of file CSCALCTDigiValidation.h.

Referenced by analyze(), and CSCALCTDigiValidation().

◆ inputTag_

edm::InputTag CSCALCTDigiValidation::inputTag_
private

Definition at line 20 of file CSCALCTDigiValidation.h.

Referenced by analyze(), and CSCALCTDigiValidation().

◆ theNDigisPerChamberPlots

MonitorElement* CSCALCTDigiValidation::theNDigisPerChamberPlots[10]
private

Definition at line 22 of file CSCALCTDigiValidation.h.

Referenced by analyze(), and bookHistograms().

◆ theNDigisPerEventPlot

MonitorElement* CSCALCTDigiValidation::theNDigisPerEventPlot
private

Definition at line 23 of file CSCALCTDigiValidation.h.

Referenced by analyze(), and bookHistograms().

◆ theTimeBinPlots

MonitorElement* CSCALCTDigiValidation::theTimeBinPlots[10]
private

Definition at line 21 of file CSCALCTDigiValidation.h.

Referenced by analyze(), and bookHistograms().

RandomServiceHelper.t2
t2
Definition: RandomServiceHelper.py:257
mps_fire.i
i
Definition: mps_fire.py:428
CSCALCTDigiValidation::theNDigisPerEventPlot
MonitorElement * theNDigisPerEventPlot
Definition: CSCALCTDigiValidation.h:23
CSCALCTDigiValidation::inputTag_
edm::InputTag inputTag_
Definition: CSCALCTDigiValidation.h:20
CSCALCTDigiValidation::alcts_Token_
edm::EDGetTokenT< CSCALCTDigiCollection > alcts_Token_
Definition: CSCALCTDigiValidation.h:19
edm::Handle< CSCALCTDigiCollection >
CSCDetId::iChamberType
unsigned short iChamberType() const
Definition: CSCDetId.h:96
CSCALCTDigiValidation::theTimeBinPlots
MonitorElement * theTimeBinPlots[10]
Definition: CSCALCTDigiValidation.h:21
RandomServiceHelper.t1
t1
Definition: RandomServiceHelper.py:256
CSCBaseValidation::CSCBaseValidation
CSCBaseValidation(const edm::ParameterSet &ps)
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
CSCDetId
Definition: CSCDetId.h:26
CSCALCTDigiCollection
edm::InputTag::encode
std::string encode() const
Definition: InputTag.cc:159
edm::LogError
Log< level::Error, false > LogError
Definition: MessageLogger.h:123
AlCaHLTBitMon_QueryRunRegistry.string
string string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
CSCALCTDigiValidation::theNDigisPerChamberPlots
MonitorElement * theNDigisPerChamberPlots[10]
Definition: CSCALCTDigiValidation.h:22
CSCDetId::chamberName
std::string chamberName() const
Definition: CSCDetId.cc:86
dqmiolumiharvest.j
j
Definition: dqmiolumiharvest.py:66
edm::HandleBase::isValid
bool isValid() const
Definition: HandleBase.h:70
edm::InputTag
Definition: InputTag.h:15
edm::ParameterSet::getParameterSet
ParameterSet const & getParameterSet(std::string const &) const
Definition: ParameterSet.cc:2128
muonDTDigis_cfi.pset
pset
Definition: muonDTDigis_cfi.py:27
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