Skip to content

Commit 6b96b4b

Browse files
committed
[RF] Fix typos to make the typo checker happy
1 parent db0d33c commit 6b96b4b

File tree

10 files changed

+61
-60
lines changed

10 files changed

+61
-60
lines changed

.typos.toml

+1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
[default.extend-identifiers]
22
BaBar = "BaBar"
3+
YtoAbsPixel = "YtoAbsPixel"
34
exportJSONtoString = "exportJSONtoString" # Maybe it's worth to rename this function to consistent camelCase
45
fChannelObservMap = "fChannelObservMap"
56
fG2ndDerivative = "fG2ndDerivative"

roofit/roofit/test/testRooGaussian.cxx

+3-3
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ TEST(RooGaussian, AnalyticalIntegral)
1313
constexpr double prec = 1.E-8;
1414
constexpr double oneSig = 0.682689492137;
1515
constexpr double twoSig = 0.954499736104;
16-
constexpr double thrSig = 0.997300203937;
16+
constexpr double thresholdSig = 0.997300203937;
1717

1818
RooRealVar x("x", "x", 0.);
1919
RooRealVar mean("mean", "mean", 0.);
@@ -44,13 +44,13 @@ TEST(RooGaussian, AnalyticalIntegral)
4444
//Test central quantiles
4545
runTest(-1., 1., oneSig);
4646
runTest(-2., 2., twoSig);
47-
runTest(-3., 3., thrSig);
47+
runTest(-3., 3., thresholdSig);
4848

4949
//Positive & negative, but one close to zero:
5050
runTest(0., 1., oneSig/2.);
5151
runTest(-0., 1., oneSig/2.);
5252
runTest(-2., 1.E-8, twoSig/2.);
53-
runTest(-1.E-9, 3., thrSig/2.);
53+
runTest(-1.E-9, 3., thresholdSig/2.);
5454

5555
//Far from zero
5656
runTest(5., 11., 2.8665157E-7);

roofit/roofitZMQ/src/ZeroMQPoller.cpp

+6-6
Original file line numberDiff line numberDiff line change
@@ -206,10 +206,10 @@ size_t ZeroMQPoller::unregister_socket(zmq::socket_t &socket)
206206
m_sockets.erase(it);
207207

208208
// Remove from m_items
209-
auto iit = std::find_if(begin(m_items), end(m_items),
209+
auto found = std::find_if(begin(m_items), end(m_items),
210210
[&it_first](const zmq::pollitem_t &item) { return it_first == item.socket; });
211-
assert(iit != end(m_items));
212-
m_items.erase(iit);
211+
assert(found != end(m_items));
212+
m_items.erase(found);
213213

214214
return index;
215215
}
@@ -235,10 +235,10 @@ size_t ZeroMQPoller::unregister_socket(int fd)
235235
m_fds.erase(it);
236236

237237
// Remove from m_items
238-
auto iit = std::find_if(begin(m_items), end(m_items),
238+
auto found = std::find_if(begin(m_items), end(m_items),
239239
[&it_first](const zmq::pollitem_t &item) { return it_first == item.fd; });
240-
assert(iit != end(m_items));
241-
m_items.erase(iit);
240+
assert(found != end(m_items));
241+
m_items.erase(found);
242242

243243
return index;
244244
}

roofit/roofitcore/src/RooAbsData.cxx

