51 LogInfo(
"PixelDQM") <<
"SiPixelPhase1Summary::SiPixelPhase1Summary: Got DQM BackEnd interface" << endl;
56 std::vector<edm::ParameterSet> mapPSets =
conf_.
getParameter<std::vector<edm::ParameterSet> >(
"SummaryMaps");
59 for (
auto const& mapPSet : mapPSets) {
69 LogInfo(
"PixelDQM") <<
"SiPixelPhase1Summary::~SiPixelPhase1Summary: Destructor" << endl;
117 std::vector<std::string> xAxisLabels_ = {
"BMO",
129 std::vector<std::string> yAxisLabels_ = {
138 auto name = mapInfo.first;
142 deadROCSummary = iBooker.
book2D(
"deadROCSummary",
"Percentage of dead ROCs per layer/ring", 2, 0, 2, 4, 0, 4);
143 std::vector<std::string> xAxisLabelsReduced_ = {
"Barrel",
"Forward"};
145 for (
unsigned int i = 0;
i < xAxisLabelsReduced_.size();
i++) {
154 summaryMap_[
"Grand"] = iBooker.
book2D(
"reportSummaryMap",
"Pixel Summary Map", 2, 0, 2, 4, 0, 4);
155 summaryMap_[
"Grand"]->setAxisTitle(
"Subdetector", 1);
156 for (
unsigned int i = 0;
i < xAxisLabelsReduced_.size();
i++) {
157 summaryMap_[
"Grand"]->setBinLabel(
i + 1, xAxisLabelsReduced_[
i]);
158 for (
unsigned int j = 0;
j < 4;
j++) {
164 summaryMap_[
"Grand"] = iBooker.
book2D(
"reportSummaryMap",
"Pixel Summary Map", 12, 0, 12, 4, 0, 4);
171 if (summaryMapEntry.first ==
"Grand")
173 auto summaryMap = summaryMapEntry.second;
174 for (
unsigned int i = 0;
i < xAxisLabels_.size();
i++) {
177 for (
unsigned int i = 0;
i < yAxisLabels_.size();
i++) {
178 summaryMap->setBinLabel(
i + 1, yAxisLabels_[
i], 2);
180 summaryMap->setAxisTitle(
"Subdetector", 1);
181 summaryMap->setAxisTitle(
"Layer/disk", 2);
182 for (
int i = 0;
i < summaryMap->getTH1()->GetXaxis()->GetNbins();
i++) {
183 for (
int j = 0;
j < summaryMap->getTH1()->GetYaxis()->GetNbins();
j++) {
184 summaryMap->Fill(
i,
j, -1.);
200 std::vector<string> binAxisLabels = {
"Layer 1",
"Layer 2",
"Layer 3",
"Layer 4",
"Ring 1",
"Ring 2"};
203 std::vector<string> varName = {
"Layer_1",
"Layer_2",
"Layer_3",
"Layer_4",
"Ring_1",
"Ring_2"};
204 std::vector<int>
yMax = {1536, 3584, 5632, 8192, 4224, 6528};
205 for (
unsigned int i = 0;
i < histoOrder.size();
i++) {
206 string varNameStr =
"deadRocTrend" + varName[
i];
207 string varTitle = binAxisLabels[
i] +
" dead ROC trend";
209 varNameStr =
"ineffRocTrend" + varName[
i];
210 varTitle = binAxisLabels[
i] +
" inefficient ROC trend";
220 for (
unsigned int i = 1;
i <= binAxisLabels.size();
i++) {
233 auto name = mapInfo.first;
234 std::ostringstream histNameStream;
237 for (
int i = 0;
i < 12;
i++) {
238 for (
int j = 0;
j < 4;
j++) {
241 bool minus = i < 2 || (i > 3 &&
i < 8);
242 int iOver2 = floor(
i / 2.);
243 bool outer = (
i > 3) ? iOver2 % 2 == 0 :
i % 2 == 0;
245 histNameStream.str(
"");
246 histNameStream <<
topFolderName_.c_str() <<
"PX" << ((
i > 3) ?
"Forward" :
"Barrel") <<
"/" 247 << ((
i > 3) ?
"HalfCylinder" :
"Shell") <<
"_" << (
minus ?
"m" :
"p") << ((
outer) ?
"O" :
"I")
248 <<
"/" << ((
i > 3) ? ((
i % 2 == 0) ?
"PXRing_1/" :
"PXRing_2/") :
"")
250 << ((
i > 3) ? ((
minus) ?
"-" :
"+") :
"") << (
j + 1);
251 histName = histNameStream.str();
255 edm::LogWarning(
"SiPixelPhase1Summary") <<
"ME " << histName <<
" is not available !!";
260 edm::LogWarning(
"SiPixelPhase1Summary") <<
"Summary map " <<
name <<
" is not available !!";
263 if (!(
me->getQReports()).
empty())
273 std::vector<int> nRocsPerTrend = {1536, 3584, 5632, 8192, 4224, 6528};
274 for (
unsigned int i = 0;
i < trendOrder.size();
i++) {
275 int xBin =
i < 4 ? 1 : 2;
276 int yBin =
i % 4 + 1;
280 nROCs = tempProfile->GetBinContent(tempProfile->FindLastBinAbove());
283 nROCs = tempProfile->GetBinContent(
i + 1);
291 float sumOfNonNegBins = 0.;
295 for (
int i = 0;
i < 12;
i++) {
297 edm::LogWarning(
"SiPixelPhase1Summary") <<
"Grand summary does not exist!";
300 for (
int j = 0;
j < 4;
j++) {
306 auto name = mapInfo.first;
314 if (
summaryMap_[
"Grand"]->getBinContent(
i + 1,
j + 1) > -0.1)
315 sumOfNonNegBins +=
summaryMap_[
"Grand"]->getBinContent(
i + 1,
j + 1);
324 for (
int i = 0;
i < 2;
i++) {
326 edm::LogWarning(
"SiPixelPhase1Summary") <<
"Grand summary does not exist!";
329 for (
int j = 0;
j < 4;
j++) {
331 if (
i == 1 &&
j > 1) {
344 sumOfNonNegBins +=
summaryMap_[
"Grand"]->getBinContent(
i + 1,
j + 1);
355 if (lumiSec % 10 != 0)
359 MonitorElement* nClustersAll = iGetter.
get(
"PixelPhase1/Phase1_MechanicalView/num_clusters_per_Lumisection_PXAll");
360 if (nClustersAll ==
nullptr) {
361 edm::LogWarning(
"SiPixelPhase1Summary") <<
"All pixel cluster trend plot not available!!";
364 if (nClustersAll->
getTH1()->GetBinContent(lumiSec) < 100)
372 std::vector<int> nFilledROCs(trendOrder.size(), 0);
373 std::vector<int> hiEffROCs(trendOrder.size(), 0);
374 std::vector<int> nRocsPerTrend = {1536, 3584, 5632, 8192, 4224, 6528};
375 std::vector<string> trendNames = {};
377 for (
auto it : {1, 2, 3, 4}) {
378 histName =
"PXBarrel/digi_occupancy_per_SignedModuleCoord_per_SignedLadderCoord_PXLayer_" +
std::to_string(it);
379 trendNames.push_back(histName);
381 for (
auto it : {1, 2}) {
382 histName =
"PXForward/digi_occupancy_per_SignedDiskCoord_per_SignedBladePanelCoord_PXRing_" +
std::to_string(it);
383 trendNames.push_back(histName);
386 for (
unsigned int trendIt = 0; trendIt < trendOrder.size(); trendIt++) {
388 histName =
"PixelPhase1/Phase1_MechanicalView/" + trendNames[trendIt];
390 if (tempLayerME ==
nullptr)
392 float lowEffValue = 0.25 * (tempLayerME->
getTH1()->Integral() / nRocsPerTrend[trendIt]);
393 for (
int i = 1;
i <= tempLayerME->
getTH1()->GetXaxis()->GetNbins();
i++) {
394 for (
int j = 1;
j <= tempLayerME->
getTH1()->GetYaxis()->GetNbins();
j++) {
396 nFilledROCs[trendIt]++;
398 hiEffROCs[trendIt]++;
402 tempLayerME->
Reset();
407 for (
unsigned int i = 0;
i < trendOrder.size();
i++) {
412 for (
unsigned int i = 0;
i < trendOrder.size();
i++) {
413 deadROCTrends_[trendOrder[
i]]->Fill(lumiSec - 1, nRocsPerTrend[
i] - nFilledROCs[
i]);
421 for (
auto it : {1, 2, 3, 4}) {
422 histName =
"PixelPhase1/Phase1_MechanicalView/PXBarrel/clusterposition_zphi_PXLayer_" +
std::to_string(it);
424 if (toReset !=
nullptr) {
428 for (
auto it : {
"-3",
"-2",
"-1",
"+1",
"+2",
"+3"}) {
429 histName =
"PixelPhase1/Phase1_MechanicalView/PXForward/clusterposition_xy_PXDisk_" +
std::string(it);
431 if (toReset !=
nullptr) {
LuminosityBlockNumber_t luminosityBlock() const
T getParameter(std::string const &) const
MonitorElement * bookFloat(TString const &name, FUNC onbooking=NOOP())
SiPixelPhase1Summary(const edm::ParameterSet &conf)
virtual void setCurrentFolder(std::string const &fullpath)
MonitorElement * deadROCSummary
std::string topFolderName_
std::map< trendPlots, MonitorElement * > ineffROCTrends_
void fillSummaries(DQMStore::IBooker &iBooker, DQMStore::IGetter &iGetter)
~SiPixelPhase1Summary() override
std::string to_string(const V &value)
void fillTrendPlots(DQMStore::IBooker &iBooker, DQMStore::IGetter &iGetter, int lumiSeg=0)
virtual void Reset()
Remove all data from the ME, keept the empty histogram with all its settings.
MonitorElement * bookProfile(TString const &name, TString const &title, int nchX, double lowX, double highX, int, double lowY, double highY, char const *option="s", FUNC onbooking=NOOP())
void beginRun(edm::Run const &run, edm::EventSetup const &eSetup) override
std::map< std::string, std::string > summaryPlotName_
#define DEFINE_FWK_MODULE(type)
void bookTrendPlots(DQMStore::IBooker &iBooker)
virtual void setBinLabel(int bin, const std::string &label, int axis=1)
set bin label for x, y or z axis (axis=1, 2, 3 respectively)
MonitorElement * reportSummary
Log< level::Info, false > LogInfo
std::vector< double > deadRocWarnThresholds_
virtual void setBinContent(int binx, double content)
set content of bin (1-D)
LuminosityBlockID id() const
std::map< trendPlots, MonitorElement * > deadROCTrends_
MonitorElement * book2D(TString const &name, TString const &title, int nchX, double lowX, double highX, int nchY, double lowY, double highY, FUNC onbooking=NOOP())
void dqmEndJob(DQMStore::IBooker &iBooker, DQMStore::IGetter &iGetter) override
virtual MonitorElement * get(std::string const &fullpath) const
std::map< std::string, MonitorElement * > summaryMap_
virtual TH1 * getTH1() const
Log< level::Warning, false > LogWarning
void bookSummaries(DQMStore::IBooker &iBooker)
void dqmEndLuminosityBlock(DQMStore::IBooker &iBooker, DQMStore::IGetter &iGetter, edm::LuminosityBlock const &lumiSeg, edm::EventSetup const &c) override
std::vector< double > deadRocThresholds_
virtual double getBinContent(int binx) const
get content of bin (1-D)
virtual void setAxisTitle(const std::string &title, int axis=1)
set x-, y- or z-axis title (axis=1, 2, 3 respectively)