CMS 3D CMS Logo

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

#include <SiStripQualityDQM.h>

Inheritance diagram for SiStripQualityDQM:
SiStripBaseCondObjDQMGet< SiStripQuality, SiStripQualityRcd > SiStripBaseCondObjDQM

Public Member Functions

void fillGrandSummaryMEs ()
 
void fillMEsForDet (const ModMEs &selModME_, uint32_t selDetId_) override
 
void fillMEsForLayer (uint32_t selDetId_) override
 
void fillModMEs (const std::vector< uint32_t > &selectedDetIds) override
 
void fillSummaryMEs (const std::vector< uint32_t > &selectedDetIds) override
 
void getActiveDetIds (const edm::EventSetup &eSetup) override
 
 SiStripQualityDQM (edm::ESGetToken< SiStripQuality, SiStripQualityRcd > token, edm::RunNumber_t iRun, edm::ParameterSet const &hPSet, edm::ParameterSet const &fPSet, const TrackerTopology *tTopo, const TkDetMap *tkDetMap)
 
 ~SiStripQualityDQM () override
 
- Public Member Functions inherited from SiStripBaseCondObjDQMGet< SiStripQuality, SiStripQualityRcd >
bool checkChanged (const edm::EventSetup &eSetup) override
 
void getConditionObject (const edm::EventSetup &eSetup) override
 
 SiStripBaseCondObjDQMGet (tokentype token, edm::RunNumber_t iRun, edm::ParameterSet const &hPSet, edm::ParameterSet const &fPSet, const TrackerTopology *tTopo)
 
 ~SiStripBaseCondObjDQMGet () override
 
- Public Member Functions inherited from SiStripBaseCondObjDQM
void analysis (const edm::EventSetup &eSetup_)
 
void analysisOnDemand (const edm::EventSetup &eSetup_, const std::vector< uint32_t > &detIdsOnDemand)
 
void analysisOnDemand (const edm::EventSetup &eSetup_, std::string requestedSubDetector, uint32_t requestedSide, uint32_t requestedLayer)
 
void analysisOnDemand (const edm::EventSetup &eSetup_, uint32_t detIdOnDemand)
 
virtual void end ()
 
void selectModules (std::vector< uint32_t > &detIds_)
 
 SiStripBaseCondObjDQM (edm::RunNumber_t iRun, edm::ParameterSet const &hPSet, edm::ParameterSet const &fPSet, const TrackerTopology *tTopo)
 
virtual ~SiStripBaseCondObjDQM ()
 

Private Member Functions

void SetBadComponents (int i, int component, SiStripQuality::BadComponent &BC)
 

Private Attributes

std::vector< uint32_t > alreadyFilledLayers
 
int NBadComponent [4][19][4]
 
int NTkBadComponent [4]
 
std::stringstream ssV [4][19]
 

Additional Inherited Members

- Public Types inherited from SiStripBaseCondObjDQMGet< SiStripQuality, SiStripQualityRcd >
using tokentype = typename edm::ESGetToken< SiStripQuality, SiStripQualityRcd >
 
- Public Types inherited from SiStripBaseCondObjDQM
typedef dqm::legacy::DQMStore DQMStore
 
typedef dqm::legacy::MonitorElement MonitorElement
 
- Protected Member Functions inherited from SiStripBaseCondObjDQM
void fillTkMap (const uint32_t &detid, const float &value)
 
std::pair< std::string, uint32_t > getLayerNameAndId (const uint32_t &detId_)
 
void getModMEs (ModMEs &CondObj_ME, const uint32_t &detId_)
 
std::vector< uint32_t > GetSameLayerDetId (const std::vector< uint32_t > &activeDetIds, uint32_t selDetId)
 
std::pair< std::string, uint32_t > getStringNameAndId (const uint32_t &detId_)
 
void getSummaryMEs (ModMEs &CondObj_ME, const uint32_t &detId_)
 
- Protected Attributes inherited from SiStripBaseCondObjDQMGet< SiStripQuality, SiStripQualityRcd >
const SiStripQualitycondObj_
 
- Protected Attributes inherited from SiStripBaseCondObjDQM
std::vector< uint32_t > activeDetIds
 
std::vector< uint32_t > all_DetIds
 
std::string CondObj_fillId_
 
std::string CondObj_name_
 
edm::ParameterSet fPSet_
 
bool GrandSummary_On_
 
bool HistoMaps_On_
 
edm::ParameterSet hPSet_
 
double maxValue
 
double minValue
 
bool Mod_On_
 
std::map< uint32_t, ModMEsModMEsMap_
 
SiStripDetInfoFileReaderreader
 
std::map< uint32_t, ModMEsSummaryMEsMap_
 
bool SummaryOnLayerLevel_On_
 
bool SummaryOnStringLevel_On_
 
std::unique_ptr< TkHistoMapTk_HM_
 
std::unique_ptr< TkHistoMapTk_HM_H
 
std::unique_ptr< TkHistoMapTk_HM_L
 
TrackerMaptkMap
 
std::vector< int > tkMapScaler
 
const TrackerTopologytTopo_
 

Detailed Description

Definition at line 9 of file SiStripQualityDQM.h.

Constructor & Destructor Documentation

◆ SiStripQualityDQM()

SiStripQualityDQM::SiStripQualityDQM ( edm::ESGetToken< SiStripQuality, SiStripQualityRcd token,
edm::RunNumber_t  iRun,
edm::ParameterSet const &  hPSet,
edm::ParameterSet const &  fPSet,
const TrackerTopology tTopo,
const TkDetMap tkDetMap 
)

Definition at line 5 of file SiStripQualityDQM.cc.

12  if (HistoMaps_On_) {
13  Tk_HM_ = std::make_unique<TkHistoMap>(tkDetMap, "SiStrip/Histo_Map", "Quality_TkMap", 0.);
14  }
15 }

