CMS 3D CMS Logo

List of all members | Public Types | Public Member Functions | Private Attributes
CastorDigiMonitor Class Reference

#include <CastorDigiMonitor.h>

Public Types

typedef dqm::legacy::DQMStore DQMStore
 
typedef dqm::legacy::MonitorElement MonitorElement
 

Public Member Functions

void bookHistograms (DQMStore::IBooker &, edm::Run const &, const edm::EventSetup &)
 
 CastorDigiMonitor (const edm::ParameterSet &ps, edm::ConsumesCollector &&)
 
void endRun ()
 
void fillTrigRes (edm::Event const &event, const edm::TriggerResults &TrigResults, double Etot)
 
void getDbData (const edm::EventSetup &)
 
int ModSecToIndex (int module, int sector)
 
void processEvent (edm::Event const &event, const CastorDigiCollection &cast, const edm::TriggerResults &trig, const CastorDbService &cond)
 
 ~CastorDigiMonitor ()
 

Private Attributes

edm::ESGetToken< CastorChannelQuality, CastorChannelQualityRcdcastorChannelQualityToken_
 
int fVerbosity
 
MonitorElementh2digierr
 
MonitorElementh2QmeanMap
 
MonitorElementh2QmeantsvsCh
 
MonitorElementh2QrmsTSvsCh
 
MonitorElementh2qualityMap
 
MonitorElementh2repsum
 
MonitorElementh2status
 
MonitorElementh2towEMvsHAD
 
MonitorElementh2TSratio
 
MonitorElementhBX
 
MonitorElementhdigisize
 
MonitorElementhModule
 
MonitorElementhpBXtrig
 
MonitorElementhpTrigRes
 
MonitorElementhQIErms [10]
 
MonitorElementhReport
 
MonitorElementhSector
 
MonitorElementhtowE
 
MonitorElementhTSratio
 
int ievt_
 
float QIEerrThreshold = 0.0001
 
double QmeanTS [224][10]
 
float Qrms_DEAD
 
double QrmsTS [224][10]
 
float RatioThresh1 = 0.
 
std::string subsystemname_
 
int TS_MAX = 10
 
const int TSped = 0
 

Detailed Description

Definition at line 23 of file CastorDigiMonitor.h.

Member Typedef Documentation

◆ DQMStore

Definition at line 25 of file CastorDigiMonitor.h.

◆ MonitorElement

Definition at line 26 of file CastorDigiMonitor.h.

Constructor & Destructor Documentation

◆ CastorDigiMonitor()

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

Definition at line 36 of file CastorDigiMonitor.cc.

39  fVerbosity = ps.getUntrackedParameter<int>("debug", 0);
40  subsystemname_ = ps.getUntrackedParameter<std::string>("subSystemFolder", "Castor");
41  EtowerLastModule = ps.getUntrackedParameter<int>("towerLastModule", 6);
42  RatioThresh1 = ps.getUntrackedParameter<double>("ratioThreshold", 0.9);
43  Qrms_DEAD = ps.getUntrackedParameter<double>("QrmsDead", 0.01); // fC
44  HltPaths_ = ps.getParameter<vector<string>>("HltPaths");
45 
47  TS_MAX = ps.getUntrackedParameter<double>("qieTSmax", 6);
48  StatusBadChannel = CastorChannelStatus::StatusBit::BAD;
49  if (fVerbosity > 0)
50  LogPrint("CastorDigi") << "enum CastorChannelStatus::StatusBit::BAD=" << StatusBadChannel
51  << "EtowerLastModule = " << EtowerLastModule << endl;
52 }

References edm::BeginRun.

◆ ~CastorDigiMonitor()

CastorDigiMonitor::~CastorDigiMonitor ( )

Definition at line 54 of file CastorDigiMonitor.cc.

54 {}

Member Function Documentation

◆ bookHistograms()

void CastorDigiMonitor::bookHistograms ( DQMStore::IBooker ibooker,
edm::Run const &  iRun,
const edm::EventSetup iSetup 
)

Definition at line 56 of file CastorDigiMonitor.cc.

