14 cout <<
"cannot read input file correctly!" << endl;
17 TString rootfilename(
"begin");
20 for(
int j=0; j<1000; j++){
21 h[j] =
new TH1F(Form(
"h%d",j),
"h", 3000, 0, 1000);
22 hx[j] =
new TH1F(Form(
"hx%d",j),
"hx", 100000, 0, 100000);
25 while(rootfilename!=
""){
26 input_file >> rootfilename;
27 if(
m_debug) cout << rootfilename << endl;
29 cout << rootfilename << endl;
32 if(rootfilename==
"")
continue;
33 TFile *
f =
new TFile(rootfilename);
35 TTree *
t =
f->Get(
"n103");
38 t->SetBranchAddress(
"runNO", &runno);
39 t->SetBranchAddress(
"dEdx_meas", &dedx);
40 t->SetBranchAddress(
"costheta", &
costheta);
41 for(
int i=0; i<
t->GetEntries(); i++){
52 x[k] = hx[k]->GetMean();
53 xerr[k] = hx[k]->GetRMS();
54 y[k] = h[k]->GetMean();
55 yerr[k] = h[k]->GetMeanError();
56 m_ave_err +=
yerr[k]/
y[k];
71 cout <<
"average error: " << m_error << endl;
74 TCanvas *c1 =
new TCanvas(
"c1",
"c1", 10, 10, 800, 642);
78 TLine *l =
new TLine(
x[k+1]-
xerr[k+1],
y[k+1]-5*(
yerr[k+1]),
x[k+1]-
xerr[k+1],
y[k+1]+5*(
yerr[k+1]));
83 c1->SaveAs(
"figs/charge_space_via_run_coarse_II.eps");
84 c1->SaveAs(
"figs/charge_space_via_run_coarse_II.root");
void draw_charge_space_coarse_II()
TString rootfilelist("rootfile_list.txt")
const double m_err_standard
const double m_diff_standard
TFile f("ana_bhabha660a_dqa_mcPat_zy_old.root")