43 for(std::vector<uint32_t>::const_iterator detIter_ = selectedDetIds.begin();
44 detIter_!= selectedDetIds.end();detIter_++){
56 ModMEs selModME_ = _selModME_;
62 for(
int istrip=0;istrip<nStrip;++istrip){
79 for(std::vector<uint32_t>::const_iterator detIter_ = selectedDetIds.begin();
80 detIter_!= selectedDetIds.end();detIter_++){
96 c1.Print(name.c_str());
108 float numberOfBadStrips=0;
120 int subDetId_ = ((selDetId_>>25)&0x7);
122 if( subDetId_<3 || subDetId_>6 ){
124 <<
"[SiStripQualityDQM::fillMEsForLayer] WRONG INPUT : no such subdetector type : "
125 << subDetId_ <<
" no folder set!"
140 selME_ =selMEsMapIter_->second;
145 std::vector<uint32_t> sameLayerDetIds_;
146 sameLayerDetIds_.clear();
160 for(
unsigned int i=0;
i< sameLayerDetIds_.size();
i++){
167 for(
int istrip=0;istrip<nStrip;++istrip){
168 if(
qualityHandle_->IsStripBad(qualityRange,istrip)) { numberOfBadStrips++;}
171 float fr=100*float(numberOfBadStrips)/nStrip;
175 sprintf(c,
"%d",sameLayerDetIds_[i]);
229 ME[0] = dqmStore_->
book1D(hSummary_BadModules_name,hSummary_BadModules_name,NchX,LowX,HighX);
233 ME[1] = dqmStore_->
book1D(hSummary_BadFibers_name,hSummary_BadFibers_name,NchX,LowX,HighX);
237 ME[2] = dqmStore_->
book1D(hSummary_BadApvs_name,hSummary_BadApvs_name,NchX,LowX,HighX);
241 ME[3] = dqmStore_->
book1D(hSummary_BadStrips_name,hSummary_BadStrips_name,NchX,LowX,HighX);
248 for(
int i=0;
i<4;++
i){
250 for(
int j=0;
j<19;++
j){
257 std::stringstream ss;
260 std::vector<uint32_t>::const_iterator idet=detids.begin();
261 for(;idet!=detids.end();++idet){
262 ss <<
"detid " << (*idet) <<
" IsModuleUsable " <<
qualityHandle_->IsModuleUsable((*idet)) <<
"\n";
264 LogDebug(
"SiStripQualityDQM") << ss.str() << std::endl;
267 std::vector<SiStripQuality::BadComponent> BC =
qualityHandle_->getBadComponentList();
269 for (
size_t i=0;
i<BC.size();++
i){
278 NTkBadComponent[1]+= ( (BC[
i].BadFibers>>2)&0x1 )+ ( (BC[
i].BadFibers>>1)&0x1 ) + ( (BC[
i].BadFibers)&0x1 );
280 NTkBadComponent[2]+= ( (BC[
i].BadApvs>>5)&0x1 )+ ( (BC[
i].BadApvs>>4)&0x1 ) + ( (BC[
i].BadApvs>>3)&0x1 ) +
281 ( (BC[
i].BadApvs>>2)&0x1 )+ ( (BC[
i].BadApvs>>1)&0x1 ) + ( (BC[
i].BadApvs)&0x1 );
328 SiStripQuality::RegistryIterator rbegin =
qualityHandle_->getRegistryVectorBegin();
329 SiStripQuality::RegistryIterator rend =
qualityHandle_->getRegistryVectorEnd();
332 uint32_t
detid=rp->detid;
353 for(
int it=0;it<sqrange.second-sqrange.first;it++){
354 unsigned int range=
qualityHandle_->decode( *(sqrange.first+it) ).range;
367 ss <<
"\n-----------------\nGlobal Info\n-----------------";
368 ss <<
"\nBadComponent \t Modules \tFibers \tApvs\tStrips\n----------------------------------------------------------------";
372 ss <<
"\nTID:\t\t\t"<<NBadComponent[1][0][0]<<
"\t"<<NBadComponent[1][0][1]<<
"\t"<<NBadComponent[1][0][2]<<
"\t"<<NBadComponent[1][0][3];
373 ss <<
"\nTOB:\t\t\t"<<NBadComponent[2][0][0]<<
"\t"<<NBadComponent[2][0][1]<<
"\t"<<NBadComponent[2][0][2]<<
"\t"<<NBadComponent[2][0][3];
374 ss <<
"\nTEC:\t\t\t"<<NBadComponent[3][0][0]<<
"\t"<<NBadComponent[3][0][1]<<
"\t"<<NBadComponent[3][0][2]<<
"\t"<<NBadComponent[3][0][3];
377 for (
int i=1;
i<5;++
i){
378 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];
379 std::stringstream binlabel;
380 binlabel<<
"TIB L "<<
i;
382 for(
int j=0;
j<4;
j++){
383 ME[
j]->
Fill(i,NBadComponent[0][i][
j]);
384 ME[
j]->
getTH1()->GetXaxis()->SetBinLabel(i,binlabel.str().c_str());
388 for (
int i=1;
i<4;++
i){
389 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];
390 std::stringstream binlabel;
391 binlabel<<
"TID+ D "<<
i;
393 for(
int j=0;
j<4;
j++){
394 ME[
j]->
Fill(i+4,NBadComponent[1][i][
j]);
395 ME[
j]->
getTH1()->GetXaxis()->SetBinLabel(i+4,binlabel.str().c_str());
398 for (
int i=4;
i<7;++
i){
399 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];
400 std::stringstream binlabel;
401 binlabel<<
"TID- D "<<
i-3;
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());
409 for (
int i=1;
i<7;++
i){
410 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];
411 std::stringstream binlabel;
412 binlabel<<
"TOB L "<<
i;
414 for(
int j=0;
j<4;
j++){
415 ME[
j]->
Fill(i+10,NBadComponent[2][i][
j]);
416 ME[
j]->
getTH1()->GetXaxis()->SetBinLabel(i+10,binlabel.str().c_str());
420 for (
int i=1;
i<10;++
i){
421 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];
422 std::stringstream binlabel;
423 binlabel<<
"TEC+ D "<<
i;
425 for(
int j=0;
j<4;
j++){
426 ME[
j]->
Fill(i+16,NBadComponent[3][i][
j]);
427 ME[
j]->
getTH1()->GetXaxis()->SetBinLabel(i+16,binlabel.str().c_str());
430 for (
int i=10;
i<19;++
i){
431 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];
432 std::stringstream binlabel;
433 binlabel<<
"TEC- D "<<
i-9;
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());
442 ss <<
"\n----------------------------------------------------------------\n\t\t Detid \tModules Fibers Apvs\n----------------------------------------------------------------";
443 for (
int i=1;
i<5;++
i)
444 ss <<
"\nTIB Layer " <<
i <<
" :" <<
ssV[0][
i].str();
446 for (
int i=1;
i<4;++
i)
447 ss <<
"\nTID+ Disk " <<
i <<
" :" <<
ssV[1][
i].str();
448 for (
int i=4;
i<7;++
i)
449 ss <<
"\nTID- Disk " <<
i-3 <<
" :" <<
ssV[1][
i].str();
451 for (
int i=1;
i<7;++
i)
452 ss <<
"\nTOB Layer " <<
i <<
" :" <<
ssV[2][
i].str();
454 for (
int i=1;
i<10;++
i)
455 ss <<
"\nTEC+ Disk " <<
i <<
" :" <<
ssV[3][
i].str();
456 for (
int i=10;
i<19;++
i)
457 ss <<
"\nTEC- Disk " <<
i-9 <<
" :" <<
ssV[3][
i].str();
460 edm::LogInfo(
"SiStripQualityDQM") << ss.str() << std::endl;
462 for (
int i=0;
i<4;
i++){
467 c1.Print(name.c_str());
478 ssV[
i][component] <<
"\n\t\t "
480 <<
" \t " << BC.BadModule <<
" \t "
481 << ( (BC.BadFibers)&0x1 ) <<
" ";
483 ssV[
i][component] <<
"x " <<( (BC.BadFibers>>1)&0x1 );
486 ssV[
i][component] << ( (BC.BadFibers>>1)&0x1 ) <<
" "
487 << ( (BC.BadFibers>>2)&0x1 );
488 ssV[
i][component] <<
" \t "
489 << ( (BC.BadApvs)&0x1 ) <<
" "
490 << ( (BC.BadApvs>>1)&0x1 ) <<
" ";
492 ssV[
i][component] <<
"x x " << ( (BC.BadApvs>>2)&0x1 ) <<
" "
493 << ( (BC.BadApvs>>3)&0x1 );
495 ssV[
i][component] << ( (BC.BadApvs>>2)&0x1 ) <<
" "
496 << ( (BC.BadApvs>>3)&0x1 ) <<
" "
497 << ( (BC.BadApvs>>4)&0x1 ) <<
" "
498 << ( (BC.BadApvs>>5)&0x1 ) <<
" ";
501 NBadComponent[
i][0][2]+= ( (BC.BadApvs>>5)&0x1 )+ ( (BC.BadApvs>>4)&0x1 ) + ( (BC.BadApvs>>3)&0x1 ) +
502 ( (BC.BadApvs>>2)&0x1 )+ ( (BC.BadApvs>>1)&0x1 ) + ( (BC.BadApvs)&0x1 );
503 NBadComponent[
i][component][2]+= ( (BC.BadApvs>>5)&0x1 )+ ( (BC.BadApvs>>4)&0x1 ) + ( (BC.BadApvs>>3)&0x1 ) +
504 ( (BC.BadApvs>>2)&0x1 )+ ( (BC.BadApvs>>1)&0x1 ) + ( (BC.BadApvs)&0x1 );
508 NBadComponent[
i][0][1]+= ( (BC.BadFibers>>2)&0x1 )+ ( (BC.BadFibers>>1)&0x1 ) + ( (BC.BadFibers)&0x1 );
509 NBadComponent[
i][component][1]+= ( (BC.BadFibers>>2)&0x1 )+ ( (BC.BadFibers>>1)&0x1 ) + ( (BC.BadFibers)&0x1 );
T getParameter(std::string const &) const
void fillGrandSummaryMEs(const edm::EventSetup &eSetup)
int NBadComponent[4][19][4]
void fillSummaryMEs(const std::vector< uint32_t > &selectedDetIds, const edm::EventSetup &es)
unsigned int tibLayer(const DetId &id) const
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
unsigned int tidWheel(const DetId &id) const
Registry::const_iterator RegistryIterator
void getSummaryMEs(ModMEs &CondObj_ME, const uint32_t &detId_, const TrackerTopology *tTopo)
void fillModMEs(const std::vector< uint32_t > &selectedDetIds, const edm::EventSetup &es)
void fillTkMap(const uint32_t &detid, const float &value)
U second(std::pair< T, U > const &p)
void getActiveDetIds(const edm::EventSetup &eSetup)
std::map< uint32_t, ModMEs > SummaryMEsMap_
unsigned int tidSide(const DetId &id) const
const std::vector< uint32_t > & getAllDetIds() const
SiStripDetInfoFileReader * reader
std::stringstream ssV[4][19]
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)
MonitorElement * ProfileDistr
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)
PixelRecoRange< float > Range
virtual ~SiStripQualityDQM()
void getModMEs(ModMEs &CondObj_ME, const uint32_t &detId_, const TrackerTopology *tTopo)
T const * product() const
std::vector< uint32_t > alreadyFilledLayers
std::pair< std::string, uint32_t > getLayerNameAndId(const uint32_t &detId_, const TrackerTopology *tTopo)
MonitorElement * SummaryDistr
std::string qualityLabel_
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 fillMEsForDet(const ModMEs &selModME_, uint32_t selDetId_, const TrackerTopology *tTopo)
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)
SiStripQualityDQM(const edm::EventSetup &eSetup, edm::ParameterSet const &hPSet, edm::ParameterSet const &fPSet)
SiStripHistoId hidmanager
void setCurrentFolder(const std::string &fullpath)
unsigned int tobLayer(const DetId &id) const
unsigned int tecSide(const DetId &id) const
void fillMEsForLayer(uint32_t selDetId_, const TrackerTopology *tTopo)