38 for(std::vector<uint32_t>::const_iterator detIter_ = selectedDetIds.begin();
39 detIter_!= selectedDetIds.end();detIter_++){
57 for(
int istrip=0;istrip<nStrip;++istrip){
69 for(std::vector<uint32_t>::const_iterator detIter_ = selectedDetIds.begin();
70 detIter_!= selectedDetIds.end();detIter_++){
86 c1.Print(name.c_str());
98 float numberOfBadStrips=0;
104 std::string hSummary_description;
107 std::string hSummary_name;
110 int subDetId_ = ((selDetId_>>25)&0x7);
112 if( subDetId_<3 || subDetId_>6 ){
114 <<
"[SiStripQualityDQM::fillMEsForLayer] WRONG INPUT : no such subdetector type : "
115 << subDetId_ <<
" no folder set!"
130 selME_ =selMEsMapIter_->second;
135 std::vector<uint32_t> sameLayerDetIds_;
136 sameLayerDetIds_.clear();
150 for(
unsigned int i=0;
i< sameLayerDetIds_.size();
i++){
157 for(
int istrip=0;istrip<nStrip;++istrip){
158 if(
qualityHandle_->IsStripBad(qualityRange,istrip)) { numberOfBadStrips++;}
161 float fr=100*float(numberOfBadStrips)/nStrip;
165 sprintf(c,
"%d",sameLayerDetIds_[i]);
187 std::string hSummary_BadObjects_xTitle =
hPSet_.
getParameter<std::string>(
"Summary_BadObjects_histo_xTitle");
189 std::string hSummary_BadModules_name =
hPSet_.
getParameter<std::string>(
"Summary_BadModules_histo_name");
190 std::string hSummary_BadModules_yTitle =
hPSet_.
getParameter<std::string>(
"Summary_BadModules_histo_yTitle");
192 std::string hSummary_BadFibers_name =
hPSet_.
getParameter<std::string>(
"Summary_BadFibers_histo_name");
193 std::string hSummary_BadFibers_yTitle =
hPSet_.
getParameter<std::string>(
"Summary_BadFibers_histo_yTitle");
195 std::string hSummary_BadApvs_name =
hPSet_.
getParameter<std::string>(
"Summary_BadApvs_histo_name");
196 std::string hSummary_BadApvs_yTitle =
hPSet_.
getParameter<std::string>(
"Summary_BadApvs_histo_yTitle");
198 std::string hSummary_BadStrips_name =
hPSet_.
getParameter<std::string>(
"Summary_BadStrips_histo_name");
199 std::string hSummary_BadStrips_yTitle =
hPSet_.
getParameter<std::string>(
"Summary_BadStrips_histo_yTitle");
212 std::string FolderName=
fPSet_.
getParameter<std::string>(
"FolderName_For_QualityAndCabling_SummaryHistos");
216 ME[0] = dqmStore_->
book1D(hSummary_BadModules_name,hSummary_BadModules_name,NchX,LowX,HighX);
220 ME[1] = dqmStore_->
book1D(hSummary_BadFibers_name,hSummary_BadFibers_name,NchX,LowX,HighX);
224 ME[2] = dqmStore_->
book1D(hSummary_BadApvs_name,hSummary_BadApvs_name,NchX,LowX,HighX);
228 ME[3] = dqmStore_->
book1D(hSummary_BadStrips_name,hSummary_BadStrips_name,NchX,LowX,HighX);
235 for(
int i=0;
i<4;++
i){
237 for(
int j=0;
j<19;++
j){
244 std::stringstream ss;
247 std::vector<uint32_t>::const_iterator idet=detids.begin();
248 for(;idet!=detids.end();++idet){
249 ss <<
"detid " << (*idet) <<
" IsModuleUsable " <<
qualityHandle_->IsModuleUsable((*idet)) <<
"\n";
251 LogDebug(
"SiStripQualityDQM") << ss.str() << std::endl;
254 std::vector<SiStripQuality::BadComponent> BC =
qualityHandle_->getBadComponentList();
256 for (
size_t i=0;
i<BC.size();++
i){
265 NTkBadComponent[1]+= ( (BC[
i].BadFibers>>2)&0x1 )+ ( (BC[
i].BadFibers>>1)&0x1 ) + ( (BC[
i].BadFibers)&0x1 );
267 NTkBadComponent[2]+= ( (BC[
i].BadApvs>>5)&0x1 )+ ( (BC[
i].BadApvs>>4)&0x1 ) + ( (BC[
i].BadApvs>>3)&0x1 ) +
268 ( (BC[
i].BadApvs>>2)&0x1 )+ ( (BC[
i].BadApvs>>1)&0x1 ) + ( (BC[
i].BadApvs)&0x1 );
319 uint32_t
detid=rp->detid;
340 for(
int it=0;it<sqrange.second-sqrange.first;it++){
341 unsigned int range=
qualityHandle_->decode( *(sqrange.first+it) ).range;
354 ss <<
"\n-----------------\nGlobal Info\n-----------------";
355 ss <<
"\nBadComponent \t Modules \tFibers \tApvs\tStrips\n----------------------------------------------------------------";
359 ss <<
"\nTID:\t\t\t"<<NBadComponent[1][0][0]<<
"\t"<<NBadComponent[1][0][1]<<
"\t"<<NBadComponent[1][0][2]<<
"\t"<<NBadComponent[1][0][3];
360 ss <<
"\nTOB:\t\t\t"<<NBadComponent[2][0][0]<<
"\t"<<NBadComponent[2][0][1]<<
"\t"<<NBadComponent[2][0][2]<<
"\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]<<
"\t"<<NBadComponent[3][0][3];
364 for (
int i=1;
i<5;++
i){
365 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];
366 std::stringstream binlabel;
367 binlabel<<
"TIB L "<<
i;
369 for(
int j=0;
j<4;
j++){
370 ME[
j]->
Fill(i,NBadComponent[0][i][
j]);
371 ME[
j]->
getTH1()->GetXaxis()->SetBinLabel(i,binlabel.str().c_str());
375 for (
int i=1;
i<4;++
i){
376 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];
377 std::stringstream binlabel;
378 binlabel<<
"TID+ D "<<
i;
380 for(
int j=0;
j<4;
j++){
381 ME[
j]->
Fill(i+4,NBadComponent[1][i][
j]);
382 ME[
j]->
getTH1()->GetXaxis()->SetBinLabel(i+4,binlabel.str().c_str());
385 for (
int i=4;
i<7;++
i){
386 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];
387 std::stringstream binlabel;
388 binlabel<<
"TID- D "<<
i-3;
390 for(
int j=0;
j<4;
j++){
391 ME[
j]->
Fill(i+4,NBadComponent[1][i][
j]);
392 ME[
j]->
getTH1()->GetXaxis()->SetBinLabel(i+4,binlabel.str().c_str());
396 for (
int i=1;
i<7;++
i){
397 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];
398 std::stringstream binlabel;
399 binlabel<<
"TOB L "<<
i;
401 for(
int j=0;
j<4;
j++){
402 ME[
j]->
Fill(i+10,NBadComponent[2][i][
j]);
403 ME[
j]->
getTH1()->GetXaxis()->SetBinLabel(i+10,binlabel.str().c_str());
407 for (
int i=1;
i<10;++
i){
408 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];
409 std::stringstream binlabel;
410 binlabel<<
"TEC+ D "<<
i;
412 for(
int j=0;
j<4;
j++){
413 ME[
j]->
Fill(i+16,NBadComponent[3][i][
j]);
414 ME[
j]->
getTH1()->GetXaxis()->SetBinLabel(i+16,binlabel.str().c_str());
417 for (
int i=10;
i<19;++
i){
418 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];
419 std::stringstream binlabel;
420 binlabel<<
"TEC- D "<<
i-9;
422 for(
int j=0;
j<4;
j++){
423 ME[
j]->
Fill(i+16,NBadComponent[3][i][
j]);
424 ME[
j]->
getTH1()->GetXaxis()->SetBinLabel(i+16,binlabel.str().c_str());
429 ss <<
"\n----------------------------------------------------------------\n\t\t Detid \tModules Fibers Apvs\n----------------------------------------------------------------";
430 for (
int i=1;
i<5;++
i)
431 ss <<
"\nTIB Layer " <<
i <<
" :" <<
ssV[0][
i].str();
433 for (
int i=1;
i<4;++
i)
434 ss <<
"\nTID+ Disk " <<
i <<
" :" <<
ssV[1][
i].str();
435 for (
int i=4;
i<7;++
i)
436 ss <<
"\nTID- Disk " <<
i-3 <<
" :" <<
ssV[1][
i].str();
438 for (
int i=1;
i<7;++
i)
439 ss <<
"\nTOB Layer " <<
i <<
" :" <<
ssV[2][
i].str();
441 for (
int i=1;
i<10;++
i)
442 ss <<
"\nTEC+ Disk " <<
i <<
" :" <<
ssV[3][
i].str();
443 for (
int i=10;
i<19;++
i)
444 ss <<
"\nTEC- Disk " <<
i-9 <<
" :" <<
ssV[3][
i].str();
447 edm::LogInfo(
"SiStripQualityDQM") << ss.str() << std::endl;
449 for (
int i=0;
i<4;
i++){
452 std::string
name (ME[
i]->getTH1()->GetTitle());
454 c1.Print(name.c_str());
465 ssV[
i][component] <<
"\n\t\t "
475 ssV[
i][component] <<
" \t "
477 << ( (BC.
BadApvs>>1)&0x1 ) <<
" ";
479 ssV[
i][component] <<
"x x " << ( (BC.
BadApvs>>2)&0x1 ) <<
" "
482 ssV[
i][component] << ( (BC.
BadApvs>>2)&0x1 ) <<
" "
483 << ( (BC.
BadApvs>>3)&0x1 ) <<
" "
484 << ( (BC.
BadApvs>>4)&0x1 ) <<
" "
485 << ( (BC.
BadApvs>>5)&0x1 ) <<
" ";
void getModMEs(ModMEs &CondObj_ME, const uint32_t &detId_)
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)
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
void fillMEsForLayer(uint32_t selDetId_)
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