13 Tk_HM_ = std::make_unique<TkHistoMap>(tkDetMap,
"SiStrip/Histo_Map",
"Quality_TkMap", 0.);
26 for (
const auto det : selectedDetIds) {
32 ModMEs selModME_ = _selModME_;
38 for (
int istrip = 0; istrip < nStrip; ++istrip) {
39 selModME_.ProfileDistr->Fill(istrip + 1,
condObj_->
IsStripBad(qualityRange, istrip) ? 0. : 1.);
45 for (
const auto det : selectedDetIds) {
56 selME.SummaryDistr->getTH1()->Draw();
59 c1.Print(name.c_str());
66 float numberOfBadStrips = 0;
77 int subDetId_ = ((selDetId_ >> 25) & 0x7);
79 if (subDetId_ < 3 || subDetId_ > 6) {
80 edm::LogError(
"SiStripQualityDQM") <<
"[SiStripQualityDQM::fillMEsForLayer] WRONG INPUT : no such "
82 << subDetId_ <<
" no folder set!" << std::endl;
92 if (selMEsMapIter_ != SummaryMEsMap_.end())
93 selME_ = selMEsMapIter_->second;
97 std::vector<uint32_t> sameLayerDetIds_;
98 sameLayerDetIds_.clear();
112 for (
unsigned int i = 0;
i < sameLayerDetIds_.size();
i++) {
116 numberOfBadStrips = 0;
118 for (
int istrip = 0; istrip < nStrip; ++istrip) {
124 float fr = 100 * float(numberOfBadStrips) / nStrip;
125 selME_.SummaryDistr->Fill(i + 1, fr);
128 sprintf(c,
"%d", sameLayerDetIds_[i]);
129 selME_.SummaryDistr->setBinLabel(i + 1, c);
134 Tk_HM_->setBinContent(sameLayerDetIds_[i], fr);
171 ME[0] =
dqmStore_->
book1D(hSummary_BadModules_name, hSummary_BadModules_name, NchX, LowX, HighX);
172 ME[0]->setAxisTitle(hSummary_BadObjects_xTitle, 1);
173 ME[0]->setAxisTitle(hSummary_BadModules_yTitle, 2);
175 ME[1] =
dqmStore_->
book1D(hSummary_BadFibers_name, hSummary_BadFibers_name, NchX, LowX, HighX);
176 ME[1]->setAxisTitle(hSummary_BadObjects_xTitle, 1);
177 ME[1]->setAxisTitle(hSummary_BadFibers_yTitle, 2);
179 ME[2] =
dqmStore_->
book1D(hSummary_BadApvs_name, hSummary_BadApvs_name, NchX, LowX, HighX);
180 ME[2]->setAxisTitle(hSummary_BadObjects_xTitle, 1);
181 ME[2]->setAxisTitle(hSummary_BadApvs_yTitle, 2);
183 ME[3] =
dqmStore_->
book1D(hSummary_BadStrips_name, hSummary_BadStrips_name, NchX, LowX, HighX);
184 ME[3]->setAxisTitle(hSummary_BadObjects_xTitle, 1);
185 ME[3]->setAxisTitle(hSummary_BadStrips_yTitle, 2);
189 for (
int i = 0; i < 4; ++
i) {
191 for (
int j = 0;
j < 19; ++
j) {
193 for (
int k = 0;
k < 4; ++
k)
198 std::stringstream
ss;
203 LogDebug(
"SiStripQualityDQM") << ss.str() << std::endl;
207 for (
size_t i = 0; i < BC.size(); ++
i) {
215 NTkBadComponent[1] += ((BC[
i].BadFibers >> 2) & 0x1) + ((BC[
i].BadFibers >> 1) & 0x1) + ((BC[
i].BadFibers) & 0x1);
217 NTkBadComponent[2] += ((BC[
i].BadApvs >> 5) & 0x1) + ((BC[
i].BadApvs >> 4) & 0x1) + ((BC[
i].BadApvs >> 3) & 0x1) +
218 ((BC[
i].BadApvs >> 2) & 0x1) + ((BC[
i].BadApvs >> 1) & 0x1) + ((BC[
i].BadApvs) & 0x1);
268 uint32_t detid = rp->detid;
273 if (
a.subdetId() == 3) {
276 }
else if (
a.subdetId() == 4) {
279 }
else if (
a.subdetId() == 5) {
282 }
else if (
a.subdetId() == 6) {
290 for (
int it = 0; it < sqrange.second - sqrange.first; it++) {
303 ss <<
"\n-----------------\nGlobal Info\n-----------------";
304 ss <<
"\nBadComponent \t Modules \tFibers "
305 "\tApvs\tStrips\n------------------------------------------------------"
312 ss <<
"\nTID:\t\t\t" << NBadComponent[1][0][0] <<
"\t" << NBadComponent[1][0][1] <<
"\t" << NBadComponent[1][0][2]
313 <<
"\t" << NBadComponent[1][0][3];
314 ss <<
"\nTOB:\t\t\t" << NBadComponent[2][0][0] <<
"\t" << NBadComponent[2][0][1] <<
"\t" << NBadComponent[2][0][2]
315 <<
"\t" << NBadComponent[2][0][3];
316 ss <<
"\nTEC:\t\t\t" << NBadComponent[3][0][0] <<
"\t" << NBadComponent[3][0][1] <<
"\t" << NBadComponent[3][0][2]
317 <<
"\t" << NBadComponent[3][0][3];
320 for (
int i = 1; i < 5; ++
i) {
321 ss <<
"\nTIB Layer " << i <<
" :\t\t" << NBadComponent[0][
i][0] <<
"\t" << NBadComponent[0][
i][1] <<
"\t"
322 << NBadComponent[0][
i][2] <<
"\t" << NBadComponent[0][
i][3];
323 std::stringstream binlabel;
324 binlabel <<
"TIB L " <<
i;
326 for (
int j = 0;
j < 4;
j++) {
327 ME[
j]->Fill(i, NBadComponent[0][i][
j]);
328 ME[
j]->setBinLabel(i, binlabel.str());
332 for (
int i = 1; i < 4; ++
i) {
333 ss <<
"\nTID+ Disk " << i <<
" :\t\t" << NBadComponent[1][
i][0] <<
"\t" << NBadComponent[1][
i][1] <<
"\t"
334 << NBadComponent[1][
i][2] <<
"\t" << NBadComponent[1][
i][3];
335 std::stringstream binlabel;
336 binlabel <<
"TID+ D " <<
i;
338 for (
int j = 0;
j < 4;
j++) {
339 ME[
j]->Fill(i + 4, NBadComponent[1][i][
j]);
340 ME[
j]->setBinLabel(i + 4, binlabel.str());
343 for (
int i = 4; i < 7; ++
i) {
344 ss <<
"\nTID- Disk " << i - 3 <<
" :\t\t" << NBadComponent[1][
i][0] <<
"\t" << NBadComponent[1][
i][1] <<
"\t"
345 << NBadComponent[1][
i][2] <<
"\t" << NBadComponent[1][
i][3];
346 std::stringstream binlabel;
347 binlabel <<
"TID- D " << i - 3;
349 for (
int j = 0;
j < 4;
j++) {
350 ME[
j]->Fill(i + 4, NBadComponent[1][i][
j]);
351 ME[
j]->setBinLabel(i + 4, binlabel.str());
355 for (
int i = 1; i < 7; ++
i) {
356 ss <<
"\nTOB Layer " << i <<
" :\t\t" << NBadComponent[2][
i][0] <<
"\t" << NBadComponent[2][
i][1] <<
"\t"
357 << NBadComponent[2][
i][2] <<
"\t" << NBadComponent[2][
i][3];
358 std::stringstream binlabel;
359 binlabel <<
"TOB L " <<
i;
361 for (
int j = 0;
j < 4;
j++) {
362 ME[
j]->Fill(i + 10, NBadComponent[2][i][
j]);
363 ME[
j]->setBinLabel(i + 10, binlabel.str());
367 for (
int i = 1; i < 10; ++
i) {
368 ss <<
"\nTEC+ Disk " << i <<
" :\t\t" << NBadComponent[3][
i][0] <<
"\t" << NBadComponent[3][
i][1] <<
"\t"
369 << NBadComponent[3][
i][2] <<
"\t" << NBadComponent[3][
i][3];
370 std::stringstream binlabel;
371 binlabel <<
"TEC+ D " <<
i;
373 for (
int j = 0;
j < 4;
j++) {
374 ME[
j]->Fill(i + 16, NBadComponent[3][i][
j]);
375 ME[
j]->setBinLabel(i + 16, binlabel.str());
378 for (
int i = 10; i < 19; ++
i) {
379 ss <<
"\nTEC- Disk " << i - 9 <<
" :\t\t" << NBadComponent[3][
i][0] <<
"\t" << NBadComponent[3][
i][1] <<
"\t"
380 << NBadComponent[3][
i][2] <<
"\t" << NBadComponent[3][
i][3];
381 std::stringstream binlabel;
382 binlabel <<
"TEC- D " << i - 9;
384 for (
int j = 0;
j < 4;
j++) {
385 ME[
j]->Fill(i + 16, NBadComponent[3][i][
j]);
386 ME[
j]->setBinLabel(i + 16, binlabel.str());
391 ss <<
"\n----------------------------------------------------------------"
392 "\n\t\t Detid \tModules Fibers "
393 "Apvs\n---------------------------------------------------------------"
395 for (
int i = 1; i < 5; ++
i)
396 ss <<
"\nTIB Layer " << i <<
" :" <<
ssV[0][i].
str();
398 for (
int i = 1; i < 4; ++
i)
399 ss <<
"\nTID+ Disk " << i <<
" :" <<
ssV[1][i].
str();
400 for (
int i = 4; i < 7; ++
i)
401 ss <<
"\nTID- Disk " << i - 3 <<
" :" <<
ssV[1][i].
str();
403 for (
int i = 1; i < 7; ++
i)
404 ss <<
"\nTOB Layer " << i <<
" :" <<
ssV[2][i].
str();
406 for (
int i = 1; i < 10; ++
i)
407 ss <<
"\nTEC+ Disk " << i <<
" :" <<
ssV[3][i].
str();
408 for (
int i = 10; i < 19; ++
i)
409 ss <<
"\nTEC- Disk " << i - 9 <<
" :" <<
ssV[3][i].
str();
411 edm::LogInfo(
"SiStripQualityDQM") << ss.str() << std::endl;
413 for (
int i = 0; i < 4; i++) {
415 ME[
i]->getTH1()->Draw();
431 ssV[
i][component] <<
" \t " << ((BC.
BadApvs) & 0x1) <<
" " << ((BC.
BadApvs >> 1) & 0x1) <<
" ";
433 ssV[
i][component] <<
"x x " << ((BC.
BadApvs >> 2) & 0x1) <<
" " << ((BC.
BadApvs >> 3) & 0x1);
435 ssV[
i][component] << ((BC.
BadApvs >> 2) & 0x1) <<
" " << ((BC.
BadApvs >> 3) & 0x1) <<
" "
436 << ((BC.
BadApvs >> 4) & 0x1) <<
" " << ((BC.
BadApvs >> 5) & 0x1) <<
" ";
439 NBadComponent[
i][0][2] += ((BC.
BadApvs >> 5) & 0x1) + ((BC.
BadApvs >> 4) & 0x1) + ((BC.
BadApvs >> 3) & 0x1) +
441 NBadComponent[
i][component][2] += ((BC.
BadApvs >> 5) & 0x1) + ((BC.
BadApvs >> 4) & 0x1) +
448 NBadComponent[
i][component][1] +=
453 NBadComponent[
i][0][0]++;
454 NBadComponent[
i][component][0]++;
void getModMEs(ModMEs &CondObj_ME, const uint32_t &detId_)
int NBadComponent[4][19][4]
const edm::EventSetup & c
const std::vector< BadComponent > & getBadComponentList() const
void getDetIds(std::vector< uint32_t > &DetIds_) const
const TrackerTopology * tTopo_
unsigned int tibLayer(const DetId &id) const
static constexpr auto TID
SiStripQualityDQM(edm::ESGetToken< SiStripQuality, SiStripQualityRcd > token, edm::RunNumber_t iRun, edm::ParameterSet const &hPSet, edm::ParameterSet const &fPSet, const TrackerTopology *tTopo, const TkDetMap *tkDetMap)
bool IsStripBad(const uint32_t &detid, const short &strip) const
void fillSummaryMEs(const std::vector< uint32_t > &selectedDetIds) override
void setCurrentFolder(std::string const &fullpath) override
unsigned int tidWheel(const DetId &id) const
Registry::const_iterator RegistryIterator
Log< level::Error, false > LogError
void fillTkMap(const uint32_t &detid, const float &value)
const SiStripQuality * condObj_
const uint16_t range(const Frame &aFrame)
U second(std::pair< T, U > const &p)
std::map< uint32_t, ModMEs > SummaryMEsMap_
RegistryIterator getRegistryVectorEnd() const
unsigned int tidSide(const DetId &id) const
std::stringstream ssV[4][19]
bool IsModuleUsable(const uint32_t &detid) const
void SetBadComponents(int i, int component, SiStripQuality::BadComponent &BC)
void fillMEsForDet(const ModMEs &selModME_, uint32_t selDetId_) override
const std::pair< unsigned short, double > getNumberOfApvsAndStripLength(uint32_t detId) const
void fillModMEs(const std::vector< uint32_t > &selectedDetIds) override
static constexpr auto TOB
ContainerIterator getDataVectorBegin() const
Log< level::Info, false > LogInfo
Detector identifier class for the strip tracker.
void getConditionObject(const edm::EventSetup &eSetup) override
T getParameter(std::string const &) const
std::vector< uint32_t > alreadyFilledLayers
~SiStripQualityDQM() override
static constexpr auto TIB
std::pair< std::string, uint32_t > getLayerNameAndId(const uint32_t &detId_)
RegistryIterator getRegistryVectorBegin() const
const Range getRange(const uint32_t detID) const
std::vector< uint32_t > GetSameLayerDetId(const std::vector< uint32_t > &activeDetIds, uint32_t selDetId)
std::pair< ContainerIterator, ContainerIterator > Range
void fillMEsForLayer(uint32_t selDetId_) override
void fillGrandSummaryMEs()
std::vector< uint32_t > activeDetIds
std::string createHistoLayer(std::string description, std::string id_type, std::string path, std::string flag)
MonitorElement * book1D(TString const &name, TString const &title, int const nchX, double const lowX, double const highX, FUNC onbooking=NOOP())
void getSummaryMEs(ModMEs &CondObj_ME, const uint32_t &detId_)
unsigned int tecWheel(const DetId &id) const
const std::vector< uint32_t > & getAllDetIds() const noexcept
SiStripHistoId hidmanager
std::unique_ptr< TkHistoMap > Tk_HM_
static constexpr auto TEC
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