58  {
59  char s[60];
60  string st;
61  if (fVerbosity > 0)
62  LogPrint("CastorMonitorModule") << "Digi bookHist(start)";
63 
64  getDbData(iSetup);
65 
66  char sTileIndex[50];
67  sprintf(sTileIndex, "Cell(=moduleZ*16+sector#phi)");
68 
69  ievt_ = 0;
70 
72  hBX = ibooker.bookProfile(
73  "average E(digi) in BX", "Castor average E (digi);Event.BX;fC", 3601, -0.5, 3600.5, 0., 1.e10, "");
74  hBX->getTProfile()->SetOption("hist");
75 
76  string trname = HltPaths_[0];
77  hpBXtrig = ibooker.bookProfile("average E(digi) in BXtrig",
78  "Castor average E (digi) trigger:'" + trname + "';Event.BX;fC",
79  3601,
80  -0.5,
81  3600.5,
82  0.,
83  1.e10,
84  "");
85  hpBXtrig->getTProfile()->SetOption("hist");
86 
87  hpTrigRes = ibooker.bookProfile(
88  "E(digi)vsTriggerIndex", "Castor average E(digi) by triggerIndex;triggerIndex;fC", 512, 0., 512, 0., 1.e10, "");
89  hpTrigRes->getTProfile()->SetOption("hist");
90 
91  ibooker.setCurrentFolder(subsystemname_ + "/CastorDigiMonitor");
92 
93  std::string s2 = "CASTOR QIE_capID+er+dv";
94  h2digierr = ibooker.bookProfile2D(s2, s2, 14, 0., 14., 16, 0., 16., 100, 0, 1.e10, "");
95  h2digierr->getTProfile2D()->GetXaxis()->SetTitle("Module Z");
96  h2digierr->getTProfile2D()->GetYaxis()->SetTitle("Sector #phi");
97  h2digierr->getTProfile2D()->SetMaximum(1.);
98  h2digierr->getTProfile2D()->SetMinimum(QIEerrThreshold);
99  h2digierr->getTProfile2D()->SetOption("colz");
100 
101  sprintf(s, "CASTORreportSummaryMap");
102  h2repsum = ibooker.bookProfile2D(s, s, 14, 0., 14., 16, 0., 16., 100, 0, 1.e10, "");
103  h2repsum->getTProfile2D()->GetXaxis()->SetTitle("Module Z");
104  h2repsum->getTProfile2D()->GetYaxis()->SetTitle("Sector #phi");
105  h2repsum->getTProfile2D()->SetMaximum(1.);
106  h2repsum->getTProfile2D()->SetMinimum(QIEerrThreshold);
107  h2repsum->getTProfile2D()->SetOption("colz");
108 
109  sprintf(s, "CASTOR BadChannelsMap");
110  h2status = ibooker.book2D(s, s, 14, 0., 14., 16, 0., 16.);
111  h2status->setAxisTitle("Module Z");
112  h2status->setAxisTitle("Sector #phi", /* axis */ 2);
113  h2status->setOption("colz");
114 
115  sprintf(s, "CASTOR TSmax Significance Map");
116  h2TSratio = ibooker.book2D(s, s, 14, 0., 14., 16, 0., 16.);
117  h2TSratio->setAxisTitle("Module Z");
118  h2TSratio->setAxisTitle("Sector #phi", /* axis */ 2);
119  h2TSratio->setOption("colz");
120 
121  sprintf(s, "CASTOR TSmax Significance All chan");
122  hTSratio = ibooker.book1D(s, s, 105, 0., 1.05);
123 
124  sprintf(s, "DigiSize");
125  hdigisize = ibooker.book1DD(s, s, 20, 0., 20.);
126  sprintf(s, "ModuleZ(fC)_allTS");
127  hModule = ibooker.book1D(s, s, 14, 0., 14.);
128  hModule->setAxisTitle("ModuleZ");
129  hModule->setAxisTitle("QIE(fC)", /* axis */ 2);
130  sprintf(s, "Sector #phi(fC)_allTS");
131  hSector = ibooker.book1D(s, s, 16, 0., 16.);
132  hSector->setAxisTitle("Sector #phi");
133  hSector->setAxisTitle("QIE(fC)", /* axis */ 2);
134 
135  st = "Castor cells avr digi(fC) per event Map TS vs Channel";
136  h2QmeantsvsCh =
137  ibooker.bookProfile2D(st, st + ";" + string(sTileIndex) + ";TS", 224, 0., 224., 10, 0., 10., 0., 1.e10, "");
138  h2QmeantsvsCh->getTProfile2D()->SetOption("colz");
139 
140  st = "Castor cells avr digiRMS(fC) per event Map TS vs Channel";
141  h2QrmsTSvsCh = ibooker.book2D(st, st + ";" + string(sTileIndex) + ";TS", 224, 0., 224., 10, 0., 10.);
142  h2QrmsTSvsCh->setOption("colz");
143 
144  sprintf(s, "CASTOR data quality");
145  h2qualityMap = ibooker.book2D(s, s, 14, 0, 14, 16, 0, 16);
146  h2qualityMap->setAxisTitle("module Z");
147  h2qualityMap->setAxisTitle("Sector #phi", /* axis */ 2);
148  h2qualityMap->setOption("colz");
149 
150  hReport = ibooker.bookFloat("CASTOR reportSummary");
151 
152  sprintf(s, "QmeanfC_map(allTS)");
153  h2QmeanMap = ibooker.book2D(s, s, 14, 0., 14., 16, 0., 16.);
154  h2QmeanMap->setAxisTitle("Module Z");
155  h2QmeanMap->setAxisTitle("Sector #phi", /* axis */ 2);
156  h2QmeanMap->setOption("textcolz");
157 
158  const int NEtow = 20;
159  float EhadTow[NEtow + 1];
160  float EMTow[NEtow + 1];
161  float ETower[NEtow + 2];
162  double E0tow = 500. / 1024.;
163  EMTow[0] = 0.;
164  EMTow[1] = E0tow;
165  EhadTow[0] = 0.;
166  EhadTow[1] = E0tow;
167  ETower[0] = 0.;
168  ETower[1] = E0tow;
169  double lnBtow = log(1.8); // 2.
170  for (int j = 1; j < NEtow; j++)
171  EMTow[j + 1] = E0tow * exp(j * lnBtow);
172  for (int j = 1; j < NEtow; j++)
173  EhadTow[j + 1] = E0tow * exp(j * lnBtow);
174  for (int j = 1; j <= NEtow; j++)
175  ETower[j + 1] = E0tow * exp(j * lnBtow);
176 
177  sprintf(s, "CASTOR_Tower_EMvsEhad(fC)");
178  h2towEMvsHAD = ibooker.book2D(s, s, NEtow, EhadTow, NEtow, EMTow);
179  h2towEMvsHAD->setAxisTitle("Ehad [fC]");
180  h2towEMvsHAD->setAxisTitle("EM [fC]", /* axis */ 2);
181  h2towEMvsHAD->setOption("colz");
182 
183  sprintf(s, "CASTOR_TowerTotalEnergy(fC)");
184  htowE = ibooker.book1D(s, s, NEtow + 1, ETower);
185  htowE->setAxisTitle("fC");
186 
187  for (int ts = 0; ts <= 1; ts++) {
188  sprintf(s, "QIErms_TS=%d", ts);
189  hQIErms[ts] = ibooker.book1D(s, s, 1000, 0., 100.);
190  hQIErms[ts]->setAxisTitle("QIErms(fC)");
191  }
192 
193  for (int ind = 0; ind < 224; ind++)
194  for (int ts = 0; ts < 10; ts++)
195  QrmsTS[ind][ts] = QmeanTS[ind][ts] = 0.;
196 
197  return;
198 }

