24 const TString file_name = Form(
"DedxConst_%d-%d_705.root",
run_begin,
run_end);
25 const TString str_eps = Form(
"figs/gain_vs_run_%d-%d.eps",
run_begin,
run_end);
26 const TString str_eps2 = Form(
"figs/resol_vs_run_%d-%d.eps",
run_begin,
run_end);
27 const TString str_eps3 = Form(
"figs/rel_resol_vs_run_%d-%d.eps",
run_begin,
run_end);
29 gStyle->SetOptStat(0);
33 TTree *o_tree_run = (TTree*)o_file.Get(
"runcalib");
35 Double_t o_gain, o_resol, o_wireg, n_mean, n_wireg;
36 o_tree_run->SetBranchAddress(
"runno", &o_run);
37 o_tree_run->SetBranchAddress(
"rungain", &o_gain);
38 o_tree_run->SetBranchAddress(
"runresol", &o_resol);
39 Int_t m_len = o_tree_run->GetEntries();
40 Int_t m_count(0), p_run(-1);
41 for(
int i=0; i<m_len; i++){
42 o_tree_run->GetEntry(i);
49 if(
m_debug) cout <<
"x " <<
x[i] <<
" y " <<
y[i] << endl;
51 TGraph *
gr =
new TGraph(m_len,
x,
y);
52 gr->SetTitle(
"gain constant vs. run");
53 TCanvas *c1 =
new TCanvas(
"c1",
"c1", 10, 10, 800, 642);
58 for(
int i=0; i<m_len; i++){
59 o_tree_run->GetEntry(i);
61 if(
y[i]) yyy[i] = 100.*(yy[i]/
y[i]/550.);
62 if(
m_debug) cout <<
"x " <<
x[i] <<
" y " << yy[i] << endl;
64 gr =
new TGraph(m_len,
x, yy);
65 gr->SetTitle(
"resolution vs. run");
70 gr =
new TGraph(m_len,
x, yyy);
71 gr->SetTitle(
"relative resolution vs. run (%)");
75 cout <<
"There are total " << m_count <<
" runs (not entries)." << endl;