RooMinimizer is a wrapper class around ROOT::Fit:Fitter that provides a seamless interface between the minimizer functionality and the native RooFit interface.
By default the Minimizer is MINUIT.
RooMinimizer can minimize any RooAbsReal function with respect to its parameters. Usual choices for minimization are RooNLLVar and RooChi2Var
RooMinimizer has methods corresponding to MINUIT functions like hesse(), migrad(), minos() etc. In each of these function calls the state of the MINUIT engine is synchronized with the state of the RooFit variables: any change in variables, change in the constant status etc is forwarded to MINUIT prior to execution of the MINUIT call. Afterwards the RooFit objects are resynchronized with the output state of MINUIT: changes parameter values, errors are propagated.
Various methods are available to control verbosity, profiling, automatic PDF optimization.
RooMinimizer(RooAbsReal& function) | |
virtual | ~RooMinimizer() |
void | TObject::AbstractMethod(const char* method) const |
virtual void | TObject::AppendPad(Option_t* option = "") |
virtual void | TObject::Browse(TBrowser* b) |
static TClass* | Class() |
virtual const char* | TObject::ClassName() const |
static void | cleanup() |
virtual void | TObject::Clear(Option_t* = "") |
virtual TObject* | TObject::Clone(const char* newname = "") const |
virtual Int_t | TObject::Compare(const TObject* obj) const |
RooPlot* | contour(RooRealVar& var1, RooRealVar& var2, Double_t n1 = 1, Double_t n2 = 2, Double_t n3 = 0, Double_t n4 = 0, Double_t n5 = 0, Double_t n6 = 0) |
virtual void | TObject::Copy(TObject& object) const |
virtual void | TObject::Delete(Option_t* option = "")MENU |
virtual Int_t | TObject::DistancetoPrimitive(Int_t px, Int_t py) |
virtual void | TObject::Draw(Option_t* option = "") |
virtual void | TObject::DrawClass() constMENU |
virtual TObject* | TObject::DrawClone(Option_t* option = "") constMENU |
virtual void | TObject::Dump() constMENU |
virtual void | TObject::Error(const char* method, const char* msgfmt) const |
virtual void | TObject::Execute(const char* method, const char* params, Int_t* error = 0) |
virtual void | TObject::Execute(TMethod* method, TObjArray* params, Int_t* error = 0) |
virtual void | TObject::ExecuteEvent(Int_t event, Int_t px, Int_t py) |
virtual void | TObject::Fatal(const char* method, const char* msgfmt) const |
virtual TObject* | TObject::FindObject(const char* name) const |
virtual TObject* | TObject::FindObject(const TObject* obj) const |
RooFitResult* | fit(const char* options) |
virtual Option_t* | TObject::GetDrawOption() const |
static Long_t | TObject::GetDtorOnly() |
virtual const char* | TObject::GetIconName() const |
virtual const char* | TObject::GetName() const |
virtual char* | TObject::GetObjectInfo(Int_t px, Int_t py) const |
static Bool_t | TObject::GetObjectStat() |
virtual Option_t* | TObject::GetOption() const |
virtual const char* | TObject::GetTitle() const |
virtual UInt_t | TObject::GetUniqueID() const |
virtual Bool_t | TObject::HandleTimer(TTimer* timer) |
virtual ULong_t | TObject::Hash() const |
Int_t | hesse() |
Int_t | improve() |
virtual void | TObject::Info(const char* method, const char* msgfmt) const |
virtual Bool_t | TObject::InheritsFrom(const char* classname) const |
virtual Bool_t | TObject::InheritsFrom(const TClass* cl) const |
virtual void | TObject::Inspect() constMENU |
void | TObject::InvertBit(UInt_t f) |
virtual TClass* | IsA() const |
virtual Bool_t | TObject::IsEqual(const TObject* obj) const |
virtual Bool_t | TObject::IsFolder() const |
Bool_t | TObject::IsOnHeap() const |
virtual Bool_t | TObject::IsSortable() const |
Bool_t | TObject::IsZombie() const |
static RooFitResult* | lastMinuitFit(const RooArgList& varList = RooArgList()) |
virtual void | TObject::ls(Option_t* option = "") const |
void | TObject::MayNotUse(const char* method) const |
Int_t | migrad() |
Int_t | minimize(const char* type, const char* alg = 0) |
Int_t | minos() |
Int_t | minos(const RooArgSet& minosParamList) |
virtual Bool_t | TObject::Notify() |
static void | TObject::operator delete(void* ptr) |
static void | TObject::operator delete(void* ptr, void* vp) |
static void | TObject::operator delete[](void* ptr) |
static void | TObject::operator delete[](void* ptr, void* vp) |
void* | TObject::operator new(size_t sz) |
void* | TObject::operator new(size_t sz, void* vp) |
void* | TObject::operator new[](size_t sz) |
void* | TObject::operator new[](size_t sz, void* vp) |
RooMinimizer& | operator=(const RooMinimizer&) |
void | optimizeConst(Bool_t flag) |
virtual void | TObject::Paint(Option_t* option = "") |
virtual void | TObject::Pop() |
virtual void | TObject::Print(Option_t* option = "") const |
virtual Int_t | TObject::Read(const char* name) |
virtual void | TObject::RecursiveRemove(TObject* obj) |
void | TObject::ResetBit(UInt_t f) |
RooFitResult* | save(const char* name = 0, const char* title = 0) |
virtual void | TObject::SaveAs(const char* filename = "", Option_t* option = "") constMENU |
virtual void | TObject::SavePrimitive(basic_ostream<char,char_traits<char> >& out, Option_t* option = "") |
Int_t | seek() |
void | TObject::SetBit(UInt_t f) |
void | TObject::SetBit(UInt_t f, Bool_t set) |
virtual void | TObject::SetDrawOption(Option_t* option = "")MENU |
static void | TObject::SetDtorOnly(void* obj) |
void | setEps(Double_t eps) |
void | setErrorLevel(Double_t level) |
void | setEvalErrorWall(Bool_t flag) |
Bool_t | setLogFile(const char* logf = 0) |
void | setMinimizerType(const char* type) |
static void | TObject::SetObjectStat(Bool_t stat) |
void | setPrintEvalErrors(Int_t numEvalErrors) |
Int_t | setPrintLevel(Int_t newLevel) |
void | setProfile(Bool_t flag = kTRUE) |
void | setStrategy(Int_t strat) |
virtual void | TObject::SetUniqueID(UInt_t uid) |
void | setVerbose(Bool_t flag = kTRUE) |
virtual void | ShowMembers(TMemberInspector& insp, char* parent) |
Int_t | simplex() |
virtual void | Streamer(TBuffer& b) |
void | StreamerNVirtual(TBuffer& b) |
virtual void | TObject::SysError(const char* method, const char* msgfmt) const |
Bool_t | TObject::TestBit(UInt_t f) const |
Int_t | TObject::TestBits(UInt_t f) const |
virtual void | TObject::UseCurrentStyle() |
virtual void | TObject::Warning(const char* method, const char* msgfmt) const |
virtual Int_t | TObject::Write(const char* name = 0, Int_t option = 0, Int_t bufsize = 0) |
virtual Int_t | TObject::Write(const char* name = 0, Int_t option = 0, Int_t bufsize = 0) const |
void | applyCovarianceMatrix(TMatrixDSym& V) |
virtual void | TObject::DoError(int level, const char* location, const char* fmt, va_list va) const |
Int_t | getNPar() const |
ofstream* | logfile() const |
void | TObject::MakeZombie() |
Double_t& | maxFCN() |
void | profileStart() |
void | profileStop() |
RooMinimizer(const RooMinimizer&) |
enum Strategy { | Speed | |
Balance | ||
Robustness | ||
}; | ||
enum PrintLevel { | None | |
Reduced | ||
Normal | ||
ExtraForProblem | ||
Maximum | ||
}; | ||
enum TObject::EStatusBits { | kCanDelete | |
kMustCleanup | ||
kObjInCanvas | ||
kIsReferenced | ||
kHasUUID | ||
kCannotPick | ||
kNoContextMenu | ||
kInvalidObject | ||
}; | ||
enum TObject::[unnamed] { | kIsOnHeap | |
kNotDeleted | ||
kZombie | ||
kBitMask | ||
kSingleKey | ||
kOverwrite | ||
kWriteDelete | ||
}; |
TStopwatch | _cumulTimer | |
TMatrixDSym* | _extV | |
RooMinimizerFcn* | _fcn | |
RooAbsReal* | _func | |
string | _minimizerType | |
Bool_t | _optConst | |
Int_t | _printLevel | |
Bool_t | _profile | |
Int_t | _status | |
static ROOT::Fit::Fitter* | _theFitter | |
TStopwatch | _timer | |
Bool_t | _verbose |
Cleanup method called by atexit handler installed by RooSentinel to delete all global heap objects when the program is terminated
Construct MINUIT interface to given function. Function can be anything, but is typically a -log(likelihood) implemented by RooNLLVar or a chi^2 (implemented by RooChi2Var). Other frequent use cases are a RooAddition of a RooNLLVar plus a penalty or constraint term. This class propagates all RooFit information (floating parameters, their values and errors) to MINUIT before each MINUIT call and propagates all MINUIT information back to the RooFit object at the end of each call (updated parameter values, their (asymmetric errors) etc. The default MINUIT error level for HESSE and MINOS error analysis is taken from the defaultErrorLevel() value of the input function.
Change MINUIT strategy to istrat. Accepted codes are 0,1,2 and represent MINUIT strategies for dealing most efficiently with fast FCNs (0), expensive FCNs (2) and 'intermediate' FCNs (1)
Set the level for MINUIT error analysis to the given value. This function overrides the default value that is taken in the RooMinimizer constructor from the defaultErrorLevel() method of the input function
Execute MIGRAD. Changes in parameter values and calculated errors are automatically propagated back the RooRealVars representing the floating parameters in the MINUIT operation
Execute HESSE. Changes in parameter values and calculated errors are automatically propagated back the RooRealVars representing the floating parameters in the MINUIT operation
Execute MINOS. Changes in parameter values and calculated errors are automatically propagated back the RooRealVars representing the floating parameters in the MINUIT operation
Execute MINOS for given list of parameters. Changes in parameter values and calculated errors are automatically propagated back the RooRealVars representing the floating parameters in the MINUIT operation
Execute SEEK. Changes in parameter values and calculated errors are automatically propagated back the RooRealVars representing the floating parameters in the MINUIT operation
Execute SIMPLEX. Changes in parameter values and calculated errors are automatically propagated back the RooRealVars representing the floating parameters in the MINUIT operation
Execute IMPROVE. Changes in parameter values and calculated errors are automatically propagated back the RooRealVars representing the floating parameters in the MINUIT operation
If flag is true, perform constant term optimization on function being minimized.
Save and return a RooFitResult snaphot of current minimizer status. This snapshot contains the values of all constant parameters, the value of all floating parameters at RooMinimizer construction and after the last MINUIT operation, the MINUIT status, variance quality, EDM setting, number of calls with evaluation problems, the minimized function value and the full correlation matrix
Create and draw a TH2 with the error contours in parameters var1 and v2 at up to 6 'sigma' settings where 'sigma' is calculated as n*n*errorLevel
Apply results of given external covariance matrix. i.e. propagate its errors to all RRV parameter representations and give this matrix instead of the HESSE matrix at the next save() call