+17-17
Original file line numberDiff line numberDiff line change
@@ -1012,40 +1012,40 @@ RooFit::OwningPtr<TMatrixDSym> RooAbsData::corrcovMatrix(const RooArgList& vars,
10121012
if (select && select->eval()==0) continue ;
10131013
if (cutRange && dvars->allInRange(cutRange)) continue ;
10141014

1015-
for(std::size_t ix = 0; ix < varList.size(); ++ix) {
1016-
auto varx = static_cast<RooRealVar const&>(varList[ix]);
1017-
xsum[ix] += weight() * varx.getVal() ;
1015+
for(std::size_t iX = 0; iX < varList.size(); ++iX) {
1016+
auto varx = static_cast<RooRealVar const&>(varList[iX]);
1017+
xsum[iX] += weight() * varx.getVal() ;
10181018
if (corr) {
1019-
x2sum[ix] += weight() * varx.getVal() * varx.getVal();
1019+
x2sum[iX] += weight() * varx.getVal() * varx.getVal();
10201020
}
10211021

1022-
for(std::size_t iy = ix; iy < varList.size(); ++iy) {
1023-
auto vary = static_cast<RooRealVar const&>(varList[iy]);
1024-
xysum(ix,iy) += weight() * varx.getVal() * vary.getVal();
1025-
xysum(iy,ix) = xysum(ix,iy) ;
1022+
for(std::size_t iY = iX; iY < varList.size(); ++iY) {
1023+
auto vary = static_cast<RooRealVar const&>(varList[iY]);
1024+
xysum(iX,iY) += weight() * varx.getVal() * vary.getVal();
1025+
xysum(iY,iX) = xysum(iX,iY) ;
10261026
}
10271027
}
10281028

10291029
}
10301030

10311031
// Normalize sums
1032-
for (std::size_t ix=0 ; ix<varList.size() ; ix++) {
1033-
xsum[ix] /= sumEntries(cutSpec, cutRange) ;
1032+
for (std::size_t iX=0 ; iX<varList.size() ; iX++) {
1033+
xsum[iX] /= sumEntries(cutSpec, cutRange) ;
10341034
if (corr) {
1035-
x2sum[ix] /= sumEntries(cutSpec, cutRange) ;
1035+
x2sum[iX] /= sumEntries(cutSpec, cutRange) ;
10361036
}
1037-
for (std::size_t iy=0 ; iy<varList.size() ; iy++) {
1038-
xysum(ix,iy) /= sumEntries(cutSpec, cutRange) ;
1037+
for (std::size_t iY=0 ; iY<varList.size() ; iY++) {
1038+
xysum(iX,iY) /= sumEntries(cutSpec, cutRange) ;
10391039
}
10401040
}
10411041

10421042
// Calculate covariance matrix
10431043
auto C = std::make_unique<TMatrixDSym>(varList.size()) ;
1044-
for (std::size_t ix=0 ; ix<varList.size() ; ix++) {
1045-
for (std::size_t iy=0 ; iy<varList.size() ; iy++) {
1046-
(*C)(ix,iy) = xysum(ix,iy)-xsum[ix]*xsum[iy] ;
1044+
for (std::size_t iX=0 ; iX<varList.size() ; iX++) {
1045+
for (std::size_t iY=0 ; iY<varList.size() ; iY++) {
1046+
(*C)(iX,iY) = xysum(iX,iY)-xsum[iX]*xsum[iY] ;
10471047
if (corr) {
1048-
(*C)(ix,iy) /= std::sqrt((x2sum[ix]-(xsum[ix]*xsum[ix]))*(x2sum[iy]-(xsum[iy]*xsum[iy]))) ;
1048+
(*C)(iX,iY) /= std::sqrt((x2sum[iX]-(xsum[iX]*xsum[iX]))*(x2sum[iY]-(xsum[iY]*xsum[iY]))) ;
10491049
}
10501050
}
10511051
}

roofit/roofitcore/src/RooAddPdf.cxx

+1-1
Original file line numberDiff line numberDiff line change
@@ -812,7 +812,7 @@ std::unique_ptr<RooAbsReal> RooAddPdf::createExpectedEventsFunc(const RooArgSet
812812
if (!_allExtendable) {
813813
// If the _refCoefNorm is empty or it's equal to normSet anyway, this is not
814814
// a conditional pdf and we don't need to do any transformation. See also
815-
// RooAddPdf::compleForNormSet() for more explanations on a similar logic.
815+
// RooAddPdf::compileForNormSet() for more explanations on a similar logic.
816816
if (!_refCoefNorm.empty() && !nset->equals(_refCoefNorm)) {
817817
prodList.addOwned(std::unique_ptr<RooAbsReal>{createIntegral(*nset, _refCoefNorm)});
818818
}

roofit/roofitcore/src/RooDataHist.cxx

+18-18
Original file line numberDiff line numberDiff line change
@@ -401,28 +401,28 @@ void RooDataHist::importTH1(const RooArgList& vars, const TH1& histo, double wgt
401401
zmin = offset[2] ;
402402
}
403403

404-
Int_t ix(0);
405-
Int_t iy(0);
404+
Int_t iX(0);
405+
Int_t iY(0);
406406
Int_t iz(0);
407-
for (ix=0 ; ix < xvar->getBins() ; ix++) {
408-
xvar->setBin(ix) ;
407+
for (iX=0 ; iX < xvar->getBins() ; iX++) {
408+
xvar->setBin(iX) ;
409409
if (yvar) {
410-
for (iy=0 ; iy < yvar->getBins() ; iy++) {
411-
yvar->setBin(iy) ;
410+
for (iY=0 ; iY < yvar->getBins() ; iY++) {
411+
yvar->setBin(iY) ;
412412
if (zvar) {
413413
for (iz=0 ; iz < zvar->getBins() ; iz++) {
414414
zvar->setBin(iz) ;
415415
double bv = doDensityCorrection ? binVolume(vset) : 1;
416-
add(vset,bv*histo.GetBinContent(ix+1+xmin,iy+1+ymin,iz+1+zmin)*wgt,bv*TMath::Power(histo.GetBinError(ix+1+xmin,iy+1+ymin,iz+1+zmin)*wgt,2)) ;
416+
add(vset,bv*histo.GetBinContent(iX+1+xmin,iY+1+ymin,iz+1+zmin)*wgt,bv*TMath::Power(histo.GetBinError(iX+1+xmin,iY+1+ymin,iz+1+zmin)*wgt,2)) ;
417417
}
418418
} else {
419419
double bv = doDensityCorrection ? binVolume(vset) : 1;
420-
add(vset,bv*histo.GetBinContent(ix+1+xmin,iy+1+ymin)*wgt,bv*TMath::Power(histo.GetBinError(ix+1+xmin,iy+1+ymin)*wgt,2)) ;
420+
add(vset,bv*histo.GetBinContent(iX+1+xmin,iY+1+ymin)*wgt,bv*TMath::Power(histo.GetBinError(iX+1+xmin,iY+1+ymin)*wgt,2)) ;
421421
}
422422
}
423423
} else {
424424
double bv = doDensityCorrection ? binVolume(vset) : 1 ;
425-
add(vset,bv*histo.GetBinContent(ix+1+xmin)*wgt,bv*TMath::Power(histo.GetBinError(ix+1+xmin)*wgt,2)) ;
425+
add(vset,bv*histo.GetBinContent(iX+1+xmin)*wgt,bv*TMath::Power(histo.GetBinError(iX+1+xmin)*wgt,2)) ;
426426
}
427427
}
428428

@@ -564,31 +564,31 @@ void RooDataHist::importTH1Set(const RooArgList& vars, RooCategory& indexCat, st
564564
double avgBV = volume / numEntries() ;
565565

566566
Int_t ic(0);
567-
Int_t ix(0);
568-
Int_t iy(0);
567+
Int_t iX(0);
568+
Int_t iY(0);
569569
Int_t iz(0);
570570
for (ic=0 ; ic < icat->numBins(nullptr) ; ic++) {
571571
icat->setBin(ic) ;
572572
histo = hmap[icat->getCurrentLabel()] ;
573-
for (ix=0 ; ix < xvar->getBins() ; ix++) {
574-
xvar->setBin(ix) ;
573+
for (iX=0 ; iX < xvar->getBins() ; iX++) {
574+
xvar->setBin(iX) ;
575575
if (yvar) {
576-
for (iy=0 ; iy < yvar->getBins() ; iy++) {
577-
yvar->setBin(iy) ;
576+
for (iY=0 ; iY < yvar->getBins() ; iY++) {
577+
yvar->setBin(iY) ;
578578
if (zvar) {
579579
for (iz=0 ; iz < zvar->getBins() ; iz++) {
580580
zvar->setBin(iz) ;
581581
double bv = doDensityCorrection ? binVolume(vset)/avgBV : 1;
582-
add(vset,bv*histo->GetBinContent(ix+1+xmin,iy+1+ymin,iz+1+zmin)*wgt,bv*TMath::Power(histo->GetBinError(ix+1+xmin,iy+1+ymin,iz+1+zmin)*wgt,2)) ;
582+
add(vset,bv*histo->GetBinContent(iX+1+xmin,iY+1+ymin,iz+1+zmin)*wgt,bv*TMath::Power(histo->GetBinError(iX+1+xmin,iY+1+ymin,iz+1+zmin)*wgt,2)) ;
583583
}
584584
} else {
585585
double bv = doDensityCorrection ? binVolume(vset)/avgBV : 1;
586-
add(vset,bv*histo->GetBinContent(ix+1+xmin,iy+1+ymin)*wgt,bv*TMath::Power(histo->GetBinError(ix+1+xmin,iy+1+ymin)*wgt,2)) ;
586+
add(vset,bv*histo->GetBinContent(iX+1+xmin,iY+1+ymin)*wgt,bv*TMath::Power(histo->GetBinError(iX+1+xmin,iY+1+ymin)*wgt,2)) ;
587587
}
588588
}
589589
} else {
590590
double bv = doDensityCorrection ? binVolume(vset)/avgBV : 1;
591-
add(vset,bv*histo->GetBinContent(ix+1+xmin)*wgt,bv*TMath::Power(histo->GetBinError(ix+1+xmin)*wgt,2)) ;
591+
add(vset,bv*histo->GetBinContent(iX+1+xmin)*wgt,bv*TMath::Power(histo->GetBinError(iX+1+xmin)*wgt,2)) ;
592592
}
593593
}
594594
}

roofit/roofitcore/test/stressRooFit_tests.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -2708,7 +2708,7 @@ class TestBasic405 : public RooUnitTest {
27082708
// Define range "alt" as including bins 1,3,5,7,9
27092709
xb->setRange("alt", "x_coarse_bin1,x_coarse_bin3,x_coarse_bin5,x_coarse_bin7,x_coarse_bin9");
27102710

2711-
// Construct subset of data matching range "alt" but only for the first 5000 events and plot it on the fram
2711+
// Construct subset of data matching range "alt" but only for the first 5000 events and plot it on the frame
27122712
std::unique_ptr<RooAbsData> dataSel{data->reduce(CutRange("alt"), EventRange(0, 5000))};
27132713
// dataSel->plotOn(xframe,MarkerColor(kGreen),LineColor(kGreen),Name("data_sel")) ;
27142714

roofit/roofitcore/test/testRooSimultaneous.cxx

+4-4
Original file line numberDiff line numberDiff line change
@@ -67,9 +67,9 @@ TEST(RooSimultaneous, CategoriesWithNoPdf)
6767

6868
RooRealVar x("x", "", 0, 1);
6969
RooRealVar rnd("rnd", "", 0, 1);
70-
RooThresholdCategory catThr("cat", "", rnd, "v2", 2);
71-
catThr.addThreshold(1. / 3, "v0", 0);
72-
catThr.addThreshold(2. / 3, "v1", 1);
70+
RooThresholdCategory catThreshold("cat", "", rnd, "v2", 2);
71+
catThreshold.addThreshold(1. / 3, "v0", 0);
72+
catThreshold.addThreshold(2. / 3, "v1", 1);
7373

7474
RooRealVar m0("m0", "", 0.5, 0, 1);
7575
RooRealVar m1("m1", "", 0.5, 0, 1);
@@ -79,7 +79,7 @@ TEST(RooSimultaneous, CategoriesWithNoPdf)
7979
RooProdPdf pdf("pdf", "", RooArgSet(g0, rndPdf));
8080

8181
std::unique_ptr<RooDataSet> ds{pdf.generate(RooArgSet(x, rnd), RooFit::Name("ds"), RooFit::NumEvents(100))};
82-
auto cat = dynamic_cast<RooCategory *>(ds->addColumn(catThr));
82+
auto cat = dynamic_cast<RooCategory *>(ds->addColumn(catThreshold));
8383

8484
RooSimultaneous sim("sim", "", *cat);
8585
sim.addPdf(g0, "v0");

roofit/roostats/src/LikelihoodInterval.cxx

+8-8
Original file line numberDiff line numberDiff line change
@@ -312,8 +312,8 @@ bool LikelihoodInterval::FindLimits(const RooRealVar & param, double &lower, dou
312312
std::unique_ptr<RooArgSet> partmp{fLikelihoodRatio->getVariables()};
313313
RemoveConstantParameters(&*partmp);
314314
RooArgList params(*partmp);
315-
int ix = params.index(&param);
316-
if (ix < 0 ) {
315+
int iX = params.index(&param);
316+
if (iX < 0 ) {
317317
ccoutE(InputArguments) << "Error - invalid parameter " << param.GetName() << " specified for finding the interval limits " << std::endl;
318318
return false;
319319
}
@@ -332,7 +332,7 @@ bool LikelihoodInterval::FindLimits(const RooRealVar & param, double &lower, dou
332332
err_level = err_level/2; // since we are using -log LR
333333
fMinimizer->SetErrorDef(err_level);
334334

335-
unsigned int ivarX = ix;
335+
unsigned int ivarX = iX;
336336

337337
double elow = 0;
338338
double eup = 0;
@@ -371,9 +371,9 @@ Int_t LikelihoodInterval::GetContourPoints(const RooRealVar & paramX, const RooR
371371
std::unique_ptr<RooArgSet> partmp{fLikelihoodRatio->getVariables()};
372372
RemoveConstantParameters(&*partmp);
373373
RooArgList params(*partmp);
374-
int ix = params.index(&paramX);
375-
int iy = params.index(&paramY);
376-
if (ix < 0 || iy < 0) {
374+
int iX = params.index(&paramX);
375+
int iY = params.index(&paramY);
376+
if (iX < 0 || iY < 0) {
377377
coutE(InputArguments) << "LikelihoodInterval - Error - invalid parameters specified for finding the contours; parX = " << paramX.GetName()
378378
<< " parY = " << paramY.GetName() << std::endl;
379379
return 0;
@@ -394,8 +394,8 @@ Int_t LikelihoodInterval::GetContourPoints(const RooRealVar & paramX, const RooR
394394
fMinimizer->SetErrorDef(cont_level);
395395

396396
unsigned int ncp = npoints;
397-
unsigned int ivarX = ix;
398-
unsigned int ivarY = iy;
397+
unsigned int ivarX = iX;
398+
unsigned int ivarY = iY;
399399
coutI(Minimization) << "LikelihoodInterval - Finding the contour of " << paramX.GetName() << " ( " << ivarX << " ) and " << paramY.GetName() << " ( " << ivarY << " ) " << std::endl;
400400
ret = fMinimizer->Contour(ivarX, ivarY, ncp, x, y );
401401
if (!ret) {

roofit/xroofit/src/xRooNode.cxx

+2-2
Original file line numberDiff line numberDiff line change
@@ -2092,7 +2092,7 @@ xRooNode xRooNode::Add(const xRooNode &child, Option_t *opt)
20922092
child.convertForAcquisition(*this);
20932093
if (child.get()) {
20942094
if (auto _d = child.get<RooAbsData>()) {
2095-
// don't use acquire method to import, because that adds datasets as Embeddded
2095+
// don't use acquire method to import, because that adds datasets as Embedded
20962096
if (!w->import(*_d)) {
20972097
return xRooNode(child.GetName(), *w->data(child.GetName()), *this);
20982098
} else {
@@ -10330,7 +10330,7 @@ void xRooNode::Draw(Option_t *opt)
1033010330
}
1033110331
hh->SetTitle(TString(hh->GetTitle())
1033210332
.ReplaceAll(TString(chan->get()->GetName()) + "_",
10333-
"")); // remove occurance of channelname_ in title (usually prefix)
10333+
"")); // remove occurrence of channelname_ in title (usually prefix)
1033410334
titleMatchName &= (TString(samp->GetName()) == hh->GetTitle() ||
1033510335
TString(hh->GetTitle()).BeginsWith(TString(samp->GetName()) + "_"));
1033610336
hh->SetBinContent(hh->GetXaxis()->FindFixBin(chanName), samp->GetContent());

0 commit comments

Comments
 (0)