Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
iarspider committed Oct 2, 2024
1 parent 71e61ee commit a789d04
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 12 deletions.
4 changes: 2 additions & 2 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 @@ -132,7 +132,7 @@ 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);
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

0 comments on commit a789d04

Please sign in to comment.