11 theNDigisPerChamberPlots(),
13 chambersRun3_(ps.getParameter<
std::
vector<unsigned>>(
"chambersRun3")),
17 clctNBin_(ps.getParameter<
std::
vector<unsigned>>(
"clctNBin")),
18 clctMinBin_(ps.getParameter<
std::
vector<double>>(
"clctMinBin")),
19 clctMaxBin_(ps.getParameter<
std::
vector<double>>(
"clctMaxBin")),
20 isRun3_(ps.getParameter<
bool>(
"isRun3")) {
32 "CSCCLCTDigisPerEvent",
"CLCT trigger primitives per event; Number of CLCTs; Entries", 100, 0, 100);
33 for (
int i = 1;
i <= 10; ++
i) {
45 for (
unsigned iType = 0; iType <
chambers_.size(); iType++) {
47 for (
unsigned iEndcap = 0; iEndcap < 2; iEndcap++) {
50 for (
unsigned iVar = 0; iVar <
clctVars_.size(); iVar++) {
58 const unsigned iTypeCorrected(iEndcap == 0 ? iType : iType +
chambers_.size());
74 unsigned nDigisPerEvent = 0;
76 for (
auto j = clcts->begin();
j != clcts->end();
j++) {
77 auto beginDigi = (*j).second.first;
78 auto endDigi = (*j).second.second;
81 int nDigis = endDigi - beginDigi;
82 nDigisPerEvent += nDigis;
85 auto range = clcts->get((*j).first);
88 for (
auto clct =
range.first; clct !=
range.second; clct++) {
89 if (clct->isValid()) {
90 chamberHistos[typeCorrected][
"clct_pattern"]->Fill(clct->getPattern());
91 chamberHistos[typeCorrected][
"clct_quality"]->Fill(clct->getQuality());
92 chamberHistos[typeCorrected][
"clct_halfstrip"]->Fill(clct->getKeyStrip());
93 chamberHistos[typeCorrected][
"clct_bend"]->Fill(clct->getBend());
99 chamberHistos[typeCorrected][
"clct_run3pattern"]->Fill(clct->getRun3Pattern());
100 chamberHistos[typeCorrected][
"clct_quartstrip"]->Fill(clct->getKeyStrip(4));
101 chamberHistos[typeCorrected][
"clct_eighthstrip"]->Fill(clct->getKeyStrip(8));
102 chamberHistos[typeCorrected][
"clct_slope"]->Fill(clct->getSlope());
103 chamberHistos[typeCorrected][
"clct_compcode"]->Fill(clct->getCompCode());
MonitorElement * theNDigisPerChamberPlots[10]
virtual void setCurrentFolder(std::string const &fullpath)
CSCCLCTDigiValidation(const edm::ParameterSet &ps, edm::ConsumesCollector &&iC)
ParameterSet const & getParameterSet(std::string const &) const
Log< level::Error, false > LogError
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
std::map< uint32_t, std::map< std::string, MonitorElement * > > chamberHistos
std::string chamberName() const
std::vector< double > clctMaxBin_
void analyze(const edm::Event &, const edm::EventSetup &) override
std::vector< std::string > chambers_
std::vector< unsigned > chambersRun3_
void bookHistograms(DQMStore::IBooker &)
MonitorElement * theNDigisPerEventPlot
std::vector< unsigned > clctNBin_
~CSCCLCTDigiValidation() override
MonitorElement * book1D(TString const &name, TString const &title, int const nchX, double const lowX, double const highX, FUNC onbooking=NOOP())
std::vector< double > clctMinBin_
edm::EDGetTokenT< CSCCLCTDigiCollection > clcts_Token_
std::vector< std::string > clctVars_