Each bin in the TH2Poly histogram is a TH2PolyBin object. TH2PolyBin is a very simple class containing the vertices (stored as TGraphs or TMultiGraphs ) and contents of the polygonal bin as well as several related functions.
Essentially, a TH2Poly is a TList of TH2PolyBin objects with methods to manipulate them.
Bins are defined using one of the AddBin() methods. The bin definition should be done before filling.
The histogram can be filled with Fill(Double_t x, Double_t y, Double_t w) . w is the weight. If no weight is specified, it is assumed to be 1.
Not all histogram's area need to be binned. Filling an area without bins, will falls into the overflows. Adding a bin is not retroactive; it doesn't affect previous fillings. A Fill() call, that was previously ignored due to the lack of a bin at the specified location, is not reconsidered when that location is binned later.
If there are two overlapping bins, the first one in the list will be incremented by Fill().
The histogram may automatically extends its limits if a bin outside the histogram limits is added. This is done when the default constructor (with no arguments) is used. It generates a histogram with no limits along the X and Y axis. Adding bins to it will extend it up to a proper size.
TH2Poly implements a partitioning algorithm to speed up bins' filling. The partitioning algorithm divides the histogram into regions called cells. The bins that each cell intersects are recorded in an array of TLists. When a coordinate in the histogram is to be filled; the method (quickly) finds which cell the coordinate belongs. It then only loops over the bins intersecting that cell to find the bin the input coordinate corresponds to. The partitioning of the histogram is updated continuously as each bin is added. The default number of cells on each axis is 25. This number could be set to another value in the constructor or adjusted later by calling the ChangePartition(Int_t, Int_t) method. The partitioning algorithm is considerably faster than the brute force algorithm (i.e. checking if each bin contains the input coordinates), especially if the histogram is to be filled many times.
The following very simple macro shows how to build and fill a TH2Poly:
{ TH2Poly *h2p = new TH2Poly(); Double_t x1[] = {0, 5, 5}; Double_t y1[] = {0, 0, 5}; Double_t x2[] = {0, -1, -1, 0}; Double_t y2[] = {0, 0, -1, -1}; Double_t x3[] = {4, 3, 0, 1, 2.4}; Double_t y3[] = {4, 3.7, 1, 4.7, 3.5}; h2p->AddBin(3, x1, y1); h2p->AddBin(3, x2, y2); h2p->AddBin(3, x3, y3); h2p->Fill( 3, 1, 3); // fill bin 1 h2p->Fill(-0.5, -0.5, 7); // fill bin 2 h2p->Fill(-0.7, -0.5, 1); // fill bin 2 h2p->Fill( 1, 3, 5); // fill bin 3 }More examples can bin found in $ROOTSYS/tutorials/hist/th2poly*.C
With the brute force approach, the filling is done in the following way: An iterator loops over all bins in the TH2Poly and invokes the method IsInside() for each of them. This method checks if the input location is in that bin. If the filling coordinate is inside, the bin is filled. Looping over all the bin is very slow.
The alternative is to divide the histogram into virtual rectangular regions called "cells". Each cell stores the pointers of the bins intersecting it. When a coordinate is to be filled, the method finds which cell the coordinate falls into. Since the cells are rectangular, this can be done very quickly. It then only loops over the bins associated with that cell.
The addition of bins to the appropriate cells is done when the bin is added to the histogram. To do this, AddBin() calls the AddBinToPartition() method. This method adds the input bin to the partitioning matrix.
The number of partition cells per axis can be specified in the constructor. If it is not specified, the default value of 25 along each axis will be assigned. This value was chosen because it is small enough to avoid slowing down AddBin(), while being large enough to enhance Fill() by a considerable amount. Regardless of how it is initialized at construction time, it can be changed later with the ChangePartition() method. ChangePartition() deletes the old partition matrix and generates a new one with the specified number of cells on each axis.
The optimum number of partition cells per axis changes with the number of times Fill() will be called. Although partitioning greatly speeds up filling, it also adds a constant time delay into the code. When Fill() is to be called many times, it is more efficient to divide the histogram into a large number cells. However, if the histogram is to be filled only a few times, it is better to divide into a small number of cells.
TH2Poly() | |
TH2Poly(const TH2Poly&) | |
TH2Poly(const char* name, const char* title, Double_t xlow, Double_t xup, Double_t ylow, Double_t yup) | |
TH2Poly(const char* name, const char* title, Int_t nX, Double_t xlow, Double_t xup, Int_t nY, Double_t ylow, Double_t yup) | |
virtual | ~TH2Poly() |
void | TObject::AbstractMethod(const char* method) const |
virtual void | Add(const TH1* h1, Double_t c1) |
virtual void | Add(TF1* h1, Double_t c1 = 1, Option_t* option = "") |
virtual void | Add(const TH1* h1, const TH1* h2, Double_t c1 = 1, Double_t c2 = 1) |
Int_t | AddBin(TObject* poly) |
Int_t | AddBin(Int_t n, const Double_t* x, const Double_t* y) |
Int_t | AddBin(Double_t x1, Double_t y1, Double_t x2, Double_t y2) |
virtual void | TH1::AddBinContent(Int_t bin) |
virtual void | TH1::AddBinContent(Int_t bin, Double_t w) |
static void | TH1::AddDirectory(Bool_t add = kTRUE) |
static Bool_t | TH1::AddDirectoryStatus() |
virtual void | TObject::AppendPad(Option_t* option = "") |
virtual void | TH1::Browse(TBrowser* b) |
virtual Int_t | TH2::BufferEmpty(Int_t action = 0) |
void | ChangePartition(Int_t n, Int_t m) |
virtual Double_t | TH1::Chi2Test(const TH1* h2, Option_t* option = "UU", Double_t* res = 0) const |
virtual Double_t | TH1::Chi2TestX(const TH1* h2, Double_t& chi2, Int_t& ndf, Int_t& igood, Option_t* option = "UU", Double_t* res = 0) const |
static TClass* | Class() |
virtual const char* | TObject::ClassName() const |
virtual void | TNamed::Clear(Option_t* option = "") |
void | ClearBinContents() |
virtual TObject* | TNamed::Clone(const char* newname = "") const |
virtual Int_t | TNamed::Compare(const TObject* obj) const |
virtual Double_t | TH1::ComputeIntegral() |
virtual void | TH2::Copy(TObject& hnew) const |
virtual void | TObject::Delete(Option_t* option = "")MENU |
virtual void | TH1::DirectoryAutoAdd(TDirectory*) |
Int_t | TAttLine::DistancetoLine(Int_t px, Int_t py, Double_t xp1, Double_t yp1, Double_t xp2, Double_t yp2) |
virtual Int_t | TH1::DistancetoPrimitive(Int_t px, Int_t py) |
virtual void | TH1::Divide(const TH1* h1) |
virtual void | TH1::Divide(TF1* f1, Double_t c1 = 1) |
virtual void | TH1::Divide(const TH1* h1, const TH1* h2, Double_t c1 = 1, Double_t c2 = 1, Option_t* option = "")MENU |
virtual void | TH1::Draw(Option_t* option = "") |
virtual void | TObject::DrawClass() constMENU |
virtual TObject* | TObject::DrawClone(Option_t* option = "") constMENU |
virtual TH1* | DrawCopy(Option_t* option = "") const |
virtual TH1* | TH1::DrawNormalized(Option_t* option = "", Double_t norm = 1) const |
virtual void | TH1::DrawPanel()MENU |
virtual void | TObject::Dump() constMENU |
virtual void | TObject::Error(const char* method, const char* msgfmt) const |
virtual void | TH1::Eval(TF1* f1, Option_t* option = "") |
virtual void | TObject::Execute(const char* method, const char* params, Int_t* error = 0) |
virtual void | TObject::Execute(TMethod* method, TObjArray* params, Int_t* error = 0) |
virtual void | TH1::ExecuteEvent(Int_t event, Int_t px, Int_t py) |
virtual void | TObject::Fatal(const char* method, const char* msgfmt) const |
virtual TH1* | TH1::FFT(TH1* h_output, Option_t* option) |
virtual Int_t | Fill(Double_t) |
virtual Int_t | Fill(Double_t x, Double_t y) |
virtual Int_t | Fill(const char* name, Double_t w) |
virtual Int_t | Fill(Double_t x, Double_t y, Double_t w) |
virtual Int_t | Fill(Double_t, const char*, Double_t) |
virtual Int_t | Fill(const char*, Double_t, Double_t) |
virtual Int_t | Fill(const char*, const char*, Double_t) |
virtual void | TNamed::FillBuffer(char*& buffer) |
virtual void | FillN(Int_t, const Double_t*, const Double_t*, Int_t) |
virtual void | FillN(Int_t ntimes, const Double_t* x, const Double_t* y, const Double_t* w, Int_t stride = 1) |
virtual void | TH2::FillRandom(const char* fname, Int_t ntimes = 5000) |
virtual void | TH2::FillRandom(TH1* h, Int_t ntimes = 5000) |
virtual Int_t | FindBin(Double_t x, Double_t y, Double_t z = 0) |
virtual Int_t | TH2::FindFirstBinAbove(Double_t threshold = 0, Int_t axis = 1) const |
virtual Int_t | TH1::FindFixBin(Double_t x, Double_t y = 0, Double_t z = 0) const |
virtual Int_t | TH2::FindLastBinAbove(Double_t threshold = 0, Int_t axis = 1) const |
virtual TObject* | TH1::FindObject(const char* name) const |
virtual TObject* | TH1::FindObject(const TObject* obj) const |
virtual TFitResultPtr | TH1::Fit(const char* formula, Option_t* option = "", Option_t* goption = "", Double_t xmin = 0, Double_t xmax = 0)MENU |
virtual TFitResultPtr | TH1::Fit(TF1* f1, Option_t* option = "", Option_t* goption = "", Double_t xmin = 0, Double_t xmax = 0) |
static Int_t | TH1::FitOptionsMake(Option_t* option, Foption_t& Foption) |
virtual void | TH1::FitPanel()MENU |
virtual void | TH2::FitSlicesX(TF1* f1 = 0, Int_t firstybin = 0, Int_t lastybin = -1, Int_t cut = 0, Option_t* option = "QNR", TObjArray* arr = 0)MENU |
virtual void | TH2::FitSlicesY(TF1* f1 = 0, Int_t firstxbin = 0, Int_t lastxbin = -1, Int_t cut = 0, Option_t* option = "QNR", TObjArray* arr = 0)MENU |
TH1* | TH1::GetAsymmetry(TH1* h2, Double_t c2 = 1, Double_t dc2 = 0) |
virtual Color_t | TH1::GetAxisColor(Option_t* axis = "X") const |
virtual Float_t | TH1::GetBarOffset() const |
virtual Float_t | TH1::GetBarWidth() const |
virtual Int_t | TH1::GetBin(Int_t binx, Int_t biny = 0, Int_t binz = 0) const |
virtual Double_t | TH1::GetBinCenter(Int_t bin) const |
virtual Double_t | GetBinContent(Int_t bin) const |
virtual Double_t | GetBinContent(Int_t, Int_t) const |
virtual Double_t | GetBinContent(Int_t, Int_t, Int_t) const |
Bool_t | GetBinContentChanged() const |
virtual Double_t | GetBinError(Int_t bin) const |
virtual Double_t | GetBinError(Int_t, Int_t) const |
virtual Double_t | GetBinError(Int_t, Int_t, Int_t) const |
virtual Double_t | TH1::GetBinLowEdge(Int_t bin) const |
const char* | GetBinName(Int_t bin) const |
TList* | GetBins() |
const char* | GetBinTitle(Int_t bin) const |
virtual Double_t | TH1::GetBinWidth(Int_t bin) const |
virtual Double_t | TH1::GetBinWithContent(Double_t c, Int_t& binx, Int_t firstx = 0, Int_t lastx = 0, Double_t maxdiff = 0) const |
virtual Double_t | TH2::GetBinWithContent2(Double_t c, Int_t& binx, Int_t& biny, Int_t firstxbin = 1, Int_t lastxbin = -1, Int_t firstybin = 1, Int_t lastybin = -1, Double_t maxdiff = 0) const |
virtual void | TH1::GetBinXYZ(Int_t binglobal, Int_t& binx, Int_t& biny, Int_t& binz) const |
const Double_t* | TH1::GetBuffer() const |
Int_t | TH1::GetBufferLength() const |
Int_t | TH1::GetBufferSize() const |
virtual Double_t | TH1::GetCellContent(Int_t binx, Int_t biny) const |
virtual Double_t | TH1::GetCellError(Int_t binx, Int_t biny) const |
virtual void | TH1::GetCenter(Double_t* center) const |
virtual Int_t | TH1::GetContour(Double_t* levels = 0) |
virtual Double_t | TH1::GetContourLevel(Int_t level) const |
virtual Double_t | TH1::GetContourLevelPad(Int_t level) const |
virtual Double_t | TH2::GetCorrelationFactor(Int_t axis1 = 1, Int_t axis2 = 2) const |
virtual Double_t | TH2::GetCovariance(Int_t axis1 = 1, Int_t axis2 = 2) const |
static Int_t | TH1::GetDefaultBufferSize() |
static Bool_t | TH1::GetDefaultSumw2() |
virtual Int_t | TH1::GetDimension() const |
TDirectory* | TH1::GetDirectory() const |
virtual Option_t* | TObject::GetDrawOption() const |
static Long_t | TObject::GetDtorOnly() |
virtual Double_t | TH1::GetEffectiveEntries() const |
virtual Double_t | TH1::GetEntries() const |
virtual Color_t | TAttFill::GetFillColor() const |
virtual Style_t | TAttFill::GetFillStyle() const |
Bool_t | GetFloat() |
virtual TF1* | TH1::GetFunction(const char* name) const |
virtual const char* | TObject::GetIconName() const |
virtual Double_t* | TH1::GetIntegral() |
virtual Double_t | TH1::GetKurtosis(Int_t axis = 1) const |
virtual Color_t | TH1::GetLabelColor(Option_t* axis = "X") const |
virtual Style_t | TH1::GetLabelFont(Option_t* axis = "X") const |
virtual Float_t | TH1::GetLabelOffset(Option_t* axis = "X") const |
virtual Float_t | TH1::GetLabelSize(Option_t* axis = "X") const |
virtual Color_t | TAttLine::GetLineColor() const |
virtual Style_t | TAttLine::GetLineStyle() const |
virtual Width_t | TAttLine::GetLineWidth() const |
TList* | TH1::GetListOfFunctions() const |
virtual void | TH1::GetLowEdge(Double_t* edge) const |
virtual Color_t | TAttMarker::GetMarkerColor() const |
virtual Size_t | TAttMarker::GetMarkerSize() const |
virtual Style_t | TAttMarker::GetMarkerStyle() const |
Double_t | GetMaximum() const |
virtual Double_t | GetMaximum(Double_t maxval) const |
virtual Int_t | TH1::GetMaximumBin() const |
virtual Int_t | TH1::GetMaximumBin(Int_t& locmax, Int_t& locmay, Int_t& locmaz) const |
virtual Double_t | TH1::GetMaximumStored() const |
virtual Double_t | TH1::GetMean(Int_t axis = 1) const |
virtual Double_t | TH1::GetMeanError(Int_t axis = 1) const |
Double_t | GetMinimum() const |
virtual Double_t | GetMinimum(Double_t minval) const |
virtual Int_t | TH1::GetMinimumBin() const |
virtual Int_t | TH1::GetMinimumBin(Int_t& locmix, Int_t& locmiy, Int_t& locmiz) const |
virtual Double_t | TH1::GetMinimumStored() const |
virtual const char* | TNamed::GetName() const |
virtual Int_t | TH1::GetNbinsX() const |
virtual Int_t | TH1::GetNbinsY() const |
virtual Int_t | TH1::GetNbinsZ() const |
virtual Int_t | TH1::GetNdivisions(Option_t* axis = "X") const |
Bool_t | GetNewBinAdded() const |
virtual Double_t | TH1::GetNormFactor() const |
Int_t | GetNumberOfBins() const |
virtual char* | TH1::GetObjectInfo(Int_t px, Int_t py) const |
static Bool_t | TObject::GetObjectStat() |
virtual Option_t* | TH1::GetOption() const |
TVirtualHistPainter* | TH1::GetPainter(Option_t* option = "") |
virtual Int_t | TH1::GetQuantiles(Int_t nprobSum, Double_t* q, const Double_t* probSum = 0) |
virtual Double_t | TH1::GetRandom() const |
virtual void | TH2::GetRandom2(Double_t& x, Double_t& y) |
virtual Double_t | TH1::GetRMS(Int_t axis = 1) const |
virtual Double_t | TH1::GetRMSError(Int_t axis = 1) const |
virtual Double_t | TH1::GetSkewness(Int_t axis = 1) const |
virtual void | TH2::GetStats(Double_t* stats) const |
virtual Double_t | TH1::GetSumOfWeights() const |
virtual TArrayD* | TH1::GetSumw2() |
virtual const TArrayD* | TH1::GetSumw2() const |
virtual Int_t | TH1::GetSumw2N() const |
virtual Float_t | TH1::GetTickLength(Option_t* axis = "X") const |
virtual const char* | TNamed::GetTitle() const |
virtual Style_t | TH1::GetTitleFont(Option_t* axis = "X") const |
virtual Float_t | TH1::GetTitleOffset(Option_t* axis = "X") const |
virtual Float_t | TH1::GetTitleSize(Option_t* axis = "X") const |
virtual UInt_t | TObject::GetUniqueID() const |
TAxis* | TH1::GetXaxis() const |
TAxis* | TH1::GetYaxis() const |
TAxis* | TH1::GetZaxis() const |
virtual Bool_t | TObject::HandleTimer(TTimer* timer) |
virtual ULong_t | TNamed::Hash() const |
void | Honeycomb(Double_t xstart, Double_t ystart, Double_t a, Int_t k, Int_t s) |
virtual void | TObject::Info(const char* method, const char* msgfmt) const |
virtual Bool_t | TObject::InheritsFrom(const char* classname) const |
virtual Bool_t | TObject::InheritsFrom(const TClass* cl) const |
virtual void | TObject::Inspect() constMENU |
virtual Double_t | Integral(Option_t* option = "") const |
virtual Double_t | Integral(Int_t, Int_t, Option_t*) const |
virtual Double_t | Integral(Int_t, Int_t, Int_t, Int_t, Option_t*) const |
virtual Double_t | Integral(Int_t, Int_t, Int_t, Int_t, Int_t, Int_t, Option_t*) const |
virtual Double_t | TH2::IntegralAndError(Int_t binx1, Int_t binx2, Int_t biny1, Int_t biny2, Double_t& err, Option_t* option = "") const |
virtual Double_t | TH2::Interpolate(Double_t x) |
virtual Double_t | TH2::Interpolate(Double_t x, Double_t y) |
virtual Double_t | TH2::Interpolate(Double_t x, Double_t y, Double_t z) |
void | TObject::InvertBit(UInt_t f) |
virtual TClass* | IsA() const |
Bool_t | TH1::IsBinOverflow(Int_t bin) const |
Bool_t | TH1::IsBinUnderflow(Int_t bin) const |
virtual Bool_t | TObject::IsEqual(const TObject* obj) const |
virtual Bool_t | TObject::IsFolder() const |
Bool_t | TObject::IsOnHeap() const |
virtual Bool_t | TNamed::IsSortable() const |
virtual Bool_t | TAttFill::IsTransparent() const |
Bool_t | TObject::IsZombie() const |
virtual Double_t | TH2::KolmogorovTest(const TH1* h2, Option_t* option = "") const |
virtual void | TH1::LabelsDeflate(Option_t* axis = "X") |
virtual void | TH1::LabelsInflate(Option_t* axis = "X") |
virtual void | TH1::LabelsOption(Option_t* option = "h", Option_t* axis = "X") |
virtual void | TNamed::ls(Option_t* option = "") const |
void | TObject::MayNotUse(const char* method) const |
virtual Long64_t | TH2::Merge(TCollection* list) |
virtual void | TAttLine::Modify() |
virtual void | TH1::Multiply(const TH1* h1) |
virtual void | TH1::Multiply(TF1* h1, Double_t c1 = 1) |
virtual void | TH1::Multiply(const TH1* h1, const TH1* h2, Double_t c1 = 1, Double_t c2 = 1, Option_t* option = "")MENU |
virtual Bool_t | TObject::Notify() |
void | TObject::Obsolete(const char* method, const char* asOfVers, const char* removedFromVers) const |
static void | TObject::operator delete(void* ptr) |
static void | TObject::operator delete(void* ptr, void* vp) |
static void | TObject::operator delete[](void* ptr) |
static void | TObject::operator delete[](void* ptr, void* vp) |
void* | TObject::operator new(size_t sz) |
void* | TObject::operator new(size_t sz, void* vp) |
void* | TObject::operator new[](size_t sz) |
void* | TObject::operator new[](size_t sz, void* vp) |
TNamed& | TNamed::operator=(const TNamed& rhs) |
virtual void | TH1::Paint(Option_t* option = "") |
virtual void | TObject::Pop() |
virtual void | TH1::Print(Option_t* option = "") const |
TProfile* | TH2::ProfileX(const char* name = "_pfx", Int_t firstybin = 1, Int_t lastybin = -1, Option_t* option = "") constMENU |
TProfile* | TH2::ProfileY(const char* name = "_pfy", Int_t firstxbin = 1, Int_t lastxbin = -1, Option_t* option = "") constMENU |
TH1D* | TH2::ProjectionX(const char* name = "_px", Int_t firstybin = 0, Int_t lastybin = -1, Option_t* option = "") constMENU |
TH1D* | TH2::ProjectionY(const char* name = "_py", Int_t firstxbin = 0, Int_t lastxbin = -1, Option_t* option = "") constMENU |
virtual void | TH2::PutStats(Double_t* stats) |
virtual Int_t | TObject::Read(const char* name) |
virtual TH1* | TH1::Rebin(Int_t ngroup = 2, const char* newname = "", const Double_t* xbins = 0)MENU |
virtual TH2* | TH2::Rebin2D(Int_t nxgroup = 2, Int_t nygroup = 2, const char* newname = "") |
virtual void | TH1::RebinAxis(Double_t x, TAxis* axis) |
virtual TH2* | TH2::RebinX(Int_t ngroup = 2, const char* newname = "") |
virtual TH2* | TH2::RebinY(Int_t ngroup = 2, const char* newname = "") |
virtual void | TH1::Rebuild(Option_t* option = "") |
virtual void | TH1::RecursiveRemove(TObject* obj) |
virtual void | Reset(Option_t* option) |
virtual void | TAttFill::ResetAttFill(Option_t* option = "") |
virtual void | TAttLine::ResetAttLine(Option_t* option = "") |
virtual void | TAttMarker::ResetAttMarker(Option_t* toption = "") |
void | TObject::ResetBit(UInt_t f) |
virtual void | TH1::ResetStats() |
virtual void | TObject::SaveAs(const char* filename = "", Option_t* option = "") constMENU |
virtual void | TAttFill::SaveFillAttributes(ostream& out, const char* name, Int_t coldef = 1, Int_t stydef = 1001) |
virtual void | TAttLine::SaveLineAttributes(ostream& out, const char* name, Int_t coldef = 1, Int_t stydef = 1, Int_t widdef = 1) |
virtual void | TAttMarker::SaveMarkerAttributes(ostream& out, const char* name, Int_t coldef = 1, Int_t stydef = 1, Int_t sizdef = 1) |
virtual void | SavePrimitive(ostream& out, Option_t* option = "") |
virtual void | TH1::Scale(Double_t c1 = 1, Option_t* option = "") |
virtual void | TH1::SetAxisColor(Color_t color = 1, Option_t* axis = "X") |
virtual void | TH1::SetAxisRange(Double_t xmin, Double_t xmax, Option_t* axis = "X") |
virtual void | TH1::SetBarOffset(Float_t offset = 0.25) |
virtual void | TH1::SetBarWidth(Float_t width = 0.5) |
virtual void | SetBinContent(Int_t bin, Double_t content) |
virtual void | SetBinContent(Int_t, Int_t, Double_t) |
virtual void | SetBinContent(Int_t, Int_t, Int_t, Double_t) |
void | SetBinContentChanged(Bool_t flag) |
virtual void | TH1::SetBinError(Int_t bin, Double_t error) |
virtual void | TH1::SetBinError(Int_t binx, Int_t biny, Double_t error) |
virtual void | TH1::SetBinError(Int_t binx, Int_t biny, Int_t binz, Double_t error) |
virtual void | TH1::SetBins(Int_t nx, const Double_t* xBins) |
virtual void | TH1::SetBins(Int_t nx, Double_t xmin, Double_t xmax) |
virtual void | TH1::SetBins(Int_t nx, const Double_t* xBins, Int_t ny, const Double_t* yBins) |
virtual void | TH1::SetBins(Int_t nx, Double_t xmin, Double_t xmax, Int_t ny, Double_t ymin, Double_t ymax) |
virtual void | TH1::SetBins(Int_t nx, const Double_t* xBins, Int_t ny, const Double_t* yBins, Int_t nz, const Double_t* zBins) |
virtual void | TH1::SetBins(Int_t nx, Double_t xmin, Double_t xmax, Int_t ny, Double_t ymin, Double_t ymax, Int_t nz, Double_t zmin, Double_t zmax) |
virtual void | TH1::SetBinsLength(Int_t = -1) |
void | TObject::SetBit(UInt_t f) |
void | TObject::SetBit(UInt_t f, Bool_t set) |
virtual void | TH1::SetBuffer(Int_t buffersize, Option_t* option = "") |
virtual void | TH1::SetCellContent(Int_t binx, Int_t biny, Double_t content) |
virtual void | TH1::SetCellError(Int_t binx, Int_t biny, Double_t content) |
virtual void | TH1::SetContent(const Double_t* content) |
virtual void | TH1::SetContour(Int_t nlevels, const Double_t* levels = 0) |
virtual void | TH1::SetContourLevel(Int_t level, Double_t value) |
static void | TH1::SetDefaultBufferSize(Int_t buffersize = 1000) |
static void | TH1::SetDefaultSumw2(Bool_t sumw2 = kTRUE) |
virtual void | TH1::SetDirectory(TDirectory* dir) |
virtual void | TObject::SetDrawOption(Option_t* option = "")MENU |
static void | TObject::SetDtorOnly(void* obj) |
virtual void | TH1::SetEntries(Double_t n) |
virtual void | TH1::SetError(const Double_t* error) |
virtual void | TAttFill::SetFillAttributes()MENU |
virtual void | TAttFill::SetFillColor(Color_t fcolor) |
virtual void | TAttFill::SetFillStyle(Style_t fstyle) |
void | SetFloat(Bool_t flag = true) |
virtual void | TH1::SetLabelColor(Color_t color = 1, Option_t* axis = "X") |
virtual void | TH1::SetLabelFont(Style_t font = 62, Option_t* axis = "X") |
virtual void | TH1::SetLabelOffset(Float_t offset = 0.005, Option_t* axis = "X") |
virtual void | TH1::SetLabelSize(Float_t size = 0.02, Option_t* axis = "X") |
virtual void | TAttLine::SetLineAttributes()MENU |
virtual void | TAttLine::SetLineColor(Color_t lcolor) |
virtual void | TAttLine::SetLineStyle(Style_t lstyle) |
virtual void | TAttLine::SetLineWidth(Width_t lwidth) |
virtual void | TAttMarker::SetMarkerAttributes()MENU |
virtual void | TAttMarker::SetMarkerColor(Color_t tcolor = 1) |
virtual void | TAttMarker::SetMarkerSize(Size_t msize = 1) |
virtual void | TAttMarker::SetMarkerStyle(Style_t mstyle = 1) |
virtual void | TH1::SetMaximum(Double_t maximum = -1111)MENU |
virtual void | TH1::SetMinimum(Double_t minimum = -1111)MENU |
virtual void | TH1::SetName(const char* name)MENU |
virtual void | TH1::SetNameTitle(const char* name, const char* title) |
virtual void | TH1::SetNdivisions(Int_t n = 510, Option_t* axis = "X") |
void | SetNewBinAdded(Bool_t flag) |
virtual void | TH1::SetNormFactor(Double_t factor = 1) |
static void | TObject::SetObjectStat(Bool_t stat) |
virtual void | TH1::SetOption(Option_t* option = " ") |
virtual void | TH2::SetShowProjectionX(Int_t nbins)MENU |
virtual void | TH2::SetShowProjectionY(Int_t nbins)MENU |
virtual void | TH1::SetStats(Bool_t stats = kTRUE)MENU |
virtual void | TH1::SetTickLength(Float_t length = 0.02, Option_t* axis = "X") |
virtual void | TH1::SetTitle(const char* title)MENU |
virtual void | TH1::SetTitleFont(Style_t font = 62, Option_t* axis = "X") |
virtual void | TH1::SetTitleOffset(Float_t offset = 1, Option_t* axis = "X") |
virtual void | TH1::SetTitleSize(Float_t size = 0.02, Option_t* axis = "X") |
virtual void | TObject::SetUniqueID(UInt_t uid) |
virtual void | TH1::SetXTitle(const char* title) |
virtual void | TH1::SetYTitle(const char* title) |
virtual void | TH1::SetZTitle(const char* title) |
virtual TH1* | TH2::ShowBackground(Int_t niter = 20, Option_t* option = "same") |
virtual void | ShowMembers(TMemberInspector& insp) |
virtual Int_t | TH2::ShowPeaks(Double_t sigma = 2, Option_t* option = "", Double_t threshold = 0.05)MENU |
virtual Int_t | TNamed::Sizeof() const |
virtual void | TH2::Smooth(Int_t ntimes = 1, Option_t* option = "")MENU |
static void | TH1::SmoothArray(Int_t NN, Double_t* XX, Int_t ntimes = 1) |
static void | TH1::StatOverflows(Bool_t flag = kTRUE) |
virtual void | Streamer(TBuffer& b) |
void | StreamerNVirtual(TBuffer& b) |
virtual void | TH1::Sumw2() |
virtual void | TObject::SysError(const char* method, const char* msgfmt) const |
Bool_t | TObject::TestBit(UInt_t f) const |
Int_t | TObject::TestBits(UInt_t f) const |
static TH1* | TH1::TransformHisto(TVirtualFFT* fft, TH1* h_output, Option_t* option) |
virtual void | TH1::UseCurrentStyle() |
virtual void | TObject::Warning(const char* method, const char* msgfmt) const |
virtual Int_t | TObject::Write(const char* name = 0, Int_t option = 0, Int_t bufsize = 0) |
virtual Int_t | TObject::Write(const char* name = 0, Int_t option = 0, Int_t bufsize = 0) const |
void | AddBinToPartition(TH2PolyBin* bin) |
virtual Int_t | TH2::BufferFill(Double_t, Double_t) |
virtual Int_t | TH2::BufferFill(Double_t x, Double_t y, Double_t w) |
static bool | TH1::CheckAxisLimits(const TAxis* a1, const TAxis* a2) |
static bool | TH1::CheckBinLimits(const TAxis* a1, const TAxis* a2) |
static bool | TH1::CheckConsistency(const TH1* h1, const TH1* h2) |
static bool | TH1::CheckConsistentSubAxes(const TAxis* a1, Int_t firstBin1, Int_t lastBin1, const TAxis* a2, Int_t firstBin2 = 0, Int_t lastBin2 = 0) |
static bool | TH1::CheckEqualAxes(const TAxis* a1, const TAxis* a2) |
virtual void | TObject::DoError(int level, const char* location, const char* fmt, va_list va) const |
virtual void | TH2::DoFitSlices(bool onX, TF1* f1, Int_t firstbin, Int_t lastbin, Int_t cut, Option_t* option, TObjArray* arr) |
virtual Double_t | TH1::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 |
virtual TProfile* | TH2::DoProfile(bool onX, const char* name, Int_t firstbin, Int_t lastbin, Option_t* option) const |
virtual TH1D* | TH2::DoProjection(bool onX, const char* name, Int_t firstbin, Int_t lastbin, Option_t* option) const |
virtual Bool_t | TH1::FindNewAxisLimits(const TAxis* axis, const Double_t point, Double_t& newMin, Double_t& newMax) |
void | Initialize(Double_t xlow, Double_t xup, Double_t ylow, Double_t yup, Int_t n, Int_t m) |
Bool_t | IsIntersecting(TH2PolyBin* bin, Double_t xclipl, Double_t xclipr, Double_t yclipb, Double_t yclipt) |
Bool_t | IsIntersectingPolygon(Int_t bn, Double_t* x, Double_t* y, Double_t xclipl, Double_t xclipr, Double_t yclipb, Double_t yclipt) |
void | TObject::MakeZombie() |
static Bool_t | TH1::RecomputeAxisLimits(TAxis& destAxis, const TAxis& anAxis) |
static Bool_t | TH1::SameLimitsAndNBins(const TAxis& axis1, const TAxis& axis2) |
virtual void | TH1::SavePrimitiveHelp(ostream& out, const char* hname, Option_t* option = "") |
enum TH1::[unnamed] { | kNoStats | |
kUserContour | ||
kCanRebin | ||
kLogX | ||
kIsZoomed | ||
kNoTitle | ||
kIsAverage | ||
kNstat | ||
}; | ||
enum TObject::EStatusBits { | kCanDelete | |
kMustCleanup | ||
kObjInCanvas | ||
kIsReferenced | ||
kHasUUID | ||
kCannotPick | ||
kNoContextMenu | ||
kInvalidObject | ||
}; | ||
enum TObject::[unnamed] { | kIsOnHeap | |
kNotDeleted | ||
kZombie | ||
kBitMask | ||
kSingleKey | ||
kOverwrite | ||
kWriteDelete | ||
}; |
Short_t | TH1::fBarOffset | (1000*offset) for bar charts or legos |
Short_t | TH1::fBarWidth | (1000*width) for bar charts or legos |
Bool_t | fBinContentChanged | !For the 3D Painter |
TList* | fBins | List of bins. |
Double_t* | TH1::fBuffer | [fBufferSize] entry buffer |
Int_t | TH1::fBufferSize | fBuffer size |
Int_t | fCellX | Number of partition cells in the x-direction of the histogram |
Int_t | fCellY | Number of partition cells in the y-direction of the histogram |
TList* | fCells | [fNCells] The array of TLists that store the bins that intersect with each cell |
Bool_t* | fCompletelyInside | [fNCells] The array that returns true if the cell at the given coordinate is completely inside a bin |
TArrayD | TH1::fContour | Array to display contour levels |
Int_t | TH1::fDimension | !Histogram dimension (1, 2 or 3 dim) |
TDirectory* | TH1::fDirectory | !Pointer to directory holding this histogram |
Double_t | TH1::fEntries | Number of entries |
Color_t | TAttFill::fFillColor | fill area color |
Style_t | TAttFill::fFillStyle | fill area style |
Bool_t | fFloat | When set to kTRUE, allows the histogram to expand if a bin outside the limits is added. |
TList* | TH1::fFunctions | ->Pointer to list of functions (fits and user) |
Double_t* | TH1::fIntegral | !Integral of bins used by GetRandom |
Bool_t* | fIsEmpty | [fNCells] The array that returns true if the cell at the given coordinate is empty |
Color_t | TAttLine::fLineColor | line color |
Style_t | TAttLine::fLineStyle | line style |
Width_t | TAttLine::fLineWidth | line width |
Color_t | TAttMarker::fMarkerColor | Marker color index |
Size_t | TAttMarker::fMarkerSize | Marker size |
Style_t | TAttMarker::fMarkerStyle | Marker style |
Double_t | TH1::fMaximum | Maximum value for plotting |
Double_t | TH1::fMinimum | Minimum value for plotting |
Int_t | fNCells | Number of partition cells: fCellX*fCellY |
TString | TNamed::fName | object identifier |
Int_t | TH1::fNcells | number of bins(1D), cells (2D) +U/Overflows |
Bool_t | fNewBinAdded | !For the 3D Painter |
Double_t | TH1::fNormFactor | Normalization factor |
TString | TH1::fOption | histogram options |
Double_t | fOverflow[9] | Overflow bins |
TVirtualHistPainter* | TH1::fPainter | !pointer to histogram painter |
Double_t | TH2::fScalefactor | Scale factor |
Double_t | fStepX | |
Double_t | fStepY | Dimensions of a partition cell |
TArrayD | TH1::fSumw2 | Array of sum of squares of weights |
TString | TNamed::fTitle | object title |
Double_t | TH1::fTsumw | Total Sum of weights |
Double_t | TH1::fTsumw2 | Total Sum of squares of weights |
Double_t | TH1::fTsumwx | Total Sum of weight*X |
Double_t | TH1::fTsumwx2 | Total Sum of weight*X*X |
Double_t | TH2::fTsumwxy | Total Sum of weight*X*Y |
Double_t | TH2::fTsumwy | Total Sum of weight*Y |
Double_t | TH2::fTsumwy2 | Total Sum of weight*Y*Y |
TAxis | TH1::fXaxis | X axis descriptor |
TAxis | TH1::fYaxis | Y axis descriptor |
TAxis | TH1::fZaxis | Z axis descriptor |
static Bool_t | TH1::fgAddDirectory | !flag to add histograms to the directory |
static Int_t | TH1::fgBufferSize | !default buffer size for automatic histograms |
static Bool_t | TH1::fgDefaultSumw2 | !flag to call TH1::Sumw2 automatically at histogram creation time |
static Bool_t | TH1::fgStatOverflows | !flag to use under/overflows in statistics |
Constructor with specified name and boundaries, but no partition cell number.
Constructor with specified name and boundaries and partition cell number.
Adds a new bin to the histogram. It can be any object having the method IsInside(). It returns the bin number in the histogram. It returns 0 if it failed to add. To allow the histogram limits to expand when a bin outside the limits is added, call SetFloat() before adding the bin.
Adds a new bin to the histogram. The number of vertices and their (x,y) coordinates are required as input. It returns the bin number in the histogram.
Add a new bin to the histogram. The bin shape is a rectangle. It returns the bin number of the bin in the histogram.
Performs the operation: this = this + c1*f1.
Replace contents of this histogram by the addition of h1 and h2.
Adds the input bin into the partition cell matrix. This method is called in AddBin() and ChangePartition().
Changes the number of partition cells in the histogram. Deletes the old partition and constructs a new one.
Returns the bin number of the bin at the given coordinate. -1 to -9 are the overflow and underflow bins. overflow bin -5 is the unbinned areas in the histogram (also called "the sea"). The third parameter can be left blank. The overflow/underflow bins are: -1 | -2 | -3 -4 | -5 | -6 -7 | -8 | -9 where -5 means is the "sea" bin (i.e. unbinned areas)
Increment the bin containing (x,y) by 1. Uses the partitioning algorithm.
Increment the bin containing (x,y) by w. Uses the partitioning algorithm.
Fills a 2-D histogram with an array of values and weights. ntimes: number of entries in arrays x and w (array size must be ntimes*stride) x: array of x values to be histogrammed y: array of y values to be histogrammed w: array of weights stride: step size through arrays x, y and w
Returns the integral of bin contents. By default the integral is computed as the sum of bin contents. If option "width" or "area" is specified, the integral is the sum of the bin contents multiplied by the area of the bin.
Returns the content of the input bin
For the overflow/underflow/sea bins:
-1 | -2 | -3
---+----+----
-4 | -5 | -6
---+----+----
-7 | -8 | -9
where -5 is the "sea" bin (i.e. unbinned areas)
Returns the value of error associated to bin number bin. If the sum of squares of weights has been defined (via Sumw2), this function returns the sqrt(sum of w2). otherwise it returns the sqrt(contents) for this bin.
Returns the maximum value of the histogram that is less than maxval.
Returns the minimum value of the histogram that is greater than minval.
Bins the histogram using a honeycomb structure
Initializes the TH2Poly object. This method is called by the constructor.
Returns kTRUE if the input bin is intersecting with the input rectangle (xclipl, xclipr, yclipb, yclipt)
Returns kTRUE if the input polygon (bn, x, y) is intersecting with the input rectangle (xclipl, xclipr, yclipb, yclipt)
Save primitive as a C++ statement(s) on output stream out
Sets the contents of the input bin to the input content
When set to kTRUE, allows the histogram to expand if a bin outside the limits is added.