diff --git a/MuonAnalysis/MomentumScaleCalibration/test/Macros/RooFit/FitWithRooFit.cc b/MuonAnalysis/MomentumScaleCalibration/test/Macros/RooFit/FitWithRooFit.cc index 0fb08f68db668..9c69609391ccc 100644 --- a/MuonAnalysis/MomentumScaleCalibration/test/Macros/RooFit/FitWithRooFit.cc +++ b/MuonAnalysis/MomentumScaleCalibration/test/Macros/RooFit/FitWithRooFit.cc @@ -23,7 +23,7 @@ #include "RooPolynomial.h" #include "RooCBShape.h" #include "RooChi2Var.h" -#include "RooFitLegacy/RooMinuit.h" +#include "RooMinimizer.h" #include "RooBreitWigner.h" #include "RooFFTConvPdf.h" @@ -126,7 +126,7 @@ class FitWithRooFit { // Fit with chi^2 else { std::cout << "FITTING WITH CHI^2" << std::endl; - RooMinuit m(chi2); + RooMinimizer m(chi2); m.migrad(); m.hesse(); // RooFitResult* r_chi2_wgt = m.save(); diff --git a/PhysicsTools/TagAndProbe/src/TagProbeFitter.cc b/PhysicsTools/TagAndProbe/src/TagProbeFitter.cc index 8ff7699d3711e..48dd4181081df 100644 --- a/PhysicsTools/TagAndProbe/src/TagProbeFitter.cc +++ b/PhysicsTools/TagAndProbe/src/TagProbeFitter.cc @@ -33,7 +33,6 @@ #include "RooLinkedListIter.h" #include "RooMappedCategory.h" #include "RooMinimizer.h" -#include "RooFitLegacy/RooMinuit.h" #include "RooMsgService.h" #include "RooMultiCategory.h" #include "RooNLLVar.h" @@ -584,9 +583,8 @@ void TagProbeFitter::doFitEfficiency(RooWorkspace* w, string pdfName, RooRealVar RooAbsReal* simNLL = w->pdf("simPdf")->createNLL(*data, Extended(true), NumCPU(numCPU)); RooMinimizer minimizer(*simNLL); // we are going to use this for 'scan' - RooMinuit minuit(*simNLL); - minuit.setStrategy(1); - minuit.setProfile(true); + minimizer.setStrategy(1); + minimizer.setProfile(true); RooProfileLL profileLL("simPdfNLL", "", *simNLL, *w->var("efficiency")); //******* The block of code below is to make the fit converge faster. @@ -618,8 +616,8 @@ void TagProbeFitter::doFitEfficiency(RooWorkspace* w, string pdfName, RooRealVar varFixer(w, true); //do fit minimizer.minimize("Minuit2", "Scan"); - minuit.migrad(); - minuit.hesse(); + minimizer.migrad(); + minimizer.hesse(); //minuit.minos(); //w->pdf("simPdf")->fitTo(*data, Save(true), Extended(true), NumCPU(numCPU), Strategy(2), //PrintLevel(quiet?-1:1), PrintEvalErrors(quiet?-1:1), Warnings(!quiet)); @@ -627,8 +625,8 @@ void TagProbeFitter::doFitEfficiency(RooWorkspace* w, string pdfName, RooRealVar varFixer(w, false); //do fit minimizer.minimize("Minuit2", "Scan"); - minuit.migrad(); - minuit.hesse(); + minimizer.migrad(); + minimizer.hesse(); //minuit.minos(); //w->pdf("simPdf")->fitTo(*data, Save(true), Extended(true), NumCPU(numCPU), Strategy(2), //PrintLevel(quiet?-1:1), PrintEvalErrors(quiet?-1:1), Warnings(!quiet)); @@ -643,8 +641,8 @@ void TagProbeFitter::doFitEfficiency(RooWorkspace* w, string pdfName, RooRealVar //do fit minimizer.minimize("Minuit2", "Scan"); - minuit.migrad(); - minuit.hesse(); + minimizer.migrad(); + minimizer.hesse(); // initialize the profile likelihood profileLL.getVal(); RooMinimizer* profMinuit = profileLL.minimizer(); @@ -665,8 +663,8 @@ void TagProbeFitter::doFitEfficiency(RooWorkspace* w, string pdfName, RooRealVar //do fit minimizer.minimize("Minuit2", "Scan"); - minuit.migrad(); - minuit.hesse(); + minimizer.migrad(); + minimizer.hesse(); res.reset(w->pdf("simPdf")->fitTo(*data, Save(true), Extended(true), diff --git a/PhysicsTools/TagAndProbe/test/utilities/ElectronTagAndProbeFitter.C b/PhysicsTools/TagAndProbe/test/utilities/ElectronTagAndProbeFitter.C index 423ee678a12d4..cbe5531c09dd9 100644 --- a/PhysicsTools/TagAndProbe/test/utilities/ElectronTagAndProbeFitter.C +++ b/PhysicsTools/TagAndProbe/test/utilities/ElectronTagAndProbeFitter.C @@ -27,7 +27,6 @@ #include "RooGaussian.h" #include "RooNLLVar.h" #include "RooConstVar.h" -#include "RooFitLegacy/RooMinuit.h" #include "RooFitResult.h" #include "RooExponential.h" #include "RooFFTConvPdf.h" diff --git a/PhysicsTools/TagAndProbe/test/utilities/ZeeBkgFit.C b/PhysicsTools/TagAndProbe/test/utilities/ZeeBkgFit.C index 0004022245b7b..b2bcd5feac33d 100644 --- a/PhysicsTools/TagAndProbe/test/utilities/ZeeBkgFit.C +++ b/PhysicsTools/TagAndProbe/test/utilities/ZeeBkgFit.C @@ -25,7 +25,6 @@ #include "RooGaussian.h" #include "RooNLLVar.h" #include "RooConstVar.h" -#include "RooFitLegacy/RooMinuit.h" #include "RooFitResult.h" #include "RooExponential.h" #include "RooFFTConvPdf.h" diff --git a/PhysicsTools/TagAndProbe/test/utilities/fitZCat.C b/PhysicsTools/TagAndProbe/test/utilities/fitZCat.C index c9c4e94d6dc78..43f74065d90f3 100644 --- a/PhysicsTools/TagAndProbe/test/utilities/fitZCat.C +++ b/PhysicsTools/TagAndProbe/test/utilities/fitZCat.C @@ -25,7 +25,6 @@ #include "RooGaussian.h" #include "RooNLLVar.h" #include "RooConstVar.h" -#include "RooFitLegacy/RooMinuit.h" #include "RooFitResult.h" #include "RooExponential.h"