References unpackBuffers-CaloStage2::token.

◆ ~SiStripQualityDQM()

SiStripQualityDQM::~SiStripQualityDQM ( )
override

Definition at line 17 of file SiStripQualityDQM.cc.

17 {}

Member Function Documentation

◆ fillGrandSummaryMEs()

void SiStripQualityDQM::fillGrandSummaryMEs ( )

Definition at line 144 of file SiStripQualityDQM.cc.

144  {
145  std::string hSummary_BadObjects_xTitle = hPSet_.getParameter<std::string>("Summary_BadObjects_histo_xTitle");
146 
147  std::string hSummary_BadModules_name = hPSet_.getParameter<std::string>("Summary_BadModules_histo_name");
148  std::string hSummary_BadModules_yTitle = hPSet_.getParameter<std::string>("Summary_BadModules_histo_yTitle");
149 
150  std::string hSummary_BadFibers_name = hPSet_.getParameter<std::string>("Summary_BadFibers_histo_name");
151  std::string hSummary_BadFibers_yTitle = hPSet_.getParameter<std::string>("Summary_BadFibers_histo_yTitle");
152 
153  std::string hSummary_BadApvs_name = hPSet_.getParameter<std::string>("Summary_BadApvs_histo_name");
154  std::string hSummary_BadApvs_yTitle = hPSet_.getParameter<std::string>("Summary_BadApvs_histo_yTitle");
155 
156  std::string hSummary_BadStrips_name = hPSet_.getParameter<std::string>("Summary_BadStrips_histo_name");
157  std::string hSummary_BadStrips_yTitle = hPSet_.getParameter<std::string>("Summary_BadStrips_histo_yTitle");
158 
159  int NchX = 34;
160  double LowX = 0.5;
161  double HighX = 34.5;
162 
163  MonitorElement *ME[4];
164 
165  DQMStore *dqmStore_ = edm::Service<DQMStore>().operator->();
166 
167  std::string FolderName = fPSet_.getParameter<std::string>("FolderName_For_QualityAndCabling_SummaryHistos");
168 
170 
171  ME[0] = dqmStore_->book1D(hSummary_BadModules_name, hSummary_BadModules_name, NchX, LowX, HighX);
172  ME[0]->setAxisTitle(hSummary_BadObjects_xTitle, 1);
173  ME[0]->setAxisTitle(hSummary_BadModules_yTitle, 2);
174 
175  ME[1] = dqmStore_->book1D(hSummary_BadFibers_name, hSummary_BadFibers_name, NchX, LowX, HighX);
176  ME[1]->setAxisTitle(hSummary_BadObjects_xTitle, 1);
177  ME[1]->setAxisTitle(hSummary_BadFibers_yTitle, 2);
178 
179  ME[2] = dqmStore_->book1D(hSummary_BadApvs_name, hSummary_BadApvs_name, NchX, LowX, HighX);
180  ME[2]->setAxisTitle(hSummary_BadObjects_xTitle, 1);
181  ME[2]->setAxisTitle(hSummary_BadApvs_yTitle, 2);
182 
183  ME[3] = dqmStore_->book1D(hSummary_BadStrips_name, hSummary_BadStrips_name, NchX, LowX, HighX);
184  ME[3]->setAxisTitle(hSummary_BadObjects_xTitle, 1);
185  ME[3]->setAxisTitle(hSummary_BadStrips_yTitle, 2);
186 
187  //==============================
188 
189  for (int i = 0; i < 4; ++i) {
190  NTkBadComponent[i] = 0;
191  for (int j = 0; j < 19; ++j) {
192  ssV[i][j].str("");
193  for (int k = 0; k < 4; ++k)
194  NBadComponent[i][j][k] = 0;
195  }
196  }
197 
198  std::stringstream ss;
199  ss.str("");
200  for (const auto det : reader->getAllDetIds()) {
201  ss << "detid " << det << " IsModuleUsable " << condObj_->IsModuleUsable(det) << "\n";
202  }
203  LogDebug("SiStripQualityDQM") << ss.str() << std::endl;
204 
205  std::vector<SiStripQuality::BadComponent> BC = condObj_->getBadComponentList();
206 
207  for (size_t i = 0; i < BC.size(); ++i) {
208  //&&&&&&&&&&&&&
209  // Full Tk
210  //&&&&&&&&&&&&&
211 
212  if (BC[i].BadModule)
213  NTkBadComponent[0]++;
214  if (BC[i].BadFibers)
215  NTkBadComponent[1] += ((BC[i].BadFibers >> 2) & 0x1) + ((BC[i].BadFibers >> 1) & 0x1) + ((BC[i].BadFibers) & 0x1);
216  if (BC[i].BadApvs)
217  NTkBadComponent[2] += ((BC[i].BadApvs >> 5) & 0x1) + ((BC[i].BadApvs >> 4) & 0x1) + ((BC[i].BadApvs >> 3) & 0x1) +
218  ((BC[i].BadApvs >> 2) & 0x1) + ((BC[i].BadApvs >> 1) & 0x1) + ((BC[i].BadApvs) & 0x1);
219 
220  //&&&&&&&&&&&&&&&&&
221  // Single SubSyste
222  //&&&&&&&&&&&&&&&&&
223 
224  int component;
225  SiStripDetId a(BC[i].detid);
226  if (a.subdetId() == SiStripDetId::TIB) {
227  //&&&&&&&&&&&&&&&&&
228  // TIB
229  //&&&&&&&&&&&&&&&&&
230 
231  component = tTopo_->tibLayer(BC[i].detid);
232  SetBadComponents(0, component, BC[i]);
233 
234  } else if (a.subdetId() == SiStripDetId::TID) {
235  //&&&&&&&&&&&&&&&&&
236  // TID
237  //&&&&&&&&&&&&&&&&&
238 
239  component = tTopo_->tidSide(BC[i].detid) == 2 ? tTopo_->tidWheel(BC[i].detid) : tTopo_->tidWheel(BC[i].detid) + 3;
240  SetBadComponents(1, component, BC[i]);
241 
242  } else if (a.subdetId() == SiStripDetId::TOB) {
243  //&&&&&&&&&&&&&&&&&
244  // TOB
245  //&&&&&&&&&&&&&&&&&
246 
247  component = tTopo_->tobLayer(BC[i].detid);
248  SetBadComponents(2, component, BC[i]);
249 
250  } else if (a.subdetId() == SiStripDetId::TEC) {
251  //&&&&&&&&&&&&&&&&&
252  // TEC
253  //&&&&&&&&&&&&&&&&&
254 
255  component = tTopo_->tecSide(BC[i].detid) == 2 ? tTopo_->tecWheel(BC[i].detid) : tTopo_->tecWheel(BC[i].detid) + 9;
256  SetBadComponents(3, component, BC[i]);
257  }
258  }
259 
260  //&&&&&&&&&&&&&&&&&&
261  // Single Strip Info
262  //&&&&&&&&&&&&&&&&&&
263 
266 
267  for (SiStripBadStrip::RegistryIterator rp = rbegin; rp != rend; ++rp) {
268  uint32_t detid = rp->detid;
269 
270  int subdet = 0;
271  int component = 0;
272  SiStripDetId a(detid);
273  if (a.subdetId() == 3) {
274  subdet = 0;
275  component = tTopo_->tibLayer(detid);
276  } else if (a.subdetId() == 4) {
277  subdet = 1;
278  component = tTopo_->tidSide(detid) == 2 ? tTopo_->tidWheel(detid) : tTopo_->tidWheel(detid) + 3;
279  } else if (a.subdetId() == 5) {
280  subdet = 2;
281  component = tTopo_->tobLayer(detid);
282  } else if (a.subdetId() == 6) {
283  subdet = 3;
284  component = tTopo_->tecSide(detid) == 2 ? tTopo_->tecWheel(detid) : tTopo_->tecWheel(detid) + 9;
285  }
286 
287  SiStripQuality::Range sqrange =
289 
290  for (int it = 0; it < sqrange.second - sqrange.first; it++) {
291  unsigned int range = condObj_->decode(*(sqrange.first + it)).range;
292  NTkBadComponent[3] += range;
293  NBadComponent[subdet][0][3] += range;
294  NBadComponent[subdet][component][3] += range;
295  }
296  }
297 
298  //&&&&&&&&&&&&&&&&&&
299  // printout
300  //&&&&&&&&&&&&&&&&&&
301 
302  ss.str("");
303  ss << "\n-----------------\nGlobal Info\n-----------------";
304  ss << "\nBadComponent \t Modules \tFibers "
305  "\tApvs\tStrips\n------------------------------------------------------"
306  "----------";
307  ss << "\nTracker:\t\t" << NTkBadComponent[0] << "\t" << NTkBadComponent[1] << "\t" << NTkBadComponent[2] << "\t"
308  << NTkBadComponent[3];
309  ss << "\n";
310  ss << "\nTIB:\t\t\t" << NBadComponent[0][0][0] << "\t" << NBadComponent[0][0][1] << "\t" << NBadComponent[0][0][2]
311  << "\t" << NBadComponent[0][0][3];
312  ss << "\nTID:\t\t\t" << NBadComponent[1][0][0] << "\t" << NBadComponent[1][0][1] << "\t" << NBadComponent[1][0][2]
313  << "\t" << NBadComponent[1][0][3];
314  ss << "\nTOB:\t\t\t" << NBadComponent[2][0][0] << "\t" << NBadComponent[2][0][1] << "\t" << NBadComponent[2][0][2]
315  << "\t" << NBadComponent[2][0][3];
316  ss << "\nTEC:\t\t\t" << NBadComponent[3][0][0] << "\t" << NBadComponent[3][0][1] << "\t" << NBadComponent[3][0][2]
317  << "\t" << NBadComponent[3][0][3];
318  ss << "\n";
319 
320  for (int i = 1; i < 5; ++i) {
321  ss << "\nTIB Layer " << i << " :\t\t" << NBadComponent[0][i][0] << "\t" << NBadComponent[0][i][1] << "\t"
322  << NBadComponent[0][i][2] << "\t" << NBadComponent[0][i][3];
323  std::stringstream binlabel;
324  binlabel << "TIB L " << i;
325 
326  for (int j = 0; j < 4; j++) {
327  ME[j]->Fill(i, NBadComponent[0][i][j]);
328  ME[j]->setBinLabel(i, binlabel.str());
329  }
330  }
331  ss << "\n";
332  for (int i = 1; i < 4; ++i) {
333  ss << "\nTID+ Disk " << i << " :\t\t" << NBadComponent[1][i][0] << "\t" << NBadComponent[1][i][1] << "\t"
334  << NBadComponent[1][i][2] << "\t" << NBadComponent[1][i][3];
335  std::stringstream binlabel;
336  binlabel << "TID+ D " << i;
337 
338  for (int j = 0; j < 4; j++) {
339  ME[j]->Fill(i + 4, NBadComponent[1][i][j]);
340  ME[j]->setBinLabel(i + 4, binlabel.str());
341  }
342  }
343  for (int i = 4; i < 7; ++i) {
344  ss << "\nTID- Disk " << i - 3 << " :\t\t" << NBadComponent[1][i][0] << "\t" << NBadComponent[1][i][1] << "\t"
345  << NBadComponent[1][i][2] << "\t" << NBadComponent[1][i][3];
346  std::stringstream binlabel;
347  binlabel << "TID- D " << i - 3;
348 
349  for (int j = 0; j < 4; j++) {
350  ME[j]->Fill(i + 4, NBadComponent[1][i][j]);
351  ME[j]->setBinLabel(i + 4, binlabel.str());
352  }
353  }
354  ss << "\n";
355  for (int i = 1; i < 7; ++i) {
356  ss << "\nTOB Layer " << i << " :\t\t" << NBadComponent[2][i][0] << "\t" << NBadComponent[2][i][1] << "\t"
357  << NBadComponent[2][i][2] << "\t" << NBadComponent[2][i][3];
358  std::stringstream binlabel;
359  binlabel << "TOB L " << i;
360 
361  for (int j = 0; j < 4; j++) {
362  ME[j]->Fill(i + 10, NBadComponent[2][i][j]);
363  ME[j]->setBinLabel(i + 10, binlabel.str());
364  }
365  }
366  ss << "\n";
367  for (int i = 1; i < 10; ++i) {
368  ss << "\nTEC+ Disk " << i << " :\t\t" << NBadComponent[3][i][0] << "\t" << NBadComponent[3][i][1] << "\t"
369  << NBadComponent[3][i][2] << "\t" << NBadComponent[3][i][3];
370  std::stringstream binlabel;
371  binlabel << "TEC+ D " << i;
372 
373  for (int j = 0; j < 4; j++) {
374  ME[j]->Fill(i + 16, NBadComponent[3][i][j]);
375  ME[j]->setBinLabel(i + 16, binlabel.str());
376  }
377  }
378  for (int i = 10; i < 19; ++i) {
379  ss << "\nTEC- Disk " << i - 9 << " :\t\t" << NBadComponent[3][i][0] << "\t" << NBadComponent[3][i][1] << "\t"
380  << NBadComponent[3][i][2] << "\t" << NBadComponent[3][i][3];
381  std::stringstream binlabel;
382  binlabel << "TEC- D " << i - 9;
383 
384  for (int j = 0; j < 4; j++) {
385  ME[j]->Fill(i + 16, NBadComponent[3][i][j]);
386  ME[j]->setBinLabel(i + 16, binlabel.str());
387  }
388  }
389  ss << "\n";
390 
391  ss << "\n----------------------------------------------------------------"
392  "\n\t\t Detid \tModules Fibers "
393  "Apvs\n---------------------------------------------------------------"
394  "-";
395  for (int i = 1; i < 5; ++i)
396  ss << "\nTIB Layer " << i << " :" << ssV[0][i].str();
397  ss << "\n";
398  for (int i = 1; i < 4; ++i)
399  ss << "\nTID+ Disk " << i << " :" << ssV[1][i].str();
400  for (int i = 4; i < 7; ++i)
401  ss << "\nTID- Disk " << i - 3 << " :" << ssV[1][i].str();
402  ss << "\n";
403  for (int i = 1; i < 7; ++i)
404  ss << "\nTOB Layer " << i << " :" << ssV[2][i].str();
405  ss << "\n";
406  for (int i = 1; i < 10; ++i)
407  ss << "\nTEC+ Disk " << i << " :" << ssV[3][i].str();
408  for (int i = 10; i < 19; ++i)
409  ss << "\nTEC- Disk " << i - 9 << " :" << ssV[3][i].str();
410 
411  edm::LogInfo("SiStripQualityDQM") << ss.str() << std::endl;
412 
413  for (int i = 0; i < 4; i++) {
414  TCanvas c1("c1");
415  ME[i]->getTH1()->Draw();
416  std::string name(ME[i]->getTitle());
417  name += ".png";
418  c1.Print(name.c_str());
419  }
420 }

