Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
soft:root [2021/02/08 03:02] – Ce Zhang | soft:root [2023/05/24 09:51] (current) – [ROOT study] Ce Zhang | ||
---|---|---|---|
Line 1: | Line 1: | ||
=====ROOT study===== | =====ROOT study===== | ||
+ | ==== Divide ==== | ||
+ | < | ||
+ | hHitTime_Ratio[i] = new TH1F(*hHitTime_Num[i]); | ||
+ | hHitTime_Ratio[i]-> | ||
+ | hHitTime_Ratio[i]-> | ||
+ | </ | ||
+ | ==== Sub Canvas and Pads ==== | ||
+ | < | ||
+ | TCanvas *c1 = new TCanvas(“c1”, | ||
+ | c1-> | ||
+ | c1-> | ||
+ | |||
+ | TVirtualPad *c1_1 = c1-> | ||
+ | gPad-> | ||
+ | // enter the 4 sub-pads and do stuff | ||
+ | c1_1-> | ||
+ | (new TText(0.1, 0.5, “c1 … 1 … 1”))-> | ||
+ | c1_1-> | ||
+ | (new TText(0.1, 0.5, “c1 … 1 … 2”))-> | ||
+ | c1_1-> | ||
+ | (new TText(0.1, 0.5, “c1 … 1 … 3”))-> | ||
+ | c1_1-> | ||
+ | (new TText(0.1, 0.5, “c1 … 1 … 4”))-> | ||
+ | </ | ||
+ | |||
+ | ==== TF1 ==== | ||
+ | < | ||
+ | TF1 * fit1 = new TF1(" | ||
+ | fit1-> | ||
+ | f3-> | ||
+ | gStyle-> | ||
+ | </ | ||
+ | |||
+ | [[https:// | ||
+ | |||
+ | ==== Time ==== | ||
+ | |||
+ | TDatime | ||
+ | |||
+ | < | ||
+ | TDatime * Time = new TDatime(); | ||
+ | cout<< | ||
+ | // output: Fri Jul 30 09:56:02 2021 20210730 95602 | ||
+ | // ... | ||
+ | c1-> | ||
+ | </ | ||
+ | ==== Get max and mim from TGraph ==== | ||
+ | |||
+ | < | ||
+ | TMath:: | ||
+ | </ | ||
+ | |||
==== Draw his from saved .root file in TCanvas ==== | ==== Draw his from saved .root file in TCanvas ==== | ||
Line 24: | Line 76: | ||
| | ||
| | ||
+ | </ | ||
+ | |||
+ | < | ||
+ | TFile *_file0 = TFile:: | ||
+ | TCanvas *c1 = (TCanvas*)_file0-> | ||
+ | TH1D *aee = (TH1D*)c1-> | ||
+ | |||
</ | </ | ||
====Reset (refresh) the histogram==== | ====Reset (refresh) the histogram==== |