This shows you the differences between two versions of the page.
— | root:thstack [2012/08/16 11:58] (current) – created nchiap | ||
---|---|---|---|
Line 1: | Line 1: | ||
+ | ====== Using and Troubleshooting THStack ====== | ||
+ | |||
+ | ===== Basic Code ===== | ||
+ | <code c++> | ||
+ | TH1F *h; | ||
+ | THStack *hs = new THStack(" | ||
+ | //create three 1-d histograms | ||
+ | for (int i = 0; i < 3; i++) { | ||
+ | h = new TH1F(" | ||
+ | h-> | ||
+ | h-> | ||
+ | h-> | ||
+ | hs-> | ||
+ | } | ||
+ | TCanvas *cst = new TCanvas(" | ||
+ | cst-> | ||
+ | hs-> | ||
+ | </ | ||
+ | |||
+ | ===== Troubleshooting ===== | ||
+ | ==== Y Axis Range ==== | ||
+ | see [[root: | ||
+ | |||
+ | ==== Scaling/ | ||
+ | **Do not use** '' | ||
+ | |||
+ | If '' | ||
+ | Instead use the following code to normalise histogram '' | ||
+ | <code c++> | ||
+ | h-> | ||
+ | </ | ||
+ | |||
+ | |||
+ | |||