References a, dqm::implementation::IBooker::book1D(), alignmentValidation::c1, SiStripBaseCondObjDQMGet< SiStripQuality, SiStripQualityRcd >::condObj_, SiStripBadStrip::decode(), SiStripBaseCondObjDQM::dqmStore_, PixelVTXMonitor_cfi::FolderName, SiStripBaseCondObjDQM::fPSet_, SiStripDetInfoFileReader::getAllDetIds(), SiStripQuality::getBadComponentList(), SiStripBadStrip::getDataVectorBegin(), edm::ParameterSet::getParameter(), SiStripBadStrip::getRegistryVectorBegin(), SiStripBadStrip::getRegistryVectorEnd(), SiStripBaseCondObjDQM::hPSet_, mps_fire::i, SiStripQuality::IsModuleUsable(), dqmiolumiharvest::j, dqmdumpme::k, LogDebug, Skims_PA_cff::name, NBadComponent, NTkBadComponent, FastTimerService_cff::range, SiStripBadStrip::data::range, SiStripBaseCondObjDQM::reader, SetBadComponents(), dqm::implementation::DQMStore::setCurrentFolder(), contentValuesCheck::ss, ssV, str, AlCaHLTBitMon_QueryRunRegistry::string, SiStripDetId::TEC, TrackerTopology::tecSide(), TrackerTopology::tecWheel(), SiStripDetId::TIB, TrackerTopology::tibLayer(), SiStripDetId::TID, TrackerTopology::tidSide(), TrackerTopology::tidWheel(), SiStripDetId::TOB, TrackerTopology::tobLayer(), SiStripBaseCondObjDQM::tTopo_, and testProducerWithPsetDescEmpty_cfi::x1.

