17 Tk_HM_ = std::make_unique<TkHistoMap>(tkDetMapHandle.
product(),
"SiStrip/Histo_Map",
"Quality_TkMap",0.);
48 for(std::vector<uint32_t>::const_iterator detIter_ = selectedDetIds.begin();
49 detIter_!= selectedDetIds.end();detIter_++){
61 ModMEs selModME_ = _selModME_;
67 for(
int istrip=0;istrip<nStrip;++istrip){
84 for(std::vector<uint32_t>::const_iterator detIter_ = selectedDetIds.begin();
85 detIter_!= selectedDetIds.end();detIter_++){
101 c1.Print(name.c_str());
113 float numberOfBadStrips=0;
125 int subDetId_ = ((selDetId_>>25)&0x7);
127 if( subDetId_<3 || subDetId_>6 ){
129 <<
"[SiStripQualityDQM::fillMEsForLayer] WRONG INPUT : no such subdetector type : " 130 << subDetId_ <<
" no folder set!" 145 selME_ =selMEsMapIter_->second;
150 std::vector<uint32_t> sameLayerDetIds_;
151 sameLayerDetIds_.clear();
165 for(
unsigned int i=0;
i< sameLayerDetIds_.size();
i++){
172 for(
int istrip=0;istrip<nStrip;++istrip){
176 float fr=100*
float(numberOfBadStrips)/nStrip;
180 sprintf(c,
"%d",sameLayerDetIds_[i]);
234 ME[0] = dqmStore_->
book1D(hSummary_BadModules_name,hSummary_BadModules_name,NchX,LowX,HighX);
238 ME[1] = dqmStore_->
book1D(hSummary_BadFibers_name,hSummary_BadFibers_name,NchX,LowX,HighX);
242 ME[2] = dqmStore_->
book1D(hSummary_BadApvs_name,hSummary_BadApvs_name,NchX,LowX,HighX);
246 ME[3] = dqmStore_->
book1D(hSummary_BadStrips_name,hSummary_BadStrips_name,NchX,LowX,HighX);
253 for(
int i=0;
i<4;++
i){
255 for(
int j=0;j<19;++j){
262 std::stringstream ss;
265 std::vector<uint32_t>::const_iterator idet=detids.begin();
266 for(;idet!=detids.end();++idet){
269 LogDebug(
"SiStripQualityDQM") << ss.str() << std::endl;
274 for (
size_t i=0;
i<BC.size();++
i){
286 ( (BC[
i].BadApvs>>2)&0
x1 )+ ( (BC[
i].BadApvs>>1)&0
x1 ) + ( (BC[
i].BadApvs)&0
x1 );
337 uint32_t detid=rp->detid;
358 for(
int it=0;it<sqrange.second-sqrange.first;it++){
372 ss <<
"\n-----------------\nGlobal Info\n-----------------";
373 ss <<
"\nBadComponent \t Modules \tFibers \tApvs\tStrips\n----------------------------------------------------------------";
377 ss <<
"\nTID:\t\t\t"<<NBadComponent[1][0][0]<<
"\t"<<NBadComponent[1][0][1]<<
"\t"<<NBadComponent[1][0][2]<<
"\t"<<NBadComponent[1][0][3];
378 ss <<
"\nTOB:\t\t\t"<<NBadComponent[2][0][0]<<
"\t"<<NBadComponent[2][0][1]<<
"\t"<<NBadComponent[2][0][2]<<
"\t"<<NBadComponent[2][0][3];
379 ss <<
"\nTEC:\t\t\t"<<NBadComponent[3][0][0]<<
"\t"<<NBadComponent[3][0][1]<<
"\t"<<NBadComponent[3][0][2]<<
"\t"<<NBadComponent[3][0][3];
382 for (
int i=1;
i<5;++
i){
383 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];
384 std::stringstream binlabel;
385 binlabel<<
"TIB L "<<
i;
387 for(
int j=0;j<4;j++){
388 ME[j]->
Fill(i,NBadComponent[0][i][j]);
389 ME[j]->
getTH1()->GetXaxis()->SetBinLabel(i,binlabel.str().c_str());
393 for (
int i=1;
i<4;++
i){
394 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];
395 std::stringstream binlabel;
396 binlabel<<
"TID+ D "<<
i;
398 for(
int j=0;j<4;j++){
399 ME[j]->
Fill(i+4,NBadComponent[1][i][j]);
400 ME[j]->
getTH1()->GetXaxis()->SetBinLabel(i+4,binlabel.str().c_str());
403 for (
int i=4;
i<7;++
i){
404 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];
405 std::stringstream binlabel;
406 binlabel<<
"TID- D "<<
i-3;
408 for(
int j=0;j<4;j++){
409 ME[j]->
Fill(i+4,NBadComponent[1][i][j]);
410 ME[j]->
getTH1()->GetXaxis()->SetBinLabel(i+4,binlabel.str().c_str());
414 for (
int i=1;
i<7;++
i){
415 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];
416 std::stringstream binlabel;
417 binlabel<<
"TOB L "<<
i;
419 for(
int j=0;j<4;j++){
420 ME[j]->
Fill(i+10,NBadComponent[2][i][j]);
421 ME[j]->
getTH1()->GetXaxis()->SetBinLabel(i+10,binlabel.str().c_str());
425 for (
int i=1;
i<10;++
i){
426 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];
427 std::stringstream binlabel;
428 binlabel<<
"TEC+ D "<<
i;
430 for(
int j=0;j<4;j++){
431 ME[j]->
Fill(i+16,NBadComponent[3][i][j]);
432 ME[j]->
getTH1()->GetXaxis()->SetBinLabel(i+16,binlabel.str().c_str());
435 for (
int i=10;
i<19;++
i){
436 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];
437 std::stringstream binlabel;
438 binlabel<<
"TEC- D "<<
i-9;
440 for(
int j=0;j<4;j++){
441 ME[j]->
Fill(i+16,NBadComponent[3][i][j]);
442 ME[j]->
getTH1()->GetXaxis()->SetBinLabel(i+16,binlabel.str().c_str());
447 ss <<
"\n----------------------------------------------------------------\n\t\t Detid \tModules Fibers Apvs\n----------------------------------------------------------------";
448 for (
int i=1;
i<5;++
i)
449 ss <<
"\nTIB Layer " <<
i <<
" :" <<
ssV[0][
i].
str();
451 for (
int i=1;
i<4;++
i)
452 ss <<
"\nTID+ Disk " <<
i <<
" :" <<
ssV[1][
i].
str();
453 for (
int i=4;
i<7;++
i)
454 ss <<
"\nTID- Disk " <<
i-3 <<
" :" <<
ssV[1][
i].
str();
456 for (
int i=1;
i<7;++
i)
457 ss <<
"\nTOB Layer " <<
i <<
" :" <<
ssV[2][
i].
str();
459 for (
int i=1;
i<10;++
i)
460 ss <<
"\nTEC+ Disk " <<
i <<
" :" <<
ssV[3][
i].
str();
461 for (
int i=10;
i<19;++
i)
462 ss <<
"\nTEC- Disk " <<
i-9 <<
" :" <<
ssV[3][
i].
str();
465 edm::LogInfo(
"SiStripQualityDQM") << ss.str() << std::endl;
467 for (
int i=0;
i<4;
i++){
472 c1.Print(name.c_str());
483 ssV[
i][component] <<
"\n\t\t " 493 ssV[
i][component] <<
" \t " 497 ssV[
i][component] <<
"x x " << ( (BC.
BadApvs>>2)&0
x1 ) <<
" " 503 << ( (BC.
BadApvs>>5)&0x1 ) <<
" ";
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