ROOT  6.06/09
Reference Guide
BasicMinimumSeed.h
Go to the documentation of this file.
1 // @(#)root/minuit2:$Id$
2 // Authors: M. Winkler, F. James, L. Moneta, A. Zsenei 2003-2005
3 
4 /**********************************************************************
5  * *
6  * Copyright (c) 2005 LCG ROOT Math team, CERN/PH-SFT *
7  * *
8  **********************************************************************/
9 
10 #ifndef ROOT_Minuit2_BasicMinimumSeed
11 #define ROOT_Minuit2_BasicMinimumSeed
12 
13 #include "Minuit2/MinimumState.h"
15 #include "Minuit2/MinimumError.h"
18 
19 #include "Minuit2/StackAllocator.h"
20 
21 namespace ROOT {
22 
23  namespace Minuit2 {
24 
25 
26 //extern StackAllocator gStackAllocator;
27 
29 
30 public:
31 
32  BasicMinimumSeed(const MinimumState& state, const MnUserTransformation& trafo) : fState(state), fTrafo(trafo), fValid(true) {}
33 
35 
36  BasicMinimumSeed(const BasicMinimumSeed& seed) : fState(seed.fState), fTrafo(seed.fTrafo), fValid(seed.fValid) {}
37 
39  fState = seed.fState;
40  fTrafo = seed.fTrafo;
41  fValid = seed.fValid;
42  return *this;
43  }
44 
45  void* operator new(size_t nbytes) {
46  return StackAllocatorHolder::Get().Allocate(nbytes);
47  }
48 
49  void operator delete(void* p, size_t /*nbytes*/) {
51  }
52 
53  const MinimumState& State() const {return fState;}
54  const MinimumParameters& Parameters() const {return State().Parameters();}
55  const MinimumError& Error() const {return State().Error();};
56  const FunctionGradient& Gradient() const {return State().Gradient();}
57  const MnUserTransformation& Trafo() const {return fTrafo;}
58  const MnMachinePrecision& Precision() const {return fTrafo.Precision();}
59  double Fval() const {return State().Fval();}
60  double Edm() const {return State().Edm();}
61  unsigned int NFcn() const {return State().NFcn();}
62  bool IsValid() const {return fValid;}
63 
64 private:
65 
68  bool fValid;
69 };
70 
71  } // namespace Minuit2
72 
73 } // namespace ROOT
74 
75 #endif // ROOT_Minuit2_BasicMinimumSeed
BasicMinimumSeed(const BasicMinimumSeed &seed)
BasicMinimumSeed(const MinimumState &state, const MnUserTransformation &trafo)
Namespace for new ROOT classes and functions.
Definition: ROOT.py:1
determines the relative floating point arithmetic precision.
const FunctionGradient & Gradient() const
Definition: MinimumState.h:63
const MinimumError & Error() const
Definition: MinimumState.h:62
void * Allocate(size_t nBytes)
BasicMinimumSeed & operator=(const BasicMinimumSeed &seed)
const MnUserTransformation & Trafo() const
const MinimumState & State() const
class dealing with the transformation between user specified parameters (external) and internal param...
const FunctionGradient & Gradient() const
const MinimumParameters & Parameters() const
Definition: MinimumState.h:58
MinimumError keeps the inv.
Definition: MinimumError.h:26
const MnMachinePrecision & Precision() const
MinimumState keeps the information (position, Gradient, 2nd deriv, etc) after one minimization step (...
Definition: MinimumState.h:29
static StackAllocator & Get()
const MnMachinePrecision & Precision() const
forwarded interface
const MinimumParameters & Parameters() const
const MinimumError & Error() const