11 theNDigisPerChamberPlots(),
12 chambers_(ps.getParameter<std::
vector<std::
string>>(
"chambers")),
13 chambersRun3_(ps.getParameter<std::
vector<unsigned>>(
"chambersRun3")),
15 clctVars_(ps.getParameter<std::
vector<std::
string>>(
"clctVars")),
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) {
36 t2,
"Number of CLCTs per chamber " +
CSCDetId::chamberName(
i) +
";Number of CLCTs per chamber;Entries", 4, 0, 4);
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());
61 chamberHistos[iTypeCorrected][
key]->
getTH1()->SetMinimum(0);
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);
87 const unsigned typeCorrected(detId.
endcap() == 1 ? chamberType - 2 : chamberType - 2 +
chambers_.size());
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)
bool getByToken(EDGetToken token, Handle< PROD > &result) const
CSCCLCTDigiValidation(const edm::ParameterSet &ps, edm::ConsumesCollector &&iC)
Log< level::Error, false > LogError
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
const uint16_t range(const Frame &aFrame)
std::map< uint32_t, std::map< std::string, MonitorElement * > > chamberHistos
std::vector< double > clctMaxBin_
tuple key
prepare the HTCondor submission files and eventually submit them
unsigned short iChamberType() const
void analyze(const edm::Event &, const edm::EventSetup &) override
std::vector< std::string > chambers_
std::string chamberName() const
std::vector< unsigned > chambersRun3_
void bookHistograms(DQMStore::IBooker &)
ParameterSet const & getParameterSet(std::string const &) const
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())
virtual TH1 * getTH1() const
std::vector< double > clctMinBin_
edm::EDGetTokenT< CSCCLCTDigiCollection > clcts_Token_
std::vector< std::string > clctVars_