@@ -857,7 +857,7 @@ void PlotAlignmentValidation::plotDMR(const std::string& variable,
857857 }
858858
859859 // Skip strip detectors if plotting any "Y" variable
860- if (i != 1 && i != 2 && variable.length () > 0 && variable[variable.length () - 1 ] == ' Y' ) {
860+ if (i != 1 && i != 2 && ! variable.empty () && variable[variable.length () - 1 ] == ' Y' ) {
861861 continue ;
862862 }
863863
@@ -2261,7 +2261,7 @@ double PlotAlignmentValidation::resampleTestOfEqualRMS(TH1F* h1, TH1F* h2, int n
22612261 std::vector<double > diff;
22622262 diff.clear ();
22632263 // "true" (in bootstrap terms) difference of the samples' RMS
2264- double rmsdiff = abs (h1->GetRMS () - h2->GetRMS ());
2264+ double rmsdiff = std:: abs (h1->GetRMS () - h2->GetRMS ());
22652265 // means of the samples to calculate RMS
22662266 double m1 = h1->GetMean ();
22672267 double m2 = h2->GetMean ();
@@ -2281,8 +2281,8 @@ double PlotAlignmentValidation::resampleTestOfEqualRMS(TH1F* h1, TH1F* h2, int n
22812281 }
22822282 d1 /= h1->GetEntries ();
22832283 d2 /= h2->GetEntries ();
2284- diff.push_back (abs (d1 - d2 - rmsdiff));
2285- test_mean += abs (d1 - d2 - rmsdiff);
2284+ diff.push_back (std:: abs (d1 - d2 - rmsdiff));
2285+ test_mean += std:: abs (d1 - d2 - rmsdiff);
22862286 }
22872287 test_mean /= numSamples;
22882288 edm::LogPrint (" " ) << " test mean:" << test_mean;
@@ -2309,7 +2309,7 @@ double PlotAlignmentValidation::resampleTestOfEqualMeans(TH1F* h1, TH1F* h2, int
23092309 std::vector<double > diff;
23102310 diff.clear ();
23112311 // "true" (in bootstrap terms) difference of the samples' means
2312- double meandiff = abs (h1->GetMean () - h2->GetMean ());
2312+ double meandiff = std:: abs (h1->GetMean () - h2->GetMean ());
23132313 // realization of random variable
23142314 double d1 = 0 ;
23152315 double d2 = 0 ;
@@ -2326,8 +2326,8 @@ double PlotAlignmentValidation::resampleTestOfEqualMeans(TH1F* h1, TH1F* h2, int
23262326 }
23272327 d1 /= h1->GetEntries ();
23282328 d2 /= h2->GetEntries ();
2329- diff.push_back (abs (d1 - d2 - meandiff));
2330- test_mean += abs (d1 - d2 - meandiff);
2329+ diff.push_back (std:: abs (d1 - d2 - meandiff));
2330+ test_mean += std:: abs (d1 - d2 - meandiff);
23312331 }
23322332 test_mean /= numSamples;
23332333 edm::LogPrint (" " ) << " test mean:" << test_mean;
@@ -2344,7 +2344,7 @@ double PlotAlignmentValidation::resampleTestOfEqualMeans(TH1F* h1, TH1F* h2, int
23442344}
23452345
23462346float PlotAlignmentValidation::twotailedStudentTTestEqualMean (float t, float v) {
2347- return 2 * (1 - ROOT::Math::tdistribution_cdf (abs (t), v));
2347+ return 2 * (1 - ROOT::Math::tdistribution_cdf (std:: abs (t), v));
23482348}
23492349
23502350const TString PlotAlignmentValidation::summaryfilename = " OfflineValidationSummary" ;
0 commit comments