50 LogInfo(
"PixelDQM") <<
"SiPixelPhase1Summary::SiPixelPhase1Summary: Got DQM BackEnd interface" << endl;
55 std::vector<edm::ParameterSet> mapPSets =
conf_.
getParameter<std::vector<edm::ParameterSet> >(
"SummaryMaps");
58 for (
auto const& mapPSet : mapPSets) {
67 LogInfo(
"PixelDQM") <<
"SiPixelPhase1Summary::~SiPixelPhase1Summary: Destructor" << endl;
115 std::vector<std::string> xAxisLabels_ = {
"BMO",
127 std::vector<std::string> yAxisLabels_ = {
136 auto name = mapInfo.first;
140 deadROCSummary = iBooker.
book2D(
"deadROCSummary",
"Percentage of dead ROCs per layer/ring", 2, 0, 2, 4, 0, 4);
141 std::vector<std::string> xAxisLabelsReduced_ = {
"Barrel",
"Forward"};
143 for (
unsigned int i = 0;
i < xAxisLabelsReduced_.size();
i++) {
150 float mean_range = 100.;
151 float rms_range = 200.;
156 residuals_[
"residual_mean_x_Inner_PXLayer_" + layer] =
157 iBooker.
book1D(
"residual_mean_x_Inner_PXLayer_" + layer,
158 "Mean Track Residuals X Inner Modules for Layer " + layer +
";mean(x_rec-x_pred)[#mum]",
162 residuals_[
"residual_mean_x_Outer_PXLayer_" + layer] =
163 iBooker.
book1D(
"residual_mean_x_Outer_PXLayer_" + layer,
164 "Mean Track Residuals X Outer Modules for Layer " + layer +
";mean(x_rec-x_pred)[#mum]",
168 residuals_[
"residual_mean_y_Inner_PXLayer_" + layer] =
169 iBooker.
book1D(
"residual_mean_y_Inner_PXLayer_" + layer,
170 "Mean Track Residuals Y Inner Modules for Layer " + layer +
";mean(y_rec-y_pred)[#mum]",
174 residuals_[
"residual_mean_y_Outer_PXLayer_" + layer] =
175 iBooker.
book1D(
"residual_mean_y_Outer_PXLayer_" + layer,
176 "Mean Track Residuals Y Outer Modules for Layer " + layer +
";mean(y_rec-y_pred)[#mum]",
181 residuals_[
"residual_rms_x_Inner_PXLayer_" + layer] =
182 iBooker.
book1D(
"residual_rms_x_Inner_PXLayer_" + layer,
183 "RMS of Track Residuals X Inner Modules for Layer " + layer +
";rms(x_rec-x_pred)[#mum]",
187 residuals_[
"residual_rms_x_Outer_PXLayer_" + layer] =
188 iBooker.
book1D(
"residual_rms_x_Outer_PXLayer_" + layer,
189 "RMS of Track Residuals X Outer Modules for Layer " + layer +
";rms(x_rec-x_pred)[#mum]",
193 residuals_[
"residual_rms_y_Inner_PXLayer_" + layer] =
194 iBooker.
book1D(
"residual_rms_y_Inner_PXLayer_" + layer,
195 "RMS of Track Residuals Y Inner Modules for Layer " + layer +
";rms(y_rec-y_pred)[#mum]",
199 residuals_[
"residual_rms_y_Outer_PXLayer_" + layer] =
200 iBooker.
book1D(
"residual_rms_y_Outer_PXLayer_" + layer,
201 "RMS of Track Residuals Y Outer Modules for Layer " + layer +
";rms(y_rec-y_pred)[#mum]",
210 "residual_mean_x_Inner",
"Mean Track Residuals X Inner Modules;mean(x_rec-x_pred)[#mum]", 100, -100., 100.);
212 "residual_mean_x_Outer",
"Mean Track Residuals X Outer Modules;mean(x_rec-x_pred)[#mum]", 100, -100., 100.);
214 "residual_mean_y_Inner",
"Mean Track Residuals Y Inner Modules;mean(y_rec-y_pred)[#mum]", 100, -100., 100.);
216 "residual_mean_y_Outer",
"Mean Track Residuals Y Outer Modules;mean(y_rec-y_pred)[#mum]", 100, -100., 100.);
219 "residual_rms_x_Inner",
"RMS of Track Residuals X Inner Modules;rms(x_rec-x_pred)[#mum]", 100, 0., 200.);
221 "residual_rms_x_Outer",
"RMS of Track Residuals X Outer Modules;rms(x_rec-x_pred)[#mum]", 100, 0., 200.);
223 "residual_rms_y_Inner",
"RMS of Track Residuals Y Inner Modules;rms(y_rec-y_pred)[#mum]", 100, 0., 200.);
225 "residual_rms_y_Outer",
"RMS of Track Residuals Y Outer Modules;rms(y_rec-y_pred)[#mum]", 100, 0., 200.);
230 "residual_mean_x_pos",
"Mean Track Residuals X pos. Side;mean(x_rec-x_pred)[#mum]", 100, -100., 100.);
232 "residual_mean_x_neg",
"Mean Track Residuals X neg. Side;mean(x_rec-x_pred)[#mum]", 100, -100., 100.);
234 "residual_mean_y_pos",
"Mean Track Residuals Y pos. Side;mean(y_rec-y_pred)[#mum]", 100, -100., 100.);
236 "residual_mean_y_neg",
"Mean Track Residuals Y neg. Side;mean(y_rec-y_pred)[#mum]", 100, -100., 100.);
239 iBooker.
book1D(
"residual_rms_x_pos",
"RMS of Track Residuals X pos. Side;rms(x_rec-x_pred)[#mum]", 100, 0., 200.);
241 iBooker.
book1D(
"residual_rms_x_neg",
"RMS of Track Residuals X neg. Side;rms(x_rec-x_pred)[#mum]", 100, 0., 200.);
243 iBooker.
book1D(
"residual_rms_y_pos",
"RMS of Track Residuals Y pos. Side;rms(y_rec-y_pred)[#mum]", 100, 0., 200.);
245 iBooker.
book1D(
"residual_rms_y_neg",
"RMS of Track Residuals Y neg. Side;rms(y_rec-y_pred)[#mum]", 100, 0., 200.);
252 summaryMap_[
"Grand"] = iBooker.
book2D(
"reportSummaryMap",
"Pixel Summary Map", 2, 0, 2, 4, 0, 4);
253 summaryMap_[
"Grand"]->setAxisTitle(
"Subdetector", 1);
254 for (
unsigned int i = 0;
i < xAxisLabelsReduced_.size();
i++) {
255 summaryMap_[
"Grand"]->setBinLabel(
i + 1, xAxisLabelsReduced_[
i]);
256 for (
unsigned int j = 0;
j < 4;
j++) {
262 summaryMap_[
"Grand"] = iBooker.
book2D(
"reportSummaryMap",
"Pixel Summary Map", 12, 0, 12, 4, 0, 4);
269 if (summaryMapEntry.first ==
"Grand")
271 auto summaryMap = summaryMapEntry.second;
272 for (
unsigned int i = 0;
i < xAxisLabels_.size();
i++) {
275 for (
unsigned int i = 0;
i < yAxisLabels_.size();
i++) {
276 summaryMap->setBinLabel(
i + 1, yAxisLabels_[
i], 2);
278 summaryMap->setAxisTitle(
"Subdetector", 1);
279 summaryMap->setAxisTitle(
"Layer/disk", 2);
280 for (
int i = 0;
i < summaryMap->getTH1()->GetXaxis()->GetNbins();
i++) {
281 for (
int j = 0;
j < summaryMap->getTH1()->GetYaxis()->GetNbins();
j++) {
282 summaryMap->Fill(
i,
j, -1.);
298 std::vector<string> binAxisLabels = {
"Layer 1",
"Layer 2",
"Layer 3",
"Layer 4",
"Ring 1",
"Ring 2"};
301 std::vector<string> varName = {
"Layer_1",
"Layer_2",
"Layer_3",
"Layer_4",
"Ring_1",
"Ring_2"};
302 std::vector<int>
yMax = {1536, 3584, 5632, 8192, 4224, 6528};
303 for (
unsigned int i = 0;
i < histoOrder.size();
i++) {
304 string varNameStr =
"deadRocTrend" + varName[
i];
305 string varTitle = binAxisLabels[
i] +
" dead ROC trend";
307 varNameStr =
"ineffRocTrend" + varName[
i];
308 varTitle = binAxisLabels[
i] +
" inefficient ROC trend";
318 for (
unsigned int i = 1;
i <= binAxisLabels.size();
i++) {
331 auto name = mapInfo.first;
332 std::ostringstream histNameStream;
335 for (
int i = 0;
i < 12;
i++) {
336 for (
int j = 0;
j < 4;
j++) {
339 bool minus =
i < 2 || (
i > 3 &&
i < 8);
340 int iOver2 = floor(
i / 2.);
341 bool outer = (
i > 3) ? iOver2 % 2 == 0 :
i % 2 == 0;
343 histNameStream.str(
"");
344 histNameStream <<
topFolderName_.c_str() <<
"PX" << ((
i > 3) ?
"Forward" :
"Barrel") <<
"/"
345 << ((
i > 3) ?
"HalfCylinder" :
"Shell") <<
"_" << (
minus ?
"m" :
"p") << ((
outer) ?
"O" :
"I")
346 <<
"/" << ((
i > 3) ? ((
i % 2 == 0) ?
"PXRing_1/" :
"PXRing_2/") :
"")
348 << ((
i > 3) ? ((
minus) ?
"-" :
"+") :
"") << (
j + 1);
349 histName = histNameStream.str();
353 edm::LogWarning(
"SiPixelPhase1Summary") <<
"ME " << histName <<
" is not available !!";
358 edm::LogWarning(
"SiPixelPhase1Summary") <<
"Summary map " <<
name <<
" is not available !!";
361 if (!(
me->getQReports()).
empty())
371 std::vector<int> nRocsPerTrend = {1536, 3584, 5632, 8192, 4224, 6528};
372 for (
unsigned int i = 0;
i < trendOrder.size();
i++) {
373 int xBin =
i < 4 ? 1 : 2;
374 int yBin =
i % 4 + 1;
378 nROCs = tempProfile->GetBinContent(tempProfile->FindLastBinAbove());
381 nROCs = tempProfile->GetBinContent(
i + 1);
393 iGetter.
get(
"PixelPhase1/Tracks/PXBarrel/residual_x_per_SignedModule_per_SignedLadder_PXLayer_" + layer);
395 iGetter.
get(
"PixelPhase1/Tracks/PXBarrel/residual_y_per_SignedModule_per_SignedLadder_PXLayer_" + layer);
401 if (i <= me_x->getNbinsY() / 2) {
402 bool iAmInner = (
i % 2 == 0);
404 for (
int j : {1, 2, 3, 4, 6, 7, 8, 9}) {
413 for (
int j : {1, 2, 3, 4, 6, 7, 8, 9}) {
423 bool iAmInner = (
i % 2 == 1);
425 for (
int j : {1, 2, 3, 4, 6, 7, 8, 9}) {
434 for (
int j : {1, 2, 3, 4, 6, 7, 8, 9}) {
450 iGetter.
get(
"PixelPhase1/Tracks/PXForward/residual_x_per_PXDisk_per_SignedBladePanel_PXRing_" +
ring);
452 iGetter.
get(
"PixelPhase1/Tracks/PXForward/residual_y_per_PXDisk_per_SignedBladePanel_PXRing_" +
ring);
453 bool posSide =
false;
469 bool iAmInner = (
i % 2 == 0);
498 float sumOfNonNegBins = 0.;
502 for (
int i = 0;
i < 12;
i++) {
504 edm::LogWarning(
"SiPixelPhase1Summary") <<
"Grand summary does not exist!";
507 for (
int j = 0;
j < 4;
j++) {
513 auto name = mapInfo.first;
521 if (
summaryMap_[
"Grand"]->getBinContent(
i + 1,
j + 1) > -0.1)
522 sumOfNonNegBins +=
summaryMap_[
"Grand"]->getBinContent(
i + 1,
j + 1);
531 for (
int i = 0;
i < 2;
i++) {
533 edm::LogWarning(
"SiPixelPhase1Summary") <<
"Grand summary does not exist!";
536 for (
int j = 0;
j < 4;
j++) {
546 sumOfNonNegBins +=
summaryMap_[
"Grand"]->getBinContent(
i + 1,
j + 1);
557 if (lumiSec % 10 != 0)
561 MonitorElement* nClustersAll = iGetter.
get(
"PixelPhase1/Phase1_MechanicalView/num_clusters_per_Lumisection_PXAll");
562 if (nClustersAll ==
nullptr) {
563 edm::LogWarning(
"SiPixelPhase1Summary") <<
"All pixel cluster trend plot not available!!";
566 if (nClustersAll->
getTH1()->GetBinContent(lumiSec) < 100)
574 std::vector<int> nFilledROCs(trendOrder.size(), 0);
575 std::vector<int> hiEffROCs(trendOrder.size(), 0);
576 std::vector<int> nRocsPerTrend = {1536, 3584, 5632, 8192, 4224, 6528};
577 std::vector<string> trendNames = {};
579 for (
auto it : {1, 2, 3, 4}) {
580 histName =
"PXBarrel/digi_occupancy_per_SignedModuleCoord_per_SignedLadderCoord_PXLayer_" + std::to_string(it);
581 trendNames.push_back(histName);
583 for (
auto it : {1, 2}) {
584 histName =
"PXForward/digi_occupancy_per_SignedDiskCoord_per_SignedBladePanelCoord_PXRing_" + std::to_string(it);
585 trendNames.push_back(histName);
588 for (
unsigned int trendIt = 0; trendIt < trendOrder.size(); trendIt++) {
590 histName =
"PixelPhase1/Phase1_MechanicalView/" + trendNames[trendIt];
592 if (tempLayerME ==
nullptr)
594 float lowEffValue = 0.25 * (tempLayerME->
getTH1()->Integral() / nRocsPerTrend[trendIt]);
595 for (
int i = 1;
i <= tempLayerME->
getTH1()->GetXaxis()->GetNbins();
i++) {
596 for (
int j = 1;
j <= tempLayerME->
getTH1()->GetYaxis()->GetNbins();
j++) {
598 nFilledROCs[trendIt]++;
600 hiEffROCs[trendIt]++;
604 tempLayerME->
Reset();
609 for (
unsigned int i = 0;
i < trendOrder.size();
i++) {
614 for (
unsigned int i = 0;
i < trendOrder.size();
i++) {
615 deadROCTrends_[trendOrder[
i]]->Fill(lumiSec - 1, nRocsPerTrend[
i] - nFilledROCs[
i]);
623 for (
auto it : {1, 2, 3, 4}) {
624 histName =
"PixelPhase1/Phase1_MechanicalView/PXBarrel/clusterposition_zphi_PXLayer_" + std::to_string(it);
626 if (toReset !=
nullptr) {
630 for (
auto it : {
"-3",
"-2",
"-1",
"+1",
"+2",
"+3"}) {
631 histName =
"PixelPhase1/Phase1_MechanicalView/PXForward/clusterposition_xy_PXDisk_" +
std::string(it);
633 if (toReset !=
nullptr) {