@@ -334,7 +334,7 @@ void HFInvMassFitter::doFit()
334334 }
335335 mTotalPdf ->plotOn (mInvMassFrame , Name (" Tot_c" ));
336336 mReflPdf = new RooAddPdf (" mReflPdf" , " reflection fit function" , RooArgList (*reflPdf), RooArgList (*mRooNRefl ));
337- RooAddPdf reflBkgPdf (" reflBkgPdf" , " reflBkgPdf" , RooArgList (*bkgPdf, *reflPdf), RooArgList (*mRooNBkg , *mRooNRefl ));
337+ RooAddPdf const reflBkgPdf (" reflBkgPdf" , " reflBkgPdf" , RooArgList (*bkgPdf, *reflPdf), RooArgList (*mRooNBkg , *mRooNRefl ));
338338 reflBkgPdf.plotOn (mInvMassFrame , Normalization (1.0 , RooAbsReal::RelativeExpected), LineStyle (7 ), LineColor (kRed + 1 ), Name (" ReflBkg_c" ));
339339 plotBkg (mTotalPdf ); // plot bkg pdf in total pdf
340340 plotRefl (mTotalPdf ); // plot reflection in total pdf
@@ -385,30 +385,30 @@ void HFInvMassFitter::fillWorkspace(RooWorkspace& workspace) const
385385 workspace.import (*bkgFuncExpo);
386386 delete bkgFuncExpo;
387387 // bkg poly1
388- RooRealVar polyParam0 (" polyParam0" , " Parameter of Poly function" , 0.5 , -5 ., 5 .);
389- RooRealVar polyParam1 (" polyParam1" , " Parameter of Poly function" , 0.2 , -5 ., 5 .);
388+ RooRealVar const polyParam0 (" polyParam0" , " Parameter of Poly function" , 0.5 , -5 ., 5 .);
389+ RooRealVar const polyParam1 (" polyParam1" , " Parameter of Poly function" , 0.2 , -5 ., 5 .);
390390 RooAbsPdf* bkgFuncPoly1 = new RooPolynomial (" bkgFuncPoly1" , " background fit function" , mass, RooArgSet (polyParam0, polyParam1));
391391 workspace.import (*bkgFuncPoly1);
392392 delete bkgFuncPoly1;
393393 // bkg poly2
394- RooRealVar polyParam2 (" polyParam2" , " Parameter of Poly function" , 0.2 , -5 ., 5 .);
394+ RooRealVar const polyParam2 (" polyParam2" , " Parameter of Poly function" , 0.2 , -5 ., 5 .);
395395 RooAbsPdf* bkgFuncPoly2 = new RooPolynomial (" bkgFuncPoly2" , " background fit function" , mass, RooArgSet (polyParam0, polyParam1, polyParam2));
396396 workspace.import (*bkgFuncPoly2);
397397 delete bkgFuncPoly2;
398398 // bkg poly3
399- RooRealVar polyParam3 (" polyParam3" , " Parameter of Poly function" , 0.2 , -1 ., 1 .);
399+ RooRealVar const polyParam3 (" polyParam3" , " Parameter of Poly function" , 0.2 , -1 ., 1 .);
400400 RooAbsPdf* bkgFuncPoly3 = new RooPolynomial (" bkgFuncPoly3" , " background pdf" , mass, RooArgSet (polyParam0, polyParam1, polyParam2, polyParam3));
401401 workspace.import (*bkgFuncPoly3);
402402 delete bkgFuncPoly3;
403403 // bkg power law
404- RooRealVar powParam1 (" powParam1" , " Parameter of Pow function" , TDatabasePDG::Instance ()->GetParticle (" pi+" )->Mass ());
405- RooRealVar powParam2 (" powParam2" , " Parameter of Pow function" , 1 ., -10 , 10 );
404+ RooRealVar const powParam1 (" powParam1" , " Parameter of Pow function" , TDatabasePDG::Instance ()->GetParticle (" pi+" )->Mass ());
405+ RooRealVar const powParam2 (" powParam2" , " Parameter of Pow function" , 1 ., -10 , 10 );
406406 RooAbsPdf* bkgFuncPow = new RooGenericPdf (" bkgFuncPow" , " bkgFuncPow" , " (mass-powParam1)^powParam2" , RooArgSet (mass, powParam1, powParam2));
407407 workspace.import (*bkgFuncPow);
408408 delete bkgFuncPow;
409409 // pow * exp
410- RooRealVar powExpoParam1 (" powExpoParam1" , " Parameter of PowExpo function" , 1 . / 2 .);
411- RooRealVar powExpoParam2 (" powExpoParam2" , " Parameter of PowExpo function" , 1 , -10 , 10 );
410+ RooRealVar const powExpoParam1 (" powExpoParam1" , " Parameter of PowExpo function" , 1 . / 2 .);
411+ RooRealVar const powExpoParam2 (" powExpoParam2" , " Parameter of PowExpo function" , 1 , -10 , 10 );
412412 RooRealVar massPi (" massPi" , " mass of pion" , TDatabasePDG::Instance ()->GetParticle (" pi+" )->Mass ());
413413 RooFormulaVar powExpoParam3 (" powExpoParam3" , " powExpoParam1 + 1" , RooArgList (powExpoParam1));
414414 RooFormulaVar powExpoParam4 (" powExpoParam4" , " 1./powExpoParam2" , RooArgList (powExpoParam2));
@@ -453,8 +453,8 @@ void HFInvMassFitter::fillWorkspace(RooWorkspace& workspace) const
453453 sigmaDoubleGaus.setVal (mSigmaSgnDoubleGaus );
454454 sigmaDoubleGaus.setConstant (kTRUE );
455455 }
456- RooGaussian gaus1 (" gaus1" , " gaus1" , mass, mean, sigma);
457- RooGaussian gaus2 (" gaus2" , " gaus2" , mass, mean, sigmaDoubleGaus);
456+ RooGaussian const gaus1 (" gaus1" , " gaus1" , mass, mean, sigma);
457+ RooGaussian const gaus2 (" gaus2" , " gaus2" , mass, mean, sigmaDoubleGaus);
458458 RooRealVar fracDoubleGaus (" fracDoubleGaus" , " frac of two gauss" , mFracDoubleGaus , 0 , 1 .);
459459 if (mFixedFracDoubleGaus ) {
460460 fracDoubleGaus.setVal (mFracDoubleGaus );
@@ -478,8 +478,8 @@ void HFInvMassFitter::fillWorkspace(RooWorkspace& workspace) const
478478 sigma.setMin (mSigmaSgn * (1 - mParamSgn ));
479479 }
480480 RooRealVar sigmaDoubleGausRatio (" sigmaDoubleGausRatio" , " sigmaDoubleGausRatio" , sigma.getVal () * ratio.getVal ());
481- RooGaussian gausRatio1 (" gausRatio1" , " gausratio1" , mass, mean, sigma);
482- RooGaussian gausRatio2 (" gausRatio2" , " gausratio2" , mass, mean, sigmaDoubleGausRatio);
481+ RooGaussian const gausRatio1 (" gausRatio1" , " gausratio1" , mass, mean, sigma);
482+ RooGaussian const gausRatio2 (" gausRatio2" , " gausratio2" , mass, mean, sigmaDoubleGausRatio);
483483 RooRealVar fracDoubleGausRatio (" fracDoubleGausRatio" , " fraction of two gauss ratio" , 0.5 , 0 , 1 .);
484484 if (mFixedFracDoubleGaus ) {
485485 fracDoubleGausRatio.setVal (mFracDoubleGaus );
@@ -507,9 +507,9 @@ void HFInvMassFitter::fillWorkspace(RooWorkspace& workspace) const
507507 sigmaSec.setMax (mSecSigma * (1 + mParamSgn ));
508508 sigmaSec.setMin (mSecSigma * (1 - mParamSgn ));
509509 }
510- RooGaussian gausSec1 (" gausSec1" , " gausSec1" , mass, mean, sigmaSec);
511- RooGaussian gausSec2 (" gausSec2" , " gausSec2" , mass, meanSec, sigmaSec);
512- RooRealVar fracSec (" fracSec" , " frac of two peak" , 0.5 , 0 , 1 .);
510+ RooGaussian const gausSec1 (" gausSec1" , " gausSec1" , mass, mean, sigmaSec);
511+ RooGaussian const gausSec2 (" gausSec2" , " gausSec2" , mass, meanSec, sigmaSec);
512+ RooRealVar const fracSec (" fracSec" , " frac of two peak" , 0.5 , 0 , 1 .);
513513 RooAbsPdf* sgnFuncDoublePeak = new RooAddPdf (" sgnFuncDoublePeak" , " signal pdf" , RooArgList (gausSec1, gausSec2), fracSec);
514514 workspace.import (*sgnFuncDoublePeak);
515515 delete sgnFuncDoublePeak;
@@ -530,24 +530,24 @@ void HFInvMassFitter::fillWorkspace(RooWorkspace& workspace) const
530530 meanReflDoubleGaus.setMin (mMassReflLowLimit );
531531 }
532532 RooRealVar sigmaReflDoubleGaus (" sigmaReflDoubleGaus" , " sigmaReflDoubleGaus" , 0.012 , 0.0 , 0.25 );
533- RooGaussian gausRefl1 (" gausRefl1" , " gausRefl1" , mass, meanRefl, sigmaRefl);
534- RooGaussian gausRefl2 (" gausRefl2" , " gausRefl2" , mass, meanReflDoubleGaus, sigmaReflDoubleGaus);
535- RooRealVar fracRefl (" fracRefl" , " frac of two gauss" , 0.5 , 0 , 1 .);
533+ RooGaussian const gausRefl1 (" gausRefl1" , " gausRefl1" , mass, meanRefl, sigmaRefl);
534+ RooGaussian const gausRefl2 (" gausRefl2" , " gausRefl2" , mass, meanReflDoubleGaus, sigmaReflDoubleGaus);
535+ RooRealVar const fracRefl (" fracRefl" , " frac of two gauss" , 0.5 , 0 , 1 .);
536536 RooAbsPdf* reflFuncDoubleGaus = new RooAddPdf (" reflFuncDoubleGaus" , " reflection pdf" , RooArgList (gausRefl1, gausRefl2), fracRefl);
537537 workspace.import (*reflFuncDoubleGaus);
538538 delete reflFuncDoubleGaus;
539539 // reflection poly3
540- RooRealVar polyReflParam0 (" polyReflParam0" , " polyReflParam0" , 0.5 , -1 ., 1 .);
541- RooRealVar polyReflParam1 (" polyReflParam1" , " polyReflParam1" , 0.2 , -1 ., 1 .);
542- RooRealVar polyReflParam2 (" polyReflParam2" , " polyReflParam2" , 0.2 , -1 ., 1 .);
543- RooRealVar polyReflParam3 (" polyReflParam3" , " polyReflParam3" , 0.2 , -1 ., 1 .);
540+ RooRealVar const polyReflParam0 (" polyReflParam0" , " polyReflParam0" , 0.5 , -1 ., 1 .);
541+ RooRealVar const polyReflParam1 (" polyReflParam1" , " polyReflParam1" , 0.2 , -1 ., 1 .);
542+ RooRealVar const polyReflParam2 (" polyReflParam2" , " polyReflParam2" , 0.2 , -1 ., 1 .);
543+ RooRealVar const polyReflParam3 (" polyReflParam3" , " polyReflParam3" , 0.2 , -1 ., 1 .);
544544 RooAbsPdf* reflFuncPoly3 = new RooPolynomial (" reflFuncPoly3" , " reflection PDF" , mass, RooArgSet (polyReflParam0, polyReflParam1, polyReflParam2, polyReflParam3));
545545 workspace.import (*reflFuncPoly3);
546546 delete reflFuncPoly3;
547547 // reflection poly6
548- RooRealVar polyReflParam4 (" polyReflParam4" , " polyReflParam4" , 0.2 , -1 ., 1 .);
549- RooRealVar polyReflParam5 (" polyReflParam5" , " polyReflParam5" , 0.2 , -1 ., 1 .);
550- RooRealVar polyReflParam6 (" polyReflParam6" , " polyReflParam6" , 0.2 , -1 ., 1 .);
548+ RooRealVar const polyReflParam4 (" polyReflParam4" , " polyReflParam4" , 0.2 , -1 ., 1 .);
549+ RooRealVar const polyReflParam5 (" polyReflParam5" , " polyReflParam5" , 0.2 , -1 ., 1 .);
550+ RooRealVar const polyReflParam6 (" polyReflParam6" , " polyReflParam6" , 0.2 , -1 ., 1 .);
551551 RooAbsPdf* reflFuncPoly6 = new RooPolynomial (" reflFuncPoly6" , " reflection pdf" , mass, RooArgSet (polyReflParam0, polyReflParam1, polyReflParam2, polyReflParam3, polyReflParam4, polyReflParam5, polyReflParam6));
552552 workspace.import (*reflFuncPoly6);
553553 delete reflFuncPoly6;
@@ -643,8 +643,8 @@ void HFInvMassFitter::highlightPeakRegion(const RooPlot* plot, Color_t color, Wi
643643 if (!mHighlightPeakRegion ) {
644644 return ;
645645 }
646- double yMin = plot->GetMinimum ();
647- double yMax = plot->GetMaximum ();
646+ double const yMin = plot->GetMinimum ();
647+ double const yMax = plot->GetMaximum ();
648648 const Double_t mean = mRooMeanSgn ->getVal ();
649649 const Double_t sigma = mRooSigmaSgn ->getVal ();
650650 const Double_t minForSgn = mean - mNSigmaForSidebands * sigma;
@@ -716,20 +716,20 @@ void HFInvMassFitter::calculateSignificance(Double_t& significance, Double_t& er
716716 calculateSignal (signal, errSignal);
717717 Double_t bkg, errBkg;
718718 calculateBackground (bkg, errBkg);
719- Double_t sgnErrSquare = errSignal * errSignal;
720- Double_t bkgErrSquare = errBkg * errBkg;
721- Double_t totalSgnBkg = signal + bkg;
719+ Double_t const sgnErrSquare = errSignal * errSignal;
720+ Double_t const bkgErrSquare = errBkg * errBkg;
721+ Double_t const totalSgnBkg = signal + bkg;
722722 significance = signal / std::sqrt (signal + bkg);
723723 errSignificance = significance * std::sqrt ((sgnErrSquare + bkgErrSquare) / (mNSigmaForSidebands * totalSgnBkg * totalSgnBkg) + (bkg / totalSgnBkg) * (sgnErrSquare / signal / signal));
724724}
725725
726726// estimate Signal
727727void HFInvMassFitter::checkForSignal (Double_t& estimatedSignal)
728728{
729- Double_t minForSgn = mMass - 4 * mSigmaSgn ;
730- Double_t maxForSgn = mMass + 4 * mSigmaSgn ;
731- Int_t binForMinSgn = mHistoInvMass ->FindBin (minForSgn);
732- Int_t binForMaxSgn = mHistoInvMass ->FindBin (maxForSgn);
729+ Double_t const minForSgn = mMass - 4 * mSigmaSgn ;
730+ Double_t const maxForSgn = mMass + 4 * mSigmaSgn ;
731+ Int_t const binForMinSgn = mHistoInvMass ->FindBin (minForSgn);
732+ Int_t const binForMaxSgn = mHistoInvMass ->FindBin (maxForSgn);
733733
734734 Double_t sum = 0 ;
735735 for (Int_t i = binForMinSgn; i <= binForMaxSgn; i++) {
0 commit comments