Skip to content

Fixes after root-project/root#16443 #46195

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Oct 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions OnlineDB/CSCCondDB/src/CSCFitAFEBThr.cc
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#include "Minuit2/VariableMetricMinimizer.h"
#include "Minuit2/FunctionMinimum.h"
#include "Minuit2/MnStrategy.h"

#include <OnlineDB/CSCCondDB/interface/CSCFitAFEBThr.h>
#include <OnlineDB/CSCCondDB/interface/CSCThrTurnOnFcn.h>
Expand Down Expand Up @@ -131,8 +131,8 @@ bool CSCFitAFEBThr::ThresholdNoise(const std::vector<float>& inputx,

/// Fit as 1D, <=500 iterations, edm=10**-5 (->0.1)
#if ROOT_VERSION_CODE >= ROOT_VERSION(6, 33, 1)
FunctionMinimum fmin =
theFitter->Minimize(*theOBJfun, std::span<double>(parinit), std::span<double>(erparinit), 1, 500, 0.1);
FunctionMinimum fmin = theFitter->Minimize(
*theOBJfun, {std::span<double>(parinit), std::span<double>(erparinit)}, MnStrategy{1}, 500, 0.1);
#else
FunctionMinimum fmin = theFitter->Minimize(*theOBJfun, parinit, erparinit, 1, 500, 0.1);
#endif
Expand Down
2 changes: 0 additions & 2 deletions RecoVertex/BeamSpotProducer/interface/BSFitter.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ ________________________________________________________________**/
// ROOT
#include "TMatrixD.h"
#include "TMath.h"
#include "Minuit2/VariableMetricMinimizer.h"
#include "TH1F.h"

// C++ standard
Expand Down Expand Up @@ -87,7 +86,6 @@ class BSFitter {
TH1F *GetVzHisto() { return h1z; }

private:
ROOT::Minuit2::ModularFunctionMinimizer *theFitter;
//BSzFcn* theGausszFcn;
BSpdfsFcn *thePDF;

Expand Down
8 changes: 0 additions & 8 deletions RecoVertex/BeamSpotProducer/src/BSFitter.cc
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@

________________________________________________________________**/

#include "Minuit2/VariableMetricMinimizer.h"
#include "Minuit2/FunctionMinimum.h"
#include "Minuit2/MnPrint.h"
#include "Minuit2/MnMigrad.h"
Expand Down Expand Up @@ -70,11 +69,6 @@ BSFitter::BSFitter(const std::vector<BSTrkParameters> &BSvector) {
//if (theGausszFcn == 0 ) {
thePDF = new BSpdfsFcn();

//}
//if (theFitter == 0 ) {

theFitter = new VariableMetricMinimizer();

//}

fapplyd0cut = false;
Expand All @@ -95,7 +89,6 @@ BSFitter::BSFitter(const std::vector<BSTrkParameters> &BSvector) {
BSFitter::~BSFitter() {
//delete fBSvector;
delete thePDF;
delete theFitter;
}

//______________________________________________________________________
Expand Down Expand Up @@ -271,7 +264,6 @@ reco::BeamSpot BSFitter::Fit_z_likelihood(double *inipar) {
thePDF->SetData(fBSvector);
//std::cout << "data loaded"<< std::endl;

//FunctionMinimum fmin = theFitter->Minimize(*theGausszFcn, par, err, 1, 500, 0.1);
MnUserParameters upar;
upar.Add("X0", 0., 0.);
upar.Add("Y0", 0., 0.);
Expand Down