Skip to content

Commit a789d04

Browse files
committed
1 parent 71e61ee commit a789d04

File tree

3 files changed

+2
-12
lines changed

3 files changed

+2
-12
lines changed

OnlineDB/CSCCondDB/src/CSCFitAFEBThr.cc

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
#include "Minuit2/VariableMetricMinimizer.h"
21
#include "Minuit2/FunctionMinimum.h"
2+
#include "Minuit2/MnStrategy.h"
33

44
#include <OnlineDB/CSCCondDB/interface/CSCFitAFEBThr.h>
55
#include <OnlineDB/CSCCondDB/interface/CSCThrTurnOnFcn.h>
@@ -132,7 +132,7 @@ bool CSCFitAFEBThr::ThresholdNoise(const std::vector<float>& inputx,
132132
/// Fit as 1D, <=500 iterations, edm=10**-5 (->0.1)
133133
#if ROOT_VERSION_CODE >= ROOT_VERSION(6, 33, 1)
134134
FunctionMinimum fmin =
135-
theFitter->Minimize(*theOBJfun, std::span<double>(parinit), std::span<double>(erparinit), 1, 500, 0.1);
135+
theFitter->Minimize(*theOBJfun, {std::span<double>(parinit), std::span<double>(erparinit)}, MnStrategy{1}, 500, 0.1);
136136
#else
137137
FunctionMinimum fmin = theFitter->Minimize(*theOBJfun, parinit, erparinit, 1, 500, 0.1);
138138
#endif

RecoVertex/BeamSpotProducer/interface/BSFitter.h

-2
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ ________________________________________________________________**/
2020
// ROOT
2121
#include "TMatrixD.h"
2222
#include "TMath.h"
23-
#include "Minuit2/VariableMetricMinimizer.h"
2423
#include "TH1F.h"
2524

2625
// C++ standard
@@ -87,7 +86,6 @@ class BSFitter {
8786
TH1F *GetVzHisto() { return h1z; }
8887

8988
private:
90-
ROOT::Minuit2::ModularFunctionMinimizer *theFitter;
9189
//BSzFcn* theGausszFcn;
9290
BSpdfsFcn *thePDF;
9391

RecoVertex/BeamSpotProducer/src/BSFitter.cc

-8
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010
1111
________________________________________________________________**/
1212

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

73-
//}
74-
//if (theFitter == 0 ) {
75-
76-
theFitter = new VariableMetricMinimizer();
77-
7872
//}
7973

8074
fapplyd0cut = false;
@@ -95,7 +89,6 @@ BSFitter::BSFitter(const std::vector<BSTrkParameters> &BSvector) {
9589
BSFitter::~BSFitter() {
9690
//delete fBSvector;
9791
delete thePDF;
98-
delete theFitter;
9992
}
10093

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

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

0 commit comments

Comments
 (0)