Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-30 10:22:13

0001 // @(#)root/minuit2:$Id$
0002 // Authors: M. Winkler, F. James, L. Moneta, A. Zsenei   2003-2005
0003 
0004 /**********************************************************************
0005  *                                                                    *
0006  * Copyright (c) 2005 LCG ROOT Math team,  CERN/PH-SFT                *
0007  *                                                                    *
0008  **********************************************************************/
0009 
0010 #ifndef ROOT_Minuit2_MnParameterScan
0011 #define ROOT_Minuit2_MnParameterScan
0012 
0013 #include "Minuit2/MnConfig.h"
0014 #include "Minuit2/MnUserParameters.h"
0015 
0016 #include <vector>
0017 #include <utility>
0018 
0019 namespace ROOT {
0020 
0021 namespace Minuit2 {
0022 
0023 class FCNBase;
0024 
0025 /** Scans the values of FCN as a function of one Parameter and retains the
0026     best function and Parameter values found.
0027  */
0028 
0029 class MnParameterScan {
0030 
0031 public:
0032    MnParameterScan(const FCNBase &, const MnUserParameters &);
0033 
0034    MnParameterScan(const FCNBase &, const MnUserParameters &, double);
0035 
0036    ~MnParameterScan() {}
0037 
0038    // returns pairs of (x,y) points, x=parameter Value, y=function Value of FCN
0039    std::vector<std::pair<double, double>>
0040    operator()(unsigned int par, unsigned int maxsteps = 41, double low = 0., double high = 0.);
0041 
0042    const MnUserParameters &Parameters() const { return fParameters; }
0043    double Fval() const { return fAmin; }
0044 
0045 private:
0046    const FCNBase &fFCN;
0047    MnUserParameters fParameters;
0048    double fAmin;
0049 };
0050 
0051 } // namespace Minuit2
0052 
0053 } // namespace ROOT
0054 
0055 #endif // ROOT_Minuit2_MnParameterScan