◆ fillMEsForDet()

void SiStripQualityDQM::fillMEsForDet ( const ModMEs selModME_,
uint32_t  selDetId_ 
)
overridevirtual

Implements SiStripBaseCondObjDQM.

Definition at line 31 of file SiStripQualityDQM.cc.

31  {
32  ModMEs selModME_ = _selModME_;
33  getModMEs(selModME_, selDetId_);
34 
35  const auto qualityRange = condObj_->getRange(selDetId_);
36  int nStrip = reader->getNumberOfApvsAndStripLength(selDetId_).first * 128;
37 
38  for (int istrip = 0; istrip < nStrip; ++istrip) {
39  selModME_.ProfileDistr->Fill(istrip + 1, condObj_->IsStripBad(qualityRange, istrip) ? 0. : 1.);
40 
41  } // istrip
42 }

References SiStripBaseCondObjDQMGet< SiStripQuality, SiStripQualityRcd >::condObj_, dqm::impl::MonitorElement::Fill(), SiStripBaseCondObjDQM::getModMEs(), SiStripDetInfoFileReader::getNumberOfApvsAndStripLength(), SiStripBadStrip::getRange(), SiStripQuality::IsStripBad(), SiStripBaseCondObjDQM::ModMEs::ProfileDistr, and SiStripBaseCondObjDQM::reader.