References dqm::implementation::IBooker::book1D(), dqm::implementation::IBooker::book1DD(), dqm::implementation::IBooker::book2D(), dqm::implementation::IBooker::bookFloat(), dqm::implementation::IBooker::bookProfile(), dqm::implementation::IBooker::bookProfile2D(), JetChargeProducer_cfi::exp, fVerbosity, getDbData(), dqm::legacy::MonitorElement::getTProfile(), dqm::legacy::MonitorElement::getTProfile2D(), h2digierr, h2QmeanMap, h2QmeantsvsCh, h2QrmsTSvsCh, h2qualityMap, h2repsum, h2status, h2towEMvsHAD, h2TSratio, hBX, hdigisize, hModule, hpBXtrig, hpTrigRes, hQIErms, hReport, hSector, htowE, hTSratio, ievt_, dqmiolumiharvest::j, dqm-mbProfile::log, QIEerrThreshold, QmeanTS, QrmsTS, alignCSCRings::s, indexGen::s2, dqm::impl::MonitorElement::setAxisTitle(), dqm::implementation::NavigatorBase::setCurrentFolder(), dqm::impl::MonitorElement::setOption(), AlCaHLTBitMon_QueryRunRegistry::string, and subsystemname_.

◆ endRun()

void CastorDigiMonitor::endRun ( )

Definition at line 366 of file CastorDigiMonitor.cc.

366  {
367  if (fVerbosity > 0)
368  LogPrint("CastorDigiMonitor") << "DigiMonitor::endRun: trigger max index = " << TrigIndexMax
369  << " TriggerIndexies(N):" << endl;
370  for (int i = 1; i < hpTrigRes->getTProfile()->GetNbinsX(); i++)
371  if (hpTrigRes->getTProfile()->GetBinContent(i) > 0)
372  LogPrint("CastorDigiMonitor") << i - 1 << "(" << hpTrigRes->getTProfile()->GetBinContent(i) << ") ";
373 }

References fVerbosity, dqm::legacy::MonitorElement::getTProfile(), hpTrigRes, and mps_fire::i.

◆ fillTrigRes()

void CastorDigiMonitor::fillTrigRes ( edm::Event const &  event,
const edm::TriggerResults TrigResults,
double  Etot 
)

Definition at line 375 of file CastorDigiMonitor.cc.

375  {
376  int nTriggers = TrigResults.size();
377  const edm::TriggerNames &trigName = event.triggerNames(TrigResults);
378  bool event_triggered = false;
379  if (nTriggers > 0)
380  for (int iTrig = 0; iTrig < nTriggers; ++iTrig) {
381  if (TrigResults.accept(iTrig)) {
382  int index = trigName.triggerIndex(trigName.triggerName(iTrig));
383  if (TrigIndexMax < index)
384  TrigIndexMax = index;
385  if (fVerbosity > 0)
386  LogPrint("CastorDigi") << "trigger[" << iTrig << "] name:" << trigName.triggerName(iTrig)
387  << " index= " << index << endl;
388  hpTrigRes->Fill(index, Etotal);
389  for (int n = 0; n < int(HltPaths_.size()); n++) {
390  if (trigName.triggerName(iTrig).find(HltPaths_[n]) != std::string::npos)
391  event_triggered = true;
392  }
393  } // end if(TrigResults.accept(iTrig)
394  }
395 
396  if (event_triggered)
397  hpBXtrig->Fill(event.bunchCrossing(), Etotal);
398  return;
399 }

References dqm::impl::MonitorElement::Fill(), fVerbosity, hpBXtrig, hpTrigRes, createfilelist::int, dqmiodumpmetadata::n, EgHLTOffTrigSelection_cfi::trigName, and EgHLTOfflineSource_cfi::TrigResults.

Referenced by processEvent().

◆ getDbData()

void CastorDigiMonitor::getDbData ( const edm::EventSetup iSetup)

Definition at line 401 of file CastorDigiMonitor.cc.

401  {
403  if (fVerbosity > 0) {
404  LogPrint("CastorDigiMonitor") << " CastorChQuality in CondDB=" << dbChQuality.isValid() << endl;
405  }
406 
407  int chInd = 0;
408  for (int mod = 0; mod < 14; mod++)
409  for (int sec = 0; sec < 16; sec++)
410  ChannelStatus[mod][sec] = 0;
411  std::vector<DetId> channels = dbChQuality->getAllChannels();
412  N_GoodChannels = 224 - channels.size();
413  if (fVerbosity > 0)
414  LogPrint("CastorDigiMonitor") << "CastorDigiMonitor::getDBData: QualityRcdSize=" << channels.size();
415  for (std::vector<DetId>::iterator ch = channels.begin(); ch != channels.end(); ch++) {
416  const CastorChannelStatus *quality = dbChQuality->getValues(*ch);
417  int value = quality->getValue();
418  int rawId = quality->rawId();
419  chInd++;
420  int mod = HcalCastorDetId(*ch).module() - 1;
421  int sec = HcalCastorDetId(*ch).sector() - 1;
422  if (mod > 0 && mod < 16 && sec > 0 && sec < 16)
424  if (fVerbosity > 0)
425  LogPrint("CastorDigiMonitor") << chInd << " module=" << mod << " sec=" << sec << " rawId=" << rawId
426  << " value=" << value << endl;
427  } // end for(std::vector<DetId>::it...
428  return;
429 }

