44 for(std::vector<uint32_t>::const_iterator detIter_ = selectedDetIds.begin();
45 detIter_!= selectedDetIds.end();detIter_++){
57 ModMEs selModME_ = _selModME_;
63 for(
int istrip=0;istrip<nStrip;++istrip){
80 for(std::vector<uint32_t>::const_iterator detIter_ = selectedDetIds.begin();
81 detIter_!= selectedDetIds.end();detIter_++){
97 c1.Print(name.c_str());
109 float numberOfBadStrips=0;
121 int subDetId_ = ((selDetId_>>25)&0x7);
123 if( subDetId_<3 || subDetId_>6 ){
125 <<
"[SiStripQualityDQM::fillMEsForLayer] WRONG INPUT : no such subdetector type : "
126 << subDetId_ <<
" no folder set!"
141 selME_ =selMEsMapIter_->second;
146 std::vector<uint32_t> sameLayerDetIds_;
147 sameLayerDetIds_.clear();
161 for(
unsigned int i=0;
i< sameLayerDetIds_.size();
i++){
168 for(
int istrip=0;istrip<nStrip;++istrip){
169 if(
qualityHandle_->IsStripBad(qualityRange,istrip)) { numberOfBadStrips++;}
172 float fr=100*float(numberOfBadStrips)/nStrip;
176 sprintf(c,
"%d",sameLayerDetIds_[i]);
230 ME[0] = dqmStore_->
book1D(hSummary_BadModules_name,hSummary_BadModules_name,NchX,LowX,HighX);
234 ME[1] = dqmStore_->
book1D(hSummary_BadFibers_name,hSummary_BadFibers_name,NchX,LowX,HighX);
238 ME[2] = dqmStore_->
book1D(hSummary_BadApvs_name,hSummary_BadApvs_name,NchX,LowX,HighX);
242 ME[3] = dqmStore_->
book1D(hSummary_BadStrips_name,hSummary_BadStrips_name,NchX,LowX,HighX);
249 for(
int i=0;
i<4;++
i){
251 for(
int j=0;
j<19;++
j){
258 std::stringstream
ss;
261 std::vector<uint32_t>::const_iterator idet=detids.begin();
262 for(;idet!=detids.end();++idet){
263 ss <<
"detid " << (*idet) <<
" IsModuleUsable " <<
qualityHandle_->IsModuleUsable((*idet)) <<
"\n";
265 LogDebug(
"SiStripQualityDQM") << ss.str() << std::endl;
268 std::vector<SiStripQuality::BadComponent> BC =
qualityHandle_->getBadComponentList();
270 for (
size_t i=0;
i<BC.size();++
i){
279 NTkBadComponent[1]+= ( (BC[
i].BadFibers>>2)&0x1 )+ ( (BC[
i].BadFibers>>1)&0x1 ) + ( (BC[
i].BadFibers)&0x1 );
281 NTkBadComponent[2]+= ( (BC[
i].BadApvs>>5)&0x1 )+ ( (BC[
i].BadApvs>>4)&0x1 ) + ( (BC[
i].BadApvs>>3)&0x1 ) +
282 ( (BC[
i].BadApvs>>2)&0x1 )+ ( (BC[
i].BadApvs>>1)&0x1 ) + ( (BC[
i].BadApvs)&0x1 );
333 uint32_t detid=rp->detid;
354 for(
int it=0;it<sqrange.second-sqrange.first;it++){
355 unsigned int range=
qualityHandle_->decode( *(sqrange.first+it) ).range;
368 ss <<
"\n-----------------\nGlobal Info\n-----------------";
369 ss <<
"\nBadComponent \t Modules \tFibers \tApvs\tStrips\n----------------------------------------------------------------";
373 ss <<
"\nTID:\t\t\t"<<NBadComponent[1][0][0]<<
"\t"<<NBadComponent[1][0][1]<<
"\t"<<NBadComponent[1][0][2]<<
"\t"<<NBadComponent[1][0][3];
374 ss <<
"\nTOB:\t\t\t"<<NBadComponent[2][0][0]<<
"\t"<<NBadComponent[2][0][1]<<
"\t"<<NBadComponent[2][0][2]<<
"\t"<<NBadComponent[2][0][3];
375 ss <<
"\nTEC:\t\t\t"<<NBadComponent[3][0][0]<<
"\t"<<NBadComponent[3][0][1]<<
"\t"<<NBadComponent[3][0][2]<<
"\t"<<NBadComponent[3][0][3];
378 for (
int i=1;
i<5;++
i){
379 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];
380 std::stringstream binlabel;
381 binlabel<<
"TIB L "<<
i;
383 for(
int j=0;
j<4;
j++){
384 ME[
j]->
Fill(i,NBadComponent[0][i][
j]);
385 ME[
j]->
getTH1()->GetXaxis()->SetBinLabel(i,binlabel.str().c_str());
389 for (
int i=1;
i<4;++
i){
390 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];
391 std::stringstream binlabel;
392 binlabel<<
"TID+ D "<<
i;
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());
399 for (
int i=4;
i<7;++
i){
400 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];
401 std::stringstream binlabel;
402 binlabel<<
"TID- D "<<
i-3;
404 for(
int j=0;
j<4;
j++){
405 ME[
j]->
Fill(i+4,NBadComponent[1][i][
j]);
406 ME[
j]->
getTH1()->GetXaxis()->SetBinLabel(i+4,binlabel.str().c_str());
410 for (
int i=1;
i<7;++
i){
411 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];
412 std::stringstream binlabel;
413 binlabel<<
"TOB L "<<
i;
415 for(
int j=0;
j<4;
j++){
416 ME[
j]->
Fill(i+10,NBadComponent[2][i][
j]);
417 ME[
j]->
getTH1()->GetXaxis()->SetBinLabel(i+10,binlabel.str().c_str());
421 for (
int i=1;
i<10;++
i){
422 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];
423 std::stringstream binlabel;
424 binlabel<<
"TEC+ D "<<
i;
426 for(
int j=0;
j<4;
j++){
427 ME[
j]->
Fill(i+16,NBadComponent[3][i][
j]);
428 ME[
j]->
getTH1()->GetXaxis()->SetBinLabel(i+16,binlabel.str().c_str());
431 for (
int i=10;
i<19;++
i){
432 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];
433 std::stringstream binlabel;
434 binlabel<<
"TEC- D "<<
i-9;
436 for(
int j=0;
j<4;
j++){
437 ME[
j]->
Fill(i+16,NBadComponent[3][i][
j]);
438 ME[
j]->
getTH1()->GetXaxis()->SetBinLabel(i+16,binlabel.str().c_str());
443 ss <<
"\n----------------------------------------------------------------\n\t\t Detid \tModules Fibers Apvs\n----------------------------------------------------------------";
444 for (
int i=1;
i<5;++
i)
445 ss <<
"\nTIB Layer " <<
i <<
" :" <<
ssV[0][
i].str();
447 for (
int i=1;
i<4;++
i)
448 ss <<
"\nTID+ Disk " <<
i <<
" :" <<
ssV[1][
i].str();
449 for (
int i=4;
i<7;++
i)
450 ss <<
"\nTID- Disk " <<
i-3 <<
" :" <<
ssV[1][
i].str();
452 for (
int i=1;
i<7;++
i)
453 ss <<
"\nTOB Layer " <<
i <<
" :" <<
ssV[2][
i].str();
455 for (
int i=1;
i<10;++
i)
456 ss <<
"\nTEC+ Disk " <<
i <<
" :" <<
ssV[3][
i].str();
457 for (
int i=10;
i<19;++
i)
458 ss <<
"\nTEC- Disk " <<
i-9 <<
" :" <<
ssV[3][
i].str();
461 edm::LogInfo(
"SiStripQualityDQM") << ss.str() << std::endl;
463 for (
int i=0;
i<4;
i++){
468 c1.Print(name.c_str());
479 ssV[
i][component] <<
"\n\t\t "
489 ssV[
i][component] <<
" \t "
491 << ( (BC.
BadApvs>>1)&0x1 ) <<
" ";
493 ssV[
i][component] <<
"x x " << ( (BC.
BadApvs>>2)&0x1 ) <<
" "
496 ssV[
i][component] << ( (BC.
BadApvs>>2)&0x1 ) <<
" "
497 << ( (BC.
BadApvs>>3)&0x1 ) <<
" "
498 << ( (BC.
BadApvs>>4)&0x1 ) <<
" "
499 << ( (BC.
BadApvs>>5)&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)
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)
std::pair< ContainerIterator, ContainerIterator > Range
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)