Referenced by fillModMEs().

◆ fillMEsForLayer()

void SiStripQualityDQM::fillMEsForLayer ( uint32_t  selDetId_)
overridevirtual

Implements SiStripBaseCondObjDQM.

Definition at line 64 of file SiStripQualityDQM.cc.

65  {
66  float numberOfBadStrips = 0;
67 
69 
70  if (hPSet_.getParameter<bool>("FillSummaryAtLayerLevel")) {
71  std::string hSummary_description;
72  hSummary_description = hPSet_.getParameter<std::string>("Summary_description");
73 
74  std::string hSummary_name;
75 
76  // ----
77  int subDetId_ = ((selDetId_ >> 25) & 0x7);
78 
79  if (subDetId_ < 3 || subDetId_ > 6) {
80  edm::LogError("SiStripQualityDQM") << "[SiStripQualityDQM::fillMEsForLayer] WRONG INPUT : no such "
81  "subdetector type : "
82  << subDetId_ << " no folder set!" << std::endl;
83  return;
84  }
85  // ----
86 
87  hSummary_name = hidmanager.createHistoLayer(hSummary_description, "layer", getLayerNameAndId(selDetId_).first, "");
88 
89  const auto selMEsMapIter_ = SummaryMEsMap_.find(getLayerNameAndId(selDetId_).second);
90 
91  ModMEs selME_;
92  if (selMEsMapIter_ != SummaryMEsMap_.end())
93  selME_ = selMEsMapIter_->second;
94 
95  getSummaryMEs(selME_, selDetId_);
96 
97  std::vector<uint32_t> sameLayerDetIds_;
98  sameLayerDetIds_.clear();
99  sameLayerDetIds_ = GetSameLayerDetId(activeDetIds, selDetId_);
100  // -----
101  // unsigned int iBin=0;
102 
103  //%%%%%%%%%%%%%%%%%%%
104  //%%% FIXME: patch to fix the bug causing double counting on each layer
105  //%%%%%%%%%%%%%%%%%%%%%%%
106  if (std::binary_search(alreadyFilledLayers.begin(), alreadyFilledLayers.end(), sameLayerDetIds_[0]))
107  return;
108  alreadyFilledLayers.push_back(sameLayerDetIds_[0]);
110  //%%%%%%%%%%%%%%%%%%%%%%% END %%%%%%%%%%
111 
112  for (unsigned int i = 0; i < sameLayerDetIds_.size(); i++) {
113  const auto qualityRange = condObj_->getRange(sameLayerDetIds_[i]);
114  int nStrip = reader->getNumberOfApvsAndStripLength(sameLayerDetIds_[i]).first * 128;
115 
116  numberOfBadStrips = 0;
117 
118  for (int istrip = 0; istrip < nStrip; ++istrip) {
119  if (condObj_->IsStripBad(qualityRange, istrip)) {
120  numberOfBadStrips++;
121  }
122  }
123 
124  float fr = 100 * float(numberOfBadStrips) / nStrip;
125  selME_.SummaryDistr->Fill(i + 1, fr);
126  if (fr > 20) {
127  char c[9];
128  sprintf(c, "%d", sameLayerDetIds_[i]);
129  selME_.SummaryDistr->setBinLabel(i + 1, c);
130  }
131 
132  // Fill the TkHistoMap with Quality output :
133  if (HistoMaps_On_)
134  Tk_HM_->setBinContent(sameLayerDetIds_[i], fr);
135 
136  // Fill the TkMap
137  if (fPSet_.getParameter<bool>("TkMap_On") || hPSet_.getParameter<bool>("TkMap_On")) {
138  fillTkMap(sameLayerDetIds_[i], fr);
139  }
140  }
141  } // if Fill ...
142 }

References SiStripBaseCondObjDQM::activeDetIds, alreadyFilledLayers, c, SiStripBaseCondObjDQMGet< SiStripQuality, SiStripQualityRcd >::condObj_, SiStripHistoId::createHistoLayer(), dqm::impl::MonitorElement::Fill(), SiStripBaseCondObjDQM::fillTkMap(), first, dqmMemoryStats::float, SiStripBaseCondObjDQM::fPSet_, SiStripBaseCondObjDQM::getLayerNameAndId(), SiStripDetInfoFileReader::getNumberOfApvsAndStripLength(), edm::ParameterSet::getParameter(), SiStripBadStrip::getRange(), SiStripBaseCondObjDQM::GetSameLayerDetId(), SiStripBaseCondObjDQM::getSummaryMEs(), SiStripBaseCondObjDQM::hidmanager, SiStripBaseCondObjDQM::HistoMaps_On_, SiStripBaseCondObjDQM::hPSet_, mps_fire::i, SiStripQuality::IsStripBad(), SiStripBaseCondObjDQM::reader, edm::second(), dqm::impl::MonitorElement::setBinLabel(), jetUpdater_cfi::sort, AlCaHLTBitMon_QueryRunRegistry::string, SiStripBaseCondObjDQM::ModMEs::SummaryDistr, SiStripBaseCondObjDQM::SummaryMEsMap_, and SiStripBaseCondObjDQM::Tk_HM_.