References castorChannelQualityToken_, ewkTauDQM_cfi::channels, hlt_dqm_sourceclient-live_cfg::ChannelStatus, fVerbosity, CastorCondObjectContainer< Item >::getAllChannels(), edm::EventSetup::getHandle(), CastorCondObjectContainer< Item >::getValues(), edm::ESHandleBase::isValid(), mod(), HcalCastorDetId::module(), quality, fileinputsource_cfi::sec, HcalCastorDetId::sector(), and relativeConstraints::value.

Referenced by bookHistograms().

◆ ModSecToIndex()

int CastorDigiMonitor::ModSecToIndex ( int  module,
int  sector 
)

Definition at line 431 of file CastorDigiMonitor.cc.

431  {
432  int ind = sector + module * 16;
433  if (ind > 223)
434  ind = 223;
435  return (ind);
436 }

Referenced by processEvent().

◆ processEvent()

void CastorDigiMonitor::processEvent ( edm::Event const &  event,
const CastorDigiCollection cast,
const edm::TriggerResults trig,
const CastorDbService cond 
)

Definition at line 200 of file CastorDigiMonitor.cc.

203  {
204  if (fVerbosity > 1)
205  LogPrint("CastorDigiMonitor") << "processEvent(begin)";
206 
207  if (castorDigis.empty()) {
208  for (int mod = 0; mod < 14; mod++)
209  for (int sec = 0; sec < 16; sec++)
210  h2repsum->Fill(mod, sec, 0.);
211  hBX->Fill(event.bunchCrossing(), 0.);
213  return;
214  }
215 
216  float Ecell[14][16]{};
217  for (CastorDigiCollection::const_iterator j = castorDigis.begin(); j != castorDigis.end(); j++) {
218  const CastorDataFrame digi = (const CastorDataFrame)(*j);
219 
220  int module = digi.id().module() - 1;
221  int sector = digi.id().sector() - 1;
222  if (ChannelStatus[module][sector] == StatusBadChannel)
223  continue;
224 
225  int capid1 = digi.sample(0).capid();
226  hdigisize->Fill(digi.size());
227  double sum = 0.;
228  int err = 0, err2 = 0;
229  for (int i = 0; i < digi.size(); i++) {
230  int capid = digi.sample(i).capid();
231  int dv = digi.sample(i).dv();
232  int er = digi.sample(i).er();
233  int rawd = digi.sample(i).adc();
234  rawd = rawd & 0x7F;
235  err |= (capid != capid1) | er << 1 | (!dv) << 2; // =0
236  err2 += (capid != capid1) | er | (!dv); // =0
237  // if(err !=0) continue;
238  int ind = ModSecToIndex(module, sector);
239  h2QmeantsvsCh->Fill(ind, i, LedMonAdc2fc[rawd]);
240  float q = LedMonAdc2fc[rawd];
241  Ecell[module][sector] = q;
242  sum += q; // sum += LedMonAdc2fc[rawd];
243  QrmsTS[ind][i] += (q * q);
244  QmeanTS[ind][i] += q;
245  if (err != 0 && fVerbosity > 0)
246  LogPrint("CastorDigiMonitor") << "event/idigi=" << ievt_ << "/" << i << " cap=cap1_dv_er_err: " << capid << "="
247  << capid1 << " " << dv << " " << er << " " << err;
248  if (capid1 < 3)
249  capid1 = capid + 1;
250  else
251  capid1 = 0;
252  }
253  h2digierr->Fill(module, sector, err);
254  h2repsum->Fill(module, sector, 1. - err2 / digi.size());
255  } // end for(CastorDigiCollection::const_iterator ...
256 
257  ievt_++;
258 
259  double Etotal = 0.;
260  for (int sec = 0; sec < 16; sec++)
261  for (int mod = 0; mod < 14; mod++)
262  Etotal = Ecell[mod][sec];
263  hBX->Fill(event.bunchCrossing(), Etotal);
264  fillTrigRes(event, TrigResults, Etotal);
265 
266  for (int sec = 0; sec < 16; sec++) {
267  float em = Ecell[0][sec] + Ecell[1][sec];
268  double ehad = 0.;
269  for (int mod = 2; mod < EtowerLastModule; mod++)
270  ehad += Ecell[mod][sec];
271  h2towEMvsHAD->Fill(em, ehad);
272  htowE->Fill(em + ehad);
273  }
274 
275  const float repChanBAD = 0.9;
276  const float repChanWarning = 0.95;
277  if (ievt_ % 100 != 0)
278  return;
279 
280  float ModuleSum[14], SectorSum[16];
281  for (int m = 0; m < 14; m++)
282  ModuleSum[m] = 0.;
283  for (int s = 0; s < 16; s++)
284  SectorSum[s] = 0.;
285  for (int mod = 0; mod < 14; mod++)
286  for (int sec = 0; sec < 16; sec++) {
287  for (int ts = 0; ts <= 1; ts++) {
288  int ind = ModSecToIndex(mod, sec);
289  double Qmean = QmeanTS[ind][ts] / ievt_;
290  double Qrms = sqrt(QrmsTS[ind][ts] / ievt_ - Qmean * Qmean);
291  hQIErms[ts]->Fill(Qrms);
292  }
293 
294  double sum = 0.;
295  for (int ts = 1; ts <= TS_MAX; ts++) {
296  int ind = ModSecToIndex(mod, sec) + 1;
297  double a = //(1) h2QtsvsCh->getTH2D()->GetBinContent(ind,ts);
298  h2QmeantsvsCh->getTProfile2D()->GetBinContent(ind, ts);
299  sum += a;
300  double Qmean = QmeanTS[ind - 1][ts - 1] / ievt_;
301  double Qrms = QrmsTS[ind - 1][ts - 1] / ievt_ - Qmean * Qmean;
302  h2QrmsTSvsCh->setBinContent(ind, ts, sqrt(Qrms));
303  }
304  ModuleSum[mod] += sum;
305  SectorSum[sec] += sum;
306  float isum = float(int(sum * 10. + 0.5)) / 10.;
307  if (ChannelStatus[mod][sec] != StatusBadChannel)
308  h2QmeanMap->setBinContent(mod + 1, sec + 1, isum);
309  } // end for(int mod=0; mod<14; mod++) for(int sec=0;...
310 
311  for (int mod = 0; mod < 14; mod++)
312  hModule->setBinContent(mod + 1, ModuleSum[mod]);
313  for (int sec = 0; sec < 16; sec++)
314  hSector->setBinContent(sec + 1, SectorSum[sec]);
315 
316  int nGoodCh = 0;
317  hTSratio->Reset();
318  for (int mod = 0; mod < 14; mod++)
319  for (int sec = 0; sec < 16; sec++) {
320  if (ChannelStatus[mod][sec] == StatusBadChannel)
321  continue;
322  int ind = ModSecToIndex(mod, sec);
323  double Qmean = QmeanTS[ind][TSped] / ievt_;
324  double Qrms = QrmsTS[ind][TSped] / ievt_ - Qmean * Qmean;
325  float ChanStatus = 0.;
326  if (Qrms < Qrms_DEAD)
327  ChanStatus = 1.;
328  h2status->setBinContent(mod + 1, sec + 1, ChanStatus);
329 
330  float am = 0.;
331  for (int ts = 0; ts < TS_MAX - 1; ts++) {
332  float a = h2QmeantsvsCh->getTProfile2D()->GetBinContent(ind + 1, ts + 1) +
333  h2QmeantsvsCh->getTProfile2D()->GetBinContent(ind + 1, ts + 2);
334  if (am < a)
335  am = a;
336  }
337 
338  double sum = 0.;
339  for (int ts = 0; ts < TS_MAX; ts++)
340  sum += h2QmeantsvsCh->getTProfile2D()->GetBinContent(ind + 1, ts + 1);
341 
342  float r = 0.; // worth case - no peak
343  if (am > 0.)
344  r = 1. - (sum - am) / (TS_MAX - 2) / am * 2.;
345  // if(r<0.|| r>1.) cout<<"ievt="<<ievt<<" r="<<r<<" amax= "<<am<<"
346  // sum="<<sum<<endl;
347  h2TSratio->setBinContent(mod + 1, sec + 1, r);
348  hTSratio->Fill(r);
349 
350  float statusTS = 1.0;
351  if (r > RatioThresh1)
352  statusTS = repChanWarning;
353  else if (r > 0.99)
354  statusTS = repChanBAD;
355  float gChanStatus = statusTS;
356  if (ChanStatus > 0.)
357  gChanStatus = repChanBAD; // RMS
358  h2qualityMap->setBinContent(mod + 1, sec + 1, gChanStatus);
359  if (gChanStatus > repChanBAD)
360  ++nGoodCh;
361  }
362  hReport->Fill(float(nGoodCh) / N_GoodChannels);
363  return;
364 }

