Skip to content

Commit e2aa770

Browse files
committed
Merge branch 'bugfix/remove-workaround' into 'release/06-02'
cherrypick+fixstayle from master See merge request belle2/software/basf2!2290
2 parents dc818d1 + ca58df5 commit e2aa770

File tree

4 files changed

+45
-39
lines changed

4 files changed

+45
-39
lines changed

dqm/analysis/modules/src/DQMHistAnalysisPXDCM.cc

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -276,7 +276,7 @@ void DQMHistAnalysisPXDCMModule::event()
276276
entries_adhoc += v;
277277
outside_adhoc += v;
278278
}
279-
if (entries_adhoc > 0 && scale < 1e-3) { // ignore 1.3.2 and minimum events
279+
if (entries_adhoc > 0 && scale < 1e-3) { // ignore modules with minimum events
280280
// scale <1e-3 == >1000 events
281281
mean_adhoc /= entries_adhoc; // calculate mean
282282
auto warn_tmp_m = fabs(10.0 - mean_adhoc) > m_warnMeanAdhoc;
@@ -385,10 +385,11 @@ void DQMHistAnalysisPXDCMModule::event()
385385
m_lineA->Draw();
386386
}
387387

388-
auto tt = new TLatex(5.5, 3, "1.3.2 Module is excluded, please ignore");
389-
tt->SetTextAngle(90);// Rotated
390-
tt->SetTextAlign(12);// Centered
391-
tt->Draw();
388+
// keep this commented code as we may have excluded modules in phase4
389+
// auto tt = new TLatex(5.5, 3, "1.3.2 Module is excluded, please ignore");
390+
// tt->SetTextAngle(90);// Rotated
391+
// tt->SetTextAlign(12);// Centered
392+
// tt->Draw();
392393

393394
m_cCommonModeDelta->Modified();
394395
m_cCommonModeDelta->Update();

dqm/analysis/modules/src/DQMHistAnalysisPXDCharge.cc

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -230,10 +230,11 @@ void DQMHistAnalysisPXDChargeModule::event()
230230
}
231231
#endif
232232

233-
auto tt = new TLatex(5.5, 0, "1.3.2 Module is excluded, please ignore");
234-
tt->SetTextAngle(90);// Rotated
235-
tt->SetTextAlign(12);// Centered
236-
tt->Draw();
233+
// keep this commented code as we may have excluded modules in phase4
234+
// auto tt = new TLatex(5.5, 0, "1.3.2 Module is excluded, please ignore");
235+
// tt->SetTextAngle(90);// Rotated
236+
// tt->SetTextAlign(12);// Centered
237+
// tt->Draw();
237238

238239
m_cCharge->Modified();
239240
m_cCharge->Update();

dqm/analysis/modules/src/DQMHistAnalysisPXDEff.cc

Lines changed: 22 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -368,7 +368,8 @@ void DQMHistAnalysisPXDEffModule::event()
368368
ihit += nhit;
369369
ieff++; // only count in modules working
370370
double var_e = nmatch / nhit; // can never be zero
371-
if (j == 6) continue; // workaround for 1.3.2 module
371+
// keep workaround code for re-use
372+
// if (j == 6) continue; // workaround for 1.3.2 module
372373
m_monObj->setVariable(Form("efficiency_%d_%d_%d", aModule.getLayerNumber(), aModule.getLadderNumber(), aModule.getSensorNumber()),
373374
var_e);
374375
}
@@ -396,7 +397,8 @@ void DQMHistAnalysisPXDEffModule::event()
396397
updated[aModule] = true;
397398
}
398399

399-
if (j == 6) continue; // workaround for 1.3.2 module
400+
// keep workaround code for re-use
401+
// if (j == 6) continue; // workaround for 1.3.2 module
400402

401403
// get the errors and check for limits for each bin seperately ...
402404

@@ -433,10 +435,9 @@ void DQMHistAnalysisPXDEffModule::event()
433435
gr->GetPoint(i, x, y);
434436
gr->SetPoint(i, x - 0.01, y); // workaround for jsroot bug (fixed upstream)
435437
auto val = y - gr->GetErrorYlow(i); // Error is relative to value
436-
if (i != 5) { // exclude 1.3.2
437-
/// check for val > 0.0) { would exclude all zero efficient modules!!!
438-
if (scale_min > val) scale_min = val;
439-
}
438+
// keep workaround code for re-use
439+
// if (i != 5) // exclude 1.3.2
440+
if (scale_min > val) scale_min = val;
440441
}
441442
if (scale_min == 1.0) scale_min = 0.0;
442443
if (scale_min > 0.9) scale_min = 0.9;
@@ -459,10 +460,11 @@ void DQMHistAnalysisPXDEffModule::event()
459460

460461
gr->Draw("AP");
461462

