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) {
68 LogInfo(
"PixelDQM") <<
"SiPixelPhase1Summary::~SiPixelPhase1Summary: Destructor" << endl;
116 std::vector<std::string> xAxisLabels_ = {
"BMO",
128 std::vector<std::string> yAxisLabels_ = {
137 auto name = mapInfo.first;
141 deadROCSummary = iBooker.
book2D(
"deadROCSummary",
"Percentage of dead ROCs per layer/ring", 2, 0, 2, 4, 0, 4);
142 std::vector<std::string> xAxisLabelsReduced_ = {
"Barrel",
"Forward"};
144 for (
unsigned int i = 0;
i < xAxisLabelsReduced_.size();
i++) {
151 float mean_range = 100.;
152 float rms_range = 200.;
157 residuals_[
"residual_mean_x_Inner_PXLayer_" + layer] =
158 iBooker.
book1D(
"residual_mean_x_Inner_PXLayer_" + layer,
159 "Mean Track Residuals X Inner Modules for Layer " + layer +
";mean(x_rec-x_pred)[#mum]",
163 residuals_[
"residual_mean_x_Outer_PXLayer_" + layer] =
164 iBooker.
book1D(
"residual_mean_x_Outer_PXLayer_" + layer,
165 "Mean Track Residuals X Outer Modules for Layer " + layer +
";mean(x_rec-x_pred)[#mum]",
169 residuals_[
"residual_mean_y_Inner_PXLayer_" + layer] =
170 iBooker.
book1D(
"residual_mean_y_Inner_PXLayer_" + layer,
171 "Mean Track Residuals Y Inner Modules for Layer " + layer +
";mean(y_rec-y_pred)[#mum]",
175 residuals_[
"residual_mean_y_Outer_PXLayer_" + layer] =
176 iBooker.
book1D(
"residual_mean_y_Outer_PXLayer_" + layer,
177 "Mean Track Residuals Y Outer Modules for Layer " + layer +
";mean(y_rec-y_pred)[#mum]",
182 residuals_[
"residual_rms_x_Inner_PXLayer_" + layer] =
183 iBooker.
book1D(
"residual_rms_x_Inner_PXLayer_" + layer,
184 "RMS of Track Residuals X Inner Modules for Layer " + layer +
";rms(x_rec-x_pred)[#mum]",
188 residuals_[
"residual_rms_x_Outer_PXLayer_" + layer] =
189 iBooker.
book1D(
"residual_rms_x_Outer_PXLayer_" + layer,
190 "RMS of Track Residuals X Outer Modules for Layer " + layer +
";rms(x_rec-x_pred)[#mum]",
194 residuals_[
"residual_rms_y_Inner_PXLayer_" + layer] =
195 iBooker.
book1D(
"residual_rms_y_Inner_PXLayer_" + layer,
196 "RMS of Track Residuals Y Inner Modules for Layer " + layer +
";rms(y_rec-y_pred)[#mum]",
200 residuals_[
"residual_rms_y_Outer_PXLayer_" + layer] =
201 iBooker.
book1D(
"residual_rms_y_Outer_PXLayer_" + layer,
202 "RMS of Track Residuals Y Outer Modules for Layer " + layer +
";rms(y_rec-y_pred)[#mum]",
211 "residual_mean_x_Inner",
"Mean Track Residuals X Inner Modules;mean(x_rec-x_pred)[#mum]", 100, -100., 100.);
213 "residual_mean_x_Outer",
"Mean Track Residuals X Outer Modules;mean(x_rec-x_pred)[#mum]", 100, -100., 100.);
215 "residual_mean_y_Inner",
"Mean Track Residuals Y Inner Modules;mean(y_rec-y_pred)[#mum]", 100, -100., 100.);
217 "residual_mean_y_Outer",
"Mean Track Residuals Y Outer Modules;mean(y_rec-y_pred)[#mum]", 100, -100., 100.);
220 "residual_rms_x_Inner",
"RMS of Track Residuals X Inner Modules;rms(x_rec-x_pred)[#mum]", 100, 0., 200.);
222 "residual_rms_x_Outer",
"RMS of Track Residuals X Outer Modules;rms(x_rec-x_pred)[#mum]", 100, 0., 200.);
224 "residual_rms_y_Inner",
"RMS of Track Residuals Y Inner Modules;rms(y_rec-y_pred)[#mum]", 100, 0., 200.);
226 "residual_rms_y_Outer",
"RMS of Track Residuals Y Outer Modules;rms(y_rec-y_pred)[#mum]", 100, 0., 200.);
231 "residual_mean_x_pos",
"Mean Track Residuals X pos. Side;mean(x_rec-x_pred)[#mum]", 100, -100., 100.);
233 "residual_mean_x_neg",
"Mean Track Residuals X neg. Side;mean(x_rec-x_pred)[#mum]", 100, -100., 100.);
235 "residual_mean_y_pos",
"Mean Track Residuals Y pos. Side;mean(y_rec-y_pred)[#mum]", 100, -100., 100.);
237 "residual_mean_y_neg",
"Mean Track Residuals Y neg. Side;mean(y_rec-y_pred)[#mum]", 100, -100., 100.);
240 iBooker.
book1D(
"residual_rms_x_pos",
"RMS of Track Residuals X pos. Side;rms(x_rec-x_pred)[#mum]", 100, 0., 200.);
242 iBooker.
book1D(
"residual_rms_x_neg",
"RMS of Track Residuals X neg. Side;rms(x_rec-x_pred)[#mum]", 100, 0., 200.);
244 iBooker.
book1D(
"residual_rms_y_pos",
"RMS of Track Residuals Y pos. Side;rms(y_rec-y_pred)[#mum]", 100, 0., 200.);
246 iBooker.
book1D(
"residual_rms_y_neg",
"RMS of Track Residuals Y neg. Side;rms(y_rec-y_pred)[#mum]", 100, 0., 200.);
253 summaryMap_[
"Grand"] = iBooker.
book2D(
"reportSummaryMap",
"Pixel Summary Map", 2, 0, 2, 4, 0, 4);
254 summaryMap_[
"Grand"]->setAxisTitle(
"Subdetector", 1);
255 for (
unsigned int i = 0;
i < xAxisLabelsReduced_.size();
i++) {
256 summaryMap_[
"Grand"]->setBinLabel(
i + 1, xAxisLabelsReduced_[
i]);
257 for (
unsigned int j = 0;
j < 4;
j++) {
263 summaryMap_[
"Grand"] = iBooker.
book2D(
"reportSummaryMap",
"Pixel Summary Map", 12, 0, 12, 4, 0, 4);
270 if (summaryMapEntry.first ==
"Grand")
272 auto summaryMap = summaryMapEntry.second;
273 for (
unsigned int i = 0;
i < xAxisLabels_.size();
i++) {
276 for (
unsigned int i = 0;
i < yAxisLabels_.size();
i++) {
277 summaryMap->setBinLabel(
i + 1, yAxisLabels_[
i], 2);
279 summaryMap->setAxisTitle(
"Subdetector", 1);
280 summaryMap->setAxisTitle(
"Layer/disk", 2);
281 for (
int i = 0;
i < summaryMap->getTH1()->GetXaxis()->GetNbins();
i++) {
282 for (
int j = 0;
j < summaryMap->getTH1()->GetYaxis()->GetNbins();
j++) {
283 summaryMap->Fill(
i,
j, -1.);
299 std::vector<string> binAxisLabels = {
"Layer 1",
"Layer 2",
"Layer 3",
"Layer 4",
"Ring 1",
"Ring 2"};
302 std::vector<string> varName = {
"Layer_1",
"Layer_2",
"Layer_3",
"Layer_4",
"Ring_1",
"Ring_2"};
303 std::vector<int>
yMax = {1536, 3584, 5632, 8192, 4224, 6528};
304 for (
unsigned int i = 0;
i < histoOrder.size();
i++) {
305 string varNameStr =
"deadRocTrend" + varName[
i];
306 string varTitle = binAxisLabels[
i] +
" dead ROC trend";
308 varNameStr =
"ineffRocTrend" + varName[
i];
309 varTitle = binAxisLabels[
i] +
" inefficient ROC trend";
319 for (
unsigned int i = 1;
i <= binAxisLabels.size();
i++) {
332 auto name = mapInfo.first;
333 std::ostringstream histNameStream;
336 for (
int i = 0;
i < 12;
i++) {
337 for (
int j = 0;
j < 4;
j++) {
340 bool minus =
i < 2 || (
i > 3 &&
i < 8);
341 int iOver2 = floor(
i / 2.);
342 bool outer = (
i > 3) ? iOver2 % 2 == 0 :
i % 2 == 0;
344 histNameStream.str(
"");
345 histNameStream <<
topFolderName_.c_str() <<
"PX" << ((
i > 3) ?
"Forward" :
"Barrel") <<
"/"
346 << ((
i > 3) ?
"HalfCylinder" :
"Shell") <<
"_" << (
minus ?
"m" :
"p") << ((
outer) ?
"O" :
"I")
347 <<
"/" << ((
i > 3) ? ((
i % 2 == 0) ?
"PXRing_1/" :
"PXRing_2/") :
"")
349 << ((
i > 3) ? ((
minus) ?
"-" :
"+") :
"") << (
j + 1);
350 histName = histNameStream.str();
354 edm::LogWarning(
"SiPixelPhase1Summary") <<
"ME " << histName <<
" is not available !!";
359 edm::LogWarning(
"SiPixelPhase1Summary") <<
"Summary map " <<
name <<
" is not available !!";
362 if (!(
me->getQReports()).
empty())
372 std::vector<int> nRocsPerTrend = {1536, 3584, 5632, 8192, 4224, 6528};
373 for (
unsigned int i = 0;
i < trendOrder.size();
i++) {
374 int xBin =
i < 4 ? 1 : 2;
375 int yBin =
i % 4 + 1;
379 nROCs = tempProfile->GetBinContent(tempProfile->FindLastBinAbove());
382 nROCs = tempProfile->GetBinContent(
i + 1);
394 iGetter.
get(
"PixelPhase1/Tracks/PXBarrel/residual_x_per_SignedModule_per_SignedLadder_PXLayer_" + layer);
396 iGetter.
get(
"PixelPhase1/Tracks/PXBarrel/residual_y_per_SignedModule_per_SignedLadder_PXLayer_" + layer);
402 if (i <= me_x->getNbinsY() / 2) {
403 bool iAmInner = (
i % 2 == 0);
405 for (
int j : {1, 2, 3, 4, 6, 7, 8, 9}) {
414 for (
int j : {1, 2, 3, 4, 6, 7, 8, 9}) {
424 bool iAmInner = (
i % 2 == 1);
426 for (
int j : {1, 2, 3, 4, 6, 7, 8, 9}) {
435 for (
int j : {1, 2, 3, 4, 6, 7, 8, 9}) {
451 iGetter.
get(
"PixelPhase1/Tracks/PXForward/residual_x_per_PXDisk_per_SignedBladePanel_PXRing_" +
ring);
453 iGetter.
get(
"PixelPhase1/Tracks/PXForward/residual_y_per_PXDisk_per_SignedBladePanel_PXRing_" +
ring);
454 bool posSide =
false;
470 bool iAmInner = (
i % 2 == 0);
499 float sumOfNonNegBins = 0.;
503 for (
int i = 0;
i < 12;
i++) {
505 edm::LogWarning(
"SiPixelPhase1Summary") <<
"Grand summary does not exist!";
508 for (
int j = 0;
j < 4;
j++) {
514 auto name = mapInfo.first;
522 if (
summaryMap_[
"Grand"]->getBinContent(
i + 1,
j + 1) > -0.1)
523 sumOfNonNegBins +=
summaryMap_[
"Grand"]->getBinContent(
i + 1,
j + 1);
532 for (
int i = 0;
i < 2;
i++) {
534 edm::LogWarning(
"SiPixelPhase1Summary") <<
"Grand summary does not exist!";
537 for (
int j = 0;
j < 4;
j++) {
547 sumOfNonNegBins +=
summaryMap_[
"Grand"]->getBinContent(
i + 1,
j + 1);
558 if (lumiSec % 10 != 0)
562 MonitorElement* nClustersAll = iGetter.
get(
"PixelPhase1/Phase1_MechanicalView/num_clusters_per_Lumisection_PXAll");
563 if (nClustersAll ==
nullptr) {
564 edm::LogWarning(
"SiPixelPhase1Summary") <<
"All pixel cluster trend plot not available!!";
567 if (nClustersAll->
getTH1()->GetBinContent(lumiSec) < 100)
575 std::vector<int> nFilledROCs(trendOrder.size(), 0);
576 std::vector<int> hiEffROCs(trendOrder.size(), 0);
577 std::vector<int> nRocsPerTrend = {1536, 3584, 5632, 8192, 4224, 6528};
578 std::vector<string> trendNames = {};
580 for (
auto it : {1, 2, 3, 4}) {
581 histName =
"PXBarrel/digi_occupancy_per_SignedModuleCoord_per_SignedLadderCoord_PXLayer_" + std::to_string(it);
582 trendNames.push_back(histName);
584 for (
auto it : {1, 2}) {
585 histName =
"PXForward/digi_occupancy_per_SignedDiskCoord_per_SignedBladePanelCoord_PXRing_" + std::to_string(it);
586 trendNames.push_back(histName);
589 for (
unsigned int trendIt = 0; trendIt < trendOrder.size(); trendIt++) {
591 histName =
"PixelPhase1/Phase1_MechanicalView/" + trendNames[trendIt];
593 if (tempLayerME ==
nullptr)
595 float lowEffValue = 0.25 * (tempLayerME->
getTH1()->Integral() / nRocsPerTrend[trendIt]);
596 for (
int i = 1;
i <= tempLayerME->
getTH1()->GetXaxis()->GetNbins();
i++) {
597 for (
int j = 1;
j <= tempLayerME->
getTH1()->GetYaxis()->GetNbins();
j++) {
599 nFilledROCs[trendIt]++;
601 hiEffROCs[trendIt]++;
605 tempLayerME->
Reset();
610 for (
unsigned int i = 0;
i < trendOrder.size();
i++) {
615 for (
unsigned int i = 0;
i < trendOrder.size();
i++) {
616 deadROCTrends_[trendOrder[
i]]->Fill(lumiSec - 1, nRocsPerTrend[
i] - nFilledROCs[
i]);
624 for (
auto it : {1, 2, 3, 4}) {
625 histName =
"PixelPhase1/Phase1_MechanicalView/PXBarrel/clusterposition_zphi_PXLayer_" + std::to_string(it);
627 if (toReset !=
nullptr) {
631 for (
auto it : {
"-3",
"-2",
"-1",
"+1",
"+2",
"+3"}) {
632 histName =
"PixelPhase1/Phase1_MechanicalView/PXForward/clusterposition_xy_PXDisk_" +
std::string(it);
634 if (toReset !=
nullptr) {