Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
TH1.h
Go to the documentation of this file.
1// @(#)root/hist:$Id$
2// Author: Rene Brun 26/12/94
3
4/*************************************************************************
5 * Copyright (C) 1995-2000, Rene Brun and Fons Rademakers. *
6 * All rights reserved. *
7 * *
8 * For the licensing terms see $ROOTSYS/LICENSE. *
9 * For the list of contributors see $ROOTSYS/README/CREDITS. *
10 *************************************************************************/
11
12#ifndef ROOT_TH1
13#define ROOT_TH1
14
15
16//////////////////////////////////////////////////////////////////////////
17// //
18// TH1 //
19// //
20// 1-Dim histogram base class. //
21// //
22//////////////////////////////////////////////////////////////////////////
23
24#include "TAxis.h"
25
26#include "TAttLine.h"
27
28#include "TAttFill.h"
29
30#include "TAttMarker.h"
31
32#include "TArrayC.h"
33#include "TArrayS.h"
34#include "TArrayI.h"
35#include "TArrayL64.h"
36#include "TArrayF.h"
37#include "TArrayD.h"
38#include "TDirectory.h"
39#include "Foption.h"
40
41#include "TVectorFfwd.h"
42#include "TVectorDfwd.h"
43
44#include "TFitResultPtr.h"
45
46#include <algorithm>
47#include <cfloat>
48#include <string>
49#include <stdexcept>
50#include <type_traits>
51#include <array>
52#include <numeric>
53
54class TF1;
55class TH1D;
56class TBrowser;
57class TDirectory;
58class TList;
59class TCollection;
60class TVirtualFFT;
62class TRandom;
63
64namespace ROOT::Internal {
65/**
66 * \brief Creates a sliced copy of the given histogram.
67 *
68 * \tparam T The type of the histogram.
69 * \param histo The histogram to slice.
70 * \param args A vector of integers specifying the low and upper edges of the slice for each dimension.
71 *
72 * \return A new histogram object that is a sliced version of the input histogram.
73 */
74template <typename T>
75T Slice(const T &histo, std::vector<Int_t> &args)
76{
77 static_assert(std::is_pointer_v<decltype(histo.fArray)>,
78 "The type of the histogram to slice must expose the internal array data.");
79
80 TDirectory::TContext _{nullptr};
81 T slicedHisto = histo;
82
83 using ValueType = std::remove_pointer_t<decltype(slicedHisto.fArray)>;
85 return slicedHisto;
86}
88/**
89 * \brief Sets the content of a slice in a histogram.
90 *
91 * \tparam T The type of the histogram.
92 * \param histo The histogram to set the slice content for.
93 * \param input A vector of values to assign to the bins in the specified slice. All input types are converted
94 * to Double_t as that's the type `SetBinContent` eventually uses.
95 * \param sliceEdges A vector of pairs specifying the low and upper edges of the slice for each dimension.
96 */
97template <typename T>
98void SetSliceContent(T &histo, const std::vector<Double_t> &input,
99 const std::vector<std::pair<Int_t, Int_t>> &sliceEdges)
100{
101 static_assert(std::is_pointer_v<decltype(histo.fArray)>,
102 "The type of the histogram to slice must expose the internal array data.");
103
104 using ValueType = std::remove_pointer_t<decltype(histo.fArray)>;
105 histo.template SetSliceContent<ValueType>(input, sliceEdges, histo.fArray);
106}
107} // namespace ROOT::Internal
108
109class TH1 : public TNamed, public TAttLine, public TAttFill, public TAttMarker {
110
111public:
112
113 /// Enumeration specifying type of statistics for bin errors
115 kNormal = 0, ///< Errors with Normal (Wald) approximation: errorUp=errorLow= sqrt(N)
116 kPoisson = 1 , ///< Errors from Poisson interval at 68.3% (1 sigma)
117 kPoisson2 = 2 ///< Errors from Poisson interval at 95% CL (~ 2 sigma)
118 };
119
120 /// Enumeration specifying which axes can be extended
121 enum {
122 kNoAxis = 0, ///< NOTE: Must always be 0 !!!
127 };
128
129 /// Enumeration specifying the way to treat statoverflow
131 kIgnore = 0, ///< Override global flag ignoring the overflows
132 kConsider = 1, ///< Override global flag considering the overflows
133 kNeutral = 2, ///< Adapt to the global flag
134 };
135
136 /// Enumeration specifying inconsistencies between two histograms,
137 /// in increasing severity.
146
147 friend class TH1Merger;
148
149protected:
150 Int_t fNcells; ///< Number of bins(1D), cells (2D) +U/Overflows
151 TAxis fXaxis; ///< X axis descriptor
152 TAxis fYaxis; ///< Y axis descriptor
153 TAxis fZaxis; ///< Z axis descriptor
154 Short_t fBarOffset; ///< (1000*offset) for bar charts or legos
155 Short_t fBarWidth; ///< (1000*width) for bar charts or legos
156 Double_t fEntries; ///< Number of entries
157 Double_t fTsumw; ///< Total Sum of weights
158 Double_t fTsumw2; ///< Total Sum of squares of weights
159 Double_t fTsumwx; ///< Total Sum of weight*X
160 Double_t fTsumwx2; ///< Total Sum of weight*X*X
161 Double_t fMaximum; ///< Maximum value for plotting
162 Double_t fMinimum; ///< Minimum value for plotting
163 Double_t fNormFactor; ///< Normalization factor
164 TArrayD fContour; ///< Array to display contour levels
165 TArrayD fSumw2; ///< Array of sum of squares of weights
166 TString fOption; ///< Histogram options
167 TList *fFunctions; ///<->Pointer to list of functions (fits and user)
168 Int_t fBufferSize; ///< fBuffer size
169 Double_t *fBuffer; ///<[fBufferSize] entry buffer
170 TDirectory *fDirectory; ///<! Pointer to directory holding this histogram
171 Int_t fDimension; ///<! Histogram dimension (1, 2 or 3 dim)
172 Double_t *fIntegral; ///<! Integral of bins used by GetRandom
173 TVirtualHistPainter *fPainter; ///<! Pointer to histogram painter
174 EBinErrorOpt fBinStatErrOpt; ///< Option for bin statistical errors
175 EStatOverflows fStatOverflows; ///< Per object flag to use under/overflows in statistics
176 static Int_t fgBufferSize; ///<! Default buffer size for automatic histograms
177 static Bool_t fgAddDirectory; ///<! Flag to add histograms to the directory
178 static Bool_t fgStatOverflows; ///<! Flag to use under/overflows in statistics
179 static Bool_t fgDefaultSumw2; ///<! Flag to call TH1::Sumw2 automatically at histogram creation time
180
181public:
183
184private:
185 void Build();
186
187 TH1(const TH1&) = delete;
188 TH1& operator=(const TH1&) = delete;
189
190 /**
191 * \brief Slices a histogram in place based on the specified bin ranges for each dimension.
192 *
193 * This function modifies the histogram by extracting a sub-region defined by the provided
194 * bin ranges for each dimension. The resulting histogram will have updated bin counts,
195 * edges, and contents. Bin contents outside the range fall into the flow bins.
196 * The histogram's internal data array is freed and reallocated by this function.
197 * This function is used by the python implementation of the Unified Histogram Interface (UHI)
198 * for slicing.
199 *
200 * \tparam ValueType The type of the histogram's data.
201 * \param args A vector of integers specifying the low and upper edges of the slice for each dimension.
202 * \param dataArray A pointer to the histogram's data array.
203 * \param fN The size of dataArray.
204 */
205 template <typename ValueType>
206 void SliceHistoInPlace(std::vector<Int_t> &args, ValueType *&dataArray, Int_t &fN)
207 {
208 constexpr Int_t kMaxDim = 3;
209 Int_t ndim = args.size() / 2;
210 if (ndim != fDimension) {
211 throw std::invalid_argument(
212 Form("Number of dimensions in slice (%d) does not match histogram dimension (%d).", ndim, fDimension));
213 }
214
215 // Compute new bin counts and edges
216 std::array<Int_t, kMaxDim> nBins{}, totalBins{};
217 std::array<Double_t, kMaxDim> lowEdge{}, upEdge{};
218 for (decltype(ndim) d = 0; d < ndim; ++d) {
219 const auto &axis = (d == 0 ? fXaxis : d == 1 ? fYaxis : fZaxis);
220 auto start = std::max(1, args[d * 2]);
221 auto end = std::min(axis.GetNbins() + 1, args[d * 2 + 1]);
222 nBins[d] = end - start;
223 lowEdge[d] = axis.GetBinLowEdge(start);
224 upEdge[d] = axis.GetBinLowEdge(end);
225 totalBins[d] = axis.GetNbins() + 2;
226 args[2 * d] = start;
227 args[2 * d + 1] = end;
228 }
229
230 // Compute layout sizes for slice
231 size_t rowSz = nBins[0] + 2;
232 size_t planeSz = rowSz * (ndim > 1 ? nBins[1] + 2 : 1);
233 size_t newSize = planeSz * (ndim > 2 ? nBins[2] + 2 : 1);
234
235 // Allocate the new array
236 auto *newArr = new ValueType[newSize]();
237
238 auto rowIncr = 1 + (ndim > 1 ? (rowSz - 1) : 0);
239 ValueType under = 0, over = 0;
240 Bool_t firstUnder = false;
241 Int_t lastOverIdx = 0;
242
243 // Copy the valid slice bins
244 size_t dstIdx = 1 + (ndim > 1 ? rowSz : 0) + (ndim > 2 ? planeSz : 0);
245 for (auto z = (ndim > 2 ? args[4] : 0); z < (ndim > 2 ? args[5] : 1); ++z) {
246 for (auto y = (ndim > 1 ? args[2] : 0); y < (ndim > 1 ? args[3] : 1); ++y) {
247 size_t rowStart = z * totalBins[1] * totalBins[0] + y * totalBins[0] + args[0];
248 std::copy_n(dataArray + rowStart, nBins[0], newArr + dstIdx);
249 if (!firstUnder) {
250 under = std::accumulate(dataArray, dataArray + rowStart, ValueType{});
251 firstUnder = true;
252 } else {
253 under += std::accumulate(dataArray + rowStart - args[0], dataArray + rowStart, ValueType{});
254 }
255 lastOverIdx = rowStart - args[0] + totalBins[0];
256 over += std::accumulate(dataArray + rowStart + nBins[0], dataArray + lastOverIdx, ValueType{});
257 dstIdx += rowIncr;
258 }
259 if (ndim > 2) {
260 dstIdx += 2 * rowIncr;
261 }
262 }
263
264 // Copy the flow bins
265 over += std::accumulate(dataArray + lastOverIdx, dataArray + fN, ValueType{});
266 newArr[0] = under;
267 newArr[newSize - 1] = over;
268
269 // Assign the new array
270 delete[] dataArray;
272
273 // Reconfigure Axes
274 if (ndim == 1) {
275 this->SetBins(nBins[0], lowEdge[0], upEdge[0]);
276 } else if (ndim == 2) {
277 this->SetBins(nBins[0], lowEdge[0], upEdge[0], nBins[1], lowEdge[1], upEdge[1]);
278 } else if (ndim == 3) {
279 this->SetBins(nBins[0], lowEdge[0], upEdge[0], nBins[1], lowEdge[1], upEdge[1], nBins[2], lowEdge[2],
280 upEdge[2]);
281 }
282
283 // Update the statistics
284 ResetStats();
285 }
286
287 template <typename T>
288 friend T ROOT::Internal::Slice(const T &histo, std::vector<Int_t> &args);
289
290 /**
291 * \brief Sets the content of a slice of bins in a histogram.
292 *
293 * This function allows setting the content of a slice of bins in a histogram
294 * by specifying the edges of the slice and the corresponding values to assign.
295 *
296 * \tparam ValueType The type of the histogram's data.
297 * \param values A vector of values to assign to the bins in the specified slice.
298 * \param sliceEdges A vector of pairs specifying the low and upper edges of the slice for each dimension.
299 * \param dataArray A pointer to the histogram's data array.
300 */
301 template <typename ValueType>
302 void SetSliceContent(const std::vector<Double_t> &values, const std::vector<std::pair<Int_t, Int_t>> &sliceEdges,
303 ValueType *dataArray)
304 {
305 const Int_t ndim = sliceEdges.size();
306 if (ndim != fDimension) {
307 throw std::invalid_argument(Form(
308 "Number of edges in the specified slice (%d) does not match histogram dimension (%d).", ndim, fDimension));
309 }
310
311 // Get the indices to set
312 auto getSliceIndices = [](const std::vector<std::pair<Int_t, Int_t>> &edges) -> std::vector<std::vector<Int_t>> {
313 const auto dim = edges.size();
314 if (dim == 0) {
315 return {};
316 }
317
318 std::vector<std::vector<Int_t>> slices(dim);
319 for (size_t d = 0; d < dim; ++d) {
320 for (auto val = edges[d].first; val < edges[d].second; ++val) {
321 slices[d].push_back(val);
322 }
323 }
324
325 size_t totalCombinations = 1;
326 for (const auto &slice : slices) {
327 totalCombinations *= slice.size();
328 }
329
330 std::vector<std::vector<Int_t>> result(totalCombinations, std::vector<Int_t>(3, 0));
331 for (size_t d = 0; d < slices.size(); ++d) {
332 size_t repeat = 1;
333 for (size_t i = d + 1; i < slices.size(); ++i) {
334 repeat *= slices[i].size();
335 }
336
337 size_t index = 0;
338 for (size_t i = 0; i < totalCombinations; ++i) {
339 result[i][d] = slices[d][(index / repeat) % slices[d].size()];
340 ++index;
341 }
342 }
343
344 return result;
345 };
346
348
349 if (values.size() != sliceIndices.size()) {
350 throw std::invalid_argument("Number of provided values does not match number of bins to set.");
351 }
352
353 for (size_t i = 0; i < sliceIndices.size(); ++i) {
354 auto globalBin = this->GetBin(sliceIndices[i][0], sliceIndices[i][1], sliceIndices[i][2]);
355
356 // Set the bin content
357 dataArray[globalBin] = values[i];
358 }
359
360 // Update the statistics
361 ResetStats();
362 }
363
364 template <typename T>
365 friend void ROOT::Internal::SetSliceContent(T &histo, const std::vector<Double_t> &input,
366 const std::vector<std::pair<Int_t, Int_t>> &sliceEdges);
367
368protected:
369 TH1();
370 TH1(const char *name,const char *title,Int_t nbinsx,Double_t xlow,Double_t xup);
371 TH1(const char *name,const char *title,Int_t nbinsx,const Float_t *xbins);
372 TH1(const char *name,const char *title,Int_t nbinsx,const Double_t *xbins);
373
374 Int_t AxisChoice(Option_t *axis) const;
376 virtual Bool_t FindNewAxisLimits(const TAxis* axis, const Double_t point, Double_t& newMin, Double_t &newMax);
378 virtual void SavePrimitiveHelp(std::ostream &out, const char *hname, Option_t *option = "");
380 static Bool_t SameLimitsAndNBins(const TAxis& axis1, const TAxis& axis2);
381 Bool_t IsEmpty() const;
383
384 inline static Double_t AutoP2GetPower2(Double_t x, Bool_t next = kTRUE);
385 inline static Int_t AutoP2GetBins(Int_t n);
386 virtual Int_t AutoP2FindLimits(Double_t min, Double_t max);
387
389 Option_t * opt, Bool_t doerr = kFALSE) const;
390
391 virtual void DoFillN(Int_t ntimes, const Double_t *x, const Double_t *w, Int_t stride=1);
393
394 static bool CheckAxisLimits(const TAxis* a1, const TAxis* a2);
395 static bool CheckBinLimits(const TAxis* a1, const TAxis* a2);
396 static bool CheckBinLabels(const TAxis* a1, const TAxis* a2);
397 static bool CheckEqualAxes(const TAxis* a1, const TAxis* a2);
399 int LoggedInconsistency(const char* name, const TH1* h1, const TH1* h2, bool useMerge=false) const;
400
401public:
402 /// TH1 status bits
404 kNoStats = BIT(9), ///< Don't draw stats box
405 kUserContour = BIT(10), ///< User specified contour levels
406 // kCanRebin = BIT(11), ///< FIXME DEPRECATED - to be removed, replaced by SetCanExtend / CanExtendAllAxes
407 kLogX = BIT(15), ///< X-axis in log scale
408 kIsZoomed = BIT(16), ///< Bit set when zooming on Y axis
409 kNoTitle = BIT(17), ///< Don't draw the histogram title
410 kIsAverage = BIT(18), ///< Bin contents are average (used by Add)
411 kIsNotW = BIT(19), ///< Histogram is forced to be not weighted even when the histogram is filled with weighted
412 /// different than 1.
413 kAutoBinPTwo = BIT(20), ///< Use Power(2)-based algorithm for autobinning
414 kIsHighlight = BIT(21) ///< bit set if histo is highlight
415 };
416 /// Size of statistics data (size of array used in GetStats()/ PutStats )
417 /// - s[0] = sumw s[1] = sumw2
418 /// - s[2] = sumwx s[3] = sumwx2
419 /// - s[4] = sumwy s[5] = sumwy2 s[6] = sumwxy
420 /// - s[7] = sumwz s[8] = sumwz2 s[9] = sumwxz s[10] = sumwyz
421 /// - s[11] = sumwt s[12] = sumwt2 (11 and 12 used only by TProfile3D)
422 enum {
423 kNstat = 13 ///< Size of statistics data (up to TProfile3D)
424 };
425
426
427 ~TH1() override;
428
429 virtual Bool_t Add(TF1 *h1, Double_t c1=1, Option_t *option="");
430 virtual Bool_t Add(const TH1 *h1, Double_t c1=1);
431 virtual Bool_t Add(const TH1 *h, const TH1 *h2, Double_t c1=1, Double_t c2=1);
432 /// Increment bin content by 1.
433 /// Passing an out-of-range bin leads to undefined behavior
434 virtual void AddBinContent(Int_t bin) = 0;
435 /// Increment bin content by a weight w.
436 /// Passing an out-of-range bin leads to undefined behavior
437 virtual void AddBinContent(Int_t bin, Double_t w) = 0;
438 static void AddDirectory(Bool_t add=kTRUE);
439 static Bool_t AddDirectoryStatus();
440 void Browse(TBrowser *b) override;
441 virtual Bool_t CanExtendAllAxes() const;
442 virtual Double_t Chi2Test(const TH1* h2, Option_t *option = "UU", Double_t *res = nullptr) const;
443 virtual Double_t Chi2TestX(const TH1* h2, Double_t &chi2, Int_t &ndf, Int_t &igood,Option_t *option = "UU", Double_t *res = nullptr) const;
444 virtual Double_t Chisquare(TF1 * f1, Option_t *option = "") const;
445 static Int_t CheckConsistency(const TH1* h1, const TH1* h2);
446 virtual void ClearUnderflowAndOverflow();
448 TObject* Clone(const char *newname = "") const override;
449 void Copy(TObject &hnew) const override;
450 virtual void DirectoryAutoAdd(TDirectory *);
451 Int_t DistancetoPrimitive(Int_t px, Int_t py) override;
452 virtual Bool_t Divide(TF1 *f1, Double_t c1=1);
453 virtual Bool_t Divide(const TH1 *h1);
454 virtual Bool_t Divide(const TH1 *h1, const TH1 *h2, Double_t c1=1, Double_t c2=1, Option_t *option="");
455 void Draw(Option_t *option = "") override;
456 virtual TH1 *DrawCopy(Option_t *option="", const char * name_postfix = "_copy") const;
457 virtual TH1 *DrawNormalized(Option_t *option="", Double_t norm=1) const;
458 virtual void DrawPanel(); // *MENU*
459 virtual Int_t BufferEmpty(Int_t action=0);
460 virtual void Eval(TF1 *f1, Option_t *option="");
461 void ExecuteEvent(Int_t event, Int_t px, Int_t py) override;
462 virtual void ExtendAxis(Double_t x, TAxis *axis);
463 virtual TH1 *FFT(TH1* h_output, Option_t *option);
464 virtual Int_t Fill(Double_t x);
465 virtual Int_t Fill(Double_t x, Double_t w);
466 virtual Int_t Fill(const char *name, Double_t w);
467 virtual void FillN(Int_t ntimes, const Double_t *x, const Double_t *w, Int_t stride=1);
468 virtual void FillN(Int_t, const Double_t *, const Double_t *, const Double_t *, Int_t) {}
469 virtual void FillRandom(TF1 *f1, Int_t ntimes=5000, TRandom * rng = nullptr);
470 void FillRandom(const char *fname, Int_t ntimes=5000, TRandom * rng = nullptr);
471 virtual void FillRandom(TH1 *h, Int_t ntimes=5000, TRandom * rng = nullptr);
472 virtual Int_t FindBin(Double_t x, Double_t y=0, Double_t z=0);
473 virtual Int_t FindFixBin(Double_t x, Double_t y=0, Double_t z=0) const;
474 virtual Int_t FindFirstBinAbove(Double_t threshold=0, Int_t axis=1, Int_t firstBin=1, Int_t lastBin=-1) const;
475 virtual Int_t FindLastBinAbove (Double_t threshold=0, Int_t axis=1, Int_t firstBin=1, Int_t lastBin=-1) const;
476 TObject *FindObject(const char *name) const override;
477 TObject *FindObject(const TObject *obj) const override;
478 virtual TFitResultPtr Fit(const char *formula ,Option_t *option="" ,Option_t *goption="", Double_t xmin=0, Double_t xmax=0); // *MENU*
480 virtual void FitPanel(); // *MENU*
482 Int_t GetBufferLength() const {return fBuffer ? (Int_t)fBuffer[0] : 0;}
483 Int_t GetBufferSize () const {return fBufferSize;}
484 const Double_t *GetBuffer() const {return fBuffer;}
486 virtual Double_t *GetIntegral();
487 TH1 *GetCumulative(Bool_t forward = kTRUE, const char* suffix = "_cumulative") const;
488
490
491 virtual Int_t GetNdivisions(Option_t *axis="X") const;
492 virtual Color_t GetAxisColor(Option_t *axis="X") const;
493 virtual Color_t GetLabelColor(Option_t *axis="X") const;
494 virtual Style_t GetLabelFont(Option_t *axis="X") const;
495 virtual Float_t GetLabelOffset(Option_t *axis="X") const;
496 virtual Float_t GetLabelSize(Option_t *axis="X") const;
497 virtual Style_t GetTitleFont(Option_t *axis="X") const;
498 virtual Float_t GetTitleOffset(Option_t *axis="X") const;
499 virtual Float_t GetTitleSize(Option_t *axis="X") const;
500 virtual Float_t GetTickLength(Option_t *axis="X") const;
501 virtual Float_t GetBarOffset() const {return Float_t(0.001*Float_t(fBarOffset));}
502 virtual Float_t GetBarWidth() const {return Float_t(0.001*Float_t(fBarWidth));}
503 virtual Int_t GetContour(Double_t *levels = nullptr);
504 virtual Double_t GetContourLevel(Int_t level) const;
505 virtual Double_t GetContourLevelPad(Int_t level) const;
506
507 virtual Int_t GetBin(Int_t binx, Int_t biny=0, Int_t binz=0) const;
508 virtual void GetBinXYZ(Int_t binglobal, Int_t &binx, Int_t &biny, Int_t &binz) const;
509 virtual Double_t GetBinCenter(Int_t bin) const;
510 virtual Double_t GetBinContent(Int_t bin) const;
511 virtual Double_t GetBinContent(Int_t bin, Int_t) const { return GetBinContent(bin); }
512 virtual Double_t GetBinContent(Int_t bin, Int_t, Int_t) const { return GetBinContent(bin); }
513 virtual Double_t GetBinError(Int_t bin) const;
514 virtual Double_t GetBinError(Int_t binx, Int_t biny) const { return GetBinError(GetBin(binx, biny)); } // for 2D histograms only
515 virtual Double_t GetBinError(Int_t binx, Int_t biny, Int_t binz) const { return GetBinError(GetBin(binx, biny, binz)); } // for 3D histograms only
516 virtual Double_t GetBinErrorLow(Int_t bin) const;
517 virtual Double_t GetBinErrorUp(Int_t bin) const;
519 virtual Double_t GetBinLowEdge(Int_t bin) const;
520 virtual Double_t GetBinWidth(Int_t bin) const;
522 virtual void GetCenter(Double_t *center) const;
523 static Bool_t GetDefaultSumw2();
525 virtual Double_t GetEntries() const;
526 virtual Double_t GetEffectiveEntries() const;
527 virtual TF1 *GetFunction(const char *name) const;
528 virtual Int_t GetDimension() const { return fDimension; }
529 virtual Double_t GetKurtosis(Int_t axis=1) const;
530 virtual void GetLowEdge(Double_t *edge) const;
532 virtual Int_t GetMaximumBin() const;
534 virtual Double_t GetMaximumStored() const {return fMaximum;}
535 virtual Double_t GetMinimum(Double_t minval=-FLT_MAX) const;
536 virtual Int_t GetMinimumBin() const;
538 virtual Double_t GetMinimumStored() const {return fMinimum;}
539 virtual void GetMinimumAndMaximum(Double_t& min, Double_t& max) const;
540 virtual Double_t GetMean(Int_t axis=1) const;
541 virtual Double_t GetMeanError(Int_t axis=1) const;
542 virtual Int_t GetNbinsX() const {return fXaxis.GetNbins();}
543 virtual Int_t GetNbinsY() const {return fYaxis.GetNbins();}
544 virtual Int_t GetNbinsZ() const {return fZaxis.GetNbins();}
545 virtual Int_t GetNcells() const {return fNcells; }
546 virtual Double_t GetNormFactor() const {return fNormFactor;}
547 char *GetObjectInfo(Int_t px, Int_t py) const override;
548 Option_t *GetOption() const override { return fOption.Data(); }
549
551
552 virtual Int_t GetQuantiles(Int_t n, Double_t *xp, const Double_t *p = nullptr);
553 virtual Double_t GetRandom(TRandom * rng = nullptr) const;
554 virtual void GetStats(Double_t *stats) const;
555 virtual Double_t GetStdDev(Int_t axis=1) const;
556 virtual Double_t GetStdDevError(Int_t axis=1) const;
558 /// Return the sum of weights across all bins excluding under/overflows.
559 /// \see TH1::GetSumOfAllWeights()
560 virtual Double_t GetSumOfWeights() const { return GetSumOfAllWeights(false); }
561 virtual TArrayD *GetSumw2() {return &fSumw2;}
562 virtual const TArrayD *GetSumw2() const {return &fSumw2;}
563 virtual Int_t GetSumw2N() const {return fSumw2.fN;}
564 /// This function returns the Standard Deviation (Sigma) of the distribution not the Root Mean Square (RMS).
565 /// The name "RMS" is been often used as a synonym for the Standard Deviation and it was introduced many years ago (Hbook/PAW times).
566 /// We keep the name GetRMS for continuity as an alias to GetStdDev. GetStdDev() should be used instead.
567 Double_t GetRMS(Int_t axis=1) const { return GetStdDev(axis); }
568 Double_t GetRMSError(Int_t axis=1) const { return GetStdDevError(axis); }
569
570 virtual Double_t GetSkewness(Int_t axis=1) const;
571 EStatOverflows GetStatOverflows() const { return fStatOverflows; } ///< Get the behaviour adopted by the object about the statoverflows. See EStatOverflows for more information.
572 TAxis* GetXaxis() { return &fXaxis; }
573 TAxis* GetYaxis() { return &fYaxis; }
574 TAxis* GetZaxis() { return &fZaxis; }
575 const TAxis* GetXaxis() const { return &fXaxis; }
576 const TAxis* GetYaxis() const { return &fYaxis; }
577 const TAxis* GetZaxis() const { return &fZaxis; }
578 virtual Double_t Integral(Option_t *option="") const;
579 virtual Double_t Integral(Int_t binx1, Int_t binx2, Option_t *option="") const;
581 virtual Double_t Interpolate(Double_t x) const;
582 virtual Double_t Interpolate(Double_t x, Double_t y) const;
583 virtual Double_t Interpolate(Double_t x, Double_t y, Double_t z) const;
584 Bool_t IsBinOverflow(Int_t bin, Int_t axis = 0) const;
585 Bool_t IsBinUnderflow(Int_t bin, Int_t axis = 0) const;
586 virtual Bool_t IsHighlight() const { return TestBit(kIsHighlight); }
587 virtual Double_t AndersonDarlingTest(const TH1 *h2, Option_t *option="") const;
588 virtual Double_t AndersonDarlingTest(const TH1 *h2, Double_t &advalue) const;
589 virtual Double_t KolmogorovTest(const TH1 *h2, Option_t *option="") const;
590 virtual void LabelsDeflate(Option_t *axis="X");
591 virtual void LabelsInflate(Option_t *axis="X");
592 virtual void LabelsOption(Option_t *option="h", Option_t *axis="X");
593 virtual Long64_t Merge(TCollection *list) { return Merge(list,""); }
595 virtual Bool_t Multiply(TF1 *f1, Double_t c1=1);
596 virtual Bool_t Multiply(const TH1 *h1);
597 virtual Bool_t Multiply(const TH1 *h1, const TH1 *h2, Double_t c1=1, Double_t c2=1, Option_t *option="");
598 virtual void Normalize(Option_t *option=""); // *MENU*
599 void Paint(Option_t *option = "") override;
600 void Print(Option_t *option = "") const override;
601 virtual void PutStats(Double_t *stats);
602 virtual TH1 *Rebin(Int_t ngroup = 2, const char *newname = "", const Double_t *xbins = nullptr); // *MENU*
603 virtual TH1 *RebinX(Int_t ngroup = 2, const char *newname = "") { return Rebin(ngroup,newname, (Double_t*) nullptr); }
604 virtual void Rebuild(Option_t *option = "");
605 void RecursiveRemove(TObject *obj) override;
606 virtual void Reset(Option_t *option = "");
607 virtual void ResetStats();
608 void SaveAs(const char *filename = "hist", Option_t *option = "") const override; // *MENU*
609 void SavePrimitive(std::ostream &out, Option_t *option = "") override;
610 virtual void Scale(Double_t c1=1, Option_t *option=""); // *MENU*
611 virtual void SetAxisColor(Color_t color=1, Option_t *axis="X");
612 virtual void SetAxisRange(Double_t xmin, Double_t xmax, Option_t *axis="X");
613 virtual void SetBarOffset(Float_t offset=0.25) {fBarOffset = Short_t(1000*offset);}
614 virtual void SetBarWidth(Float_t width=0.5) {fBarWidth = Short_t(1000*width);}
615 virtual void SetBinContent(Int_t bin, Double_t content);
618 virtual void SetBinError(Int_t bin, Double_t error);
619 virtual void SetBinError(Int_t binx, Int_t biny, Double_t error);
620 virtual void SetBinError(Int_t binx, Int_t biny, Int_t binz, Double_t error);
621 virtual void SetBins(Int_t nx, Double_t xmin, Double_t xmax);
622 virtual void SetBins(Int_t nx, const Double_t *xBins);
624 virtual void SetBins(Int_t nx, const Double_t *xBins, Int_t ny, const Double_t *yBins);
626 Int_t nz, Double_t zmin, Double_t zmax);
627 virtual void SetBins(Int_t nx, const Double_t *xBins, Int_t ny, const Double_t * yBins, Int_t nz,
628 const Double_t *zBins);
629 virtual void SetBinsLength(Int_t = -1) { } //redefined in derived classes
631 virtual void SetBuffer(Int_t bufsize, Option_t *option="");
633 virtual void SetContent(const Double_t *content);
634 virtual void SetContour(Int_t nlevels, const Double_t *levels = nullptr);
635 virtual void SetContourLevel(Int_t level, Double_t value);
636 virtual void SetColors(Color_t linecolor = -1, Color_t markercolor = -1, Color_t fillcolor = -1);
637 static void SetDefaultBufferSize(Int_t bufsize=1000);
638 static void SetDefaultSumw2(Bool_t sumw2=kTRUE);
639 virtual void SetDirectory(TDirectory *dir);
640 virtual void SetEntries(Double_t n) { fEntries = n; }
641 virtual void SetError(const Double_t *error);
642 virtual void SetHighlight(Bool_t set = kTRUE); // *TOGGLE* *GETTER=IsHighlight
643 virtual void SetLabelColor(Color_t color=1, Option_t *axis="X");
644 virtual void SetLabelFont(Style_t font=62, Option_t *axis="X");
645 virtual void SetLabelOffset(Float_t offset=0.005, Option_t *axis="X");
646 virtual void SetLabelSize(Float_t size=0.02, Option_t *axis="X");
647
648 /*
649 * Set the minimum / maximum value for the Y axis (1-D histograms) or Z axis (2-D histograms)
650 * By default the maximum / minimum value used in drawing is the maximum / minimum value of the histogram
651 * plus a margin of 10%. If these functions are called, the values are used without any extra margin.
652 */
653 virtual void SetMaximum(Double_t maximum = -1111) { fMaximum = maximum; } // *MENU*
654 virtual void SetMinimum(Double_t minimum = -1111) { fMinimum = minimum; } // *MENU*
655
656 void SetName(const char *name) override; // *MENU*
657 void SetNameTitle(const char *name, const char *title) override;
658 virtual void SetNdivisions(Int_t n=510, Option_t *axis="X");
659 virtual void SetNormFactor(Double_t factor=1) {fNormFactor = factor;}
660 virtual void SetStats(Bool_t stats=kTRUE); // *MENU*
661 virtual void SetOption(Option_t *option=" ") {fOption = option;}
662 virtual void SetTickLength(Float_t length=0.02, Option_t *axis="X");
663 virtual void SetTitleFont(Style_t font=62, Option_t *axis="X");
664 virtual void SetTitleOffset(Float_t offset=1, Option_t *axis="X");
665 virtual void SetTitleSize(Float_t size=0.02, Option_t *axis="X");
666 void SetStatOverflows(EStatOverflows statOverflows) { fStatOverflows = statOverflows; } ///< See GetStatOverflows for more information.
667 void SetTitle(const char *title) override; // *MENU*
668 virtual void SetXTitle(const char *title) {fXaxis.SetTitle(title);}
669 virtual void SetYTitle(const char *title) {fYaxis.SetTitle(title);}
670 virtual void SetZTitle(const char *title) {fZaxis.SetTitle(title);}
671 virtual TH1 *ShowBackground(Int_t niter=20, Option_t *option="same"); // *MENU*
672 virtual Int_t ShowPeaks(Double_t sigma=2, Option_t *option="", Double_t threshold=0.05); // *MENU*
673 virtual void Smooth(Int_t ntimes=1, Option_t *option=""); // *MENU*
674 static void SmoothArray(Int_t NN, Double_t *XX, Int_t ntimes=1);
675 static void StatOverflows(Bool_t flag=kTRUE);
676 virtual void Sumw2(Bool_t flag = kTRUE);
677 void UseCurrentStyle() override;
679
680 static void SavePrimitiveFunctions(std::ostream &out, const char *varname, TList *lst);
681
682 // TODO: Remove obsolete methods in v6-04
684 { Obsolete("GetCellContent", "v6-00", "v6-04"); return GetBinContent(GetBin(binx, biny)); }
686 { Obsolete("GetCellError", "v6-00", "v6-04"); return GetBinError(binx, biny); }
687 virtual void RebinAxis(Double_t x, TAxis *axis)
688 { Obsolete("RebinAxis", "v6-00", "v6-04"); ExtendAxis(x, axis); }
690 { Obsolete("SetCellContent", "v6-00", "v6-04"); SetBinContent(GetBin(binx, biny), content); }
692 { Obsolete("SetCellError", "v6-00", "v6-04"); SetBinError(binx, biny, content); }
693
694 ClassDefOverride(TH1,8) //1-Dim histogram base class
695
697
698 /// Raw retrieval of bin content on internal data structure
699 /// see convention for numbering bins in TH1::GetBin
701
702 /// Raw update of bin content on internal data structure
703 /// see convention for numbering bins in TH1::GetBin
705
707};
708
709namespace cling {
710 std::string printValue(TH1 *val);
711}
712
713//________________________________________________________________________
714
715class TH1C : public TH1, public TArrayC {
716
717public:
718 TH1C();
719 TH1C(const char *name,const char *title,Int_t nbinsx,Double_t xlow,Double_t xup);
720 TH1C(const char *name,const char *title,Int_t nbinsx,const Float_t *xbins);
721 TH1C(const char *name,const char *title,Int_t nbinsx,const Double_t *xbins);
722 TH1C(const TH1C &h1c);
723 TH1C& operator=(const TH1C &h1);
724 ~TH1C() override;
725
726 void AddBinContent(Int_t bin) override;
727 void AddBinContent(Int_t bin, Double_t w) override;
728 void Copy(TObject &hnew) const override;
729 void Reset(Option_t *option="") override;
730 void SetBinsLength(Int_t n=-1) override;
731
732 ClassDefOverride(TH1C,3) //1-Dim histograms (one char per channel)
733
734 friend TH1C operator*(Double_t c1, const TH1C &h1);
735 friend TH1C operator*(const TH1C &h1, Double_t c1);
736 friend TH1C operator+(const TH1C &h1, const TH1C &h2);
737 friend TH1C operator-(const TH1C &h1, const TH1C &h2);
738 friend TH1C operator*(const TH1C &h1, const TH1C &h2);
739 friend TH1C operator/(const TH1C &h1, const TH1C &h2);
740
742 Double_t RetrieveBinContent(Int_t bin) const override { return Double_t (fArray[bin]); }
743 void UpdateBinContent(Int_t bin, Double_t content) override { fArray[bin] = Char_t (content); }
744};
745
747inline
749TH1C operator+(const TH1C &h1, const TH1C &h2);
750TH1C operator-(const TH1C &h1, const TH1C &h2);
751TH1C operator*(const TH1C &h1, const TH1C &h2);
752TH1C operator/(const TH1C &h1, const TH1C &h2);
753
754//________________________________________________________________________
755
756class TH1S : public TH1, public TArrayS {
757
758public:
759 TH1S();
760 TH1S(const char *name,const char *title,Int_t nbinsx,Double_t xlow,Double_t xup);
761 TH1S(const char *name,const char *title,Int_t nbinsx,const Float_t *xbins);
762 TH1S(const char *name,const char *title,Int_t nbinsx,const Double_t *xbins);
763 TH1S(const TH1S &h1s);
764 TH1S& operator=(const TH1S &h1);
765 ~TH1S() override;
766
767 void AddBinContent(Int_t bin) override;
768 void AddBinContent(Int_t bin, Double_t w) override;
769 void Copy(TObject &hnew) const override;
770 void Reset(Option_t *option="") override;
771 void SetBinsLength(Int_t n=-1) override;
772
773 ClassDefOverride(TH1S,3) //1-Dim histograms (one short per channel)
774
775 friend TH1S operator*(Double_t c1, const TH1S &h1);
776 friend TH1S operator*(const TH1S &h1, Double_t c1);
777 friend TH1S operator+(const TH1S &h1, const TH1S &h2);
778 friend TH1S operator-(const TH1S &h1, const TH1S &h2);
779 friend TH1S operator*(const TH1S &h1, const TH1S &h2);
780 friend TH1S operator/(const TH1S &h1, const TH1S &h2);
781
783 Double_t RetrieveBinContent(Int_t bin) const override { return Double_t (fArray[bin]); }
784 void UpdateBinContent(Int_t bin, Double_t content) override { fArray[bin] = Short_t (content); }
785};
786
788inline
790TH1S operator+(const TH1S &h1, const TH1S &h2);
791TH1S operator-(const TH1S &h1, const TH1S &h2);
792TH1S operator*(const TH1S &h1, const TH1S &h2);
793TH1S operator/(const TH1S &h1, const TH1S &h2);
794
795//________________________________________________________________________
796
797class TH1I: public TH1, public TArrayI {
798
799public:
800 TH1I();
801 TH1I(const char *name,const char *title,Int_t nbinsx,Double_t xlow,Double_t xup);
802 TH1I(const char *name,const char *title,Int_t nbinsx,const Float_t *xbins);
803 TH1I(const char *name,const char *title,Int_t nbinsx,const Double_t *xbins);
804 TH1I(const TH1I &h1i);
805 TH1I& operator=(const TH1I &h1);
806 ~TH1I() override;
807
808 void AddBinContent(Int_t bin) override;
809 void AddBinContent(Int_t bin, Double_t w) override;
810 void Copy(TObject &hnew) const override;
811 void Reset(Option_t *option="") override;
812 void SetBinsLength(Int_t n=-1) override;
813
814 ClassDefOverride(TH1I,3) //1-Dim histograms (one 32 bit integer per channel)
815
816 friend TH1I operator*(Double_t c1, const TH1I &h1);
817 friend TH1I operator*(const TH1I &h1, Double_t c1);
818 friend TH1I operator+(const TH1I &h1, const TH1I &h2);
819 friend TH1I operator-(const TH1I &h1, const TH1I &h2);
820 friend TH1I operator*(const TH1I &h1, const TH1I &h2);
821 friend TH1I operator/(const TH1I &h1, const TH1I &h2);
822
824 Double_t RetrieveBinContent(Int_t bin) const override { return Double_t (fArray[bin]); }
825 void UpdateBinContent(Int_t bin, Double_t content) override { fArray[bin] = Int_t (content); }
826};
827
829inline
831TH1I operator+(const TH1I &h1, const TH1I &h2);
832TH1I operator-(const TH1I &h1, const TH1I &h2);
833TH1I operator*(const TH1I &h1, const TH1I &h2);
834TH1I operator/(const TH1I &h1, const TH1I &h2);
835
836//________________________________________________________________________
837
838class TH1L: public TH1, public TArrayL64 {
839
840public:
841 TH1L();
842 TH1L(const char *name,const char *title,Int_t nbinsx,Double_t xlow,Double_t xup);
843 TH1L(const char *name,const char *title,Int_t nbinsx,const Float_t *xbins);
844 TH1L(const char *name,const char *title,Int_t nbinsx,const Double_t *xbins);
845 TH1L(const TH1L &h1l);
846 TH1L& operator=(const TH1L &h1);
847 ~TH1L() override;
848
849 void AddBinContent(Int_t bin) override;
850 void AddBinContent(Int_t bin, Double_t w) override;
851 void Copy(TObject &hnew) const override;
852 void Reset(Option_t *option="") override;
853 void SetBinsLength(Int_t n=-1) override;
854
855 ClassDefOverride(TH1L,0) //1-Dim histograms (one 64 bit integer per channel)
856
857 friend TH1L operator*(Double_t c1, const TH1L &h1);
858 friend TH1L operator*(const TH1L &h1, Double_t c1);
859 friend TH1L operator+(const TH1L &h1, const TH1L &h2);
860 friend TH1L operator-(const TH1L &h1, const TH1L &h2);
861 friend TH1L operator*(const TH1L &h1, const TH1L &h2);
862 friend TH1L operator/(const TH1L &h1, const TH1L &h2);
863
865 Double_t RetrieveBinContent(Int_t bin) const override { return Double_t (fArray[bin]); }
866 void UpdateBinContent(Int_t bin, Double_t content) override { fArray[bin] = Int_t (content); }
867};
868
870inline
872TH1L operator+(const TH1L &h1, const TH1L &h2);
873TH1L operator-(const TH1L &h1, const TH1L &h2);
874TH1L operator*(const TH1L &h1, const TH1L &h2);
875TH1L operator/(const TH1L &h1, const TH1L &h2);
876
877//________________________________________________________________________
878
879class TH1F : public TH1, public TArrayF {
880
881public:
882 TH1F();
883 TH1F(const char *name,const char *title,Int_t nbinsx,Double_t xlow,Double_t xup);
884 TH1F(const char *name,const char *title,Int_t nbinsx,const Float_t *xbins);
885 TH1F(const char *name,const char *title,Int_t nbinsx,const Double_t *xbins);
886 explicit TH1F(const TVectorF &v);
887 TH1F(const TH1F &h1f);
888 TH1F& operator=(const TH1F &h1);
889 ~TH1F() override;
890
891 /// Increment bin content by 1.
892 /// Passing an out-of-range bin leads to undefined behavior
893 void AddBinContent(Int_t bin) override {++fArray[bin];}
894 /// Increment bin content by a weight w.
895 /// \warning The value of w is cast to `Float_t` before being added.
896 /// Passing an out-of-range bin leads to undefined behavior
897 void AddBinContent(Int_t bin, Double_t w) override
898 { fArray[bin] += Float_t (w); }
899 void Copy(TObject &hnew) const override;
900 void Reset(Option_t *option = "") override;
901 void SetBinsLength(Int_t n=-1) override;
902
903 ClassDefOverride(TH1F,3) //1-Dim histograms (one float per channel)
904
905 friend TH1F operator*(Double_t c1, const TH1F &h1);
906 friend TH1F operator*(const TH1F &h1, Double_t c1);
907 friend TH1F operator+(const TH1F &h1, const TH1F &h2);
908 friend TH1F operator-(const TH1F &h1, const TH1F &h2);
909 friend TH1F operator*(const TH1F &h1, const TH1F &h2);
910 friend TH1F operator/(const TH1F &h1, const TH1F &h2);
911
913 Double_t RetrieveBinContent(Int_t bin) const override { return Double_t (fArray[bin]); }
914 void UpdateBinContent(Int_t bin, Double_t content) override { fArray[bin] = Float_t (content); }
915};
916
918inline
920TH1F operator+(const TH1F &h1, const TH1F &h2);
921TH1F operator-(const TH1F &h1, const TH1F &h2);
922TH1F operator*(const TH1F &h1, const TH1F &h2);
923TH1F operator/(const TH1F &h1, const TH1F &h2);
924
925//________________________________________________________________________
926
927class TH1D : public TH1, public TArrayD {
928
929public:
930 TH1D();
931 TH1D(const char *name,const char *title,Int_t nbinsx,Double_t xlow,Double_t xup);
932 TH1D(const char *name,const char *title,Int_t nbinsx,const Float_t *xbins);
933 TH1D(const char *name,const char *title,Int_t nbinsx,const Double_t *xbins);
934 explicit TH1D(const TVectorD &v);
935 TH1D(const TH1D &h1d);
936 TH1D& operator=(const TH1D &h1);
937 ~TH1D() override;
938
939 /// Increment bin content by 1.
940 /// Passing an out-of-range bin leads to undefined behavior
941 void AddBinContent(Int_t bin) override {++fArray[bin];}
942 /// Increment bin content by a weight w
943 /// Passing an out-of-range bin leads to undefined behavior
944 void AddBinContent(Int_t bin, Double_t w) override
945 {fArray[bin] += Double_t (w);}
946 void Copy(TObject &hnew) const override;
947 void Reset(Option_t *option = "") override;
948 void SetBinsLength(Int_t n=-1) override;
949
950 ClassDefOverride(TH1D,3) //1-Dim histograms (one double per channel)
951
952 friend TH1D operator*(Double_t c1, const TH1D &h1);
953 friend TH1D operator*(const TH1D &h1, Double_t c1);
954 friend TH1D operator+(const TH1D &h1, const TH1D &h2);
955 friend TH1D operator-(const TH1D &h1, const TH1D &h2);
956 friend TH1D operator*(const TH1D &h1, const TH1D &h2);
957 friend TH1D operator/(const TH1D &h1, const TH1D &h2);
958
960 Double_t RetrieveBinContent(Int_t bin) const override { return fArray[bin]; }
961 void UpdateBinContent(Int_t bin, Double_t content) override { fArray[bin] = content; }
962};
963
965inline
967TH1D operator+(const TH1D &h1, const TH1D &h2);
968TH1D operator-(const TH1D &h1, const TH1D &h2);
969TH1D operator*(const TH1D &h1, const TH1D &h2);
970TH1D operator/(const TH1D &h1, const TH1D &h2);
971
972 extern TH1 *R__H(Int_t hid);
973 extern TH1 *R__H(const char *hname);
974
975#endif
#define d(i)
Definition RSha256.hxx:102
#define b(i)
Definition RSha256.hxx:100
#define c(i)
Definition RSha256.hxx:101
#define h(i)
Definition RSha256.hxx:106
size_t size(const MatrixT &matrix)
retrieve the size of a square matrix
short Style_t
Style number (short)
Definition RtypesCore.h:96
bool Bool_t
Boolean (0=false, 1=true) (bool)
Definition RtypesCore.h:77
int Int_t
Signed integer 4 bytes (int)
Definition RtypesCore.h:59
short Color_t
Color number (short)
Definition RtypesCore.h:99
char Char_t
Character 1 byte (char)
Definition RtypesCore.h:51
unsigned int UInt_t
Unsigned integer 4 bytes (unsigned int)
Definition RtypesCore.h:60
float Float_t
Float 4 bytes (float)
Definition RtypesCore.h:71
short Short_t
Signed Short integer 2 bytes (short)
Definition RtypesCore.h:53
constexpr Bool_t kFALSE
Definition RtypesCore.h:108
double Double_t
Double 8 bytes.
Definition RtypesCore.h:73
long long Long64_t
Portable signed long integer 8 bytes.
Definition RtypesCore.h:83
constexpr Bool_t kTRUE
Definition RtypesCore.h:107
const char Option_t
Option string (const char)
Definition RtypesCore.h:80
#define BIT(n)
Definition Rtypes.h:91
#define ClassDefOverride(name, id)
Definition Rtypes.h:348
ROOT::Detail::TRangeCast< T, true > TRangeDynCast
TRangeDynCast is an adapter class that allows the typed iteration through a TCollection.
winID h TVirtualViewer3D TVirtualGLPainter p
Option_t Option_t option
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void input
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t Float_t Float_t Int_t Int_t UInt_t UInt_t Rectangle_t Int_t Int_t Window_t TString Int_t GCValues_t GetPrimarySelectionOwner GetDisplay GetScreen GetColormap GetNativeEvent const char const char dpyName wid window const char font_name cursor keysym reg const char only_if_exist regb h Point_t winding char text const char depth char const char Int_t count const char ColorStruct_t color const char filename
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t Float_t Float_t Int_t Int_t UInt_t UInt_t Rectangle_t Int_t Int_t Window_t TString Int_t GCValues_t GetPrimarySelectionOwner GetDisplay GetScreen GetColormap GetNativeEvent const char const char dpyName wid window const char font_name cursor keysym reg const char only_if_exist regb h Point_t winding char text const char depth char const char Int_t count const char ColorStruct_t color const char Pixmap_t Pixmap_t PictureAttributes_t attr const char char ret_data h unsigned char height h offset
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t Float_t Float_t Int_t Int_t UInt_t UInt_t Rectangle_t result
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t index
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t Float_t Float_t Int_t Int_t UInt_t UInt_t Rectangle_t Int_t Int_t Window_t TString Int_t GCValues_t GetPrimarySelectionOwner GetDisplay GetScreen GetColormap GetNativeEvent const char const char dpyName wid window const char font_name cursor keysym reg const char only_if_exist regb h Point_t winding char text const char depth char const char Int_t count const char ColorStruct_t color const char Pixmap_t Pixmap_t PictureAttributes_t attr const char char ret_data h unsigned char height h length
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void value
Option_t Option_t width
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t Float_t Float_t Int_t Int_t UInt_t UInt_t Rectangle_t Int_t Int_t Window_t TString Int_t GCValues_t GetPrimarySelectionOwner GetDisplay GetScreen GetColormap GetNativeEvent const char const char dpyName wid window const char font_name cursor keysym reg const char only_if_exist regb h Point_t winding char text const char depth char const char Int_t count const char ColorStruct_t color const char Pixmap_t Pixmap_t PictureAttributes_t attr const char char ret_data h unsigned char height h Atom_t Int_t ULong_t ULong_t unsigned char prop_list Atom_t Atom_t Atom_t Time_t type
char name[80]
Definition TGX11.cxx:110
TH1C operator+(const TH1C &h1, const TH1C &h2)
Operator +.
Definition TH1.cxx:9615
TH1C operator-(const TH1C &h1, const TH1C &h2)
Operator -.
Definition TH1.cxx:9626
TH1C operator/(const TH1C &h1, const TH1C &h2)
Operator /.
Definition TH1.cxx:9648
TH1 * R__H(Int_t hid)
return pointer to histogram with name hid if id >=0 h_id if id <0
Definition TH1.cxx:10586
TH1C operator*(Double_t c1, const TH1C &h1)
Operator *.
Definition TH1.cxx:9604
float xmin
float ymin
float xmax
float ymax
char * Form(const char *fmt,...)
Formats a string in a circular formatting buffer.
Definition TString.cxx:2496
R__EXTERN Foption_t Foption
#define _(A, B)
Definition cfortran.h:108
Array of chars or bytes (8 bits per element).
Definition TArrayC.h:27
Char_t * fArray
Definition TArrayC.h:30
Array of doubles (64 bits per element).
Definition TArrayD.h:27
Double_t * fArray
Definition TArrayD.h:30
void Reset()
Definition TArrayD.h:47
Array of floats (32 bits per element).
Definition TArrayF.h:27
Float_t * fArray
Definition TArrayF.h:30
void Reset()
Definition TArrayF.h:47
Array of integers (32 bits per element).
Definition TArrayI.h:27
Int_t * fArray
Definition TArrayI.h:30
void Reset()
Definition TArrayI.h:47
Array of long64s (64 bits per element).
Definition TArrayL64.h:27
Long64_t * fArray
Definition TArrayL64.h:30
void Reset()
Definition TArrayL64.h:47
Array of shorts (16 bits per element).
Definition TArrayS.h:27
void Reset()
Definition TArrayS.h:47
Short_t * fArray
Definition TArrayS.h:30
Int_t fN
Definition TArray.h:38
Fill Area Attributes class.
Definition TAttFill.h:20
Line Attributes class.
Definition TAttLine.h:20
Marker Attributes class.
Definition TAttMarker.h:20
Class to manage histogram axis.
Definition TAxis.h:32
Int_t GetNbins() const
Definition TAxis.h:127
Using a TBrowser one can browse all ROOT objects.
Definition TBrowser.h:37
Collection abstract base class.
Definition TCollection.h:65
TDirectory::TContext keeps track and restore the current directory.
Definition TDirectory.h:89
Describe directory structure in memory.
Definition TDirectory.h:45
1-Dim function class
Definition TF1.h:182
Provides an indirection to the TFitResult class and with a semantics identical to a TFitResult pointe...
1-D histogram with a byte per channel (see TH1 documentation)
Definition TH1.h:715
~TH1C() override
Destructor.
Definition TH1.cxx:9528
void SetBinsLength(Int_t n=-1) override
Set total number of bins including under/overflow Reallocate bin contents array.
Definition TH1.cxx:9584
TH1C & operator=(const TH1C &h1)
Operator =.
Definition TH1.cxx:9594
Double_t RetrieveBinContent(Int_t bin) const override
Raw retrieval of bin content on internal data structure see convention for numbering bins in TH1::Get...
Definition TH1.h:742
TH1C()
Constructor.
Definition TH1.cxx:9480
void Copy(TObject &hnew) const override
Copy this to newth1.
Definition TH1.cxx:9566
void AddBinContent(Int_t bin) override
Increment bin content by 1.
Definition TH1.cxx:9545
void Reset(Option_t *option="") override
Reset.
Definition TH1.cxx:9574
void UpdateBinContent(Int_t bin, Double_t content) override
Raw update of bin content on internal data structure see convention for numbering bins in TH1::GetBin...
Definition TH1.h:743
1-D histogram with a double per channel (see TH1 documentation)
Definition TH1.h:927
Double_t RetrieveBinContent(Int_t bin) const override
Raw retrieval of bin content on internal data structure see convention for numbering bins in TH1::Get...
Definition TH1.h:960
~TH1D() override
Destructor.
Definition TH1.cxx:10474
void SetBinsLength(Int_t n=-1) override
Set total number of bins including under/overflow Reallocate bin contents array.
Definition TH1.cxx:10508
void Copy(TObject &hnew) const override
Copy this to newth1.
Definition TH1.cxx:10490
void UpdateBinContent(Int_t bin, Double_t content) override
Raw update of bin content on internal data structure see convention for numbering bins in TH1::GetBin...
Definition TH1.h:961
TH1D()
Constructor.
Definition TH1.cxx:10409
TH1D & operator=(const TH1D &h1)
Operator =.
Definition TH1.cxx:10518
void AddBinContent(Int_t bin, Double_t w) override
Increment bin content by a weight w Passing an out-of-range bin leads to undefined behavior.
Definition TH1.h:944
void AddBinContent(Int_t bin) override
Increment bin content by 1.
Definition TH1.h:941
1-D histogram with a float per channel (see TH1 documentation)
Definition TH1.h:879
void AddBinContent(Int_t bin, Double_t w) override
Increment bin content by a weight w.
Definition TH1.h:897
void AddBinContent(Int_t bin) override
Increment bin content by 1.
Definition TH1.h:893
Double_t RetrieveBinContent(Int_t bin) const override
Raw retrieval of bin content on internal data structure see convention for numbering bins in TH1::Get...
Definition TH1.h:913
TH1F & operator=(const TH1F &h1)
Operator =.
Definition TH1.cxx:10337
void UpdateBinContent(Int_t bin, Double_t content) override
Raw update of bin content on internal data structure see convention for numbering bins in TH1::GetBin...
Definition TH1.h:914
void Copy(TObject &hnew) const override
Copy this to newth1.
Definition TH1.cxx:10309
void SetBinsLength(Int_t n=-1) override
Set total number of bins including under/overflow Reallocate bin contents array.
Definition TH1.cxx:10327
~TH1F() override
Destructor.
Definition TH1.cxx:10302
TH1F()
Constructor.
Definition TH1.cxx:10228
1-D histogram with an int per channel (see TH1 documentation)
Definition TH1.h:797
void SetBinsLength(Int_t n=-1) override
Set total number of bins including under/overflow Reallocate bin contents array.
Definition TH1.cxx:9957
void AddBinContent(Int_t bin) override
Increment bin content by 1.
Definition TH1.cxx:9918
~TH1I() override
Destructor.
Definition TH1.cxx:9901
void UpdateBinContent(Int_t bin, Double_t content) override
Raw update of bin content on internal data structure see convention for numbering bins in TH1::GetBin...
Definition TH1.h:825
TH1I()
Constructor.
Definition TH1.cxx:9853
void Copy(TObject &hnew) const override
Copy this to newth1.
Definition TH1.cxx:9939
TH1I & operator=(const TH1I &h1)
Operator =.
Definition TH1.cxx:9967
Double_t RetrieveBinContent(Int_t bin) const override
Raw retrieval of bin content on internal data structure see convention for numbering bins in TH1::Get...
Definition TH1.h:824
1-D histogram with a long64 per channel (see TH1 documentation)
Definition TH1.h:838
TH1L & operator=(const TH1L &h1)
Operator =.
Definition TH1.cxx:10155
Double_t RetrieveBinContent(Int_t bin) const override
Raw retrieval of bin content on internal data structure see convention for numbering bins in TH1::Get...
Definition TH1.h:865
void AddBinContent(Int_t bin) override
Increment bin content by 1.
Definition TH1.cxx:10106
void SetBinsLength(Int_t n=-1) override
Set total number of bins including under/overflow Reallocate bin contents array.
Definition TH1.cxx:10145
~TH1L() override
Destructor.
Definition TH1.cxx:10089
TH1L()
Constructor.
Definition TH1.cxx:10041
void Copy(TObject &hnew) const override
Copy this to newth1.
Definition TH1.cxx:10127
void UpdateBinContent(Int_t bin, Double_t content) override
Raw update of bin content on internal data structure see convention for numbering bins in TH1::GetBin...
Definition TH1.h:866
1-D histogram with a short per channel (see TH1 documentation)
Definition TH1.h:756
void UpdateBinContent(Int_t bin, Double_t content) override
Raw update of bin content on internal data structure see convention for numbering bins in TH1::GetBin...
Definition TH1.h:784
Double_t RetrieveBinContent(Int_t bin) const override
Raw retrieval of bin content on internal data structure see convention for numbering bins in TH1::Get...
Definition TH1.h:783
TH1S & operator=(const TH1S &h1)
Operator =.
Definition TH1.cxx:9780
void Copy(TObject &hnew) const override
Copy this to newth1.
Definition TH1.cxx:9752
TH1S()
Constructor.
Definition TH1.cxx:9666
void SetBinsLength(Int_t n=-1) override
Set total number of bins including under/overflow Reallocate bin contents array.
Definition TH1.cxx:9770
~TH1S() override
Destructor.
Definition TH1.cxx:9714
void AddBinContent(Int_t bin) override
Increment bin content by 1.
Definition TH1.cxx:9731
TH1 is the base class of all histogram classes in ROOT.
Definition TH1.h:109
~TH1() override
Histogram default destructor.
Definition TH1.cxx:631
virtual void SetLabelFont(Style_t font=62, Option_t *axis="X")
Set font number used to draw axis labels.
Definition Haxis.cxx:249
virtual void SetError(const Double_t *error)
Replace bin errors by values in array error.
Definition TH1.cxx:8980
virtual void SetDirectory(TDirectory *dir)
By default, when a histogram is created, it is added to the list of histogram objects in the current ...
Definition TH1.cxx:8966
virtual void FitPanel()
Display a panel with all histogram fit options.
Definition TH1.cxx:4262
Double_t * fBuffer
[fBufferSize] entry buffer
Definition TH1.h:169
virtual Int_t AutoP2FindLimits(Double_t min, Double_t max)
Buffer-based estimate of the histogram range using the power of 2 algorithm.
Definition TH1.cxx:1313
void SetStatOverflows(EStatOverflows statOverflows)
See GetStatOverflows for more information.
Definition TH1.h:666
virtual Double_t GetEffectiveEntries() const
Number of effective entries of the histogram.
Definition TH1.cxx:4426
char * GetObjectInfo(Int_t px, Int_t py) const override
Redefines TObject::GetObjectInfo.
Definition TH1.cxx:4480
virtual void Smooth(Int_t ntimes=1, Option_t *option="")
Smooth bin contents of this histogram.
Definition TH1.cxx:6915
virtual void SetNormFactor(Double_t factor=1)
Definition TH1.h:659
virtual Double_t GetBinCenter(Int_t bin) const
Return bin center for 1D histogram.
Definition TH1.cxx:9167
virtual void Rebuild(Option_t *option="")
Using the current bin info, recompute the arrays for contents and errors.
Definition TH1.cxx:7123
virtual void SetBarOffset(Float_t offset=0.25)
Set the bar offset as fraction of the bin width for drawing mode "B".
Definition TH1.h:613
virtual Color_t GetLabelColor(Option_t *axis="X") const
Return the "axis" label color.
Definition Haxis.cxx:53
static Bool_t fgStatOverflows
! Flag to use under/overflows in statistics
Definition TH1.h:178
virtual Int_t FindLastBinAbove(Double_t threshold=0, Int_t axis=1, Int_t firstBin=1, Int_t lastBin=-1) const
Find last bin with content > threshold for axis (1=x, 2=y, 3=z) if no bins with content > threshold i...
Definition TH1.cxx:3775
virtual void SetTitleSize(Float_t size=0.02, Option_t *axis="X")
Set the axis' title size.
Definition Haxis.cxx:365
TAxis * GetZaxis()
Definition TH1.h:574
Int_t DistancetoPrimitive(Int_t px, Int_t py) override
Compute distance from point px,py to a line.
Definition TH1.cxx:2795
virtual Bool_t Multiply(TF1 *f1, Double_t c1=1)
Performs the operation:
Definition TH1.cxx:6052
virtual void SetLabelOffset(Float_t offset=0.005, Option_t *axis="X")
Set offset between axis and axis' labels.
Definition Haxis.cxx:267
@ kXaxis
Definition TH1.h:123
@ kAllAxes
Definition TH1.h:126
@ kNoAxis
NOTE: Must always be 0 !!!
Definition TH1.h:122
@ kZaxis
Definition TH1.h:125
@ kYaxis
Definition TH1.h:124
Int_t fNcells
Number of bins(1D), cells (2D) +U/Overflows.
Definition TH1.h:150
virtual void GetStats(Double_t *stats) const
fill the array stats from the contents of this histogram The array stats must be correctly dimensione...
Definition TH1.cxx:7857
virtual void Normalize(Option_t *option="")
Normalize a histogram to its integral or to its maximum.
Definition TH1.cxx:6214
void Copy(TObject &hnew) const override
Copy this histogram structure to newth1.
Definition TH1.cxx:2643
virtual Double_t GetCellContent(Int_t binx, Int_t biny) const
Definition TH1.h:683
void SetTitle(const char *title) override
Change/set the title.
Definition TH1.cxx:6754
virtual Double_t GetBinError(Int_t binx, Int_t biny) const
Definition TH1.h:514
Double_t fTsumw
Total Sum of weights.
Definition TH1.h:157
virtual EBinErrorOpt GetBinErrorOption() const
Definition TH1.h:518
virtual Float_t GetBarWidth() const
Definition TH1.h:502
Double_t fTsumw2
Total Sum of squares of weights.
Definition TH1.h:158
static void StatOverflows(Bool_t flag=kTRUE)
if flag=kTRUE, underflows and overflows are used by the Fill functions in the computation of statisti...
Definition TH1.cxx:6961
TDirectory * GetDirectory() const
Definition TH1.h:524
virtual Double_t GetMinimumStored() const
Definition TH1.h:538
virtual Float_t GetBarOffset() const
Definition TH1.h:501
TList * fFunctions
->Pointer to list of functions (fits and user)
Definition TH1.h:167
virtual void RebinAxis(Double_t x, TAxis *axis)
Definition TH1.h:687
EStatOverflows GetStatOverflows() const
Get the behaviour adopted by the object about the statoverflows. See EStatOverflows for more informat...
Definition TH1.h:571
static Bool_t fgAddDirectory
! Flag to add histograms to the directory
Definition TH1.h:177
static Int_t GetDefaultBufferSize()
Static function return the default buffer size for automatic histograms the parameter fgBufferSize ma...
Definition TH1.cxx:4384
virtual Double_t DoIntegral(Int_t ix1, Int_t ix2, Int_t iy1, Int_t iy2, Int_t iz1, Int_t iz2, Double_t &err, Option_t *opt, Bool_t doerr=kFALSE) const
Internal function compute integral and optionally the error between the limits specified by the bin n...
Definition TH1.cxx:8006
Double_t fTsumwx2
Total Sum of weight*X*X.
Definition TH1.h:160
void SetSliceContent(const std::vector< Double_t > &values, const std::vector< std::pair< Int_t, Int_t > > &sliceEdges, ValueType *dataArray)
Sets the content of a slice of bins in a histogram.
Definition TH1.h:302
virtual Double_t GetStdDev(Int_t axis=1) const
Returns the Standard Deviation (Sigma).
Definition TH1.cxx:7631
TH1()
Histogram default constructor.
Definition TH1.cxx:603
static TH1 * TransformHisto(TVirtualFFT *fft, TH1 *h_output, Option_t *option)
For a given transform (first parameter), fills the histogram (second parameter) with the transform ou...
Definition TH1.cxx:9345
void UseCurrentStyle() override
Copy current attributes from/to current style.
Definition TH1.cxx:7493
virtual void LabelsOption(Option_t *option="h", Option_t *axis="X")
Sort bins with labels or set option(s) to draw axis with labels.
Definition TH1.cxx:5385
virtual Int_t GetNbinsY() const
Definition TH1.h:543
Short_t fBarOffset
(1000*offset) for bar charts or legos
Definition TH1.h:154
virtual void AddBinContent(Int_t bin, Double_t w)=0
Increment bin content by a weight w.
virtual Double_t Chi2TestX(const TH1 *h2, Double_t &chi2, Int_t &ndf, Int_t &igood, Option_t *option="UU", Double_t *res=nullptr) const
The computation routine of the Chisquare test.
Definition TH1.cxx:2039
static bool CheckBinLimits(const TAxis *a1, const TAxis *a2)
Check bin limits.
Definition TH1.cxx:1511
virtual Double_t GetBinError(Int_t bin) const
Return value of error associated to bin number bin.
Definition TH1.cxx:9089
static Int_t FitOptionsMake(Option_t *option, Foption_t &Foption)
Decode string choptin and fill fitOption structure.
Definition TH1.cxx:4655
virtual Int_t GetNbinsZ() const
Definition TH1.h:544
virtual Double_t GetNormFactor() const
Definition TH1.h:546
virtual Double_t GetMean(Int_t axis=1) const
For axis = 1,2 or 3 returns the mean value of the histogram along X,Y or Z axis.
Definition TH1.cxx:7559
TH1(const TH1 &)=delete
virtual Double_t GetSkewness(Int_t axis=1) const
Definition TH1.cxx:7695
virtual void ClearUnderflowAndOverflow()
Remove all the content from the underflow and overflow bins, without changing the number of entries A...
Definition TH1.cxx:2489
virtual void FillRandom(TF1 *f1, Int_t ntimes=5000, TRandom *rng=nullptr)
Definition TH1.cxx:3500
virtual Double_t GetContourLevelPad(Int_t level) const
Return the value of contour number "level" in Pad coordinates.
Definition TH1.cxx:8469
virtual void SetXTitle(const char *title)
Definition TH1.h:668
virtual TH1 * DrawNormalized(Option_t *option="", Double_t norm=1) const
Draw a normalized copy of this histogram.
Definition TH1.cxx:3116
EStatOverflows
Enumeration specifying the way to treat statoverflow.
Definition TH1.h:130
@ kNeutral
Adapt to the global flag.
Definition TH1.h:133
@ kIgnore
Override global flag ignoring the overflows.
Definition TH1.h:131
@ kConsider
Override global flag considering the overflows.
Definition TH1.h:132
virtual Int_t GetDimension() const
Definition TH1.h:528
static void AddDirectory(Bool_t add=kTRUE)
Sets the flag controlling the automatic add of histograms in memory.
Definition TH1.cxx:1264
virtual Double_t GetBinContent(Int_t bin, Int_t) const
Definition TH1.h:511
Double_t GetSumOfAllWeights(const bool includeOverflow) const
Return the sum of all weights.
Definition TH1.cxx:7943
EStatusBits
TH1 status bits.
Definition TH1.h:403
@ kLogX
X-axis in log scale.
Definition TH1.h:407
@ kIsAverage
Bin contents are average (used by Add)
Definition TH1.h:410
@ kNoTitle
Don't draw the histogram title.
Definition TH1.h:409
@ kUserContour
User specified contour levels.
Definition TH1.h:405
@ kNoStats
Don't draw stats box.
Definition TH1.h:404
@ kIsZoomed
Bit set when zooming on Y axis.
Definition TH1.h:408
@ kAutoBinPTwo
different than 1.
Definition TH1.h:413
@ kIsNotW
Histogram is forced to be not weighted even when the histogram is filled with weighted.
Definition TH1.h:411
@ kIsHighlight
bit set if histo is highlight
Definition TH1.h:414
virtual void SetContourLevel(Int_t level, Double_t value)
Set value for one contour level.
Definition TH1.cxx:8551
virtual Bool_t CanExtendAllAxes() const
Returns true if all axes are extendable.
Definition TH1.cxx:6672
TDirectory * fDirectory
! Pointer to directory holding this histogram
Definition TH1.h:170
Option_t * GetOption() const override
Definition TH1.h:548
virtual void Reset(Option_t *option="")
Reset this histogram: contents, errors, etc.
Definition TH1.cxx:7139
void SetNameTitle(const char *name, const char *title) override
Change the name and title of this histogram.
Definition TH1.cxx:9003
TAxis * GetXaxis()
Definition TH1.h:572
virtual void GetBinXYZ(Int_t binglobal, Int_t &binx, Int_t &biny, Int_t &binz) const
Return binx, biny, binz corresponding to the global bin number globalbin see TH1::GetBin function abo...
Definition TH1.cxx:4977
TH1 * GetCumulative(Bool_t forward=kTRUE, const char *suffix="_cumulative") const
Return a pointer to a histogram containing the cumulative content.
Definition TH1.cxx:2588
static Double_t AutoP2GetPower2(Double_t x, Bool_t next=kTRUE)
Auxiliary function to get the power of 2 next (larger) or previous (smaller) a given x.
Definition TH1.cxx:1278
virtual Int_t GetNcells() const
Definition TH1.h:545
virtual Int_t ShowPeaks(Double_t sigma=2, Option_t *option="", Double_t threshold=0.05)
Interface to TSpectrum::Search.
Definition TH1.cxx:9327
Int_t GetBufferLength() const
Definition TH1.h:482
static Bool_t RecomputeAxisLimits(TAxis &destAxis, const TAxis &anAxis)
Finds new limits for the axis for the Merge function.
Definition TH1.cxx:5911
virtual Style_t GetTitleFont(Option_t *axis="X") const
Return the "axis" title font.
Definition Haxis.cxx:118
virtual void SetNdivisions(Int_t n=510, Option_t *axis="X")
Set the number of divisions to draw an axis.
Definition Haxis.cxx:170
virtual Style_t GetLabelFont(Option_t *axis="X") const
Return the "axis" label font.
Definition Haxis.cxx:66
virtual Float_t GetTickLength(Option_t *axis="X") const
Return the "axis" tick length.
Definition Haxis.cxx:105
Int_t GetBufferSize() const
Definition TH1.h:483
virtual Double_t GetSumOfWeights() const
Return the sum of weights across all bins excluding under/overflows.
Definition TH1.h:560
virtual void PutStats(Double_t *stats)
Replace current statistics with the values in array stats.
Definition TH1.cxx:7908
TVirtualHistPainter * GetPainter(Option_t *option="")
Return pointer to painter.
Definition TH1.cxx:4489
TObject * FindObject(const char *name) const override
Search object named name in the list of functions.
Definition TH1.cxx:3835
virtual Float_t GetTitleSize(Option_t *axis="X") const
Return the "axis" title size.
Definition Haxis.cxx:144
void Print(Option_t *option="") const override
Print some global quantities for this histogram.
Definition TH1.cxx:7045
static Bool_t GetDefaultSumw2()
Return kTRUE if TH1::Sumw2 must be called when creating new histograms.
Definition TH1.cxx:4393
virtual Int_t FindFirstBinAbove(Double_t threshold=0, Int_t axis=1, Int_t firstBin=1, Int_t lastBin=-1) const
Find first bin with content > threshold for axis (1=x, 2=y, 3=z) if no bins with content > threshold ...
Definition TH1.cxx:3712
virtual TFitResultPtr Fit(const char *formula, Option_t *option="", Option_t *goption="", Double_t xmin=0, Double_t xmax=0)
Fit histogram with function fname.
Definition TH1.cxx:3876
virtual Int_t GetBin(Int_t binx, Int_t biny=0, Int_t binz=0) const
Return Global bin number corresponding to binx,y,z.
Definition TH1.cxx:4964
virtual Double_t GetMaximum(Double_t maxval=FLT_MAX) const
Return maximum value smaller than maxval of bins in the range, unless the value has been overridden b...
Definition TH1.cxx:8574
Double_t GetRMSError(Int_t axis=1) const
Definition TH1.h:568
virtual Int_t GetNbinsX() const
Definition TH1.h:542
virtual void SetMaximum(Double_t maximum=-1111)
Definition TH1.h:653
virtual TH1 * FFT(TH1 *h_output, Option_t *option)
This function allows to do discrete Fourier transforms of TH1 and TH2.
Definition TH1.cxx:3256
virtual void LabelsInflate(Option_t *axis="X")
Double the number of bins for axis.
Definition TH1.cxx:5318
virtual TH1 * ShowBackground(Int_t niter=20, Option_t *option="same")
This function calculates the background spectrum in this histogram.
Definition TH1.cxx:9313
virtual void FillN(Int_t, const Double_t *, const Double_t *, const Double_t *, Int_t)
Definition TH1.h:468
static Bool_t SameLimitsAndNBins(const TAxis &axis1, const TAxis &axis2)
Same limits and bins.
Definition TH1.cxx:5901
virtual Bool_t Add(TF1 *h1, Double_t c1=1, Option_t *option="")
Performs the operation: this = this + c1*f1 if errors are defined (see TH1::Sumw2),...
Definition TH1.cxx:814
Double_t fMaximum
Maximum value for plotting.
Definition TH1.h:161
Int_t fBufferSize
fBuffer size
Definition TH1.h:168
TString ProvideSaveName(Option_t *option, Bool_t testfdir=kFALSE)
Provide variable name for histogram for saving as primitive Histogram pointer has by default the hist...
Definition TH1.cxx:7278
virtual Double_t IntegralAndError(Int_t binx1, Int_t binx2, Double_t &err, Option_t *option="") const
Return integral of bin contents in range [binx1,binx2] and its error.
Definition TH1.cxx:7997
Int_t fDimension
! Histogram dimension (1, 2 or 3 dim)
Definition TH1.h:171
virtual void SetBinError(Int_t bin, Double_t error)
Set the bin Error Note that this resets the bin eror option to be of Normal Type and for the non-empt...
Definition TH1.cxx:9232
EBinErrorOpt fBinStatErrOpt
Option for bin statistical errors.
Definition TH1.h:174
static Int_t fgBufferSize
! Default buffer size for automatic histograms
Definition TH1.h:176
virtual void SetBinsLength(Int_t=-1)
Definition TH1.h:629
Double_t fNormFactor
Normalization factor.
Definition TH1.h:163
EInconsistencyBits
Enumeration specifying inconsistencies between two histograms, in increasing severity.
Definition TH1.h:138
@ kFullyConsistent
Definition TH1.h:139
@ kDifferentNumberOfBins
Definition TH1.h:143
@ kDifferentDimensions
Definition TH1.h:144
@ kDifferentBinLimits
Definition TH1.h:141
@ kDifferentAxisLimits
Definition TH1.h:142
@ kDifferentLabels
Definition TH1.h:140
virtual Int_t Fill(Double_t x)
Increment bin with abscissa X by 1.
Definition TH1.cxx:3316
TAxis * GetYaxis()
Definition TH1.h:573
TArrayD fContour
Array to display contour levels.
Definition TH1.h:164
virtual Double_t GetBinErrorLow(Int_t bin) const
Return lower error associated to bin number bin.
Definition TH1.cxx:9105
virtual TH1 * RebinX(Int_t ngroup=2, const char *newname="")
Definition TH1.h:603
void Browse(TBrowser *b) override
Browse the Histogram object.
Definition TH1.cxx:750
virtual Double_t GetBinContent(Int_t bin, Int_t, Int_t) const
Definition TH1.h:512
virtual void SetContent(const Double_t *content)
Replace bin contents by the contents of array content.
Definition TH1.cxx:8427
virtual Float_t GetLabelSize(Option_t *axis="X") const
Return the "axis" label size.
Definition Haxis.cxx:92
virtual void SavePrimitiveHelp(std::ostream &out, const char *hname, Option_t *option="")
Helper function for the SavePrimitive functions from TH1 or classes derived from TH1,...
Definition TH1.cxx:7405
Short_t fBarWidth
(1000*width) for bar charts or legos
Definition TH1.h:155
virtual Double_t GetBinErrorSqUnchecked(Int_t bin) const
Definition TH1.h:706
virtual Double_t GetCellError(Int_t binx, Int_t biny) const
Definition TH1.h:685
virtual Int_t GetNdivisions(Option_t *axis="X") const
Return the number of divisions for "axis".
Definition Haxis.cxx:27
Int_t AxisChoice(Option_t *axis) const
Choose an axis according to "axis".
Definition Haxis.cxx:14
virtual void SetMinimum(Double_t minimum=-1111)
Definition TH1.h:654
Bool_t IsBinUnderflow(Int_t bin, Int_t axis=0) const
Return true if the bin is underflow.
Definition TH1.cxx:5217
void SavePrimitive(std::ostream &out, Option_t *option="") override
Save primitive as a C++ statement(s) on output stream out.
Definition TH1.cxx:7300
virtual void SetCellContent(Int_t binx, Int_t biny, Double_t content)
Definition TH1.h:689
static bool CheckBinLabels(const TAxis *a1, const TAxis *a2)
Check that axis have same labels.
Definition TH1.cxx:1538
virtual Double_t Interpolate(Double_t x) const
Given a point x, approximates the value via linear interpolation based on the two nearest bin centers...
Definition TH1.cxx:5118
static void SetDefaultSumw2(Bool_t sumw2=kTRUE)
When this static function is called with sumw2=kTRUE, all new histograms will automatically activate ...
Definition TH1.cxx:6739
virtual void SetBuffer(Int_t bufsize, Option_t *option="")
Set the maximum number of entries to be kept in the buffer.
Definition TH1.cxx:8487
Bool_t IsBinOverflow(Int_t bin, Int_t axis=0) const
Return true if the bin is overflow.
Definition TH1.cxx:5185
UInt_t GetAxisLabelStatus() const
Internal function used in TH1::Fill to see which axis is full alphanumeric, i.e.
Definition TH1.cxx:6711
Double_t GetRMS(Int_t axis=1) const
This function returns the Standard Deviation (Sigma) of the distribution not the Root Mean Square (RM...
Definition TH1.h:567
Double_t * fIntegral
! Integral of bins used by GetRandom
Definition TH1.h:172
Double_t fMinimum
Minimum value for plotting.
Definition TH1.h:162
virtual Double_t Integral(Option_t *option="") const
Return integral of bin contents.
Definition TH1.cxx:7970
static void SetDefaultBufferSize(Int_t bufsize=1000)
Static function to set the default buffer size for automatic histograms.
Definition TH1.cxx:6729
TH1 & operator=(const TH1 &)=delete
virtual void SetBinContent(Int_t bin, Double_t content)
Set bin content see convention for numbering bins in TH1::GetBin In case the bin number is greater th...
Definition TH1.cxx:9248
virtual void DirectoryAutoAdd(TDirectory *)
Perform the automatic addition of the histogram to the given directory.
Definition TH1.cxx:2773
virtual void GetLowEdge(Double_t *edge) const
Fill array with low edge of bins for 1D histogram Better to use h1.GetXaxis()->GetLowEdge(edge)
Definition TH1.cxx:9213
virtual Double_t GetBinLowEdge(Int_t bin) const
Return bin lower edge for 1D histogram.
Definition TH1.cxx:9178
void Build()
Creates histogram basic data structure.
Definition TH1.cxx:759
virtual Double_t GetEntries() const
Return the current number of entries.
Definition TH1.cxx:4401
const TAxis * GetZaxis() const
Definition TH1.h:577
virtual Double_t RetrieveBinContent(Int_t bin) const =0
Raw retrieval of bin content on internal data structure see convention for numbering bins in TH1::Get...
virtual void SetZTitle(const char *title)
Definition TH1.h:670
virtual TF1 * GetFunction(const char *name) const
Return pointer to function with name.
Definition TH1.cxx:9077
virtual TH1 * Rebin(Int_t ngroup=2, const char *newname="", const Double_t *xbins=nullptr)
Rebin this histogram.
Definition TH1.cxx:6311
virtual Int_t BufferFill(Double_t x, Double_t w)
accumulate arguments in buffer.
Definition TH1.cxx:1476
virtual Double_t GetBinWithContent(Double_t c, Int_t &binx, Int_t firstx=0, Int_t lastx=0, Double_t maxdiff=0) const
Compute first binx in the range [firstx,lastx] for which diff = abs(bin_content-c) <= maxdiff.
Definition TH1.cxx:5089
virtual UInt_t SetCanExtend(UInt_t extendBitMask)
Make the histogram axes extendable / not extendable according to the bit mask returns the previous bi...
Definition TH1.cxx:6685
TList * GetListOfFunctions() const
Definition TH1.h:489
void SetName(const char *name) override
Change the name of this histogram.
Definition TH1.cxx:8989
virtual TH1 * DrawCopy(Option_t *option="", const char *name_postfix="_copy") const
Copy this histogram and Draw in the current pad.
Definition TH1.cxx:3085
virtual Float_t GetTitleOffset(Option_t *axis="X") const
Return the "axis" title offset.
Definition Haxis.cxx:131
Bool_t IsEmpty() const
Check if a histogram is empty (this is a protected method used mainly by TH1Merger )
Definition TH1.cxx:5167
virtual Double_t GetMeanError(Int_t axis=1) const
Return standard error of mean of this histogram along the X axis.
Definition TH1.cxx:7599
void Paint(Option_t *option="") override
Control routine to paint any kind of histograms.
Definition TH1.cxx:6242
virtual Double_t AndersonDarlingTest(const TH1 *h2, Option_t *option="") const
Statistical test of compatibility in shape between this histogram and h2, using the Anderson-Darling ...
Definition TH1.cxx:8091
virtual void ResetStats()
Reset the statistics including the number of entries and replace with values calculated from bin cont...
Definition TH1.cxx:7926
virtual void SetBinContent(Int_t bin, Int_t, Int_t, Double_t content)
Definition TH1.h:617
virtual void SetBinErrorOption(EBinErrorOpt type)
Definition TH1.h:630
virtual void DrawPanel()
Display a panel with all histogram drawing options.
Definition TH1.cxx:3147
virtual Double_t GetRandom(TRandom *rng=nullptr) const
Return a random number distributed according the histogram bin contents.
Definition TH1.cxx:5013
const TAxis * GetXaxis() const
Definition TH1.h:575
virtual Double_t Chisquare(TF1 *f1, Option_t *option="") const
Compute and return the chisquare of this histogram with respect to a function The chisquare is comput...
Definition TH1.cxx:2468
virtual Double_t Chi2Test(const TH1 *h2, Option_t *option="UU", Double_t *res=nullptr) const
test for comparing weighted and unweighted histograms.
Definition TH1.cxx:1980
virtual Double_t GetMaximumStored() const
Definition TH1.h:534
virtual void DoFillN(Int_t ntimes, const Double_t *x, const Double_t *w, Int_t stride=1)
Internal method to fill histogram content from a vector called directly by TH1::BufferEmpty.
Definition TH1.cxx:3445
virtual void GetMinimumAndMaximum(Double_t &min, Double_t &max) const
Retrieve the minimum and maximum values in the histogram.
Definition TH1.cxx:8760
@ kNstat
Size of statistics data (up to TProfile3D)
Definition TH1.h:423
virtual const TArrayD * GetSumw2() const
Definition TH1.h:562
virtual Int_t GetMaximumBin() const
Return location of bin with maximum value in the range.
Definition TH1.cxx:8606
static Int_t AutoP2GetBins(Int_t n)
Auxiliary function to get the next power of 2 integer value larger then n.
Definition TH1.cxx:1291
Double_t fEntries
Number of entries.
Definition TH1.h:156
virtual Long64_t Merge(TCollection *list)
Definition TH1.h:593
virtual void SetColors(Color_t linecolor=-1, Color_t markercolor=-1, Color_t fillcolor=-1)
Shortcut to set the three histogram colors with a single call.
Definition TH1.cxx:4445
void ExecuteEvent(Int_t event, Int_t px, Int_t py) override
Execute action corresponding to one event.
Definition TH1.cxx:3212
virtual Double_t * GetIntegral()
Return a pointer to the array of bins integral.
Definition TH1.cxx:2558
TAxis fZaxis
Z axis descriptor.
Definition TH1.h:153
EStatOverflows fStatOverflows
Per object flag to use under/overflows in statistics.
Definition TH1.h:175
virtual void FillN(Int_t ntimes, const Double_t *x, const Double_t *w, Int_t stride=1)
Fill this histogram with an array x and weights w.
Definition TH1.cxx:3419
virtual Float_t GetLabelOffset(Option_t *axis="X") const
Return the "axis" label offset.
Definition Haxis.cxx:79
static bool CheckEqualAxes(const TAxis *a1, const TAxis *a2)
Check that the axis are the same.
Definition TH1.cxx:1581
EBinErrorOpt
Enumeration specifying type of statistics for bin errors.
Definition TH1.h:114
@ kPoisson2
Errors from Poisson interval at 95% CL (~ 2 sigma)
Definition TH1.h:117
@ kNormal
Errors with Normal (Wald) approximation: errorUp=errorLow= sqrt(N)
Definition TH1.h:115
@ kPoisson
Errors from Poisson interval at 68.3% (1 sigma)
Definition TH1.h:116
virtual Double_t GetBinContent(Int_t bin) const
Return content of bin number bin.
Definition TH1.cxx:5064
virtual TArrayD * GetSumw2()
Definition TH1.h:561
virtual Int_t GetContour(Double_t *levels=nullptr)
Return contour values into array levels if pointer levels is non zero.
Definition TH1.cxx:8440
TAxis fXaxis
X axis descriptor.
Definition TH1.h:151
virtual void SetTitleOffset(Float_t offset=1, Option_t *axis="X")
Specify a parameter offset to control the distance between the axis and the axis' title.
Definition Haxis.cxx:345
const Double_t * GetBuffer() const
Definition TH1.h:484
virtual Bool_t IsHighlight() const
Definition TH1.h:586
virtual void SetLabelColor(Color_t color=1, Option_t *axis="X")
Set axis labels color.
Definition Haxis.cxx:226
virtual Double_t GetBinError(Int_t binx, Int_t biny, Int_t binz) const
Definition TH1.h:515
virtual void ExtendAxis(Double_t x, TAxis *axis)
Histogram is resized along axis such that x is in the axis range.
Definition TH1.cxx:6540
virtual void SetAxisColor(Color_t color=1, Option_t *axis="X")
Set color to draw the axis line and tick marks.
Definition Haxis.cxx:187
virtual Double_t GetBinWidth(Int_t bin) const
Return bin width for 1D histogram.
Definition TH1.cxx:9189
const TAxis * GetYaxis() const
Definition TH1.h:576
TArrayD fSumw2
Array of sum of squares of weights.
Definition TH1.h:165
virtual void SetOption(Option_t *option=" ")
Definition TH1.h:661
TH1 * GetAsymmetry(TH1 *h2, Double_t c2=1, Double_t dc2=0)
Return a histogram containing the asymmetry of this histogram with h2, where the asymmetry is defined...
Definition TH1.cxx:4317
virtual Double_t GetContourLevel(Int_t level) const
Return value of contour number level.
Definition TH1.cxx:8459
virtual void SetContour(Int_t nlevels, const Double_t *levels=nullptr)
Set the number and values of contour levels.
Definition TH1.cxx:8512
virtual void SetHighlight(Bool_t set=kTRUE)
Set highlight (enable/disable) mode for the histogram by default highlight mode is disable.
Definition TH1.cxx:4460
virtual void SetAxisRange(Double_t xmin, Double_t xmax, Option_t *axis="X")
Set the "axis" range.
Definition Haxis.cxx:201
virtual Double_t GetBinErrorUp(Int_t bin) const
Return upper error associated to bin number bin.
Definition TH1.cxx:9136
virtual void SetYTitle(const char *title)
Definition TH1.h:669
virtual void Scale(Double_t c1=1, Option_t *option="")
Multiply this histogram by a constant c1.
Definition TH1.cxx:6640
virtual Int_t GetMinimumBin() const
Return location of bin with minimum value in the range.
Definition TH1.cxx:8694
virtual Int_t GetSumw2N() const
Definition TH1.h:563
virtual void SetCellError(Int_t binx, Int_t biny, Double_t content)
Definition TH1.h:691
virtual Int_t FindBin(Double_t x, Double_t y=0, Double_t z=0)
Return Global bin number corresponding to x,y,z.
Definition TH1.cxx:3650
Bool_t GetStatOverflowsBehaviour() const
Definition TH1.h:392
void SaveAs(const char *filename="hist", Option_t *option="") const override
Save the histogram as .csv, .tsv or .txt.
Definition TH1.cxx:7217
virtual void SetTitleFont(Style_t font=62, Option_t *axis="X")
Set the axis' title font.
Definition Haxis.cxx:323
virtual Int_t GetQuantiles(Int_t n, Double_t *xp, const Double_t *p=nullptr)
Compute Quantiles for this histogram.
Definition TH1.cxx:4593
virtual Color_t GetAxisColor(Option_t *axis="X") const
Return the number of divisions for "axis".
Definition Haxis.cxx:40
virtual void AddBinContent(Int_t bin)=0
Increment bin content by 1.
TObject * Clone(const char *newname="") const override
Make a complete copy of the underlying object.
Definition TH1.cxx:2724
virtual Double_t GetStdDevError(Int_t axis=1) const
Return error of standard deviation estimation for Normal distribution.
Definition TH1.cxx:7679
virtual Bool_t Divide(TF1 *f1, Double_t c1=1)
Performs the operation: this = this/(c1*f1) if errors are defined (see TH1::Sumw2),...
Definition TH1.cxx:2812
virtual Double_t GetMinimum(Double_t minval=-FLT_MAX) const
Return minimum value larger than minval of bins in the range, unless the value has been overridden by...
Definition TH1.cxx:8664
int LoggedInconsistency(const char *name, const TH1 *h1, const TH1 *h2, bool useMerge=false) const
Definition TH1.cxx:871
static bool CheckConsistentSubAxes(const TAxis *a1, Int_t firstBin1, Int_t lastBin1, const TAxis *a2, Int_t firstBin2=0, Int_t lastBin2=0)
Check that two sub axis are the same.
Definition TH1.cxx:1610
static Int_t CheckConsistency(const TH1 *h1, const TH1 *h2)
Check histogram compatibility.
Definition TH1.cxx:1649
void RecursiveRemove(TObject *obj) override
Recursively remove object from the list of functions.
Definition TH1.cxx:6612
TAxis fYaxis
Y axis descriptor.
Definition TH1.h:152
virtual Double_t KolmogorovTest(const TH1 *h2, Option_t *option="") const
Statistical test of compatibility in shape between this histogram and h2, using Kolmogorov test.
Definition TH1.cxx:8207
static void SmoothArray(Int_t NN, Double_t *XX, Int_t ntimes=1)
Smooth array xx, translation of Hbook routine hsmoof.F.
Definition TH1.cxx:6804
virtual void GetCenter(Double_t *center) const
Fill array with center of bins for 1D histogram Better to use h1.GetXaxis()->GetCenter(center)
Definition TH1.cxx:9200
TVirtualHistPainter * fPainter
! Pointer to histogram painter
Definition TH1.h:173
virtual void SetBins(Int_t nx, Double_t xmin, Double_t xmax)
Redefine x axis parameters.
Definition TH1.cxx:8796
virtual Int_t FindFixBin(Double_t x, Double_t y=0, Double_t z=0) const
Return Global bin number corresponding to x,y,z.
Definition TH1.cxx:3683
virtual void SetBinContent(Int_t bin, Int_t, Double_t content)
Definition TH1.h:616
virtual void SetLabelSize(Float_t size=0.02, Option_t *axis="X")
Set size of axis' labels.
Definition Haxis.cxx:285
virtual void Sumw2(Bool_t flag=kTRUE)
Create structure to store sum of squares of weights.
Definition TH1.cxx:9049
virtual void SetEntries(Double_t n)
Definition TH1.h:640
virtual Bool_t FindNewAxisLimits(const TAxis *axis, const Double_t point, Double_t &newMin, Double_t &newMax)
finds new limits for the axis so that point is within the range and the limits are compatible with th...
Definition TH1.cxx:6496
static bool CheckAxisLimits(const TAxis *a1, const TAxis *a2)
Check that the axis limits of the histograms are the same.
Definition TH1.cxx:1567
static Bool_t AddDirectoryStatus()
Static function: cannot be inlined on Windows/NT.
Definition TH1.cxx:742
static Bool_t fgDefaultSumw2
! Flag to call TH1::Sumw2 automatically at histogram creation time
Definition TH1.h:179
static void SavePrimitiveFunctions(std::ostream &out, const char *varname, TList *lst)
Save list of functions Also can be used by TGraph classes.
Definition TH1.cxx:7459
virtual void UpdateBinContent(Int_t bin, Double_t content)=0
Raw update of bin content on internal data structure see convention for numbering bins in TH1::GetBin...
void SliceHistoInPlace(std::vector< Int_t > &args, ValueType *&dataArray, Int_t &fN)
Slices a histogram in place based on the specified bin ranges for each dimension.
Definition TH1.h:206
Double_t fTsumwx
Total Sum of weight*X.
Definition TH1.h:159
virtual void LabelsDeflate(Option_t *axis="X")
Reduce the number of bins for the axis passed in the option to the number of bins having a label.
Definition TH1.cxx:5248
virtual Double_t ComputeIntegral(Bool_t onlyPositive=false)
Compute integral (normalized cumulative sum of bins) w/o under/overflows The result is stored in fInt...
Definition TH1.cxx:2509
TString fOption
Histogram options.
Definition TH1.h:166
virtual void Eval(TF1 *f1, Option_t *option="")
Evaluate function f1 at the center of bins of this histogram.
Definition TH1.cxx:3164
virtual void SetBarWidth(Float_t width=0.5)
Set the width of bars as fraction of the bin width for drawing mode "B".
Definition TH1.h:614
virtual Int_t BufferEmpty(Int_t action=0)
Fill histogram with all entries in the buffer.
Definition TH1.cxx:1384
virtual void SetStats(Bool_t stats=kTRUE)
Set statistics option on/off.
Definition TH1.cxx:9019
virtual void SetTickLength(Float_t length=0.02, Option_t *axis="X")
Set the axis' tick marks length.
Definition Haxis.cxx:302
virtual Double_t GetKurtosis(Int_t axis=1) const
Definition TH1.cxx:7768
A doubly linked list.
Definition TList.h:38
The TNamed class is the base class for all named ROOT classes.
Definition TNamed.h:29
virtual void SetTitle(const char *title="")
Set the title of the TNamed.
Definition TNamed.cxx:174
Mother of all ROOT objects.
Definition TObject.h:41
R__ALWAYS_INLINE Bool_t TestBit(UInt_t f) const
Definition TObject.h:202
void Obsolete(const char *method, const char *asOfVers, const char *removedFromVers) const
Use this method to declare a method obsolete.
Definition TObject.cxx:1143
This is the base class for the ROOT Random number generators.
Definition TRandom.h:27
Basic string class.
Definition TString.h:138
const char * Data() const
Definition TString.h:384
TVectorT.
Definition TVectorT.h:29
TVirtualFFT is an interface class for Fast Fourier Transforms.
Definition TVirtualFFT.h:88
Abstract interface to a histogram painter.
const Double_t sigma
Double_t y[n]
Definition legend1.C:17
return c1
Definition legend1.C:41
Double_t x[n]
Definition legend1.C:17
const Int_t n
Definition legend1.C:16
TH1F * h1
Definition legend1.C:5
TF1 * f1
Definition legend1.C:11
return c2
Definition legend2.C:14
T Slice(const T &histo, std::vector< Int_t > &args)
Creates a sliced copy of the given histogram.
Definition TH1.h:75
void SetSliceContent(T &histo, const std::vector< Double_t > &input, const std::vector< std::pair< Int_t, Int_t > > &sliceEdges)
Sets the content of a slice in a histogram.
Definition TH1.h:98
th1 Draw()