[Notes] ROOT User Guide (2)
来源:互联网 发布:dnf阿修罗智力固伤算法 编辑:程序博客网 时间:2024/06/05 16:15
Chapter 3. Histograms
Wikipedia: In statistics, a histogram is a graphical display of tabulated frequencies, shown as bars. It shows what proportion of cases fall into each of several categories: it is a form of data binning.
Classes:
1-D: TH1C, TH1S, TH1I, TH1F, TH1D
2-D: TH2C, TH2S, TH2I, TH2F, TH2D
3-D: TH3C, TH3S, TH3I, TH3F, TH3D
Profile Histogram: TProfile, TProfile2D
where C denotes char(1 byte), S short(2 bytes), I int(4 bytes), F float(4 bytes), D double(8 bytes).
Creating Historgrams
TH1F *h1 = new TH1F("h1","h1 title",100,0,4.4);
TH2F *h2 = new TH2F("h2","h2 title",40,0,4,30,-3,3);
Fixed or Variable Bin Size
TH1(const char name,const *title,Int_t nbins, Float_t *xbins)
TH1(const char name,const *title,Int_t nbins, Double_t *xbins)
where xbins is an array of low-edges for each bin. It is an array of size nbins+1.
Bin Numbering
For 1-D, Bin#0 contains the underflow, The last bin contains the overflow.
For 2-D and 3-D, a "global bin" number is defined. Take 3-D for example,
Int_t bin = h->GetBin(binx,biny,binz);
GetBinContent(...) : get the number of items in a specified bin
SetBinContent(..., ...) : set the number of items in a specified bin
Filling Histograms
The Fill method computes the bin number corresponding to the given x, y or z argument and increments this bin by the given weight.
Fill Histograms with a function or a histrograms
Fill with a function:
Fill with another histrograms:
Scaling, Adding, Dividing and Multiplying
Draw Options:
There are enormous draw options to display histrograms in different styles. See User Guide for details.
Remember these:
- gRandom->Uniform()
- gRandom->Gaus(0, 1)
- kRed
- kGreen
- [Notes] ROOT User Guide (2)
- [Notes] ROOT User Guide (1)
- Study Notes of Linux queuing discipline manual - user guide
- Kibana User Guide [4.2] » Kibana 4.2 Release Notes
- Flume 1.5.2 User Guide
- Gradle User Guide(2)
- user guide
- user guide
- UML user guide, chapter 2, UML introduction
- notes Fcitx Guide
- "Zend Framework" Programmer's Reference Guide - reading notes (Chapter 2)
- Vim user manual notes
- notes virtualbox User Manual
- GCC User Guide
- commons-fileupload user guide
- proxool user guide
- ubuntu user guide
- Auto Test User Guide
- 完善自己的html parse
- [Notes] ROOT User Guide (1)
- ARM 程序设计优化策略与技术
- 几种开源的TCP/IP协议栈分析
- ARM开发板厂家信息大全
- [Notes] ROOT User Guide (2)
- 嵌入式Linux文件系统及其存储机制分析
- 委托和回调函数
- 纸上得来始觉浅!
- C#开发WPF/Silverlight动画及游戏系列教程(Game Tutorial):(五十) 终章!新的曙光!
- Javascript操作select方法大全[新增、修改、删除、选中、清空、判断存在
- [转] LaTeX/文献管理
- Facelets 非常适合 JSF
- C++成员初始化列表