References a, HcalQIESample::adc(), HcalQIESample::capid(), RawToDigi_cff::castorDigis, hlt_dqm_sourceclient-live_cfg::ChannelStatus, HcalQIESample::dv(), HcalQIESample::er(), submitPVResolutionJobs::err, dqm::impl::MonitorElement::Fill(), fillTrigRes(), dqmMemoryStats::float, fVerbosity, dqm::legacy::MonitorElement::getTProfile2D(), h2digierr, h2QmeanMap, h2QmeantsvsCh, h2QrmsTSvsCh, h2qualityMap, h2repsum, h2status, h2towEMvsHAD, h2TSratio, hBX, hdigisize, hModule, hQIErms, hReport, hSector, htowE, hTSratio, mps_fire::i, CastorDataFrame::id(), ievt_, isum, dqmiolumiharvest::j, LedMonAdc2fc, visualization-live-secondInstance_cfg::m, mod(), ModSecToIndex(), HcalCastorDetId::module(), submitPVResolutionJobs::q, QmeanTS, Qrms_DEAD, QrmsTS, alignCSCRings::r, RatioThresh1, dqm::impl::MonitorElement::Reset(), alignCSCRings::s, CastorDataFrame::sample(), fileinputsource_cfi::sec, HcalCastorDetId::sector(), dqm::impl::MonitorElement::setBinContent(), CastorDataFrame::size(), mathSSE::sqrt(), EgHLTOfflineSource_cfi::TrigResults, TS_MAX, and TSped.

Member Data Documentation

◆ castorChannelQualityToken_

edm::ESGetToken<CastorChannelQuality, CastorChannelQualityRcd> CastorDigiMonitor::castorChannelQualityToken_
private

Definition at line 41 of file CastorDigiMonitor.h.

Referenced by getDbData().

◆ fVerbosity

int CastorDigiMonitor::fVerbosity
private

Definition at line 43 of file CastorDigiMonitor.h.

Referenced by bookHistograms(), endRun(), fillTrigRes(), getDbData(), and processEvent().

◆ h2digierr

MonitorElement* CastorDigiMonitor::h2digierr
private

Definition at line 54 of file CastorDigiMonitor.h.

Referenced by bookHistograms(), and processEvent().

◆ h2QmeanMap

MonitorElement* CastorDigiMonitor::h2QmeanMap
private