Referenced by fillSummaryMEs().

◆ fillModMEs()

void SiStripQualityDQM::fillModMEs ( const std::vector< uint32_t > &  selectedDetIds)
overridevirtual

Reimplemented from SiStripBaseCondObjDQM.

Definition at line 24 of file SiStripQualityDQM.cc.

24  {
25  ModMEs CondObj_ME;
26  for (const auto det : selectedDetIds) {
27  fillMEsForDet(CondObj_ME, det);
28  }
29 }

References fillMEsForDet().

◆ fillSummaryMEs()

void SiStripQualityDQM::fillSummaryMEs ( const std::vector< uint32_t > &  selectedDetIds)
overridevirtual

Reimplemented from SiStripBaseCondObjDQM.

Definition at line 44 of file SiStripQualityDQM.cc.

44  {
45  for (const auto det : selectedDetIds) {
46  fillMEsForLayer(/*SummaryMEsMap_,*/ det);
47  }
48 
49  for (const auto &itm : SummaryMEsMap_) {
50  ModMEs selME;
51  selME = itm.second;
52 
53  if (hPSet_.getParameter<bool>("FillSummaryAtLayerLevel") &&
54  fPSet_.getParameter<bool>("OutputSummaryAtLayerLevelAsImage")) {
55  TCanvas c1("c1");
56  selME.SummaryDistr->getTH1()->Draw();
57  std::string name(selME.SummaryDistr->getTitle());
58  name += ".png";
59  c1.Print(name.c_str());
60  }
61  }
62 }

References alignmentValidation::c1, fillMEsForLayer(), SiStripBaseCondObjDQM::fPSet_, edm::ParameterSet::getParameter(), dqm::legacy::MonitorElement::getTH1(), dqm::impl::MonitorElement::getTitle(), SiStripBaseCondObjDQM::hPSet_, Skims_PA_cff::name, AlCaHLTBitMon_QueryRunRegistry::string, SiStripBaseCondObjDQM::ModMEs::SummaryDistr, and SiStripBaseCondObjDQM::SummaryMEsMap_.

◆ getActiveDetIds()

void SiStripQualityDQM::getActiveDetIds ( const edm::EventSetup eSetup)
overridevirtual

◆ SetBadComponents()

void SiStripQualityDQM::SetBadComponents ( int  i,
int  component,
SiStripQuality::BadComponent BC 
)
private

Definition at line 422 of file SiStripQualityDQM.cc.

422  {
423  int napv = reader->getNumberOfApvsAndStripLength(BC.detid).first;
424 
425  ssV[i][component] << "\n\t\t " << BC.detid << " \t " << BC.BadModule << " \t " << ((BC.BadFibers) & 0x1) << " ";
426  if (napv == 4)
427  ssV[i][component] << "x " << ((BC.BadFibers >> 1) & 0x1);
428 
429  if (napv == 6)
430  ssV[i][component] << ((BC.BadFibers >> 1) & 0x1) << " " << ((BC.BadFibers >> 2) & 0x1);
431  ssV[i][component] << " \t " << ((BC.BadApvs) & 0x1) << " " << ((BC.BadApvs >> 1) & 0x1) << " ";
432  if (napv == 4)
433  ssV[i][component] << "x x " << ((BC.BadApvs >> 2) & 0x1) << " " << ((BC.BadApvs >> 3) & 0x1);
434  if (napv == 6)
435  ssV[i][component] << ((BC.BadApvs >> 2) & 0x1) << " " << ((BC.BadApvs >> 3) & 0x1) << " "
436  << ((BC.BadApvs >> 4) & 0x1) << " " << ((BC.BadApvs >> 5) & 0x1) << " ";
437 
438  if (BC.BadApvs) {
439  NBadComponent[i][0][2] += ((BC.BadApvs >> 5) & 0x1) + ((BC.BadApvs >> 4) & 0x1) + ((BC.BadApvs >> 3) & 0x1) +
440  ((BC.BadApvs >> 2) & 0x1) + ((BC.BadApvs >> 1) & 0x1) + ((BC.BadApvs) & 0x1);
441  NBadComponent[i][component][2] += ((BC.BadApvs >> 5) & 0x1) + ((BC.BadApvs >> 4) & 0x1) +
442  ((BC.BadApvs >> 3) & 0x1) + ((BC.BadApvs >> 2) & 0x1) +
443  ((BC.BadApvs >> 1) & 0x1) + ((BC.BadApvs) & 0x1);
444  // tkMap->fillc(BC.detid,0xff0000);
445  }
446  if (BC.BadFibers) {
447  NBadComponent[i][0][1] += ((BC.BadFibers >> 2) & 0x1) + ((BC.BadFibers >> 1) & 0x1) + ((BC.BadFibers) & 0x1);
448  NBadComponent[i][component][1] +=
449  ((BC.BadFibers >> 2) & 0x1) + ((BC.BadFibers >> 1) & 0x1) + ((BC.BadFibers) & 0x1);
450  // tkMap->fillc(BC.detid,0x0000ff);
451  }
452  if (BC.BadModule) {
453  NBadComponent[i][0][0]++;
454  NBadComponent[i][component][0]++;
455  // tkMap->fillc(BC.detid,0x0);
456  }
457 }

