38 for(std::vector<uint32_t>::const_iterator detIter_ = selectedDetIds.begin();
39 detIter_!= selectedDetIds.end();detIter_++){
57 for(
int istrip=0;istrip<nStrip;++istrip){
64 <<
"[SiStripQualityDQM::fillMEsForDet] cms::Exception accessing qualityHandle_->IsStripBad(qualityRange,istrip)?1.:0.) for strip "
83 for(std::vector<uint32_t>::const_iterator detIter_ = selectedDetIds.begin();
84 detIter_!= selectedDetIds.end();detIter_++){
100 c1.Print(name.c_str());
112 float numberOfBadStrips=0;
118 std::string hSummary_description;
121 std::string hSummary_name;
124 int subDetId_ = ((selDetId_>>25)&0x7);
126 if( subDetId_<3 || subDetId_>6 ){
128 <<
"[SiStripQualityDQM::fillMEsForLayer] WRONG INPUT : no such subdetector type : "
129 << subDetId_ <<
" no folder set!"
143 selME_ =selMEsMapIter_->second;
148 std::vector<uint32_t> sameLayerDetIds_;
149 sameLayerDetIds_.clear();
163 for(
unsigned int i=0;
i< sameLayerDetIds_.size();
i++){
170 for(
int istrip=0;istrip<nStrip;++istrip){
171 if(
qualityHandle_->IsStripBad(qualityRange,istrip)) { numberOfBadStrips++;}
175 float fr=100*float(numberOfBadStrips)/nStrip;
179 sprintf(c,
"%d",sameLayerDetIds_[i]);
194 <<
"[SiStripQualityDQM::fillMEsForLayer] cms::Exception filling fraction of bad strips for detId "
195 << sameLayerDetIds_[
i]
210 std::string hSummary_BadObjects_xTitle =
hPSet_.
getParameter<std::string>(
"Summary_BadObjects_histo_xTitle");
212 std::string hSummary_BadModules_name =
hPSet_.
getParameter<std::string>(
"Summary_BadModules_histo_name");
213 std::string hSummary_BadModules_yTitle =
hPSet_.
getParameter<std::string>(
"Summary_BadModules_histo_yTitle");
215 std::string hSummary_BadFibers_name =
hPSet_.
getParameter<std::string>(
"Summary_BadFibers_histo_name");
216 std::string hSummary_BadFibers_yTitle =
hPSet_.
getParameter<std::string>(
"Summary_BadFibers_histo_yTitle");
218 std::string hSummary_BadApvs_name =
hPSet_.
getParameter<std::string>(
"Summary_BadApvs_histo_name");
219 std::string hSummary_BadApvs_yTitle =
hPSet_.
getParameter<std::string>(
"Summary_BadApvs_histo_yTitle");
221 std::string hSummary_BadStrips_name =
hPSet_.
getParameter<std::string>(
"Summary_BadStrips_histo_name");
222 std::string hSummary_BadStrips_yTitle =
hPSet_.
getParameter<std::string>(
"Summary_BadStrips_histo_yTitle");
235 std::string FolderName=
fPSet_.
getParameter<std::string>(
"FolderName_For_QualityAndCabling_SummaryHistos");
239 ME[0] = dqmStore_->
book1D(hSummary_BadModules_name,hSummary_BadModules_name,NchX,LowX,HighX);
243 ME[1] = dqmStore_->
book1D(hSummary_BadFibers_name,hSummary_BadFibers_name,NchX,LowX,HighX);
247 ME[2] = dqmStore_->
book1D(hSummary_BadApvs_name,hSummary_BadApvs_name,NchX,LowX,HighX);
251 ME[3] = dqmStore_->
book1D(hSummary_BadStrips_name,hSummary_BadStrips_name,NchX,LowX,HighX);
258 for(
int i=0;
i<4;++
i){
260 for(
int j=0;
j<19;++
j){
267 std::stringstream ss;
270 std::vector<uint32_t>::const_iterator idet=detids.begin();
271 for(;idet!=detids.end();++idet){
272 ss <<
"detid " << (*idet) <<
" IsModuleUsable " <<
qualityHandle_->IsModuleUsable((*idet)) <<
"\n";
274 LogDebug(
"SiStripQualityStatistics") << ss.str() << std::endl;
277 std::vector<SiStripQuality::BadComponent> BC =
qualityHandle_->getBadComponentList();
279 for (
size_t i=0;
i<BC.size();++
i){
288 NTkBadComponent[1]+= ( (BC[
i].BadFibers>>2)&0x1 )+ ( (BC[
i].BadFibers>>1)&0x1 ) + ( (BC[
i].BadFibers)&0x1 );
290 NTkBadComponent[2]+= ( (BC[
i].BadApvs>>5)&0x1 )+ ( (BC[
i].BadApvs>>4)&0x1 ) + ( (BC[
i].BadApvs>>3)&0x1 ) +
291 ( (BC[
i].BadApvs>>2)&0x1 )+ ( (BC[
i].BadApvs>>1)&0x1 ) + ( (BC[
i].BadApvs)&0x1 );
342 uint32_t
detid=rp->detid;
363 for(
int it=0;it<sqrange.second-sqrange.first;it++){
364 unsigned int range=
qualityHandle_->decode( *(sqrange.first+it) ).range;
377 ss <<
"\n-----------------\nGlobal Info\n-----------------";
378 ss <<
"\nBadComponent \t Modules \tFibers \tApvs\tStrips\n----------------------------------------------------------------";
382 ss <<
"\nTID:\t\t\t"<<NBadComponent[1][0][0]<<
"\t"<<NBadComponent[1][0][1]<<
"\t"<<NBadComponent[1][0][2]<<
"\t"<<NBadComponent[1][0][3];
383 ss <<
"\nTOB:\t\t\t"<<NBadComponent[2][0][0]<<
"\t"<<NBadComponent[2][0][1]<<
"\t"<<NBadComponent[2][0][2]<<
"\t"<<NBadComponent[2][0][3];
384 ss <<
"\nTEC:\t\t\t"<<NBadComponent[3][0][0]<<
"\t"<<NBadComponent[3][0][1]<<
"\t"<<NBadComponent[3][0][2]<<
"\t"<<NBadComponent[3][0][3];
387 for (
int i=1;
i<5;++
i){
388 ss <<
"\nTIB Layer " <<
i <<
" :\t\t"<<NBadComponent[0][
i][0]<<
"\t"<<NBadComponent[0][
i][1]<<
"\t"<<NBadComponent[0][
i][2]<<
"\t"<<NBadComponent[0][
i][3];
389 std::stringstream binlabel;
390 binlabel<<
"TIB L "<<
i;
392 for(
int j=0;
j<4;
j++){
393 ME[
j]->
Fill(i,NBadComponent[0][i][
j]);
394 ME[
j]->
getTH1()->GetXaxis()->SetBinLabel(i,binlabel.str().c_str());
398 for (
int i=1;
i<4;++
i){
399 ss <<
"\nTID+ Disk " <<
i <<
" :\t\t"<<NBadComponent[1][
i][0]<<
"\t"<<NBadComponent[1][
i][1]<<
"\t"<<NBadComponent[1][
i][2]<<
"\t"<<NBadComponent[1][
i][3];
400 std::stringstream binlabel;
401 binlabel<<
"TID+ D "<<
i;
403 for(
int j=0;
j<4;
j++){
404 ME[
j]->
Fill(i+4,NBadComponent[1][i][
j]);
405 ME[
j]->
getTH1()->GetXaxis()->SetBinLabel(i+4,binlabel.str().c_str());
408 for (
int i=4;
i<7;++
i){
409 ss <<
"\nTID- Disk " <<
i-3 <<
" :\t\t"<<NBadComponent[1][
i][0]<<
"\t"<<NBadComponent[1][
i][1]<<
"\t"<<NBadComponent[1][
i][2]<<
"\t"<<NBadComponent[1][
i][3];
410 std::stringstream binlabel;
411 binlabel<<
"TID- D "<<
i-3;
413 for(
int j=0;
j<4;
j++){
414 ME[
j]->
Fill(i+4,NBadComponent[1][i][
j]);
415 ME[
j]->
getTH1()->GetXaxis()->SetBinLabel(i+4,binlabel.str().c_str());
419 for (
int i=1;
i<7;++
i){
420 ss <<
"\nTOB Layer " <<
i <<
" :\t\t"<<NBadComponent[2][
i][0]<<
"\t"<<NBadComponent[2][
i][1]<<
"\t"<<NBadComponent[2][
i][2]<<
"\t"<<NBadComponent[2][
i][3];
421 std::stringstream binlabel;
422 binlabel<<
"TOB L "<<
i;
424 for(
int j=0;
j<4;
j++){
425 ME[
j]->
Fill(i+10,NBadComponent[2][i][
j]);
426 ME[
j]->
getTH1()->GetXaxis()->SetBinLabel(i+10,binlabel.str().c_str());
430 for (
int i=1;
i<10;++
i){
431 ss <<
"\nTEC+ Disk " <<
i <<
" :\t\t"<<NBadComponent[3][
i][0]<<
"\t"<<NBadComponent[3][
i][1]<<
"\t"<<NBadComponent[3][
i][2]<<
"\t"<<NBadComponent[3][
i][3];
432 std::stringstream binlabel;
433 binlabel<<
"TEC+ D "<<
i;
435 for(
int j=0;
j<4;
j++){
436 ME[
j]->
Fill(i+16,NBadComponent[3][i][
j]);
437 ME[
j]->
getTH1()->GetXaxis()->SetBinLabel(i+16,binlabel.str().c_str());
440 for (
int i=10;
i<19;++
i){
441 ss <<
"\nTEC- Disk " <<
i-9 <<
" :\t\t"<<NBadComponent[3][
i][0]<<
"\t"<<NBadComponent[3][
i][1]<<
"\t"<<NBadComponent[3][
i][2]<<
"\t"<<NBadComponent[3][
i][3];
442 std::stringstream binlabel;
443 binlabel<<
"TEC- D "<<
i-9;
445 for(
int j=0;
j<4;
j++){
446 ME[
j]->
Fill(i+16,NBadComponent[3][i][
j]);
447 ME[
j]->
getTH1()->GetXaxis()->SetBinLabel(i+16,binlabel.str().c_str());
452 ss <<
"\n----------------------------------------------------------------\n\t\t Detid \tModules Fibers Apvs\n----------------------------------------------------------------";
453 for (
int i=1;
i<5;++
i)
454 ss <<
"\nTIB Layer " <<
i <<
" :" <<
ssV[0][
i].str();
456 for (
int i=1;
i<4;++
i)
457 ss <<
"\nTID+ Disk " <<
i <<
" :" <<
ssV[1][
i].str();
458 for (
int i=4;
i<7;++
i)
459 ss <<
"\nTID- Disk " <<
i-3 <<
" :" <<
ssV[1][
i].str();
461 for (
int i=1;
i<7;++
i)
462 ss <<
"\nTOB Layer " <<
i <<
" :" <<
ssV[2][
i].str();
464 for (
int i=1;
i<10;++
i)
465 ss <<
"\nTEC+ Disk " <<
i <<
" :" <<
ssV[3][
i].str();
466 for (
int i=10;
i<19;++
i)
467 ss <<
"\nTEC- Disk " <<
i-9 <<
" :" <<
ssV[3][
i].str();
470 edm::LogInfo(
"SiStripQualityStatistics") << ss.str() << std::endl;
472 for (
int i=0;
i<4;
i++){
475 std::string
name (ME[
i]->getTH1()->GetTitle());
477 c1.Print(name.c_str());
488 ssV[
i][component] <<
"\n\t\t "
498 ssV[
i][component] <<
" \t "
500 << ( (BC.
BadApvs>>1)&0x1 ) <<
" ";
502 ssV[
i][component] <<
"x x " << ( (BC.
BadApvs>>2)&0x1 ) <<
" "
505 ssV[
i][component] << ( (BC.
BadApvs>>2)&0x1 ) <<
" "
506 << ( (BC.
BadApvs>>3)&0x1 ) <<
" "
507 << ( (BC.
BadApvs>>4)&0x1 ) <<
" "
508 << ( (BC.
BadApvs>>5)&0x1 ) <<
" ";
void getModMEs(ModMEs &CondObj_ME, const uint32_t &detId_)
virtual char const * what() const
T getParameter(std::string const &) const
int NBadComponent[4][19][4]
unsigned int layer() const
layer id
MonitorElement * book1D(const char *name, const char *title, int nchX, double lowX, double highX)
Book 1D histogram.
const std::pair< unsigned short, double > getNumberOfApvsAndStripLength(uint32_t detId) const
std::vector< uint32_t > GetSameLayerDetId(std::vector< uint32_t > activeDetIds, uint32_t selDetId)
void fillMEsForLayer(std::map< uint32_t, ModMEs > selModMEsMap_, uint32_t selDetId_)
Registry::const_iterator RegistryIterator
void fillModMEs(const std::vector< uint32_t > &selectedDetIds)
void fillTkMap(const uint32_t &detid, const float &value)
unsigned int side() const
positive or negative id
U second(std::pair< T, U > const &p)
void getActiveDetIds(const edm::EventSetup &eSetup)
std::map< uint32_t, ModMEs > SummaryMEsMap_
const std::vector< uint32_t > & getAllDetIds() const
SiStripDetInfoFileReader * reader
std::stringstream ssV[4][19]
void SetBadComponents(int i, int component, SiStripQuality::BadComponent &BC)
MonitorElement * ProfileDistr
void fillMEsForDet(ModMEs selModME_, uint32_t selDetId_)
int subdetId() const
get the contents of the subdetector field (not cast into any detector's numbering enum) ...
Detector identifier class for the strip tracker.
void setBinContent(uint32_t &detid, float value)
virtual ~SiStripQualityDQM()
void fillSummaryMEs(const std::vector< uint32_t > &selectedDetIds)
unsigned int side() const
positive or negative id
std::vector< uint32_t > alreadyFilledLayers
unsigned int wheel() const
wheel id
std::pair< std::string, uint32_t > getLayerNameAndId(const uint32_t &detId_)
unsigned int layer() const
layer id
std::pair< ContainerIterator, ContainerIterator > Range
MonitorElement * SummaryDistr
std::string qualityLabel_
void fillGrandSummaryMEs()
std::vector< uint32_t > activeDetIds
edm::ESHandle< SiStripQuality > qualityHandle_
void getConditionObject(const edm::EventSetup &eSetup)
std::string createHistoLayer(std::string description, std::string id_type, std::string path, std::string flag)
void getSummaryMEs(ModMEs &CondObj_ME, const uint32_t &detId_)
void setAxisTitle(const std::string &title, int axis=1)
set x-, y- or z-axis title (axis=1, 2, 3 respectively)
SiStripQualityDQM(const edm::EventSetup &eSetup, edm::ParameterSet const &hPSet, edm::ParameterSet const &fPSet)
SiStripHistoId hidmanager
void setCurrentFolder(const std::string &fullpath)
unsigned int wheel() const
wheel id