Definition at line 59 of file CastorDigiMonitor.h.

Referenced by bookHistograms(), and processEvent().

◆ h2QmeantsvsCh

MonitorElement* CastorDigiMonitor::h2QmeantsvsCh
private

Definition at line 58 of file CastorDigiMonitor.h.

Referenced by bookHistograms(), and processEvent().

◆ h2QrmsTSvsCh

MonitorElement* CastorDigiMonitor::h2QrmsTSvsCh
private

Definition at line 49 of file CastorDigiMonitor.h.

Referenced by bookHistograms(), and processEvent().

◆ h2qualityMap

MonitorElement* CastorDigiMonitor::h2qualityMap
private

Definition at line 56 of file CastorDigiMonitor.h.

Referenced by bookHistograms(), and processEvent().

◆ h2repsum

MonitorElement* CastorDigiMonitor::h2repsum
private

Definition at line 55 of file CastorDigiMonitor.h.

Referenced by bookHistograms(), and processEvent().

◆ h2status

MonitorElement* CastorDigiMonitor::h2status
private

Definition at line 53 of file CastorDigiMonitor.h.

Referenced by bookHistograms(), and processEvent().

◆ h2towEMvsHAD

MonitorElement* CastorDigiMonitor::h2towEMvsHAD
private

Definition at line 63 of file CastorDigiMonitor.h.

Referenced by bookHistograms(), and processEvent().

◆ h2TSratio

MonitorElement* CastorDigiMonitor::h2TSratio
private

Definition at line 52 of file CastorDigiMonitor.h.

Referenced by bookHistograms(), and processEvent().

◆ hBX

MonitorElement* CastorDigiMonitor::hBX
private

Definition at line 47 of file CastorDigiMonitor.h.

Referenced by bookHistograms(), and processEvent().

◆ hdigisize

MonitorElement* CastorDigiMonitor::hdigisize
private

Definition at line 62 of file CastorDigiMonitor.h.

Referenced by bookHistograms(), and processEvent().

◆ hModule

MonitorElement* CastorDigiMonitor::hModule
private

Definition at line 60 of file CastorDigiMonitor.h.

Referenced by bookHistograms(), and processEvent().

◆ hpBXtrig

MonitorElement * CastorDigiMonitor::hpBXtrig
private

Definition at line 47 of file CastorDigiMonitor.h.

Referenced by bookHistograms(), and fillTrigRes().

◆ hpTrigRes

MonitorElement* CastorDigiMonitor::hpTrigRes
private

Definition at line 48 of file CastorDigiMonitor.h.

Referenced by bookHistograms(), endRun(), and fillTrigRes().

◆ hQIErms

MonitorElement* CastorDigiMonitor::hQIErms[10]
private

Definition at line 50 of file CastorDigiMonitor.h.

Referenced by bookHistograms(), and processEvent().

◆ hReport

MonitorElement* CastorDigiMonitor::hReport
private

Definition at line 57 of file CastorDigiMonitor.h.

Referenced by bookHistograms(), and processEvent().

◆ hSector

MonitorElement* CastorDigiMonitor::hSector
private

Definition at line 61 of file CastorDigiMonitor.h.

Referenced by bookHistograms(), and processEvent().

◆ htowE

MonitorElement* CastorDigiMonitor::htowE
private

Definition at line 64 of file CastorDigiMonitor.h.

Referenced by bookHistograms(), and processEvent().

◆ hTSratio

MonitorElement* CastorDigiMonitor::hTSratio
private

Definition at line 51 of file CastorDigiMonitor.h.

Referenced by bookHistograms(), and processEvent().

◆ ievt_

int CastorDigiMonitor::ievt_
private

Definition at line 44 of file CastorDigiMonitor.h.

Referenced by bookHistograms(), and processEvent().

◆ QIEerrThreshold

float CastorDigiMonitor::QIEerrThreshold = 0.0001
private

Definition at line 68 of file CastorDigiMonitor.h.

Referenced by bookHistograms().

◆ QmeanTS

double CastorDigiMonitor::QmeanTS[224][10]
private

Definition at line 69 of file CastorDigiMonitor.h.

Referenced by bookHistograms(), and processEvent().

◆ Qrms_DEAD

float CastorDigiMonitor::Qrms_DEAD
private

Definition at line 45 of file CastorDigiMonitor.h.

Referenced by processEvent().

◆ QrmsTS

double CastorDigiMonitor::QrmsTS[224][10]
private

Definition at line 69 of file CastorDigiMonitor.h.

Referenced by bookHistograms(), and processEvent().

◆ RatioThresh1

float CastorDigiMonitor::RatioThresh1 = 0.
private

Definition at line 67 of file CastorDigiMonitor.h.

Referenced by processEvent().

◆ subsystemname_

std::string CastorDigiMonitor::subsystemname_
private

Definition at line 42 of file CastorDigiMonitor.h.

Referenced by bookHistograms().

◆ TS_MAX

int CastorDigiMonitor::TS_MAX = 10
private

Definition at line 66 of file CastorDigiMonitor.h.

Referenced by processEvent().

◆ TSped

const int CastorDigiMonitor::TSped = 0
private

Definition at line 70 of file CastorDigiMonitor.h.

Referenced by processEvent().

