@@ -215,7 +215,7 @@ DhCorrelationFitter& DhCorrelationFitter::operator=(const DhCorrelationFitter& c
215215 return *this ;
216216}
217217
218- void DhCorrelationFitter::SetExternalValsAndBounds (Int_t nPars, Double_t* vals, Double_t* lowBounds, Double_t* uppBounds)
218+ void DhCorrelationFitter::setExternalValsAndBounds (Int_t nPars, Double_t* vals, Double_t* lowBounds, Double_t* uppBounds)
219219{
220220
221221 fNpars = nPars;
@@ -233,7 +233,7 @@ void DhCorrelationFitter::SetExternalValsAndBounds(Int_t nPars, Double_t* vals,
233233 return ;
234234}
235235
236- void DhCorrelationFitter::Fitting (Bool_t drawSplitTerm, Bool_t useExternalPars)
236+ void DhCorrelationFitter::fitting (Bool_t drawSplitTerm, Bool_t useExternalPars)
237237{
238238 // -> fFixBase = 0 : baseline free
239239 // = 1 : fix the baseline to the minimum of the histogram
@@ -252,18 +252,18 @@ void DhCorrelationFitter::Fitting(Bool_t drawSplitTerm, Bool_t useExternalPars)
252252
253253 if (fFixBase != 0 && fFixBase != 6 ) {
254254 Printf (" [INFO] DhCorrelationFitter::Fitting, Finding baseline" );
255- FindBaseline ();
255+ findBaseline ();
256256 }
257257 if (fFixBase == 0 ) {
258258 // set initial value of the fBaseline
259- fBaseline = CalculateBaseline (fHist , fIsTotal );
259+ fBaseline = calculateBaseline (fHist , fIsTotal );
260260 }
261261 Printf (" [INFO] DhCorrelationFitter::Fitting, Setting Function" );
262262 if (fTypeOfFitFunc == 7 ) { // case for v2 modulation
263- FitBaselineWv2 (); // to contrain the B parameter in the fit function for the pedestal
263+ fitBaselineWv2 (); // to contrain the B parameter in the fit function for the pedestal
264264 Printf (" [INFO] B parameter for v2 fit: %.3f" , fBaseline );
265265 }
266- SetFitFunction ();
266+ setFitFunction ();
267267
268268 if (fFixBase != 0 ) {
269269 fFit ->FixParameter (0 , fBaseline );
@@ -293,10 +293,10 @@ void DhCorrelationFitter::Fitting(Bool_t drawSplitTerm, Bool_t useExternalPars)
293293 fErrBaseline = fFit ->GetParError (0 );
294294 }
295295 Printf (" [INFO] DhCorrelationFitter::Fitting, Calculating yields with BC" );
296- CalculateYieldsAboveBaseline ();
296+ calculateYieldsAboveBaseline ();
297297 fHist ->SetTitle (" ;#Delta#varphi (rad); #frac{1}{N_{D}}#frac{dN^{assoc}}{d#Delta#varphi} (rad^{-1})" );
298298 Printf (" [INFO] DhCorrelationFitter::Fitting, Now drawing, if requested" );
299- SetSingleTermsForDrawing (drawSplitTerm);
299+ setSingleTermsForDrawing (drawSplitTerm);
300300
301301 // NS yield from bin counting
302302 double fNSyield = 0 .;
@@ -321,7 +321,7 @@ void DhCorrelationFitter::Fitting(Bool_t drawSplitTerm, Bool_t useExternalPars)
321321 printf (" [RESULT MINE] Bin counting results: NS Yield = %.3f +- %.3f \n [RESULT MINE] Bin counting results: AS Yield: %.3f +- %.3f \n [RESULT MINE] baseline = %.3f \n " , fNSyield , fNSyieldErr , fASyield , fASyieldErr , baselinBinCount);
322322}
323323
324- void DhCorrelationFitter::SetFitFunction ()
324+ void DhCorrelationFitter::setFitFunction ()
325325{
326326 // -> fitFunc = 1: const + G NS + G AS (w/o periodicity)
327327 // = 2: const + G NS + G AS (w/ periodicity)
@@ -596,7 +596,7 @@ void DhCorrelationFitter::SetFitFunction()
596596 }
597597}
598598
599- void DhCorrelationFitter::SetPointsForBaseline (Int_t nBaselinePoints, Int_t* binsBaseline)
599+ void DhCorrelationFitter::setPointsForBaseline (Int_t nBaselinePoints, Int_t* binsBaseline)
600600{
601601
602602 fNbasleinePoints = nBaselinePoints;
@@ -610,13 +610,13 @@ void DhCorrelationFitter::SetPointsForBaseline(Int_t nBaselinePoints, Int_t* bin
610610 return ;
611611}
612612
613- Double_t DhCorrelationFitter::FindBaseline ()
613+ Double_t DhCorrelationFitter::findBaseline ()
614614{
615615
616616 // baseline free
617617 if (fFixBase == 0 ) {
618618 Printf (" [INFO] DhCorrelationFitter::FindBasline(). The baseline option is set to free baseline: now the full fit will be done. Beware!" );
619- Fitting (); // TODO: not sure
619+ fitting (); // TODO: not sure
620620 return fBaseline ;
621621 }
622622
@@ -654,7 +654,7 @@ Double_t DhCorrelationFitter::FindBaseline()
654654 for (Int_t k = 1 ; k <= fHist ->GetNbinsX (); k++) {
655655 hval[k - 1 ] = fHist ->GetBinContent (k);
656656 }
657- Double_t errAv = 0 ., Av = 0 .;
657+ Double_t errAv = 0 ., av = 0 .;
658658 TMath::Sort (fHist ->GetNbinsX (), hval, ind, kFALSE ); // KFALSE -> increasing order
659659 // Average of abs(fFixBase) lower points
660660 for (Int_t k = 0 ; k < npointsAv; k++) {
@@ -664,13 +664,13 @@ Double_t DhCorrelationFitter::FindBaseline()
664664 npointsAv++;
665665 continue ;
666666 }
667- Av += fHist ->GetBinContent (ind[k] + 1 ) / (fHist ->GetBinError (ind[k] + 1 ) * fHist ->GetBinError (ind[k] + 1 ));
667+ av += fHist ->GetBinContent (ind[k] + 1 ) / (fHist ->GetBinError (ind[k] + 1 ) * fHist ->GetBinError (ind[k] + 1 ));
668668 errAv += 1 . / (fHist ->GetBinError (ind[k] + 1 ) * fHist ->GetBinError (ind[k] + 1 ));
669669 }
670- Av /= errAv;
670+ av /= errAv;
671671 errAv = TMath::Sqrt (1 . / errAv);
672- printf (" [RESULT] Average fBaseline: %.3f +- %.3f" , Av , errAv);
673- fBaseline = Av ;
672+ printf (" [RESULT] Average fBaseline: %.3f +- %.3f" , av , errAv);
673+ fBaseline = av ;
674674 fErrBaseline = errAv;
675675
676676 if (fShiftBaselineUp ) {
@@ -688,23 +688,23 @@ Double_t DhCorrelationFitter::FindBaseline()
688688
689689 // zyam at pi/2. Fix the baseline averaging the 2 points around +-pi/2 value
690690 if (fFixBase == 2 ) {
691- Double_t errAv = 0 ., Av = 0 .;
691+ Double_t errAv = 0 ., av = 0 .;
692692 Int_t binPhi = fHist ->FindBin (TMath::Pi () / 2 .);
693- Av += fHist ->GetBinContent (binPhi) / (fHist ->GetBinError (binPhi) * fHist ->GetBinError (binPhi));
693+ av += fHist ->GetBinContent (binPhi) / (fHist ->GetBinError (binPhi) * fHist ->GetBinError (binPhi));
694694 errAv += 1 . / (fHist ->GetBinError (binPhi) * fHist ->GetBinError (binPhi));
695695 if (!fIsReflected ) {
696696 binPhi = fHist ->FindBin (-TMath::Pi () / 2 .);
697697 if (binPhi < 1 )
698698 binPhi = 1 ;
699- Av += fHist ->GetBinContent (binPhi) / (fHist ->GetBinError (binPhi) * fHist ->GetBinError (binPhi));
699+ av += fHist ->GetBinContent (binPhi) / (fHist ->GetBinError (binPhi) * fHist ->GetBinError (binPhi));
700700 errAv += 1 . / (fHist ->GetBinError (binPhi) * fHist ->GetBinError (binPhi));
701701 } else {
702702 printf (" [INFO] Reflected histo: only the point at +pi/2 used to evaluate baseline" );
703703 }
704- Av /= errAv;
704+ av /= errAv;
705705 errAv = TMath::Sqrt (1 . / errAv);
706- printf (" [RESULT] Average fBaseline: %.3f +- %.3f \n " , Av , errAv);
707- fBaseline = Av ;
706+ printf (" [RESULT] Average fBaseline: %.3f +- %.3f \n " , av , errAv);
707+ fBaseline = av ;
708708 fErrBaseline = errAv;
709709
710710 if (fShiftBaselineUp ) {
@@ -726,15 +726,15 @@ Double_t DhCorrelationFitter::FindBaseline()
726726 printf (" [ERROR] No baseline points set for the baseline evaluation, SetPointsForBaseline(Int_t nBaselinePoints, Double_t* valsBaseline). Returning -1" );
727727 return -1 ;
728728 }
729- Double_t errAv = 0 ., Av = 0 .;
729+ Double_t errAv = 0 ., av = 0 .;
730730 for (int i = 0 ; i < fNbasleinePoints ; i++) {
731- Av += fHist ->GetBinContent (fBinsBaseline [i]) / (fHist ->GetBinError (fBinsBaseline [i]) * fHist ->GetBinError (fBinsBaseline [i]));
731+ av += fHist ->GetBinContent (fBinsBaseline [i]) / (fHist ->GetBinError (fBinsBaseline [i]) * fHist ->GetBinError (fBinsBaseline [i]));
732732 errAv += 1 . / (fHist ->GetBinError (fBinsBaseline [i]) * fHist ->GetBinError (fBinsBaseline [i]));
733733 }
734- Av /= errAv;
734+ av /= errAv;
735735 errAv = TMath::Sqrt (1 . / errAv);
736- printf (" [RESULT] Average fBaseline: %.3f +- %.3f \n " , Av , errAv);
737- fBaseline = Av ;
736+ printf (" [RESULT] Average fBaseline: %.3f +- %.3f \n " , av , errAv);
737+ fBaseline = av ;
738738 fErrBaseline = errAv;
739739
740740 if (fShiftBaselineUp ) {
@@ -751,8 +751,8 @@ Double_t DhCorrelationFitter::FindBaseline()
751751 }
752752
753753 if (fFixBase == 4 ) {
754- fBaseline = CalculateBaseline (fHist , fIsTotal ); // TODO: add the option for total range/ reflected range to pass in input
755- fErrBaseline = CalculateBaselineError (fHist , fIsTotal );
754+ fBaseline = calculateBaseline (fHist , fIsTotal ); // TODO: add the option for total range/ reflected range to pass in input
755+ fErrBaseline = calculateBaselineError (fHist , fIsTotal );
756756
757757 if (fShiftBaselineUp ) {
758758 fBaseline += fErrBaseline ;
@@ -771,7 +771,7 @@ Double_t DhCorrelationFitter::FindBaseline()
771771 return -1 .;
772772}
773773
774- void DhCorrelationFitter::FitBaselineWv2 ()
774+ void DhCorrelationFitter::fitBaselineWv2 ()
775775{
776776
777777 fBaseTransvReg = new TF1 (" fBaseTransvReg" , [](double * x, double * p) {
@@ -791,14 +791,14 @@ void DhCorrelationFitter::FitBaselineWv2()
791791 return ;
792792}
793793
794- void DhCorrelationFitter::CalculateYieldsAboveBaseline ()
794+ void DhCorrelationFitter::calculateYieldsAboveBaseline ()
795795{
796796
797797 fNSyieldBinCount = 0 ;
798798 fErrNSyieldBinCount = 0 ;
799799 fASyieldBinCount = 0 ;
800800 fErrASyieldBinCount = 0 ;
801- cout << " [RESULT] Baseline: " << fBaseline << " +- " << fErrBaseline << endl;
801+ std:: cout << " [RESULT] Baseline: " << fBaseline << " +- " << fErrBaseline << std:: endl;
802802 Int_t binMinNS = fHist ->FindBin (-1.5 ); // slightly more than -pi/2
803803 if (binMinNS < 1 )
804804 binMinNS = 1 ; // with this, it is ok even in the case of a reflected fHist (range 0 - pi)
@@ -807,11 +807,11 @@ void DhCorrelationFitter::CalculateYieldsAboveBaseline()
807807 Int_t binMaxAS = 16 ; // fHist -> FindBin(3.14+1.5); // slightly less than +3pi/2
808808 if (binMaxAS > fHist ->GetNbinsX ())
809809 binMaxAS = fHist ->GetNbinsX (); // with this, it is ok even in the case of a reflected fHist (range 0 - pi)
810- cout << " N bins : " << fHist ->GetNbinsX () << endl;
811- cout << " binMinNS : " << binMinNS << endl;
812- cout << " binMaxNS : " << binMaxNS << endl;
813- cout << " binMinAS : " << binMinAS << endl;
814- cout << " binMaxAS : " << binMaxAS << endl;
810+ std:: cout << " N bins : " << fHist ->GetNbinsX () << std:: endl;
811+ std:: cout << " binMinNS : " << binMinNS << std:: endl;
812+ std:: cout << " binMaxNS : " << binMaxNS << std:: endl;
813+ std:: cout << " binMinAS : " << binMinAS << std:: endl;
814+ std:: cout << " binMaxAS : " << binMaxAS << std:: endl;
815815 // Near Side Yield from bin counting
816816 for (Int_t bmNS = binMinNS; bmNS <= binMaxNS; bmNS++) {
817817 fNSyieldBinCount += 2 * (fHist ->GetBinContent (bmNS) - fBaseline ) * fHist ->GetBinWidth (bmNS);
@@ -831,7 +831,7 @@ void DhCorrelationFitter::CalculateYieldsAboveBaseline()
831831 return ;
832832}
833833
834- Double_t DhCorrelationFitter::CalculateBaseline (TH1F*& histo, Bool_t totalRange)
834+ Double_t DhCorrelationFitter::calculateBaseline (TH1F*& histo, Bool_t totalRange)
835835{
836836
837837 // total range = 2*Pi
@@ -904,7 +904,7 @@ Double_t DhCorrelationFitter::CalculateBaseline(TH1F*& histo, Bool_t totalRange)
904904 return baseline;
905905}
906906
907- Double_t DhCorrelationFitter::CalculateBaselineError (TH1F*& histo, Bool_t totalRange)
907+ Double_t DhCorrelationFitter::calculateBaselineError (TH1F*& histo, Bool_t totalRange)
908908{
909909
910910 // total range = 2*Pi
@@ -954,7 +954,7 @@ Double_t DhCorrelationFitter::CalculateBaselineError(TH1F*& histo, Bool_t totalR
954954 return errBaseline;
955955}
956956
957- void DhCorrelationFitter::SetSingleTermsForDrawing (Bool_t draw)
957+ void DhCorrelationFitter::setSingleTermsForDrawing (Bool_t draw)
958958{
959959 Double_t* par = 0 ;
960960 if (fTypeOfFitFunc == 1 || fTypeOfFitFunc == 2 || fTypeOfFitFunc == 5 ) {
0 commit comments