// @(#)root/minuit2:$Id$
// Authors: M. Winkler, F. James, L. Moneta, A. Zsenei   2003-2005

/**********************************************************************
 *                                                                    *
 * Copyright (c) 2005 LCG ROOT Math team,  CERN/PH-SFT                *
 *                                                                    *
 **********************************************************************/

#ifndef ROOT_Minuit2_MnContours
#define ROOT_Minuit2_MnContours


#include "Minuit2/MnConfig.h"
#include "Minuit2/MnStrategy.h"

#include <vector>
#include <utility>

namespace ROOT {

   namespace Minuit2 {


class FCNBase;
class FunctionMinimum;
class ContoursError;

//_____________________________________________________________
/**
   API class for Contours Error analysis (2-dim errors);
   minimization has to be done before and Minimum must be valid;
   possibility to ask only for the points or the points and associated Minos
   errors;
 */

class MnContours {

public:

   /// construct from FCN + Minimum
   MnContours(const FCNBase& fcn, const FunctionMinimum& min) : fFCN(fcn), fMinimum(min), fStrategy(MnStrategy(1)) {}

   /// construct from FCN + Minimum + strategy
   MnContours(const FCNBase& fcn, const FunctionMinimum& min, unsigned int stra) : fFCN(fcn), fMinimum(min), fStrategy(MnStrategy(stra)) {}

   /// construct from FCN + Minimum + strategy
   MnContours(const FCNBase& fcn, const FunctionMinimum& min, const MnStrategy& stra) : fFCN(fcn), fMinimum(min), fStrategy(stra) {}

   ~MnContours() {}

   /// ask for one Contour (points only) from number of points (>=4) and parameter indeces
   std::vector<std::pair<double,double> > operator()(unsigned int, unsigned int, unsigned int npoints = 20) const;

   /// ask for one Contour ContoursError (MinosErrors + points)
   /// from number of points (>=4) and parameter indeces
   /// can be printed via std::cout
   ContoursError Contour(unsigned int, unsigned int, unsigned int npoints = 20) const;

   const MnStrategy& Strategy() const {return fStrategy;}

private:

   const FCNBase& fFCN;
   const FunctionMinimum& fMinimum;
   MnStrategy fStrategy;
};

  }  // namespace Minuit2

}  // namespace ROOT

#endif  // ROOT_Minuit2_MnContours
 MnContours.h:1
 MnContours.h:2
 MnContours.h:3
 MnContours.h:4
 MnContours.h:5
 MnContours.h:6
 MnContours.h:7
 MnContours.h:8
 MnContours.h:9
 MnContours.h:10
 MnContours.h:11
 MnContours.h:12
 MnContours.h:13
 MnContours.h:14
 MnContours.h:15
 MnContours.h:16
 MnContours.h:17
 MnContours.h:18
 MnContours.h:19
 MnContours.h:20
 MnContours.h:21
 MnContours.h:22
 MnContours.h:23
 MnContours.h:24
 MnContours.h:25
 MnContours.h:26
 MnContours.h:27
 MnContours.h:28
 MnContours.h:29
 MnContours.h:30
 MnContours.h:31
 MnContours.h:32
 MnContours.h:33
 MnContours.h:34
 MnContours.h:35
 MnContours.h:36
 MnContours.h:37
 MnContours.h:38
 MnContours.h:39
 MnContours.h:40
 MnContours.h:41
 MnContours.h:42
 MnContours.h:43
 MnContours.h:44
 MnContours.h:45
 MnContours.h:46
 MnContours.h:47
 MnContours.h:48
 MnContours.h:49
 MnContours.h:50
 MnContours.h:51
 MnContours.h:52
 MnContours.h:53
 MnContours.h:54
 MnContours.h:55
 MnContours.h:56
 MnContours.h:57
 MnContours.h:58
 MnContours.h:59
 MnContours.h:60
 MnContours.h:61
 MnContours.h:62
 MnContours.h:63
 MnContours.h:64
 MnContours.h:65
 MnContours.h:66
 MnContours.h:67
 MnContours.h:68
 MnContours.h:69
 MnContours.h:70
 MnContours.h:71
 MnContours.h:72
 MnContours.h:73