Skip to content

Commit

Permalink
Merge pull request #35865 from sayanchatterjee38/sayan&nihar_SiPixelP…
Browse files Browse the repository at this point in the history
…hase1Summary_CMSSW_12_1_X_2021-10-26-1100

 TkDQM: PixelPhase1 Summary plots
  • Loading branch information
cmsbuild committed Nov 4, 2021
2 parents cc5a950 + 65d409f commit 3ca4fa6
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 14 deletions.
1 change: 1 addition & 0 deletions DQM/SiPixelPhase1Summary/interface/SiPixelPhase1Summary.h
Expand Up @@ -78,6 +78,7 @@ class SiPixelPhase1Summary : public DQMEDHarvester {

//Error thresholds for the dead ROC plots
std::vector<double> deadRocThresholds_;
std::vector<double> deadRocWarnThresholds_;

//book the summary plots
void bookSummaries(DQMStore::IBooker& iBooker);
Expand Down
10 changes: 6 additions & 4 deletions DQM/SiPixelPhase1Summary/python/SiPixelPhase1Summary_cfi.py
Expand Up @@ -35,7 +35,8 @@
)
),
# Number of dead ROCs required to generate an error. Order must be layers 1-4, ring1, ring2.
DeadROCErrorThreshold = cms.vdouble(0.2,0.2,0.2,0.2,0.2,0.2)
DeadROCErrorThreshold = cms.vdouble(0.2,0.2,0.2,0.2,0.2,0.2),
DeadROCWarningThreshold = cms.vdouble(0.1,0.1,0.1,0.1,0.1,0.1)
)

SiPixelPhase1SummaryOffline = DQMEDHarvester("SiPixelPhase1Summary",
Expand Down Expand Up @@ -67,8 +68,8 @@
MapHist = cms.string("mean_charge")
)
),
DeadROCErrorThreshold = cms.vdouble(0.2,0.2,0.2,0.2,0.2,0.2)

DeadROCErrorThreshold = cms.vdouble(0.2,0.2,0.2,0.2,0.2,0.2),
DeadROCWarningThreshold = cms.vdouble(0.1,0.1,0.1,0.1,0.1,0.1)
)

SiPixelPhase1SummaryCosmics = DQMEDHarvester("SiPixelPhase1Summary",
Expand All @@ -92,7 +93,8 @@
MapHist = cms.string("mean_charge")
)
),
DeadROCErrorThreshold = cms.vdouble(0.2,0.2,0.2,0.2,0.2,0.2)
DeadROCErrorThreshold = cms.vdouble(0.2,0.2,0.2,0.2,0.2,0.2),
DeadROCWarningThreshold = cms.vdouble(0.1,0.1,0.1,0.1,0.1,0.1)
)

from DQMServices.Core.DQMQualityTester import DQMQualityTester
Expand Down
28 changes: 18 additions & 10 deletions DQM/SiPixelPhase1Summary/src/SiPixelPhase1Summary.cc
Expand Up @@ -60,6 +60,7 @@ SiPixelPhase1Summary::SiPixelPhase1Summary(const edm::ParameterSet& iConfig)
summaryPlotName_[mapPSet.getParameter<std::string>("MapName")] = mapPSet.getParameter<std::string>("MapHist");
}
deadRocThresholds_ = conf_.getParameter<std::vector<double> >("DeadROCErrorThreshold");
deadRocWarnThresholds_ = conf_.getParameter<std::vector<double> >("DeadROCWarningThreshold");
}

SiPixelPhase1Summary::~SiPixelPhase1Summary() {
Expand Down Expand Up @@ -282,6 +283,8 @@ void SiPixelPhase1Summary::fillSummaries(DQMStore::IBooker& iBooker, DQMStore::I
nROCs = tempProfile->GetBinContent(i + 1);
}
deadROCSummary->setBinContent(xBin, yBin, nROCs / nRocsPerTrend[i]);
deadROCSummary->setBinContent(2, 3, -1);
deadROCSummary->setBinContent(2, 4, -1);
}

//Sum of non-negative bins for the reportSummary
Expand Down Expand Up @@ -325,20 +328,25 @@ void SiPixelPhase1Summary::fillSummaries(DQMStore::IBooker& iBooker, DQMStore::I
}
for (int j = 0; j < 4; j++) { // !??!?!? yAxisLabels_.size() ?!?!?!
//Ignore the bins without detectors in them
if (i == 1 && j > 1)
continue;
summaryMap_["Grand"]->setBinContent(
i + 1,
j + 1,
1); // This resets the map to be good. We only then set it to 0 if there has been a problem in one of the other summaries.
if (deadROCSummary->getBinContent(i + 1, j + 1) > deadRocThresholds_[i * 4 + j])
summaryMap_["Grand"]->setBinContent(i + 1, j + 1, 0);
sumOfNonNegBins += summaryMap_["Grand"]->getBinContent(i + 1, j + 1);
if (i == 1 && j > 1) {
summaryMap_["Grand"]->setBinContent(i + 1, j + 1, -1);
} else {
if (deadROCSummary->getBinContent(i + 1, j + 1) < deadRocWarnThresholds_[i * 4 + j])
summaryMap_["Grand"]->setBinContent(i + 1, j + 1, 1);

else if (deadROCSummary->getBinContent(i + 1, j + 1) > deadRocWarnThresholds_[i * 4 + j] &&
deadROCSummary->getBinContent(i + 1, j + 1) < deadRocThresholds_[i * 4 + j])
summaryMap_["Grand"]->setBinContent(i + 1, j + 1, 0.8);

else
summaryMap_["Grand"]->setBinContent(i + 1, j + 1, 0);

sumOfNonNegBins += summaryMap_["Grand"]->getBinContent(i + 1, j + 1);
}
}
}
}
}

//------------------------------------------------------------------
// Fill the trend plots
//------------------------------------------------------------------
Expand Down

0 comments on commit 3ca4fa6

Please sign in to comment.