/usr/include/root/RooFitResult.h is in libroot-roofit-dev 5.34.30-0ubuntu8.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 | /*****************************************************************************
* Project: RooFit *
* Package: RooFitCore *
* File: $Id: RooFitResult.h,v 1.28 2007/05/11 09:11:30 verkerke Exp $
* Authors: *
* WV, Wouter Verkerke, UC Santa Barbara, verkerke@slac.stanford.edu *
* DK, David Kirkby, UC Irvine, dkirkby@uci.edu *
* *
* Copyright (c) 2000-2005, Regents of the University of California *
* and Stanford University. All rights reserved. *
* *
* Redistribution and use in source and binary forms, *
* with or without modification, are permitted according to the terms *
* listed in LICENSE (http://roofit.sourceforge.net/license.txt) *
*****************************************************************************/
#ifndef ROO_FIT_RESULT
#define ROO_FIT_RESULT
#include "Riosfwd.h"
#include "RooAbsArg.h"
#include "RooPrintable.h"
#include "RooDirItem.h"
#include "RooArgList.h"
#include "RVersion.h"
#include "TMatrixFfwd.h"
#include "TMatrixDSym.h"
#include "TRootIOCtor.h"
#include <vector>
#include <string>
#include <map>
class RooArgSet ;
class RooAbsPdf ;
class RooPlot;
class TObject ;
class TH2 ;
typedef RooArgSet* pRooArgSet ;
class RooFitResult : public TNamed, public RooPrintable, public RooDirItem {
public:
// Constructors, assignment etc.
RooFitResult(const char* name=0, const char* title=0) ;
RooFitResult(const RooFitResult& other) ;
virtual TObject* Clone(const char* newname = 0) const {
RooFitResult* r = new RooFitResult(*this) ;
if (newname && *newname) r->SetName(newname) ;
return r ;
}
virtual TObject* clone() const { return new RooFitResult(*this); }
virtual ~RooFitResult() ;
static RooFitResult* lastMinuitFit(const RooArgList& varList=RooArgList()) ;
// Printing interface (human readable)
virtual void printValue(std::ostream& os) const ;
virtual void printName(std::ostream& os) const ;
virtual void printTitle(std::ostream& os) const ;
virtual void printClassName(std::ostream& os) const ;
virtual void printArgs(std::ostream& os) const ;
void printMultiline(std::ostream& os, Int_t contents, Bool_t verbose=kFALSE, TString indent="") const ;
inline virtual void Print(Option_t *options= 0) const {
// Printing interface
printStream(defaultPrintStream(),defaultPrintContents(options),defaultPrintStyle(options));
}
virtual Int_t defaultPrintContents(Option_t* opt) const ;
virtual StyleOption defaultPrintStyle(Option_t* opt) const ;
RooAbsPdf* createHessePdf(const RooArgSet& params) const ;
// Accessors
inline Int_t status() const {
// Return MINUIT status code
return _status ;
}
inline UInt_t numStatusHistory() const { return _statusHistory.size() ; }
Int_t statusCodeHistory(UInt_t icycle) const ;
const char* statusLabelHistory(UInt_t icycle) const ;
inline Int_t covQual() const {
// Return MINUIT quality code of covariance matrix
return _covQual ;
}
inline Int_t numInvalidNLL() const {
// Return number of NLL evaluations with problems
return _numBadNLL ;
}
inline Double_t edm() const {
// Return estimated distance to minimum
return _edm ;
}
inline Double_t minNll() const {
// Return minimized -log(L) value
return _minNLL ;
}
inline const RooArgList& constPars() const {
// Return list of constant parameters
return *_constPars ;
}
inline const RooArgList& floatParsInit() const {
// Return list of floating parameters before fit
return *_initPars ;
}
inline const RooArgList& floatParsFinal() const {
// Return list of floarting parameters after fit
return *_finalPars ;
}
TH2* correlationHist(const char* name = "correlation_matrix") const ;
Double_t correlation(const RooAbsArg& par1, const RooAbsArg& par2) const {
// Return correlation between par1 and par2
return correlation(par1.GetName(),par2.GetName()) ;
}
const RooArgList* correlation(const RooAbsArg& par) const {
// Return pointer to list of correlations of all parameters with par
return correlation(par.GetName()) ;
}
Double_t correlation(const char* parname1, const char* parname2) const ;
const RooArgList* correlation(const char* parname) const ;
const TMatrixDSym& covarianceMatrix() const ;
const TMatrixDSym& correlationMatrix() const ;
TMatrixDSym reducedCovarianceMatrix(const RooArgList& params) const ;
TMatrixDSym conditionalCovarianceMatrix(const RooArgList& params) const ;
// Global correlation accessors
Double_t globalCorr(const RooAbsArg& par) { return globalCorr(par.GetName()) ; }
Double_t globalCorr(const char* parname) ;
const RooArgList* globalCorr() ;
// Add objects to a 2D plot
inline RooPlot *plotOn(RooPlot *frame, const RooAbsArg &par1, const RooAbsArg &par2,
const char *options= "ME") const {
// Plot error ellipse in par1 and par2 on frame
return plotOn(frame,par1.GetName(),par2.GetName(),options);
}
RooPlot *plotOn(RooPlot *plot, const char *parName1, const char *parName2,
const char *options= "ME") const;
// Generate random perturbations of the final parameters using the covariance matrix
const RooArgList& randomizePars() const;
Bool_t isIdentical(const RooFitResult& other, Double_t tol=5e-5, Double_t tolCorr=1e-4, Bool_t verbose=kTRUE) const ;
void SetName(const char *name) ;
void SetNameTitle(const char *name, const char* title) ;
protected:
friend class RooMinuit ;
friend class RooMinimizer ;
void setCovarianceMatrix(TMatrixDSym& V) ;
void setConstParList(const RooArgList& list) ;
void setInitParList(const RooArgList& list) ;
void setFinalParList(const RooArgList& list) ;
inline void setMinNLL(Double_t val) { _minNLL = val ; }
inline void setEDM(Double_t val) { _edm = val ; }
inline void setStatus(Int_t val) { _status = val ; }
inline void setCovQual(Int_t val) { _covQual = val ; }
inline void setNumInvalidNLL(Int_t val) { _numBadNLL=val ; }
void fillCorrMatrix() ;
void fillCorrMatrix(const std::vector<double>& globalCC, const TMatrixDSym& corrs, const TMatrixDSym& covs) ;
void fillLegacyCorrMatrix() const ;
void setStatusHistory(std::vector<std::pair<std::string,int> >& hist) { _statusHistory = hist ; }
Double_t correlation(Int_t row, Int_t col) const;
Double_t covariance(Int_t row, Int_t col) const;
Int_t _status ; // MINUIT status code
Int_t _covQual ; // MINUIT quality code of covariance matrix
Int_t _numBadNLL ; // Number calls with bad (zero,negative) likelihood
Double_t _minNLL ; // NLL at minimum
Double_t _edm ; // Estimated distance to minimum
RooArgList* _constPars ; // List of constant parameters
RooArgList* _initPars ; // List of floating parameters with initial values
RooArgList* _finalPars ; // List of floating parameters with final values
mutable RooArgList* _globalCorr ; //! List of global correlation coefficients
mutable TList _corrMatrix ; //! Correlation matrix (list of RooArgLists)
mutable RooArgList *_randomPars; //! List of floating parameters with most recent random perturbation applied
mutable TMatrixF* _Lt; //! triangular matrix used for generate random perturbations
TMatrixDSym* _CM ; // Correlation matrix
TMatrixDSym* _VM ; // Covariance matrix
TVectorD* _GC ; // Global correlation coefficients
std::vector<std::pair<std::string,int> > _statusHistory ; // History of status codes
ClassDef(RooFitResult,5) // Container class for fit result
};
#endif
|