Back to home page

EIC code displayed by LXR

 
 

    


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

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_SimplexParameters
0011 #define ROOT_Minuit2_SimplexParameters
0012 
0013 #include <cassert>
0014 
0015 #include "Minuit2/MnMatrix.h"
0016 
0017 #include <vector>
0018 #include <utility>
0019 
0020 namespace ROOT {
0021 
0022 namespace Minuit2 {
0023 
0024 /**
0025    class describing the simplex set of points (f(x), x )  which evolve during the minimization
0026    iteration process.
0027  */
0028 
0029 class SimplexParameters {
0030 
0031 public:
0032    SimplexParameters(const std::vector<std::pair<double, MnAlgebraicVector>> &simpl, unsigned int jh, unsigned int jl)
0033       : fSimplexParameters(simpl), fJHigh(jh), fJLow(jl)
0034    {
0035    }
0036 
0037    ~SimplexParameters() {}
0038 
0039    void Update(double, const MnAlgebraicVector &);
0040 
0041    const std::vector<std::pair<double, MnAlgebraicVector>> &Simplex() const { return fSimplexParameters; }
0042 
0043    const std::pair<double, MnAlgebraicVector> &operator()(unsigned int i) const
0044    {
0045       assert(i < fSimplexParameters.size());
0046       return fSimplexParameters[i];
0047    }
0048 
0049    unsigned int Jh() const { return fJHigh; }
0050    unsigned int Jl() const { return fJLow; }
0051    double Edm() const { return fSimplexParameters[Jh()].first - fSimplexParameters[Jl()].first; }
0052    MnAlgebraicVector Dirin() const;
0053 
0054 private:
0055    std::vector<std::pair<double, MnAlgebraicVector>> fSimplexParameters;
0056    unsigned int fJHigh;
0057    unsigned int fJLow;
0058 };
0059 
0060 } // namespace Minuit2
0061 
0062 } // namespace ROOT
0063 
0064 #endif // ROOT_Minuit2_SimplexParameters