References SiStripQuality::BadComponent::BadApvs, SiStripQuality::BadComponent::BadFibers, SiStripQuality::BadComponent::BadModule, SiStripQuality::BadComponent::detid, SiStripDetInfoFileReader::getNumberOfApvsAndStripLength(), mps_fire::i, NBadComponent, SiStripBaseCondObjDQM::reader, ssV, and testProducerWithPsetDescEmpty_cfi::x1.

Referenced by fillGrandSummaryMEs().

Member Data Documentation

◆ alreadyFilledLayers

std::vector<uint32_t> SiStripQualityDQM::alreadyFilledLayers
private

Definition at line 36 of file SiStripQualityDQM.h.

Referenced by fillMEsForLayer().

◆ NBadComponent

int SiStripQualityDQM::NBadComponent[4][19][4]
private

Definition at line 32 of file SiStripQualityDQM.h.

Referenced by fillGrandSummaryMEs(), and SetBadComponents().

◆ NTkBadComponent

int SiStripQualityDQM::NTkBadComponent[4]
private

Definition at line 31 of file SiStripQualityDQM.h.

Referenced by fillGrandSummaryMEs().

◆ ssV

std::stringstream SiStripQualityDQM::ssV[4][19]
private

Definition at line 33 of file SiStripQualityDQM.h.

Referenced by fillGrandSummaryMEs(), and SetBadComponents().

