Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 10:10:24

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_MinimumSeed
0011 #define ROOT_Minuit2_MinimumSeed
0012 
0013 #include "Minuit2/MinimumState.h"
0014 #include "Minuit2/MinimumParameters.h"
0015 #include "Minuit2/MinimumError.h"
0016 #include "Minuit2/FunctionGradient.h"
0017 #include "Minuit2/MnUserTransformation.h"
0018 
0019 namespace ROOT {
0020 
0021 namespace Minuit2 {
0022 
0023 class MinimumSeed {
0024 
0025 public:
0026    MinimumSeed(const MinimumState &state, const MnUserTransformation &trafo) : fPtr{new Data{state, trafo, true}} {}
0027 
0028    const MinimumState &State() const { return fPtr->fState; }
0029    const MinimumParameters &Parameters() const { return State().Parameters(); }
0030    const MinimumError &Error() const { return State().Error(); };
0031    const FunctionGradient &Gradient() const { return State().Gradient(); }
0032    const MnUserTransformation &Trafo() const { return fPtr->fTrafo; }
0033    const MnMachinePrecision &Precision() const { return Trafo().Precision(); }
0034    double Fval() const { return State().Fval(); }
0035    double Edm() const { return State().Edm(); }
0036    unsigned int NFcn() const { return State().NFcn(); }
0037    bool IsValid() const { return fPtr->fValid; }
0038 
0039 private:
0040    struct Data {
0041       MinimumState fState;
0042       MnUserTransformation fTrafo;
0043       bool fValid;
0044    };
0045 
0046    std::shared_ptr<Data> fPtr;
0047 };
0048 
0049 } // namespace Minuit2
0050 
0051 } // namespace ROOT
0052 
0053 #endif // ROOT_Minuit2_MinimumSeed