17 const TString
old_path =
"/cvmfs/bes3.ihep.ac.cn/bessw/CalibConst/dedx/6.6.3/";
18 const TString file_name = Form(
"DedxConst_%d-%d_663.root",
run_begin,
run_end);
19 const TString str_eps = Form(
"figs/gain_vs_run_%d-%d.eps",
run_begin,
run_end);
20 const TString str_eps2 = Form(
"figs/resol_vs_run_%d-%d.eps",
run_begin,
run_end);
21 const TString str_eps3 = Form(
"figs/rel_resol_vs_run_%d-%d.eps",
run_begin,
run_end);
23 gStyle->SetOptStat(0);
27 TTree *o_tree_run = (TTree*)o_file.Get(
"runcalib");
29 Double_t o_gain, o_resol, o_wireg, n_mean, n_wireg;
30 o_tree_run->SetBranchAddress(
"runno", &o_run);
31 o_tree_run->SetBranchAddress(
"rungain", &o_gain);
32 o_tree_run->SetBranchAddress(
"runresol", &o_resol);
33 Int_t m_len = o_tree_run->GetEntries();
34 for(
int i=0; i<m_len; i++){
35 o_tree_run->GetEntry(i);
38 if(
m_debug) cout <<
"x " <<
x[i] <<
" y " <<
y[i] << endl;
40 TGraph *
gr =
new TGraph(m_len,
x,
y);
41 gr->SetTitle(
"gain constant vs. run");
42 TCanvas *c1 =
new TCanvas(
"c1",
"c1", 10, 10, 800, 642);
47 for(
int i=0; i<m_len; i++){
48 o_tree_run->GetEntry(i);
50 if(
y[i]) yyy[i] = 100.*(yy[i]/
y[i]/550.);
51 if(
m_debug) cout <<
"x " <<
x[i] <<
" y " << yy[i] << endl;
53 gr =
new TGraph(m_len,
x, yy);
54 gr->SetTitle(
"resolution vs. run");
59 gr =
new TGraph(m_len,
x, yyy);
60 gr->SetTitle(
"relative resolution vs. run (%)");