462-
auto tt = new TLatex(5.5, scale_min, " 1.3.2 Module is excluded, please ignore");
463-
tt->SetTextAngle(90);// Rotated
464-
tt->SetTextAlign(12);// Centered
465-
tt->Draw();
463+
// keep workaround code for re-use
464+
// auto tt = new TLatex(5.5, scale_min, " 1.3.2 Module is excluded, please ignore");
465+
// tt->SetTextAngle(90);// Rotated
466+
// tt->SetTextAlign(12);// Centered
467+
// tt->Draw();
466468

467469
if (all < 100.) {
468470
m_cEffAll->Pad()->SetFillColor(kGray);// Magenta or Gray
@@ -515,10 +517,9 @@ void DQMHistAnalysisPXDEffModule::event()
515517
gr->GetPoint(i, x, y);
516518
gr->SetPoint(i, x - 0.2, y); // shift a bit if in same plot
517519
auto val = y - gr->GetErrorYlow(i); // Error is relative to value
518-
if (i != 5) { // exclude 1.3.2
519-
/// check for val > 0.0) { would exclude all zero efficient modules!!!
520-
if (scale_min > val) scale_min = val;
521-
}
520+
// keep workaround code for re-use
521+
// if (i != 5) { // exclude 1.3.2
522+
if (scale_min > val) scale_min = val;
522523
}
523524
if (scale_min == 1.0) scale_min = 0.0;
524525
if (scale_min > 0.9) scale_min = 0.9;
@@ -528,7 +529,7 @@ void DQMHistAnalysisPXDEffModule::event()
528529
if (ay) ay->SetRangeUser(scale_min, 1.0);
529530
auto ax = gr->GetXaxis();
530531
if (ax) {
531-
ax->Set(m_PXDModules.size() , 0, m_PXDModules.size());
532+
ax->Set(m_PXDModules.size(), 0, m_PXDModules.size());
532533
for (unsigned int i = 0; i < m_PXDModules.size(); i++) {
533534
TString ModuleName = (std::string)m_PXDModules[i];
534535
ax->SetBinLabel(i + 1, ModuleName);
@@ -553,11 +554,12 @@ void DQMHistAnalysisPXDEffModule::event()
553554
} else scale_min = 0.0;
554555
if (gr) gr->Draw("AP");
555556
if (gr3) gr3->Draw("P");
556-
auto tt = new TLatex(5.5, scale_min, " 1.3.2 Module is excluded, please ignore");
557-
tt->SetTextSize(0.035);
558-
tt->SetTextAngle(90);// Rotated
559-
tt->SetTextAlign(12);// Centered
560-
tt->Draw();
557+
// keep workaround code for re-use
558+
// auto tt = new TLatex(5.5, scale_min, " 1.3.2 Module is excluded, please ignore");
559+
// tt->SetTextSize(0.035);
560+
// tt->SetTextAngle(90);// Rotated
561+
// tt->SetTextAlign(12);// Centered
562+
// tt->Draw();
561563

562564
if (all < 100.) {
563565
m_cEffAllUpdate->Pad()->SetFillColor(kGray);// Magenta or Gray

dqm/analysis/modules/src/DQMHistAnalysisPXDTrackCharge.cc

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -233,10 +233,11 @@ void DQMHistAnalysisPXDTrackChargeModule::event()
233233
href2->Draw("same,hist");
234234
}
235235

236-
auto tt = new TLatex(5.5, 0, " 1.3.2 Module is excluded, please ignore");
237-
tt->SetTextAngle(90);// Rotated
238-
tt->SetTextAlign(12);// Centered
239-
tt->Draw();
236+
// keep this commented code as we may have excluded modules in phase4
237+
// auto tt = new TLatex(5.5, 0, " 1.3.2 Module is excluded, please ignore");
238+
// tt->SetTextAngle(90);// Rotated
239+
// tt->SetTextAlign(12);// Centered
240+
// tt->Draw();
240241
}
241242
}
242243

@@ -396,12 +397,13 @@ void DQMHistAnalysisPXDTrackChargeModule::event()
396397
m_gCharge->SetLineWidth(2);
397398
m_gCharge->SetMarkerStyle(8);
398399
m_gCharge->Draw("AP");
399-
{
400-
auto tt = new TLatex(5.5, 0, " 1.3.2 Module is excluded, please ignore");
401-
tt->SetTextAngle(90);// Rotated
402-
tt->SetTextAlign(12);// Centered
403-
tt->Draw();
404-
}
400+
// {
401+
// keep this commented code as we may have excluded modules in phase4
402+
// auto tt = new TLatex(5.5, 0, " 1.3.2 Module is excluded, please ignore");
403+
// tt->SetTextAngle(90);// Rotated
404+
// tt->SetTextAlign(12);// Centered
405+
// tt->Draw();
406+
// }
405407
m_cCharge->cd(0);
406408
m_cCharge->Modified();
407409
m_cCharge->Update();

0 commit comments

Comments
 (0)