SiStripHistoId::createHistoLayer
std::string createHistoLayer(std::string description, std::string id_type, std::string path, std::string flag)
Definition: SiStripHistoId.cc:51
SiStripQuality::BadComponent::detid
uint32_t detid
Definition: SiStripQuality.h:35
FastTimerService_cff.range
range
Definition: FastTimerService_cff.py:34
SiStripBaseCondObjDQM::hidmanager
SiStripHistoId hidmanager
Definition: SiStripBaseCondObjDQM.h:141
mps_fire.i
i
Definition: mps_fire.py:428
dqmMemoryStats.float
float
Definition: dqmMemoryStats.py:127
SiStripBadStrip::getRange
const Range getRange(const uint32_t detID) const
Definition: SiStripBadStrip.cc:27
SiStripBaseCondObjDQM::activeDetIds
std::vector< uint32_t > activeDetIds
Definition: SiStripBaseCondObjDQM.h:114
SiStripBadStrip::decode
data decode(const unsigned int &value) const
Definition: SiStripBadStrip.h:78
SiStripQualityDQM::NTkBadComponent
int NTkBadComponent[4]
Definition: SiStripQualityDQM.h:31
SiStripQualityDQM::NBadComponent
int NBadComponent[4][19][4]
Definition: SiStripQualityDQM.h:32
edm::second
U second(std::pair< T, U > const &p)
Definition: ParameterSet.cc:222
SiStripQuality::IsModuleUsable
bool IsModuleUsable(const uint32_t &detid) const
Definition: SiStripQuality.cc:585
dqm::legacy::MonitorElement
Definition: MonitorElement.h:462
SiStripBaseCondObjDQM::HistoMaps_On_
bool HistoMaps_On_
Definition: SiStripBaseCondObjDQM.h:100
edm::LogInfo
Log< level::Info, false > LogInfo
Definition: MessageLogger.h:125
SiStripBadStrip::getDataVectorBegin
ContainerIterator getDataVectorBegin() const
Definition: SiStripBadStrip.h:73
SiStripBaseCondObjDQM::SummaryMEsMap_
std::map< uint32_t, ModMEs > SummaryMEsMap_
Definition: SiStripBaseCondObjDQM.h:113
PixelVTXMonitor_cfi.FolderName
FolderName
Definition: PixelVTXMonitor_cfi.py:5
TrackerTopology::tidWheel
unsigned int tidWheel(const DetId &id) const
Definition: TrackerTopology.h:201
SiStripBaseCondObjDQM::reader
SiStripDetInfoFileReader * reader
Definition: SiStripBaseCondObjDQM.h:94
SiStripQualityDQM::SetBadComponents
void SetBadComponents(int i, int component, SiStripQuality::BadComponent &BC)
Definition: SiStripQualityDQM.cc:422
contentValuesCheck.ss
ss
Definition: contentValuesCheck.py:33
SiStripBaseCondObjDQM::fillTkMap
void fillTkMap(const uint32_t &detid, const float &value)
Definition: SiStripBaseCondObjDQM.cc:1049
testProducerWithPsetDescEmpty_cfi.x1
x1
Definition: testProducerWithPsetDescEmpty_cfi.py:33
SiStripBadStrip::Range
std::pair< ContainerIterator, ContainerIterator > Range
Definition: SiStripBadStrip.h:53
SiStripQuality::getBadComponentList
const std::vector< BadComponent > & getBadComponentList() const
Definition: SiStripQuality.h:119
SiStripBadStrip::getRegistryVectorBegin
RegistryIterator getRegistryVectorBegin() const
Definition: SiStripBadStrip.h:75
dqm::legacy::DQMStore
Definition: DQMStore.h:727
SiStripBaseCondObjDQM::getLayerNameAndId
std::pair< std::string, uint32_t > getLayerNameAndId(const uint32_t &detId_)
Definition: SiStripBaseCondObjDQM.cc:827
SiStripBaseCondObjDQM::Tk_HM_
std::unique_ptr< TkHistoMap > Tk_HM_
Definition: SiStripBaseCondObjDQM.h:117
SiStripBaseCondObjDQM::getModMEs
void getModMEs(ModMEs &CondObj_ME, const uint32_t &detId_)
Definition: SiStripBaseCondObjDQM.cc:300
str
#define str(s)
Definition: TestProcessor.cc:52
dqm::implementation::DQMStore::setCurrentFolder
void setCurrentFolder(std::string const &fullpath) override
Definition: DQMStore.h:569
dqmdumpme.k
k
Definition: dqmdumpme.py:60
SiStripDetId::TEC
static constexpr auto TEC
Definition: SiStripDetId.h:40
first
auto first
Definition: CAHitNtupletGeneratorKernelsImpl.h:112
SiStripQuality::BadComponent::BadFibers
unsigned short BadFibers
Definition: SiStripQuality.h:37
SiStripQuality::IsStripBad
bool IsStripBad(const uint32_t &detid, const short &strip) const
Definition: SiStripQuality.cc:623
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
SiStripBaseCondObjDQMGet< SiStripQuality, SiStripQualityRcd >
LogDebug
#define LogDebug(id)
Definition: MessageLogger.h:233
a
double a
Definition: hdecay.h:119
SiStripQualityDQM::alreadyFilledLayers
std::vector< uint32_t > alreadyFilledLayers
Definition: SiStripQualityDQM.h:36
jetUpdater_cfi.sort
sort
Definition: jetUpdater_cfi.py:29
SiStripQualityDQM::ssV
std::stringstream ssV[4][19]
Definition: SiStripQualityDQM.h:33
SiStripQuality::BadComponent::BadModule
bool BadModule
Definition: SiStripQuality.h:38
TrackerTopology::tidSide
unsigned int tidSide(const DetId &id) const
Definition: TrackerTopology.h:190
edm::Service
Definition: Service.h:30
alignmentValidation.c1
c1
do drawing
Definition: alignmentValidation.py:1025
SiStripBadStrip::getDetIds
void getDetIds(std::vector< uint32_t > &DetIds_) const
Definition: SiStripBadStrip.cc:51
SiStripDetId::TOB
static constexpr auto TOB
Definition: SiStripDetId.h:39
SiStripQualityDQM::fillMEsForDet
void fillMEsForDet(const ModMEs &selModME_, uint32_t selDetId_) override
Definition: SiStripQualityDQM.cc:31
SiStripQuality::BadComponent::BadApvs
unsigned short BadApvs
Definition: SiStripQuality.h:36
edm::LogError
Log< level::Error, false > LogError
Definition: MessageLogger.h:123
SiStripDetInfoFileReader::getAllDetIds
const std::vector< uint32_t > & getAllDetIds() const
Definition: SiStripDetInfoFileReader.h:52
SiStripBaseCondObjDQM::GetSameLayerDetId
std::vector< uint32_t > GetSameLayerDetId(const std::vector< uint32_t > &activeDetIds, uint32_t selDetId)
Definition: SiStripBaseCondObjDQM.cc:1022
SiStripDetId::TID
static constexpr auto TID
Definition: SiStripDetId.h:38
SiStripHistoId
Definition: SiStripHistoId.h:25
TrackerTopology::tobLayer
unsigned int tobLayer(const DetId &id) const
Definition: TrackerTopology.h:147
SiStripDetInfoFileReader::getNumberOfApvsAndStripLength
const std::pair< unsigned short, double > getNumberOfApvsAndStripLength(uint32_t detId) const
Definition: SiStripDetInfoFileReader.cc:101
SiStripBaseCondObjDQM::tTopo_
const TrackerTopology * tTopo_
Definition: SiStripBaseCondObjDQM.h:122
SiStripBaseCondObjDQM::getSummaryMEs
void getSummaryMEs(ModMEs &CondObj_ME, const uint32_t &detId_)
Definition: SiStripBaseCondObjDQM.cc:333
ME
Definition: ME.h:11
SiStripBaseCondObjDQM::fPSet_
edm::ParameterSet fPSet_
Definition: SiStripBaseCondObjDQM.h:97
SiStripDetId::TIB
static constexpr auto TIB
Definition: SiStripDetId.h:37
Skims_PA_cff.name
name
Definition: Skims_PA_cff.py:17
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
SiStripBadStrip::RegistryIterator
Registry::const_iterator RegistryIterator
Definition: SiStripBadStrip.h:55
SiStripBaseCondObjDQM::hPSet_
edm::ParameterSet hPSet_
Definition: SiStripBaseCondObjDQM.h:96
SiStripBadStrip::data::range
unsigned short range
Definition: SiStripBadStrip.h:34
SiStripDetId
Detector identifier class for the strip tracker.
Definition: SiStripDetId.h:18
SiStripBaseCondObjDQMGet< SiStripQuality, SiStripQualityRcd >::getConditionObject
void getConditionObject(const edm::EventSetup &eSetup) override
Definition: SiStripBaseCondObjDQM.h:159
SiStripBaseCondObjDQMGet< SiStripQuality, SiStripQualityRcd >::condObj_
const SiStripQuality * condObj_
Definition: SiStripBaseCondObjDQM.h:163
c
auto & c
Definition: CAHitNtupletGeneratorKernelsImpl.h:46
dqmiolumiharvest.j
j
Definition: dqmiolumiharvest.py:66
SiStripBaseCondObjDQM::dqmStore_
DQMStore * dqmStore_
Definition: SiStripBaseCondObjDQM.h:143
TrackerTopology::tecWheel
unsigned int tecWheel(const DetId &id) const
Definition: TrackerTopology.h:198
SiStripBadStrip::getRegistryVectorEnd
RegistryIterator getRegistryVectorEnd() const
Definition: SiStripBadStrip.h:76
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
SiStripQualityDQM::fillMEsForLayer
void fillMEsForLayer(uint32_t selDetId_) override
Definition: SiStripQualityDQM.cc:64
TrackerTopology::tibLayer
unsigned int tibLayer(const DetId &id) const
Definition: TrackerTopology.h:150
unpackBuffers-CaloStage2.token
token
Definition: unpackBuffers-CaloStage2.py:316
TrackerTopology::tecSide
unsigned int tecSide(const DetId &id) const
Definition: TrackerTopology.h:184