library: libHist #include "TH1.h" |
TH1S() | |
TH1S(const TH1S& h1s) | |
TH1S(const char* name, const char* title, Int_t nbinsx, const Float_t* xbins) | |
TH1S(const char* name, const char* title, Int_t nbinsx, const Double_t* xbins) | |
TH1S(const char* name, const char* title, Int_t nbinsx, Double_t xlow, Double_t xup) | |
virtual | ~TH1S() |
void | TObject::AbstractMethod(const char* method) const |
virtual void | TH1::Add(const TH1* h1, Double_t c1 = 1) |
virtual void | TH1::Add(TF1* h1, Double_t c1 = 1, Option_t* option = "") |
virtual void | TH1::Add(const TH1* h, const TH1* h2, Double_t c1 = 1, Double_t c2 = 1) |
void | TArrayS::AddAt(Short_t c, Int_t idx) |
virtual void | AddBinContent(Int_t bin) |
virtual void | AddBinContent(Int_t bin, Double_t w) |
static void | TH1::AddDirectory(Bool_t add = kTRUE) |
static Bool_t | TH1::AddDirectoryStatus() |
void | TArrayS::Adopt(Int_t n, Short_t* array) |
virtual void | TObject::AppendPad(Option_t* option = "") |
Short_t | TArrayS::At(Int_t i) const |
virtual void | TH1::Browse(TBrowser* b) |
virtual Int_t | TH1::BufferEmpty(Int_t action = 0) |
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 = "") |
virtual TObject* | TNamed::Clone(const char* newname = "") const |
virtual Int_t | TNamed::Compare(const TObject* obj) const |
virtual Double_t | TH1::ComputeIntegral() |
virtual void | Copy(TObject& hnew) const |
virtual void | TObject::Delete(Option_t* option = "") |
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 = "") |
virtual void | TH1::Draw(Option_t* option = "") |
virtual void | TObject::DrawClass() const |
virtual TObject* | TObject::DrawClone(Option_t* option = "") const |
virtual TH1* | DrawCopy(Option_t* option = "") const |
virtual TH1* | TH1::DrawNormalized(Option_t* option = "", Double_t norm = 1) const |
virtual void | TH1::DrawPanel() |
virtual void | TObject::Dump() const |
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 | TH1::Fill(Double_t x) |
virtual Int_t | TH1::Fill(Double_t x, Double_t w) |
virtual Int_t | TH1::Fill(const char* name, Double_t w) |
virtual void | TNamed::FillBuffer(char*& buffer) |
virtual void | TH1::FillN(Int_t ntimes, const Double_t* x, const Double_t* w, Int_t stride = 1) |
virtual void | TH1::FillN(Int_t, const Double_t*, const Double_t*, const Double_t*, Int_t) |
virtual void | TH1::FillRandom(const char* fname, Int_t ntimes = 5000) |
virtual void | TH1::FillRandom(TH1* h, Int_t ntimes = 5000) |
virtual Int_t | TH1::FindBin(Double_t x, Double_t y = 0, Double_t z = 0) |
virtual TObject* | TH1::FindObject(const char* name) const |
virtual TObject* | TH1::FindObject(const TObject* obj) const |
virtual Int_t | TH1::Fit(const char* formula, Option_t* option = "", Option_t* goption = "", Double_t xmin = 0, Double_t xmax = 0) |
virtual Int_t | TH1::Fit(TF1* f1, Option_t* option = "", Option_t* goption = "", Double_t xmin = 0, Double_t xmax = 0) |
virtual void | TH1::FitPanel() |
const Short_t* | TArrayS::GetArray() const |
Short_t* | TArrayS::GetArray() |
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 bin, Int_t) const |
virtual Double_t | GetBinContent(Int_t bin, Int_t, Int_t) const |
virtual Double_t | TH1::GetBinError(Int_t bin) const |
virtual Double_t | TH1::GetBinError(Int_t binx, Int_t biny) const |
virtual Double_t | TH1::GetBinError(Int_t binx, Int_t biny, Int_t binz) const |
virtual Double_t | TH1::GetBinLowEdge(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 |
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 |
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 |
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 |
virtual Double_t | TH1::GetMaximum(Double_t maxval = FLT_MAX) 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 |
virtual Double_t | TH1::GetMinimum(Double_t minval = -FLT_MAX) 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 |
virtual Double_t | TH1::GetNormFactor() 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 Double_t | TH1::GetRMS(Int_t axis = 1) const |
virtual Double_t | TH1::GetRMSError(Int_t axis = 1) const |
Int_t | TArray::GetSize() const |
virtual Double_t | TH1::GetSkewness(Int_t axis = 1) const |
virtual void | TH1::GetStats(Double_t* stats) const |
Stat_t | TArrayS::GetSum() 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 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 |
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() const |
virtual Double_t | TH1::Integral(Option_t* option = "") const |
virtual Double_t | TH1::Integral(Int_t binx1, Int_t binx2, Option_t* option = "") const |
virtual Double_t | TH1::Integral(Int_t, Int_t, Int_t, Int_t, Option_t* = "") const |
virtual Double_t | TH1::Integral(Int_t, Int_t, Int_t, Int_t, Int_t, Int_t, Option_t* = "") const |
void | TObject::InvertBit(UInt_t f) |
virtual TClass* | IsA() 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 | TH1::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 | TH1::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 = "") |
virtual Bool_t | TObject::Notify() |
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) |
TH1S& | operator=(const TH1S& h1) |
Short_t& | TArrayS::operator[](Int_t i) |
Short_t | TArrayS::operator[](Int_t i) const |
virtual void | TH1::Paint(Option_t* option = "") |
virtual void | TObject::Pop() |
virtual void | TH1::Print(Option_t* option = "") const |
virtual void | TH1::PutStats(Double_t* stats) |
virtual Int_t | TObject::Read(const char* name) |
static TArray* | TArray::ReadArray(TBuffer& b, const TClass* clReq) |
virtual TH1* | TH1::Rebin(Int_t ngroup = 2, const char* newname = "", const Double_t* xbins = 0) |
virtual void | TH1::RebinAxis(Double_t x, Option_t* axis = "X") |
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 | TObject::SaveAs(const char* filename = "", Option_t* option = "") const |
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 | TH1::SavePrimitive(ostream& out, Option_t* option = "") |
virtual void | TH1::Scale(Double_t c1 = 1) |
virtual void | TArrayS::Set(Int_t n) |
void | TArrayS::Set(Int_t n, const Short_t* array) |
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 bin, Int_t, Double_t content) |
virtual void | SetBinContent(Int_t bin, Int_t, Int_t, Double_t content) |
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, 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 | SetBinsLength(Int_t n = -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 = "") |
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() |
virtual void | TAttFill::SetFillColor(Color_t fcolor) |
virtual void | TAttFill::SetFillStyle(Style_t fstyle) |
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() |
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() |
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) |
virtual void | TH1::SetMinimum(Double_t minimum = -1111) |
virtual void | TH1::SetName(const char* name) |
virtual void | TH1::SetNameTitle(const char* name, const char* title) |
virtual void | TH1::SetNdivisions(Int_t n = 510, Option_t* axis = "X") |
virtual void | TH1::SetNormFactor(Double_t factor = 1) |
static void | TObject::SetObjectStat(Bool_t stat) |
virtual void | TH1::SetOption(Option_t* option = " ") |
virtual void | TH1::SetStats(Bool_t stats = kTRUE) |
virtual void | TH1::SetTickLength(Float_t length = 0.02, Option_t* axis = "X") |
virtual void | TH1::SetTitle(const char* title) |
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* | TH1::ShowBackground(Int_t niter = 20, Option_t* option = "same") |
virtual void | ShowMembers(TMemberInspector& insp, char* parent) |
virtual Int_t | TH1::ShowPeaks(Double_t sigma = 2, Option_t* option = "", Double_t threshold = 0.05) |
virtual Int_t | TNamed::Sizeof() const |
virtual void | TH1::Smooth(Int_t ntimes = 1, Int_t firstbin = -1, Int_t lastbin = -1) |
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 |
static void | TArray::WriteArray(TBuffer& b, const TArray* a) |
Bool_t | TArray::BoundsOk(const char* where, Int_t at) const |
virtual Int_t | TH1::BufferFill(Double_t x, Double_t w) |
virtual void | TObject::DoError(int level, const char* location, const char* fmt, va_list va) const |
virtual Bool_t | TH1::FindNewAxisLimits(const TAxis* axis, const Double_t point, Double_t& newMin, Double_t& newMax) |
void | TObject::MakeZombie() |
Bool_t | TArray::OutOfBoundsError(const char* where, Int_t i) const |
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, Option_t* option = "") |
enum TH1::[unnamed] { | kNoStats | |
kUserContour | ||
kCanRebin | ||
kLogX | ||
kIsZoomed | ||
kNoTitle | ||
}; | ||
enum TObject::EStatusBits { | kCanDelete | |
kMustCleanup | ||
kObjInCanvas | ||
kIsReferenced | ||
kHasUUID | ||
kCannotPick | ||
kNoContextMenu | ||
kInvalidObject | ||
}; | ||
enum TObject::[unnamed] { | kIsOnHeap | |
kNotDeleted | ||
kZombie | ||
kBitMask | ||
kSingleKey | ||
kOverwrite | ||
kWriteDelete | ||
}; |
Short_t* | TArrayS::fArray | [fN] Array of fN shorts |
Int_t | TArray::fN | Number of array elements |
Int_t | TH1::fNcells | number of bins(1D), cells (2D) +U/Overflows |
TAxis | TH1::fXaxis | X axis descriptor |
TAxis | TH1::fYaxis | Y axis descriptor |
TAxis | TH1::fZaxis | Z axis descriptor |
Short_t | TH1::fBarOffset | (1000*offset) for bar charts or legos |
Short_t | TH1::fBarWidth | (1000*width) for bar charts or legos |
Double_t | TH1::fEntries | Number of entries |
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 | TH1::fMaximum | Maximum value for plotting |
Double_t | TH1::fMinimum | Minimum value for plotting |
Double_t | TH1::fNormFactor | Normalization factor |
TArrayD | TH1::fContour | Array to display contour levels |
TArrayD | TH1::fSumw2 | Array of sum of squares of weights |
TString | TH1::fOption | histogram options |
TList* | TH1::fFunctions | ->Pointer to list of functions (fits and user) |
Int_t | TH1::fBufferSize | fBuffer size |
Double_t* | TH1::fBuffer | [fBufferSize] entry buffer |
TDirectory* | TH1::fDirectory | !Pointer to directory holding this histogram |
Int_t | TH1::fDimension | !Histogram dimension (1, 2 or 3 dim) |
Double_t* | TH1::fIntegral | !Integral of bins used by GetRandom |
TVirtualHistPainter* | TH1::fPainter | !pointer to histogram painter |
static Int_t | TH1::fgBufferSize | !default buffer size for automatic histograms |
static Bool_t | TH1::fgAddDirectory | !flag to add histograms to the directory |
static Bool_t | TH1::fgStatOverflows | !flag to use under/overflows in statistics |
static Bool_t | TH1::fgDefaultSumw2 | !flag to call TH1::Sumw2 automatically at histogram creation time |
TString | TNamed::fName | object identifier |
TString | TNamed::fTitle | object title |
Color_t | TAttLine::fLineColor | line color |
Style_t | TAttLine::fLineStyle | line style |
Width_t | TAttLine::fLineWidth | line width |
Color_t | TAttFill::fFillColor | fill area color |
Style_t | TAttFill::fFillStyle | fill area style |
Color_t | TAttMarker::fMarkerColor | Marker color index |
Style_t | TAttMarker::fMarkerStyle | Marker style |
Size_t | TAttMarker::fMarkerSize | Marker size |
The H I S T O G R A M Classes =============================== ROOT supports the following histogram types: 1-D histograms: TH1C : histograms with one byte per channel. Maximum bin content = 255 TH1S : histograms with one short per channel. Maximum bin content = 65535 TH1I : histograms with one int per channel. Maximum bin content = 2147483647 TH1F : histograms with one float per channel. Maximum precision 7 digits TH1D : histograms with one double per channel. Maximum precision 14 digits 2-D histograms: TH2C : histograms with one byte per channel. Maximum bin content = 255 TH2S : histograms with one short per channel. Maximum bin content = 65535 TH2I : histograms with one int per channel. Maximum bin content = 2147483647 TH2F : histograms with one float per channel. Maximum precision 7 digits TH2D : histograms with one double per channel. Maximum precision 14 digits 3-D histograms: TH3C : histograms with one byte per channel. Maximum bin content = 255 TH3S : histograms with one short per channel. Maximum bin content = 65535 TH3I : histograms with one int per channel. Maximum bin content = 2147483647 TH3F : histograms with one float per channel. Maximum precision 7 digits TH3D : histograms with one double per channel. Maximum precision 14 digits Profile histograms: See classes TProfile and TProfile2D Profile histograms are used to display the mean value of Y and its RMS for each bin in X. Profile histograms are in many cases an elegant replacement of two-dimensional histograms : the inter-relation of two measured quantities X and Y can always be visualized by a two-dimensional histogram or scatter-plot; If Y is an unknown (but single-valued) approximate function of X, this function is displayed by a profile histogram with much better precision than by a scatter-plot. - All histogram classes are derived from the base class TH1 TH1 ^ | | | ----------------------------------------------------------- | | | | | | | | | TH1C TH1S TH1I TH1F TH1D | | | | | | | TH2 TProfile | | | | | ---------------------------------- | | | | | | | TH2C TH2S TH2I TH2F TH2D | | TH3 | | TProfile2D | ------------------------------------- | | | | | TH3C TH3S TH3I TH3F TH3D The TH*C classes also inherit from the array class TArrayC. The TH*S classes also inherit from the array class TArrayS. The TH*I classes also inherit from the array class TArrayI. The TH*F classes also inherit from the array class TArrayF. The TH*D classes also inherit from the array class TArrayD. Creating histograms =================== Histograms are created by invoking one of the constructors, eg TH1F *h1 = new TH1F("h1","h1 title",100,0,4.4); TH2F *h2 = new TH2F("h2","h2 title",40,0,4,30,-3,3); histograms may also be created by: - calling the Clone function, see below - making a projection from a 2-D or 3-D histogram, see below - reading an histogram from a file When an histogram is created, a reference to it is automatically added to the list of in-memory objects for the current file or directory. This default behaviour can be changed by: h->SetDirectory(0); // for the current histogram h TH1::AddDirectory(kFALSE); // sets a global switch disabling the reference When the histogram is deleted, the reference to it is removed from the list of objects in memory. When a file is closed, all histograms in memory associated with this file are automatically deleted. Fix or variable bin size ======================== All histogram types support either fix or variable bin sizes. 2-D histograms may have fix size bins along X and variable size bins along Y or vice-versa. The functions to fill, manipulate, draw or access histograms are identical in both cases. Each histogram always contains 3 objects TAxis: fXaxis, fYaxis and fZaxis To access the axis parameters, do: TAxis *xaxis = h->GetXaxis(); etc. Double_t binCenter = xaxis->GetBinCenter(bin), etc. See class TAxis for a description of all the access functions. The axis range is always stored internally in double precision. Convention for numbering bins ============================= For all histogram types: nbins, xlow, xup bin = 0; underflow bin bin = 1; first bin with low-edge xlow INCLUDED bin = nbins; last bin with upper-edge xup EXCLUDED bin = nbins+1; overflow bin In case of 2-D or 3-D histograms, a "global bin" number is defined. For example, assuming a 3-D histogram with binx,biny,binz, the function Int_t gbin = h->GetBin(binx,biny,binz); returns a global/linearized gbin number. This global gbin is useful to access the bin content/error information independently of the dimension. Note that to access the information other than bin content and errors one should use the TAxis object directly with eg: Double_t xcenter = h3->GetZaxis()->GetBinCenter(27); returns the center along z of bin number 27 (not the global bin) in the 3-d histogram h3. Alphanumeric Bin Labels ======================= By default, an histogram axis is drawn with its numeric bin labels. One can specify alphanumeric labels instead with: 1- call TAxis::SetBinLabel(bin,label); This can always be done before or after filling. When the histogram is drawn, bin labels will be automatically drawn. See example in $ROOTSYS/tutorials/graphs/labels1.C, labels2.C 2- call to a Fill function with one of the arguments being a string, eg hist1->Fill(somename,weigth); hist2->Fill(x,somename,weight); hist2->Fill(somename,y,weight); hist2->Fill(somenamex,somenamey,weight); See example in $ROOTSYS/tutorials/hist/hlabels1.C, hlabels2.C 3- via TTree::Draw. see for example $ROOTSYS/tutorials/tree/cernstaff.C tree.Draw("Nation::Division"); where "Nation" and "Division" are two branches of a Tree. When using the options 2 or 3 above, the labels are automatically added to the list (THashList) of labels for a given axis. By default, an axis is drawn with the order of bins corresponding to the filling sequence. It is possible to reorder the axis - alphabetically - by increasing or decreasing values The reordering can be triggered via the TAxis contextMenu by selecting the menu item "LabelsOption" or by calling directly TH1::LabelsOption(option,axis) where -axis may be "X","Y" or "Z" -option may be: option = "a" sort by alphabetic order = ">" sort by decreasing values = "<" sort by increasing values = "h" draw labels horizonthal = "v" draw labels vertical = "u" draw labels up (end of label right adjusted) = "d" draw labels down (start of label left adjusted) When using the option 2 above, new labels are added by doubling the current number of bins in case one label does not exist yet. When the Filling is terminated, it is possible to trim the number of bins to match the number of active labels by calling TH1::LabelsDeflate(axis) with axis = "X","Y" or "Z" This operation is automatic when using TTree::Draw. Once bin labels have been created, they become persistent if the histogram is written to a file or when generating the C++ code via SavePrimitive. Histograms with automatic bins ============================== When an histogram is created with an axis lower limit greater or equal to its upper limit, the SetBuffer is automatically called with an argument fBufferSize equal to fgBufferSize (default value=1000). fgBufferSize may be reset via the static function TH1::SetDefaultBufferSize. The axis limits will be automatically computed when the buffer will be full or when the function BufferEmpty is called. Filling histograms ================== An histogram is typically filled with statements like: h1->Fill(x); h1->Fill(x,w); //fill with weight h2->Fill(x,y) h2->Fill(x,y,w) h3->Fill(x,y,z) h3->Fill(x,y,z,w) or via one of the Fill functions accepting names described above. The Fill functions compute the bin number corresponding to the given x,y or z argument and increment this bin by the given weight. The Fill functions return the bin number for 1-D histograms or global bin number for 2-D and 3-D histograms. If TH1::Sumw2 has been called before filling, the sum of squares of weights is also stored. One can also increment directly a bin number via TH1::AddBinContent or replace the existing content via TH1::SetBinContent. To access the bin content of a given bin, do: Double_t binContent = h->GetBinContent(bin); By default, the bin number is computed using the current axis ranges. If the automatic binning option has been set via h->SetBit(TH1::kCanRebin); then, the Fill Function will automatically extend the axis range to accomodate the new value specified in the Fill argument. The method used is to double the bin size until the new value fits in the range, merging bins two by two. This automatic binning options is extensively used by the TTree::Draw function when histogramming Tree variables with an unknown range. This automatic binning option is supported for 1-d, 2-D and 3-D histograms. During filling, some statistics parameters are incremented to compute the mean value and Root Mean Square with the maximum precision. In case of histograms of type TH1C, TH1S, TH2C, TH2S, TH3C, TH3S a check is made that the bin contents do not exceed the maximum positive capacity (127 or 65535). Histograms of all types may have positive or/and negative bin contents. Rebinning ========= At any time, an histogram can be rebinned via TH1::Rebin. This function returns a new histogram with the rebinned contents. If bin errors were stored, they are recomputed during the rebinning. Associated errors ================= By default, for each bin, the sum of weights is computed at fill time. One can also call TH1::Sumw2 to force the storage and computation of the sum of the square of weights per bin. If Sumw2 has been called, the error per bin is computed as the sqrt(sum of squares of weights), otherwise the error is set equal to the sqrt(bin content). To return the error for a given bin number, do: Double_t error = h->GetBinError(bin); Associated functions ==================== One or more object (typically a TF1*) can be added to the list of functions (fFunctions) associated to each histogram. When TH1::Fit is invoked, the fitted function is added to this list. Given an histogram h, one can retrieve an associated function with: TF1 *myfunc = h->GetFunction("myfunc"); Operations on histograms ======================== Many types of operations are supported on histograms or between histograms - Addition of an histogram to the current histogram - Additions of two histograms with coefficients and storage into the current histogram - Multiplications and Divisions are supported in the same way as additions. - The Add, Divide and Multiply functions also exist to add,divide or multiply an histogram by a function. If an histogram has associated error bars (TH1::Sumw2 has been called), the resulting error bars are also computed assuming independent histograms. In case of divisions, Binomial errors are also supported. Fitting histograms ================== Histograms (1-D,2-D,3-D and Profiles) can be fitted with a user specified function via TH1::Fit. When an histogram is fitted, the resulting function with its parameters is added to the list of functions of this histogram. If the histogram is made persistent, the list of associated functions is also persistent. Given a pointer (see above) to an associated function myfunc, one can retrieve the function/fit parameters with calls such as: Double_t chi2 = myfunc->GetChisquare(); Double_t par0 = myfunc->GetParameter(0); //value of 1st parameter Double_t err0 = myfunc->GetParError(0); //error on first parameter Projections of histograms ======================== One can: - make a 1-D projection of a 2-D histogram or Profile see functions TH2::ProjectionX,Y, TH2::ProfileX,Y, TProfile::ProjectionX - make a 1-D, 2-D or profile out of a 3-D histogram see functions TH3::ProjectionZ, TH3::Project3D. One can fit these projections via: TH2::FitSlicesX,Y, TH3::FitSlicesZ. Random Numbers and histograms ============================= TH1::FillRandom can be used to randomly fill an histogram using the contents of an existing TF1 function or another TH1 histogram (for all dimensions). For example the following two statements create and fill an histogram 10000 times with a default gaussian distribution of mean 0 and sigma 1: TH1F h1("h1","histo from a gaussian",100,-3,3); h1.FillRandom("gaus",10000); TH1::GetRandom can be used to return a random number distributed according the contents of an histogram. Making a copy of an histogram ============================= Like for any other ROOT object derived from TObject, one can use the Clone() function. This makes an identical copy of the original histogram including all associated errors and functions, e.g.: TH1F *hnew = (TH1F*)h->Clone("hnew"); Normalizing histograms ====================== One can scale an histogram such that the bins integral is equal to the normalization parameter via TH1::Scale(Double_t norm). Drawing histograms ================== Histograms are drawn via the THistPainter class. Each histogram has a pointer to its own painter (to be usable in a multithreaded program). Many drawing options are supported. See THistPainter::Paint() for more details. The same histogram can be drawn with different options in different pads. When an histogram drawn in a pad is deleted, the histogram is automatically removed from the pad or pads where it was drawn. If an histogram is drawn in a pad, then filled again, the new status of the histogram will be automatically shown in the pad next time the pad is updated. One does not need to redraw the histogram. To draw the current version of an histogram in a pad, one can use h->DrawCopy(); This makes a clone (see Clone below) of the histogram. Once the clone is drawn, the original histogram may be modified or deleted without affecting the aspect of the clone. One can use TH1::SetMaximum() and TH1::SetMinimum() to force a particular value for the maximum or the minimum scale on the plot. TH1::UseCurrentStyle() can be used to change all histogram graphics attributes to correspond to the current selected style. This function must be called for each histogram. In case one reads and draws many histograms from a file, one can force the histograms to inherit automatically the current graphics style by calling before gROOT->ForceStyle(). Setting Drawing histogram contour levels (2-D hists only) ========================================================= By default contours are automatically generated at equidistant intervals. A default value of 20 levels is used. This can be modified via TH1::SetContour() or TH1::SetContourLevel(). the contours level info is used by the drawing options "cont", "surf", and "lego". Setting histogram graphics attributes ===================================== The histogram classes inherit from the attribute classes: TAttLine, TAttFill, TAttMarker and TAttText. See the member functions of these classes for the list of options. Giving titles to the X, Y and Z axis ==================================== h->GetXaxis()->SetTitle("X axis title"); h->GetYaxis()->SetTitle("Y axis title"); The histogram title and the axis titles can be any TLatex string. The titles are part of the persistent histogram. It is also possible to specify the histogram title and the axis titles at creation time. These titles can be given in the "title" parameter. They must be separated by ";": TH1F* h=new TH1F("h","Histogram title;X Axis;Y Axis;Z Axis",100,0,1); Any title can be omitted: TH1F* h=new TH1F("h","Histogram title;;Y Axis",100,0,1); TH1F* h=new TH1F("h",";;Y Axis",100,0,1); The method SetTitle has the same syntax: h->SetTitle("Histogram title;An other X title Axis"); Saving/Reading histograms to/from a ROOT file ============================================= The following statements create a ROOT file and store an histogram on the file. Because TH1 derives from TNamed, the key identifier on the file is the histogram name: TFile f("histos.root","new"); TH1F h1("hgaus","histo from a gaussian",100,-3,3); h1.FillRandom("gaus",10000); h1->Write(); To Read this histogram in another Root session, do: TFile f("histos.root"); TH1F *h = (TH1F*)f.Get("hgaus"); One can save all histograms in memory to the file by: file->Write(); Miscelaneous operations ======================= TH1::KolmogorovTest(): statistical test of compatibility in shape between two histograms TH1::Smooth() smooths the bin contents of a 1-d histogram TH1::Integral() returns the integral of bin contents in a given bin range TH1::GetMean(int axis) returns the mean value along axis TH1::GetRMS(int axis) returns the sigma distribution along axis TH1::GetEntries() returns the number of entries TH1::Reset() resets the bin contents and errors of an histogram/*
Create a 1-Dim histogram with fix bins of type short ==================================================== (see TH1::TH1 for explanation of parameters)
Create a 1-Dim histogram with variable bins of type short ========================================================= (see TH1::TH1 for explanation of parameters)
Create a 1-Dim histogram with variable bins of type short ========================================================= (see TH1::TH1 for explanation of parameters)
-*-*-*-*-*-*-*-*Increment bin content by 1*-*-*-*-*-*-*-*-*-*-*-*-*-* ==========================
Set bin content see convention for numbering bins in TH1::GetBin In case the bin number is greater than the number of bins and the timedisplay option is set or the kCanRebin bit is set, the number of bins is automatically doubled to accomodate the new bin
Set total number of bins including under/overflow Reallocate bin contents array