11 theNDigisPerChamberPlots(),
12 chambers_(ps.getParameter<std::
vector<std::
string>>(
"chambers")),
14 alctVars_(ps.getParameter<std::
vector<std::
string>>(
"alctVars")),
16 alctNBin_(ps.getParameter<std::
vector<unsigned>>(
"alctNBin")),
17 alctMinBin_(ps.getParameter<std::
vector<double>>(
"alctMinBin")),
18 alctMaxBin_(ps.getParameter<std::
vector<double>>(
"alctMaxBin")) {
30 "CSCALCTDigisPerEvent",
"ALCT trigger primitives per event; Number of ALCTs; Entries", 100, 0, 100);
31 for (
int i = 1;
i <= 10; ++
i) {
34 t2,
"Number of ALCTs per chamber " +
CSCDetId::chamberName(
i) +
";Number of ALCTs per chamber;Entries", 4, 0, 4);
38 for (
unsigned iType = 0; iType <
chambers_.size(); iType++) {
40 for (
unsigned iEndcap = 0; iEndcap < 2; iEndcap++) {
43 for (
unsigned iVar = 0; iVar <
alctVars_.size(); iVar++) {
47 const unsigned iTypeCorrected(iEndcap == 0 ? iType : iType +
chambers_.size());
50 chamberHistos[iTypeCorrected][
key]->
getTH1()->SetMinimum(0);
62 unsigned nDigisPerEvent = 0;
64 for (
auto j = alcts->begin();
j != alcts->end();
j++) {
65 auto beginDigi = (*j).second.first;
66 auto endDigi = (*j).second.second;
69 int nDigis = endDigi - beginDigi;
70 nDigisPerEvent += nDigis;
73 auto range = alcts->get((*j).first);
75 const unsigned typeCorrected(detId.
endcap() == 1 ? chamberType - 2 : chamberType - 2 +
chambers_.size());
76 for (
auto alct =
range.first; alct !=
range.second; alct++) {
77 if (alct->isValid()) {
78 chamberHistos[typeCorrected][
"alct_quality"]->Fill(alct->getQuality());
79 chamberHistos[typeCorrected][
"alct_wiregroup"]->Fill(alct->getKeyWG());
std::vector< std::string > chambers_
MonitorElement * theNDigisPerChamberPlots[10]
virtual void setCurrentFolder(std::string const &fullpath)
bool getByToken(EDGetToken token, Handle< PROD > &result) const
void bookHistograms(DQMStore::IBooker &)
Log< level::Error, false > LogError
const uint16_t range(const Frame &aFrame)
edm::EDGetTokenT< CSCALCTDigiCollection > alcts_Token_
std::vector< double > alctMinBin_
tuple key
prepare the HTCondor submission files and eventually submit them
unsigned short iChamberType() const
void analyze(const edm::Event &, const edm::EventSetup &) override
~CSCALCTDigiValidation() override
std::string chamberName() const
ParameterSet const & getParameterSet(std::string const &) const
CSCALCTDigiValidation(const edm::ParameterSet &ps, edm::ConsumesCollector &&iC)
std::vector< std::string > alctVars_
std::vector< double > alctMaxBin_
std::vector< unsigned > alctNBin_
MonitorElement * theNDigisPerEventPlot
std::map< uint32_t, std::map< std::string, MonitorElement * > > chamberHistos
MonitorElement * book1D(TString const &name, TString const &title, int const nchX, double const lowX, double const highX, FUNC onbooking=NOOP())
virtual TH1 * getTH1() const