From 866ea0dad807f1acf98acdb626fadced4d7e452c Mon Sep 17 00:00:00 2001 From: Jonas Rembser Date: Fri, 20 Sep 2024 20:15:02 +0200 Subject: [PATCH] Revert "Update classes inheriting from ROOT::Minuit2::FCNBase to account for changes in ROOT master" This reverts commit 4b5e99dfba2c486de69ebb2c39ac4aa6bc041dd7. --- .../CSCCondDB/interface/CSCThrTurnOnFcn.h | 8 -------- OnlineDB/CSCCondDB/src/CSCFitAFEBThr.cc | 6 +----- OnlineDB/CSCCondDB/src/CSCThrTurnOnFcn.cc | 4 ---- .../BeamSpotProducer/interface/BSpdfsFcn.h | 15 -------------- .../interface/FcnBeamSpotFitPV.h | 6 ------ RecoVertex/BeamSpotProducer/src/BSpdfsFcn.cc | 20 ------------------- .../BeamSpotProducer/src/FcnBeamSpotFitPV.cc | 4 ---- 7 files changed, 1 insertion(+), 62 deletions(-) diff --git a/OnlineDB/CSCCondDB/interface/CSCThrTurnOnFcn.h b/OnlineDB/CSCCondDB/interface/CSCThrTurnOnFcn.h index 340543eff74b0..a114a62208369 100644 --- a/OnlineDB/CSCCondDB/interface/CSCThrTurnOnFcn.h +++ b/OnlineDB/CSCCondDB/interface/CSCThrTurnOnFcn.h @@ -11,10 +11,6 @@ #include "Minuit2/FCNBase.h" #include -#include -#if ROOT_VERSION_CODE >= ROOT_VERSION(6, 33, 1) -#include -#endif class CSCThrTurnOnFcn : public ROOT::Minuit2::FCNBase { private: @@ -43,11 +39,7 @@ class CSCThrTurnOnFcn : public ROOT::Minuit2::FCNBase { void setNorm(float n) { norm = n; }; /// Provide the chi-squared function for the given data -#if ROOT_VERSION_CODE >= ROOT_VERSION(6, 33, 1) - double operator()(std::span) const override; -#else double operator()(const std::vector&) const override; -#endif ///@@ What? double Up() const override { return 1.; } diff --git a/OnlineDB/CSCCondDB/src/CSCFitAFEBThr.cc b/OnlineDB/CSCCondDB/src/CSCFitAFEBThr.cc index b3d188f27a5f5..e71f97e64008a 100644 --- a/OnlineDB/CSCCondDB/src/CSCFitAFEBThr.cc +++ b/OnlineDB/CSCCondDB/src/CSCFitAFEBThr.cc @@ -130,12 +130,8 @@ bool CSCFitAFEBThr::ThresholdNoise(const std::vector& inputx, // <<" "<0.1) -#if ROOT_VERSION_CODE >= ROOT_VERSION(6, 33, 1) - FunctionMinimum fmin = - theFitter->Minimize(*theOBJfun, std::span(parinit), std::span(erparinit), 1, 500, 0.1); -#else FunctionMinimum fmin = theFitter->Minimize(*theOBJfun, parinit, erparinit, 1, 500, 0.1); -#endif + status = fmin.IsValid(); if (status) { diff --git a/OnlineDB/CSCCondDB/src/CSCThrTurnOnFcn.cc b/OnlineDB/CSCCondDB/src/CSCThrTurnOnFcn.cc index 721f3a0a7b80b..ae8d5b94d15c9 100644 --- a/OnlineDB/CSCCondDB/src/CSCThrTurnOnFcn.cc +++ b/OnlineDB/CSCCondDB/src/CSCThrTurnOnFcn.cc @@ -5,11 +5,7 @@ #include #include "TMath.h" -#if ROOT_VERSION_CODE >= ROOT_VERSION(6, 33, 1) -double CSCThrTurnOnFcn::operator()(std::span par) const { -#else double CSCThrTurnOnFcn::operator()(const std::vector& par) const { -#endif double x, y, er, fn; double N = norm; double chi2 = 0.; diff --git a/RecoVertex/BeamSpotProducer/interface/BSpdfsFcn.h b/RecoVertex/BeamSpotProducer/interface/BSpdfsFcn.h index ca33384094dd5..6e431e29080e2 100644 --- a/RecoVertex/BeamSpotProducer/interface/BSpdfsFcn.h +++ b/RecoVertex/BeamSpotProducer/interface/BSpdfsFcn.h @@ -18,10 +18,6 @@ ________________________________________________________________**/ #include #include -#include -#if ROOT_VERSION_CODE >= ROOT_VERSION(6, 32, 4) -#include -#endif class BSpdfsFcn : public ROOT::Minuit2::FCNBase { public: @@ -30,25 +26,14 @@ class BSpdfsFcn : public ROOT::Minuit2::FCNBase { // define pdfs to use void SetPDFs(std::string usepdfs) { fusepdfs = usepdfs; } -#if ROOT_VERSION_CODE >= ROOT_VERSION(6, 33, 1) - double operator()(std::span) const override; -#else double operator()(const std::vector&) const override; -#endif double Up() const override { return 1.; } private: -#if ROOT_VERSION_CODE >= ROOT_VERSION(6, 33, 1) - double PDFGauss_d(double z, double d, double sigmad, double phi, std::span parms) const; - double PDFGauss_d_resolution(double z, double d, double phi, double pt, std::span parms) const; - - double PDFGauss_z(double z, double sigmaz, std::span parms) const; -#else double PDFGauss_d(double z, double d, double sigmad, double phi, const std::vector& parms) const; double PDFGauss_d_resolution(double z, double d, double phi, double pt, const std::vector& parms) const; double PDFGauss_z(double z, double sigmaz, const std::vector& parms) const; -#endif std::string fusepdfs; std::vector fBSvector; diff --git a/RecoVertex/BeamSpotProducer/interface/FcnBeamSpotFitPV.h b/RecoVertex/BeamSpotProducer/interface/FcnBeamSpotFitPV.h index e39584257832d..bb38fa870f368 100644 --- a/RecoVertex/BeamSpotProducer/interface/FcnBeamSpotFitPV.h +++ b/RecoVertex/BeamSpotProducer/interface/FcnBeamSpotFitPV.h @@ -18,8 +18,6 @@ #include "Minuit2/FCNBase.h" #include -#include -#include class FcnBeamSpotFitPV : public ROOT::Minuit2::FCNBase { public: @@ -31,11 +29,7 @@ class FcnBeamSpotFitPV : public ROOT::Minuit2::FCNBase { // deltaFcn for definition of the uncertainty double Up() const override { return errorDef_; } // -2lnL value based on vector of parameters -#if ROOT_VERSION_CODE >= ROOT_VERSION(6, 32, 4) - double operator()(std::span) const override; -#else double operator()(const std::vector&) const override; -#endif // vertex count used for the fit (after selection) unsigned int nrOfVerticesUsed() const; diff --git a/RecoVertex/BeamSpotProducer/src/BSpdfsFcn.cc b/RecoVertex/BeamSpotProducer/src/BSpdfsFcn.cc index d1295e4fd8eb8..d7556fd42b25a 100644 --- a/RecoVertex/BeamSpotProducer/src/BSpdfsFcn.cc +++ b/RecoVertex/BeamSpotProducer/src/BSpdfsFcn.cc @@ -15,16 +15,9 @@ ________________________________________________________________**/ #include #include -#if ROOT_VERSION_CODE >= ROOT_VERSION(6, 33, 1) -#include -#endif //______________________________________________________________________ -#if ROOT_VERSION_CODE >= ROOT_VERSION(6, 32, 4) -double BSpdfsFcn::PDFGauss_d(double z, double d, double sigmad, double phi, std::span parms) const { -#else double BSpdfsFcn::PDFGauss_d(double z, double d, double sigmad, double phi, const std::vector& parms) const { -#endif //--------------------------------------------------------------------------- // PDF for d0 distribution. This PDF is a simple gaussian in the // beam reference frame. @@ -42,12 +35,8 @@ double BSpdfsFcn::PDFGauss_d(double z, double d, double sigmad, double phi, cons } //______________________________________________________________________ -#if ROOT_VERSION_CODE >= ROOT_VERSION(6, 32, 4) -double BSpdfsFcn::PDFGauss_d_resolution(double z, double d, double phi, double pt, std::span parms) const { -#else double BSpdfsFcn::PDFGauss_d_resolution( double z, double d, double phi, double pt, const std::vector& parms) const { -#endif //--------------------------------------------------------------------------- // PDF for d0 distribution. This PDF is a simple gaussian in the // beam reference frame. The IP resolution is parametrize by a linear @@ -68,12 +57,7 @@ double BSpdfsFcn::PDFGauss_d_resolution( } //______________________________________________________________________ -#if ROOT_VERSION_CODE >= ROOT_VERSION(6, 32, 4) -double BSpdfsFcn::PDFGauss_z(double z, double sigmaz, std::span parms) const { -#else double BSpdfsFcn::PDFGauss_z(double z, double sigmaz, const std::vector& parms) const { -#endif - //--------------------------------------------------------------------------- // PDF for z-vertex distribution. This distribution // is parametrized by a simple normalized gaussian distribution. @@ -89,11 +73,7 @@ double BSpdfsFcn::PDFGauss_z(double z, double sigmaz, const std::vector& } //______________________________________________________________________ -#if ROOT_VERSION_CODE >= ROOT_VERSION(6, 32, 4) -double BSpdfsFcn::operator()(const std::span params) const { -#else double BSpdfsFcn::operator()(const std::vector& params) const { -#endif double f = 0.0; //std::cout << "fusepdfs=" << fusepdfs << " params.size="<= ROOT_VERSION(6, 33, 1) -double FcnBeamSpotFitPV::operator()(std::span pars) const { -#else double FcnBeamSpotFitPV::operator()(const std::vector& pars) const { -#endif // // fit parameters //