29 #ifndef ROOT_TFitResultPtr 32 #ifndef ROOT_TObjArray 76 fNdimensions(0), fEntries(0),
77 fTsumw(0), fTsumw2(-1.), fIntegral(0), fIntegralStatus(kNoInt)
84 if (GetCalculateErrors()) {
85 for (
Int_t d = 0; d < fNdimensions; ++d) {
88 fTsumwx2[d] += w * xd * xd;
97 if (GetCalculateErrors()) {
101 fIntegralStatus = kInvalidInt;
104 virtual void InitStorage(
Int_t* nbins,
Int_t chunkSize) = 0;
105 void Init(
const char* name,
const char* title,
107 Int_t chunkSize = 1024 * 16);
108 THnBase* CloneEmpty(
const char* name,
const char* title,
114 TH1* CreateHist(
const char* name,
const char* title,
122 void ResetBase(
Option_t *option=
"");
124 static THnBase* CreateHnAny(
const char* name,
const char* title,
126 Int_t chunkSize = 1024 * 16);
127 static THnBase* CreateHnAny(
const char* name,
const char* title,
129 Int_t chunkSize = 1024 * 16);
143 virtual Long64_t GetNbins()
const = 0;
173 void SetTitle(
const char *title);
180 virtual Long64_t GetBin(
const char* name[])
const = 0;
204 return (
TH1D*) ProjectionAny(1, &xDim,
false, option);
219 const Int_t dim[2] = {xDim, yDim};
220 return (
TH2D*) ProjectionAny(2, dim,
false, option);
233 const Int_t dim[3] = {xDim, yDim, zDim};
234 return (
TH3D*) ProjectionAny(3, dim,
false, option);
239 return (
THnBase*)ProjectionAny(ndim, dim,
kTRUE , option);
247 void Multiply(
const THnBase* h);
254 virtual void Sumw2() = 0;
262 PrintBin(-1, coord, options);
297 fRespectAxisRange(respectAxisRange), fHaveSkippedBin(
kFALSE) {}
315 fIter(hist->CreateIter(respectAxisRange)) {}
323 return fIter->Next(coord);
335 #endif // ROOT_THnBase Double_t GetBinError(const Int_t *idx) const
Bool_t GetCalculateErrors() const
void Add(THist< DIMENSION, PRECISIONA > &to, THist< DIMENSION, PRECISIONB > &from)
Bool_t IsFolder() const
Returns kTRUE in case object contains browsable objects (like containers or lists of other objects)...
void SetEntries(Double_t entries)
void CalculateErrors(Bool_t calc=kTRUE)
Namespace for new ROOT classes and functions.
Long64_t Fill(const Double_t *x, Double_t w=1.)
Double_t GetBinContent(const Int_t *idx) const
void FillBinBase(Double_t w)
THnBaseBinIter(Bool_t respectAxisRange)
Bool_t HaveSkippedBin() const
TH3D * Projection(Int_t xDim, Int_t yDim, Int_t zDim, Option_t *option="") const
void AddBinContent(const Int_t *x, Double_t v=1.)
THnIter(const THnBase *hist, Bool_t respectAxisRange=kFALSE)
Double_t fEntries
browser-helpers for each axis
TBrowser helper for THnBase.
#define ClassDef(name, id)
TList * GetListOfFunctions()
The TNamed class is the base class for all named ROOT classes.
TH1D * Projection(Int_t xDim, Option_t *option="") const
Long64_t Fill(const char *name[], Double_t w=1.)
Int_t GetCoord(Int_t dim) const
void Init(TClassEdit::TInterpreterLookupHelper *helper)
virtual void Reserve(Long64_t)
void SetBinContent(const Int_t *idx, Double_t v)
Double_t GetSumw2() const
Using a TBrowser one can browse all ROOT objects.
virtual void SetFilledBins(Long64_t)
void PrintBin(Int_t *coord, Option_t *options) const
TAxis * GetAxis(Int_t dim) const
Class to manage histogram axis.
3-D histogram with a double per channel (see TH1 documentation)}
Long64_t Next(Int_t *coord=0)
Iterator over THnBase bins (internal implementation).
Provides an indirection to the TFitResult class and with a semantics identical to a TFitResult pointe...
Collection abstract base class.
Double_t GetSumwx2(Int_t dim) const
TH2D * Projection(Int_t yDim, Int_t xDim, Option_t *option="") const
void Reset(Detail::TBranchProxy *x)
1-D histogram with a double per channel (see TH1 documentation)}
Double_t GetEntries() const
Double_t GetSumwx(Int_t dim) const
void UpdateXStat(const Double_t *x, Double_t w=1.)
void SetBinError(const Int_t *idx, Double_t e)
void Print(std::ostream &os, const OptionType &opt)
ROOT::Internal::THnBaseBinIter * fIter
THnBase * ProjectionND(Int_t ndim, const Int_t *dim, Option_t *option="") const
TFitResultPtr Fit(FitObject *h1, TF1 *f1, Foption_t &option, const ROOT::Math::MinimizerOptions &moption, const char *goption, ROOT::Fit::DataRange &range)
Double_t GetBinError(Long64_t linidx) const
const TObjArray * GetListOfAxes() const
Array of doubles (64 bits per element).
Int_t GetNdimensions() const
Binding & operator=(OUT(*fun)(void))
Mother of all ROOT objects.
Bool_t IsFolder() const
Returns kTRUE in case object contains browsable objects (like containers or lists of other objects)...
Double_t GetWeightSum() const
Bool_t RespectsAxisRange() const
Bool_t HaveSkippedBin() const
Iterator over THnBase bins.
Bool_t RespectsAxisRange() const
TObjArray * GetListOfAxes()
Multidimensional histogram base.
Double_t Sqrt(Double_t x)
void SetBinError(Long64_t bin, Double_t e)
2-D histogram with a double per channel (see TH1 documentation)}