TBackCompFitter Backward compatible implementation of TVirtualFitter using the class ROOT::Fit::Fitter. This class is created after fitting an histogram (TH1), TGraph or TTree and provides in addition to the methods of the TVirtualFitter hooks to access the fit result class (ROOT::Fit::FitResult), the fit configuration (ROOT::Fit::FitConfig) or the fit data (ROOT::Fit::FitData) using <pre> TBackCompFitter * fitter = (TBackCompFitter *) TVirtualFitter::GetFitter(); ROOT::Fit::FitResult & result = fitter->GetFitResult(); result.Print(std::cout); </pre> Methods for getting the confidence level or contours are also provided. Note that after a new calls to TH1::Fit (or similar) the class will be deleted and all reference to the FitResult, FitConfig or minimizer will be invalid. One could eventually copying the class before issuing a new fit to avoid deleting this information.
virtual | ~TBackCompFitter() |
void | TObject::AbstractMethod(const char* method) const |
virtual void | TObject::AppendPad(Option_t* option = "") |
virtual void | TObject::Browse(TBrowser* b) |
virtual Double_t | Chisquare(Int_t npar, Double_t* params) const |
static TClass* | Class() |
virtual const char* | TObject::ClassName() const |
virtual void | Clear(Option_t* option = "") |
virtual TObject* | TNamed::Clone(const char* newname = "") const |
virtual Int_t | TNamed::Compare(const TObject* obj) const |
bool | Contour(unsigned int ipar, unsigned int jpar, TGraph* gr, double confLevel = 0.68300000000000005) |
virtual void | TNamed::Copy(TObject& named) 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 Int_t | ExecuteCommand(const char* command, Double_t* args, Int_t nargs) |
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 void | TNamed::FillBuffer(char*& buffer) |
virtual TObject* | TObject::FindObject(const char* name) const |
virtual TObject* | TObject::FindObject(const TObject* obj) const |
static TVirtualFitter* | TVirtualFitter::Fitter(TObject* obj, Int_t maxpar = 25) |
virtual void | FixParameter(Int_t ipar) |
virtual void | GetConfidenceIntervals(TObject* obj, Double_t cl = 0.94999999999999996) |
virtual void | GetConfidenceIntervals(Int_t n, Int_t ndim, const Double_t* x, Double_t* ci, Double_t cl = 0.94999999999999996) |
virtual Double_t* | GetCovarianceMatrix() const |
virtual Double_t | GetCovarianceMatrixElement(Int_t i, Int_t j) const |
static const char* | TVirtualFitter::GetDefaultFitter() |
virtual Option_t* | TObject::GetDrawOption() const |
static Long_t | TObject::GetDtorOnly() |
static Double_t | TVirtualFitter::GetErrorDef() |
virtual Int_t | GetErrors(Int_t ipar, Double_t& eplus, Double_t& eminus, Double_t& eparab, Double_t& globcc) const |
virtual TVirtualFitter::FCNFunc_t | TVirtualFitter::GetFCN() |
ROOT::Fit::FitConfig& | GetFitConfig() |
const ROOT::Fit::FitData& | GetFitData() const |
virtual Foption_t | TVirtualFitter::GetFitOption() const |
const ROOT::Fit::FitResult& | GetFitResult() const |
static TVirtualFitter* | TVirtualFitter::GetFitter() |
virtual const char* | TObject::GetIconName() const |
static Int_t | TVirtualFitter::GetMaxIterations() |
TMethodCall* | TVirtualFitter::GetMethodCall() const |
ROOT::Math::Minimizer* | GetMinimizer() const |
virtual const char* | TNamed::GetName() const |
virtual Int_t | GetNumberFreeParameters() const |
virtual Int_t | GetNumberTotalParameters() const |
virtual TObject* | TVirtualFitter::GetObjectFit() const |
virtual char* | TObject::GetObjectInfo(Int_t px, Int_t py) const |
static Bool_t | TObject::GetObjectStat() |
ROOT::Math::IMultiGenFunction* | GetObjFunction() const |
virtual Option_t* | TObject::GetOption() const |
virtual Double_t | GetParameter(Int_t ipar) const |
virtual Int_t | GetParameter(Int_t ipar, char* name, Double_t& value, Double_t& verr, Double_t& vlow, Double_t& vhigh) const |
virtual Double_t | GetParError(Int_t ipar) const |
virtual const char* | GetParName(Int_t ipar) const |
static Double_t | TVirtualFitter::GetPrecision() |
virtual Int_t | GetStats(Double_t& amin, Double_t& edm, Double_t& errdef, Int_t& nvpar, Int_t& nparx) const |
virtual Double_t | GetSumLog(Int_t i) |
TFitResult* | GetTFitResult() const |
virtual const char* | TNamed::GetTitle() const |
virtual UInt_t | TObject::GetUniqueID() const |
virtual TObject* | TVirtualFitter::GetUserFunc() const |
virtual Int_t | TVirtualFitter::GetXfirst() const |
virtual Int_t | TVirtualFitter::GetXlast() const |
virtual Int_t | TVirtualFitter::GetYfirst() const |
virtual Int_t | TVirtualFitter::GetYlast() const |
virtual Int_t | TVirtualFitter::GetZfirst() const |
virtual Int_t | TVirtualFitter::GetZlast() const |
virtual Bool_t | TObject::HandleTimer(TTimer* timer) |
virtual ULong_t | TNamed::Hash() const |
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 | IsFixed(Int_t ipar) const |
virtual Bool_t | TObject::IsFolder() const |
Bool_t | TObject::IsOnHeap() const |
virtual Bool_t | TNamed::IsSortable() const |
Bool_t | TObject::IsZombie() const |
virtual void | TNamed::ls(Option_t* option = "") const |
void | TObject::MayNotUse(const char* method) const |
virtual Bool_t | TObject::Notify() |
void | TObject::Obsolete(const char* method, const char* asOfVers, const char* removedFromVers) const |
void | TObject::operator delete(void* ptr) |
void | TObject::operator delete(void* ptr, void* vp) |
void | TObject::operator delete[](void* ptr) |
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) |
TBackCompFitter& | operator=(TBackCompFitter&) |
virtual void | TObject::Paint(Option_t* option = "") |
virtual void | TObject::Pop() |
virtual void | TNamed::Print(Option_t* option = "") const |
virtual void | PrintResults(Int_t level, Double_t amin) const |
virtual Int_t | TObject::Read(const char* name) |
void | ReCreateMinimizer() |
virtual void | TObject::RecursiveRemove(TObject* obj) |
virtual void | ReleaseParameter(Int_t ipar) |
void | TObject::ResetBit(UInt_t f) |
virtual void | TObject::SaveAs(const char* filename = "", Option_t* option = "") constMENU |
virtual void | TObject::SavePrimitive(ostream& out, Option_t* option = "") |
bool | Scan(unsigned int ipar, TGraph* gr, double xmin = 0, double xmax = 0) |
void | TObject::SetBit(UInt_t f) |
void | TObject::SetBit(UInt_t f, Bool_t set) |
virtual Double_t* | TVirtualFitter::SetCache(Int_t npoints, Int_t psize) |
static void | TVirtualFitter::SetDefaultFitter(const char* name = "") |
virtual void | TObject::SetDrawOption(Option_t* option = "")MENU |
static void | TObject::SetDtorOnly(void* obj) |
static void | TVirtualFitter::SetErrorDef(Double_t errdef = 1) |
virtual void | SetFCN(void(*)(Int_t&,Double_t*,Double_t&,Double_t*,Int_t) fcn) |
virtual void | SetFCN(void*) |
virtual void | SetFitMethod(const char* name) |
virtual void | TVirtualFitter::SetFitOption(Foption_t option) |
static void | TVirtualFitter::SetFitter(TVirtualFitter* fitter, Int_t maxpar = 25) |
static void | TVirtualFitter::SetMaxIterations(Int_t niter = 5000) |
virtual void | SetMethodCall(TMethodCall* m) |
virtual void | TNamed::SetName(const char* name)MENU |
virtual void | TNamed::SetNameTitle(const char* name, const char* title) |
virtual void | TVirtualFitter::SetObjectFit(TObject* obj) |
static void | TObject::SetObjectStat(Bool_t stat) |
virtual void | SetObjFunction(ROOT::Math::IMultiGenFunction* f) |
virtual Int_t | SetParameter(Int_t ipar, const char* parname, Double_t value, Double_t verr, Double_t vlow, Double_t vhigh) |
static void | TVirtualFitter::SetPrecision(Double_t prec = 9.9999999999999995E-7) |
virtual void | TNamed::SetTitle(const char* title = "")MENU |
virtual void | TObject::SetUniqueID(UInt_t uid) |
virtual void | TVirtualFitter::SetUserFunc(TObject* userfunc) |
virtual void | TVirtualFitter::SetXfirst(Int_t first) |
virtual void | TVirtualFitter::SetXlast(Int_t last) |
virtual void | TVirtualFitter::SetYfirst(Int_t first) |
virtual void | TVirtualFitter::SetYlast(Int_t last) |
virtual void | TVirtualFitter::SetZfirst(Int_t first) |
virtual void | TVirtualFitter::SetZlast(Int_t last) |
virtual void | ShowMembers(TMemberInspector& insp) const |
virtual Int_t | TNamed::Sizeof() const |
virtual void | Streamer(TBuffer&) |
void | StreamerNVirtual(TBuffer& ClassDef_StreamerNVirtual_b) |
virtual void | TObject::SysError(const char* method, const char* msgfmt) const |
TBackCompFitter() | |
TBackCompFitter(TBackCompFitter&) | |
TBackCompFitter(auto_ptr<ROOT::Fit::Fitter> fitter, auto_ptr<ROOT::Fit::FitData> data) | |
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 |
virtual void | TObject::DoError(int level, const char* location, const char* fmt, va_list va) const |
void | DoSetDimension() |
void | TObject::MakeZombie() |
bool | ValidParameterIndex(int ipar) const |
static TObject::<anonymous> | TObject::kBitMask | |
static TObject::EStatusBits | TObject::kCanDelete | |
static TBackCompFitter::<anonymous> | kCanDeleteLast | |
static TObject::EStatusBits | TObject::kCannotPick | |
static TObject::EStatusBits | TObject::kHasUUID | |
static TObject::EStatusBits | TObject::kInvalidObject | |
static TObject::<anonymous> | TObject::kIsOnHeap | |
static TObject::EStatusBits | TObject::kIsReferenced | |
static TObject::EStatusBits | TObject::kMustCleanup | |
static TObject::EStatusBits | TObject::kNoContextMenu | |
static TObject::<anonymous> | TObject::kNotDeleted | |
static TObject::EStatusBits | TObject::kObjInCanvas | |
static TObject::<anonymous> | TObject::kOverwrite | |
static TObject::<anonymous> | TObject::kSingleKey | |
static TObject::<anonymous> | TObject::kWriteDelete | |
static TObject::<anonymous> | TObject::kZombie |
Double_t* | TVirtualFitter::fCache | [fCacheSize] array of points data (fNpoints*fPointSize < fCacheSize words) |
Int_t | TVirtualFitter::fCacheSize | Size of the fCache array |
void(*)(Int_t&,Double_t*,Double_t&,Double_t*,Int_t) | TVirtualFitter::fFCN | |
TMethodCall* | TVirtualFitter::fMethodCall | Pointer to MethodCall in case of interpreted function |
TString | TNamed::fName | object identifier |
Int_t | TVirtualFitter::fNpoints | Number of points to fit |
TObject* | TVirtualFitter::fObjectFit | pointer to object being fitted |
Foption_t | TVirtualFitter::fOption | struct with the fit options |
Int_t | TVirtualFitter::fPointSize | Number of words per point in the cache |
TString | TNamed::fTitle | object title |
TObject* | TVirtualFitter::fUserFunc | pointer to user theoretical function (a TF1*) |
Int_t | TVirtualFitter::fXfirst | first bin on X axis |
Int_t | TVirtualFitter::fXlast | last bin on X axis |
Int_t | TVirtualFitter::fYfirst | first bin on Y axis |
Int_t | TVirtualFitter::fYlast | last bin on Y axis |
Int_t | TVirtualFitter::fZfirst | first bin on Z axis |
Int_t | TVirtualFitter::fZlast | last bin on Z axis |
static TString | TVirtualFitter::fgDefault | name of the default fitter ("Minuit","Fumili",etc) |
static Double_t | TVirtualFitter::fgErrorDef | Error definition (default=1) |
static TVirtualFitter* | TVirtualFitter::fgFitter | Current fitter (default TFitter) |
static Int_t | TVirtualFitter::fgMaxiter | Maximum number of iterations |
static Int_t | TVirtualFitter::fgMaxpar | Maximum number of fit parameters for current fitter |
static Double_t | TVirtualFitter::fgPrecision | maximum precision |
vector<double> | fCovar | cached covariance matrix (NxN) |
auto_ptr<ROOT::Fit::FitData> | fFitData | ! data of the fit (managed by TBackCompFitter) |
auto_ptr<ROOT::Fit::Fitter> | fFitter | ! pointer to fitter object (managed by TBackCompFitter) |
ROOT::Math::Minimizer* | fMinimizer | |
ROOT::Math::IParamMultiFunction* | fModelFunc | |
ROOT::Math::IMultiGenFunction* | fObjFunc |
Constructur needed by TVirtualFitter interface. Same behavior as default constructor. initialize setting name and the global pointer
do chisquare calculations in case of likelihood fits do evaluation a the minimum only
execute the command (Fortran Minuit compatible interface)
Computes point-by-point confidence intervals for the fitted function Parameters: n - number of points ndim - dimensions of points x - points, at which to compute the intervals, for ndim > 1 should be in order: (x0,y0, x1, y1, ... xn, yn) ci - computed intervals are returned in this array cl - confidence level, default=0.95 NOTE, that the intervals are approximate for nonlinear(in parameters) models
Computes confidence intervals at level cl. Default is 0.95 The TObject parameter can be a TGraphErrors, a TGraph2DErrors or a TH1,2,3. For Graphs, confidence intervals are computed for each point, the value of the graph at that point is set to the function value at that point, and the graph y-errors (or z-errors) are set to the value of the confidence interval at that point. For Histograms, confidence intervals are computed for each bin center The bin content of this bin is then set to the function value at the bin center, and the bin error is set to the confidence interval value. NOTE: confidence intervals are approximate for nonlinear models! Allowed combinations: Fitted object Passed object TGraph TGraphErrors, TH1 TGraphErrors, AsymmErrors TGraphErrors, TH1 TH1 TGraphErrors, TH1 TGraph2D TGraph2DErrors, TH2 TGraph2DErrors TGraph2DErrors, TH2 TH2 TGraph2DErrors, TH2 TH3 TH3
get the error matrix in a pointer to a NxN array. excluding the fixed parameters
get error matrix element (return all zero if matrix is not available)
get fit errors
get all parameter info (name, value, errors)
get fit statistical information
print the fit result use PrintResults function in case of Minuit for old -style printing
set fit method (i.e. chi2 or likelihood) according to the method the appropriate FCN function will be created
set (add) a new fit parameter passing initial value, step size (verr) and parametr limits if vlow > vhigh the parameter is unbounded if the stepsize (verr) == 0 the parameter is treated as fixed
Recreate a minimizer instance using the function and data set objective function in minimizers function to re-create FCN from stored data object and fit options
override setFCN to use the Adapter to Minuit2 FCN interface To set the address of the minimization function*- *-* =============================================== *
To set the address of the minimization function*- *-* =============================================== this function is called by CINT instead of the function above *
set the objective function for fitting Needed if fitting directly using TBackCompFitter class The class clones a copy of the function and manages it
return a pointer to the objective function (FCN) If fitting directly using TBackCompFitter the pointer is managed by the class, which has been set previously when calling SetObjFunction or SetFCN Otherwise if the class is used in the backward compatible mode (e.g. after having fitted a TH1) the return pointer will be valid after fitting and as long a new fit will not be done.
return a pointer to the minimizer. the return pointer will be valid after fitting and as long a new fit will not be done. For keeping a minimizer pointer the method ReCreateMinimizer() could eventually be used
return a new copy of the TFitResult object which needs to be deleted later by the user
scan parameter ipar between value of xmin and xmax a graph must be given which will be on return filled with the scan resul If the graph size is zero, a default size n = 40 will be used *
create a 2D contour around the minimum for the parameter ipar and jpar if a minimum does not exist or is invalid it will return false on exit a TGraph is filled with the contour points the number of contur points is determined by the size of the TGraph. if the size is zero a default number of points = 20 is used pass optionally the confidence level, default is 0.683 it is assumed that ErrorDef() defines the right error definition (i.e 1 sigma error for one parameter). If not the confidence level are scaled to new level
for using interpreted function passed by the user
{ fMethodCall = m; }
!!!! new method (of this interface) get reference to Fit configuration (NOTE: it will be invalid when class is deleted)
{ return fFitter->Config(); }
get reference to Fit Result object (NOTE: it will be invalid when class is deleted)
{ return fFitter->Result(); }
get reference to Fit Data object (NOTE: it will be invalid when class is deleted)
{ return *fFitData; }