CastorDigiMonitor::h2repsum
MonitorElement * h2repsum
Definition: CastorDigiMonitor.h:55
CastorDigiMonitor::hReport
MonitorElement * hReport
Definition: CastorDigiMonitor.h:57
CastorDigiMonitor::fVerbosity
int fVerbosity
Definition: CastorDigiMonitor.h:43
CastorDigiMonitor::QrmsTS
double QrmsTS[224][10]
Definition: CastorDigiMonitor.h:69
CastorDigiMonitor::h2QmeantsvsCh
MonitorElement * h2QmeantsvsCh
Definition: CastorDigiMonitor.h:58
CastorDigiMonitor::h2qualityMap
MonitorElement * h2qualityMap
Definition: CastorDigiMonitor.h:56
CastorCondObjectContainer::getValues
const Item * getValues(DetId fId, bool throwOnFail=true) const
Definition: CastorCondObjectContainer.h:65
mps_fire.i
i
Definition: mps_fire.py:428
CastorDigiMonitor::hpBXtrig
MonitorElement * hpBXtrig
Definition: CastorDigiMonitor.h:47
edm::SortedCollection::const_iterator
std::vector< T >::const_iterator const_iterator
Definition: SortedCollection.h:80
CastorDigiMonitor::hpTrigRes
MonitorElement * hpTrigRes
Definition: CastorDigiMonitor.h:48
dqmMemoryStats.float
float
Definition: dqmMemoryStats.py:127
dqmiodumpmetadata.n
n
Definition: dqmiodumpmetadata.py:28
dqm::implementation::IBooker::bookFloat
MonitorElement * bookFloat(TString const &name, FUNC onbooking=NOOP())
Definition: DQMStore.h:80
CastorDigiMonitor::ievt_
int ievt_
Definition: CastorDigiMonitor.h:44
dqm::impl::MonitorElement::setOption
virtual void setOption(const char *option)
Definition: MonitorElement.cc:887
HcalQIESample::adc
constexpr int adc() const
get the ADC sample
Definition: HcalQIESample.h:43
dqm::implementation::IBooker::bookProfile2D
MonitorElement * bookProfile2D(TString const &name, TString const &title, int nchX, double lowX, double highX, int nchY, double lowY, double highY, double lowZ, double highZ, char const *option="s", FUNC onbooking=NOOP())
Definition: DQMStore.h:399
mod
T mod(const T &a, const T &b)
Definition: ecalDccMap.h:4
edm::LogPrint
Log< level::Warning, true > LogPrint
Definition: MessageLogger.h:130
CastorDigiMonitor::h2towEMvsHAD
MonitorElement * h2towEMvsHAD
Definition: CastorDigiMonitor.h:63
dqm::implementation::NavigatorBase::setCurrentFolder
virtual void setCurrentFolder(std::string const &fullpath)
Definition: DQMStore.cc:32
CastorDigiMonitor::h2digierr
MonitorElement * h2digierr
Definition: CastorDigiMonitor.h:54
edm::ParameterSet::getUntrackedParameter
T getUntrackedParameter(std::string const &, T const &) const
CastorDataFrame::id
const HcalCastorDetId & id() const
Definition: CastorDataFrame.h:22
indexGen.s2
s2
Definition: indexGen.py:107
CastorDigiMonitor::Qrms_DEAD
float Qrms_DEAD
Definition: CastorDigiMonitor.h:45
edm::ConsumesCollector::esConsumes
auto esConsumes()
Definition: ConsumesCollector.h:97
CastorCondObjectContainer::getAllChannels
std::vector< DetId > getAllChannels() const
Definition: CastorCondObjectContainer.h:119
HcalQIESample::er
constexpr bool er() const
is the error bit set?
Definition: HcalQIESample.h:51
CastorDigiMonitor::h2status
MonitorElement * h2status
Definition: CastorDigiMonitor.h:53
quality
const uint32_t *__restrict__ Quality * quality
Definition: CAHitNtupletGeneratorKernelsImpl.h:109
CastorDigiMonitor::hModule
MonitorElement * hModule
Definition: CastorDigiMonitor.h:60
alignCSCRings.s
s
Definition: alignCSCRings.py:92
dqm::legacy::MonitorElement::getTProfile2D
virtual TProfile2D * getTProfile2D() const
Definition: MonitorElement.h:511
CastorDigiMonitor::h2QmeanMap
MonitorElement * h2QmeanMap
Definition: CastorDigiMonitor.h:59
CastorDigiMonitor::RatioThresh1
float RatioThresh1
Definition: CastorDigiMonitor.h:67
visualization-live-secondInstance_cfg.m
m
Definition: visualization-live-secondInstance_cfg.py:72
mathSSE::sqrt
T sqrt(T t)
Definition: SSEVec.h:19
dqm::impl::MonitorElement::Fill
void Fill(long long x)
Definition: MonitorElement.h:290
dqm::impl::MonitorElement::Reset
virtual void Reset()
Remove all data from the ME, keept the empty histogram with all its settings.
Definition: MonitorElement.cc:354
edm::ESHandle
Definition: DTSurvey.h:22
dqm::implementation::IBooker::bookProfile
MonitorElement * bookProfile(TString const &name, TString const &title, int nchX, double lowX, double highX, int, double lowY, double highY, char const *option="s", FUNC onbooking=NOOP())
Definition: DQMStore.h:322
dqm::legacy::MonitorElement::getTProfile
virtual TProfile * getTProfile() const
Definition: MonitorElement.h:507
RawToDigi_cff.castorDigis
castorDigis
Definition: RawToDigi_cff.py:34
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
HcalCastorDetId
Definition: HcalCastorDetId.h:23
EgHLTOffTrigSelection_cfi.trigName
trigName
Definition: EgHLTOffTrigSelection_cfi.py:8
dqm::implementation::IBooker::book1DD
MonitorElement * book1DD(TString const &name, TString const &title, int nchX, double lowX, double highX, FUNC onbooking=NOOP())
Definition: DQMStore.h:155
CastorDataFrame::sample
const HcalQIESample & sample(int i) const
access a sample
Definition: CastorDataFrame.h:39
CastorDataFrame
Definition: CastorDataFrame.h:15
CastorDataFrame::size
int size() const
total number of samples in the digi
Definition: CastorDataFrame.h:26
HcalCastorDetId::module
int module() const
get the module (1-2 for EM, 1-12 for HAD)
Definition: HcalCastorDetId.h:58
a
double a
Definition: hdecay.h:119
CastorChannelQualityRcd
Definition: CastorChannelQualityRcd.h:24
CastorDigiMonitor::hdigisize
MonitorElement * hdigisize
Definition: CastorDigiMonitor.h:62
CastorDigiMonitor::castorChannelQualityToken_
edm::ESGetToken< CastorChannelQuality, CastorChannelQualityRcd > castorChannelQualityToken_
Definition: CastorDigiMonitor.h:41
CastorDigiMonitor::hSector
MonitorElement * hSector
Definition: CastorDigiMonitor.h:61
CastorDigiMonitor::h2QrmsTSvsCh
MonitorElement * h2QrmsTSvsCh
Definition: CastorDigiMonitor.h:49
createfilelist.int
int
Definition: createfilelist.py:10
HcalCastorDetId::sector
int sector() const
get the sector (1-16)
Definition: HcalCastorDetId.h:62
value
Definition: value.py:1
edm::EventSetup::getHandle
ESHandle< T > getHandle(const ESGetToken< T, R > &iToken) const
Definition: EventSetup.h:155
HcalQIESample::capid
constexpr int capid() const
get the Capacitor id
Definition: HcalQIESample.h:47
CastorDigiMonitor::fillTrigRes
void fillTrigRes(edm::Event const &event, const edm::TriggerResults &TrigResults, double Etot)
Definition: CastorDigiMonitor.cc:375
submitPVResolutionJobs.q
q
Definition: submitPVResolutionJobs.py:84
hlt_dqm_sourceclient-live_cfg.ChannelStatus
ChannelStatus
Definition: hlt_dqm_sourceclient-live_cfg.py:65
CastorDigiMonitor::ModSecToIndex
int ModSecToIndex(int module, int sector)
Definition: CastorDigiMonitor.cc:431
submitPVResolutionJobs.err
err
Definition: submitPVResolutionJobs.py:85
edm::ESHandleBase::isValid
bool isValid() const
Definition: ESHandle.h:44
CastorChannelQuality
Definition: CastorChannelQuality.h:17
CastorDigiMonitor::QmeanTS
double QmeanTS[224][10]
Definition: CastorDigiMonitor.h:69
fileinputsource_cfi.sec
sec
Definition: fileinputsource_cfi.py:87
alignCSCRings.r
r
Definition: alignCSCRings.py:93
EgHLTOfflineSource_cfi.TrigResults
TrigResults
Definition: EgHLTOfflineSource_cfi.py:18
HcalQIESample::dv
constexpr bool dv() const
is the Data Valid bit set?
Definition: HcalQIESample.h:49
dqm::impl::MonitorElement::setBinContent
virtual void setBinContent(int binx, double content)
set content of bin (1-D)
Definition: MonitorElement.cc:691
CastorDigiMonitor::hBX
MonitorElement * hBX
Definition: CastorDigiMonitor.h:47
CastorChannelStatus
Definition: CastorChannelStatus.h:15
isum
double isum
Definition: MuScleFitUtils.cc:77
CastorDigiMonitor::TSped
const int TSped
Definition: CastorDigiMonitor.h:70
CastorDigiMonitor::subsystemname_
std::string subsystemname_
Definition: CastorDigiMonitor.h:42
edm::Transition::BeginRun
relativeConstraints.value
value
Definition: relativeConstraints.py:53
dqm::implementation::IBooker::book2D
MonitorElement * book2D(TString const &name, TString const &title, int nchX, double lowX, double highX, int nchY, double lowY, double highY, FUNC onbooking=NOOP())
Definition: DQMStore.h:177
ewkTauDQM_cfi.channels
channels
Definition: ewkTauDQM_cfi.py:14
edm::TriggerNames
Definition: TriggerNames.h:55
CastorDigiMonitor::QIEerrThreshold
float QIEerrThreshold
Definition: CastorDigiMonitor.h:68
CastorDigiMonitor::hQIErms
MonitorElement * hQIErms[10]
Definition: CastorDigiMonitor.h:50
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
dqm-mbProfile.log
log
Definition: dqm-mbProfile.py:17
AlignmentPI::index
index
Definition: AlignmentPayloadInspectorHelper.h:46
hcaldqm::constants::BAD
const double BAD
Definition: Constants.h:15
dqmiolumiharvest.j
j
Definition: dqmiolumiharvest.py:66
JetChargeProducer_cfi.exp
exp
Definition: JetChargeProducer_cfi.py:6
CastorDigiMonitor::getDbData
void getDbData(const edm::EventSetup &)
Definition: CastorDigiMonitor.cc:401
event
Definition: event.py:1
CastorDigiMonitor::htowE
MonitorElement * htowE
Definition: CastorDigiMonitor.h:64
dqm::impl::MonitorElement::setAxisTitle
virtual void setAxisTitle(const std::string &title, int axis=1)
set x-, y- or z-axis title (axis=1, 2, 3 respectively)
Definition: MonitorElement.cc:800
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
CastorDigiMonitor::TS_MAX
int TS_MAX
Definition: CastorDigiMonitor.h:66
CastorDigiMonitor::hTSratio
MonitorElement * hTSratio
Definition: CastorDigiMonitor.h:51
CastorDigiMonitor::h2TSratio
MonitorElement * h2TSratio
Definition: CastorDigiMonitor.h:52
LedMonAdc2fc
static const float LedMonAdc2fc[128]
Definition: CastorLEDMonitor.h:11