18 Tk_HM_ = std::make_unique<TkHistoMap>(tkDetMapHandle.
product(),
"SiStrip/Histo_Map",
"Quality_TkMap", 0.);
44 for (std::vector<uint32_t>::const_iterator detIter_ = selectedDetIds.begin(); detIter_ != selectedDetIds.end();
54 ModMEs selModME_ = _selModME_;
60 for (
int istrip = 0; istrip < nStrip; ++istrip) {
75 for (std::vector<uint32_t>::const_iterator detIter_ = selectedDetIds.begin(); detIter_ != selectedDetIds.end();
90 c1.Print(name.c_str());
100 float numberOfBadStrips = 0;
111 int subDetId_ = ((selDetId_ >> 25) & 0x7);
113 if (subDetId_ < 3 || subDetId_ > 6) {
114 edm::LogError(
"SiStripQualityDQM") <<
"[SiStripQualityDQM::fillMEsForLayer] WRONG INPUT : no such " 115 "subdetector type : " 116 << subDetId_ <<
" no folder set!" << std::endl;
124 std::map<uint32_t, ModMEs>::iterator selMEsMapIter_ =
129 selME_ = selMEsMapIter_->second;
133 std::vector<uint32_t> sameLayerDetIds_;
134 sameLayerDetIds_.clear();
148 for (
unsigned int i = 0;
i < sameLayerDetIds_.size();
i++) {
152 numberOfBadStrips = 0;
154 for (
int istrip = 0; istrip < nStrip; ++istrip) {
160 float fr = 100 *
float(numberOfBadStrips) / nStrip;
164 sprintf(c,
"%d", sameLayerDetIds_[i]);
170 Tk_HM_->setBinContent(sameLayerDetIds_[i], fr);
214 ME[0] = dqmStore_->
book1D(hSummary_BadModules_name, hSummary_BadModules_name, NchX, LowX, HighX);
218 ME[1] = dqmStore_->
book1D(hSummary_BadFibers_name, hSummary_BadFibers_name, NchX, LowX, HighX);
222 ME[2] = dqmStore_->
book1D(hSummary_BadApvs_name, hSummary_BadApvs_name, NchX, LowX, HighX);
226 ME[3] = dqmStore_->
book1D(hSummary_BadStrips_name, hSummary_BadStrips_name, NchX, LowX, HighX);
232 for (
int i = 0;
i < 4; ++
i) {
234 for (
int j = 0; j < 19; ++j) {
236 for (
int k = 0;
k < 4; ++
k)
241 std::stringstream ss;
244 std::vector<uint32_t>::const_iterator idet = detids.begin();
245 for (; idet != detids.end(); ++idet) {
248 LogDebug(
"SiStripQualityDQM") << ss.str() << std::endl;
252 for (
size_t i = 0;
i < BC.size(); ++
i) {
263 ((BC[
i].BadApvs >> 2) & 0
x1) + ((BC[
i].BadApvs >> 1) & 0
x1) + ((BC[
i].BadApvs) & 0
x1);
276 component = tTopo->
tibLayer(BC[
i].detid);
292 component = tTopo->
tobLayer(BC[
i].detid);
313 uint32_t detid = rp->detid;
335 for (
int it = 0; it < sqrange.second - sqrange.first; it++) {
348 ss <<
"\n-----------------\nGlobal Info\n-----------------";
349 ss <<
"\nBadComponent \t Modules \tFibers " 350 "\tApvs\tStrips\n------------------------------------------------------" 357 ss <<
"\nTID:\t\t\t" << NBadComponent[1][0][0] <<
"\t" << NBadComponent[1][0][1] <<
"\t" << NBadComponent[1][0][2]
358 <<
"\t" << NBadComponent[1][0][3];
359 ss <<
"\nTOB:\t\t\t" << NBadComponent[2][0][0] <<
"\t" << NBadComponent[2][0][1] <<
"\t" << NBadComponent[2][0][2]
360 <<
"\t" << NBadComponent[2][0][3];
361 ss <<
"\nTEC:\t\t\t" << NBadComponent[3][0][0] <<
"\t" << NBadComponent[3][0][1] <<
"\t" << NBadComponent[3][0][2]
362 <<
"\t" << NBadComponent[3][0][3];
365 for (
int i = 1;
i < 5; ++
i) {
366 ss <<
"\nTIB Layer " <<
i <<
" :\t\t" << NBadComponent[0][
i][0] <<
"\t" << NBadComponent[0][
i][1] <<
"\t" 367 << NBadComponent[0][
i][2] <<
"\t" << NBadComponent[0][
i][3];
368 std::stringstream binlabel;
369 binlabel <<
"TIB L " <<
i;
371 for (
int j = 0; j < 4; j++) {
372 ME[j]->
Fill(i, NBadComponent[0][i][j]);
373 ME[j]->
getTH1()->GetXaxis()->SetBinLabel(i, binlabel.str().c_str());
377 for (
int i = 1;
i < 4; ++
i) {
378 ss <<
"\nTID+ Disk " <<
i <<
" :\t\t" << NBadComponent[1][
i][0] <<
"\t" << NBadComponent[1][
i][1] <<
"\t" 379 << NBadComponent[1][
i][2] <<
"\t" << NBadComponent[1][
i][3];
380 std::stringstream binlabel;
381 binlabel <<
"TID+ D " <<
i;
383 for (
int j = 0; j < 4; j++) {
384 ME[j]->
Fill(i + 4, NBadComponent[1][i][j]);
385 ME[j]->
getTH1()->GetXaxis()->SetBinLabel(i + 4, binlabel.str().c_str());
388 for (
int i = 4;
i < 7; ++
i) {
389 ss <<
"\nTID- Disk " <<
i - 3 <<
" :\t\t" << NBadComponent[1][
i][0] <<
"\t" << NBadComponent[1][
i][1] <<
"\t" 390 << NBadComponent[1][
i][2] <<
"\t" << NBadComponent[1][
i][3];
391 std::stringstream binlabel;
392 binlabel <<
"TID- D " <<
i - 3;
394 for (
int j = 0; j < 4; j++) {
395 ME[j]->
Fill(i + 4, NBadComponent[1][i][j]);
396 ME[j]->
getTH1()->GetXaxis()->SetBinLabel(i + 4, binlabel.str().c_str());
400 for (
int i = 1;
i < 7; ++
i) {
401 ss <<
"\nTOB Layer " <<
i <<
" :\t\t" << NBadComponent[2][
i][0] <<
"\t" << NBadComponent[2][
i][1] <<
"\t" 402 << NBadComponent[2][
i][2] <<
"\t" << NBadComponent[2][
i][3];
403 std::stringstream binlabel;
404 binlabel <<
"TOB L " <<
i;
406 for (
int j = 0; j < 4; j++) {
407 ME[j]->
Fill(i + 10, NBadComponent[2][i][j]);
408 ME[j]->
getTH1()->GetXaxis()->SetBinLabel(i + 10, binlabel.str().c_str());
412 for (
int i = 1;
i < 10; ++
i) {
413 ss <<
"\nTEC+ Disk " <<
i <<
" :\t\t" << NBadComponent[3][
i][0] <<
"\t" << NBadComponent[3][
i][1] <<
"\t" 414 << NBadComponent[3][
i][2] <<
"\t" << NBadComponent[3][
i][3];
415 std::stringstream binlabel;
416 binlabel <<
"TEC+ D " <<
i;
418 for (
int j = 0; j < 4; j++) {
419 ME[j]->
Fill(i + 16, NBadComponent[3][i][j]);
420 ME[j]->
getTH1()->GetXaxis()->SetBinLabel(i + 16, binlabel.str().c_str());
423 for (
int i = 10;
i < 19; ++
i) {
424 ss <<
"\nTEC- Disk " <<
i - 9 <<
" :\t\t" << NBadComponent[3][
i][0] <<
"\t" << NBadComponent[3][
i][1] <<
"\t" 425 << NBadComponent[3][
i][2] <<
"\t" << NBadComponent[3][
i][3];
426 std::stringstream binlabel;
427 binlabel <<
"TEC- D " <<
i - 9;
429 for (
int j = 0; j < 4; j++) {
430 ME[j]->
Fill(i + 16, NBadComponent[3][i][j]);
431 ME[j]->
getTH1()->GetXaxis()->SetBinLabel(i + 16, binlabel.str().c_str());
436 ss <<
"\n----------------------------------------------------------------" 437 "\n\t\t Detid \tModules Fibers " 438 "Apvs\n---------------------------------------------------------------" 440 for (
int i = 1;
i < 5; ++
i)
441 ss <<
"\nTIB Layer " <<
i <<
" :" <<
ssV[0][
i].
str();
443 for (
int i = 1;
i < 4; ++
i)
444 ss <<
"\nTID+ Disk " <<
i <<
" :" <<
ssV[1][
i].
str();
445 for (
int i = 4;
i < 7; ++
i)
446 ss <<
"\nTID- Disk " <<
i - 3 <<
" :" <<
ssV[1][
i].
str();
448 for (
int i = 1;
i < 7; ++
i)
449 ss <<
"\nTOB Layer " <<
i <<
" :" <<
ssV[2][
i].
str();
451 for (
int i = 1;
i < 10; ++
i)
452 ss <<
"\nTEC+ Disk " <<
i <<
" :" <<
ssV[3][
i].
str();
453 for (
int i = 10;
i < 19; ++
i)
454 ss <<
"\nTEC- Disk " <<
i - 9 <<
" :" <<
ssV[3][
i].
str();
456 edm::LogInfo(
"SiStripQualityDQM") << ss.str() << std::endl;
458 for (
int i = 0;
i < 4;
i++) {
463 c1.Print(name.c_str());
T getParameter(std::string const &) const
void fillGrandSummaryMEs(const edm::EventSetup &eSetup)
int NBadComponent[4][19][4]
const std::vector< BadComponent > & getBadComponentList() const
void getDetIds(std::vector< uint32_t > &DetIds_) const
SiStripQualityDQM(const edm::EventSetup &eSetup, edm::RunNumber_t iRun, edm::ParameterSet const &hPSet, edm::ParameterSet const &fPSet)
unsigned int tibLayer(const DetId &id) const
const std::pair< unsigned short, double > getNumberOfApvsAndStripLength(uint32_t detId) const
bool IsStripBad(const uint32_t &detid, const short &strip) const
unsigned int tidWheel(const DetId &id) const
Registry::const_iterator RegistryIterator
void getSummaryMEs(ModMEs &CondObj_ME, const uint32_t &detId_, const TrackerTopology *tTopo)
MonitorElement * book1D(char_string const &name, char_string const &title, int const nchX, double const lowX, double const highX)
Book 1D histogram.
void fillTkMap(const uint32_t &detid, const float &value)
void fillModMEs(const std::vector< uint32_t > &selectedDetIds, const edm::EventSetup &es) override
U second(std::pair< T, U > const &p)
std::map< uint32_t, ModMEs > SummaryMEsMap_
RegistryIterator getRegistryVectorEnd() const
unsigned int tidSide(const DetId &id) const
const std::vector< uint32_t > & getAllDetIds() const
SiStripDetInfoFileReader * reader
std::stringstream ssV[4][19]
bool IsModuleUsable(const uint32_t &detid) const
void SetBadComponents(int i, int component, SiStripQuality::BadComponent &BC)
std::vector< uint32_t > GetSameLayerDetId(const std::vector< uint32_t > &activeDetIds, uint32_t selDetId, const TrackerTopology *tTopo)
constexpr int subdetId() const
get the contents of the subdetector field (not cast into any detector's numbering enum) ...
void getConditionObject(const edm::EventSetup &eSetup) override
MonitorElement * ProfileDistr
void fillMEsForLayer(uint32_t selDetId_, const TrackerTopology *tTopo) override
ContainerIterator getDataVectorBegin() const
Detector identifier class for the strip tracker.
void setCurrentFolder(std::string const &fullpath)
void getModMEs(ModMEs &CondObj_ME, const uint32_t &detId_, const TrackerTopology *tTopo)
std::vector< uint32_t > alreadyFilledLayers
~SiStripQualityDQM() override
RegistryIterator getRegistryVectorBegin() const
const Range getRange(const uint32_t detID) const
std::pair< std::string, uint32_t > getLayerNameAndId(const uint32_t &detId_, const TrackerTopology *tTopo)
std::pair< ContainerIterator, ContainerIterator > Range
MonitorElement * SummaryDistr
std::string qualityLabel_
std::vector< uint32_t > activeDetIds
edm::ESHandle< SiStripQuality > qualityHandle_
std::string createHistoLayer(std::string description, std::string id_type, std::string path, std::string flag)
unsigned int tecWheel(const DetId &id) const
void setAxisTitle(const std::string &title, int axis=1)
set x-, y- or z-axis title (axis=1, 2, 3 respectively)
T const * product() const
void fillSummaryMEs(const std::vector< uint32_t > &selectedDetIds, const edm::EventSetup &es) override
SiStripHistoId hidmanager
std::unique_ptr< TkHistoMap > Tk_HM_
void fillMEsForDet(const ModMEs &selModME_, uint32_t selDetId_, const TrackerTopology *tTopo) override
data decode(const unsigned int &value) const
unsigned int tobLayer(const DetId &id) const
unsigned int tecSide(const DetId &id) const
void getActiveDetIds(const edm::EventSetup &eSetup) override