2TString
old_file =
"../../Eangle1DSec/eangle.root";
10 TTree *tree = (TTree*)
f->Get(strout.str().c_str());
11 double dedx[100],eangle[100], err[100];
12 tree->SetBranchAddress(
"gain",dedx);
13 tree->SetBranchAddress(
"eangle",eangle);
14 tree->SetBranchAddress(
"fitmeanerr", err);
17 for(
int i=0;i<100;i++)
23 gStyle->SetOptFit(0111);
24 TCanvas *c1 =
new TCanvas(
"c1",
"c1",10,10,800,642);
26 TGraph*
gr =
new TGraphErrors(100,eangle,dedx);
27 gr->SetMarkerColor(2);
33 tree = (TTree*)
f->Get(strout.str().c_str());
34 double dedx2[100],eangle2[100], err2[100];
35 tree->SetBranchAddress(
"gain",dedx2);
36 tree->SetBranchAddress(
"eangle",eangle2);
37 tree->SetBranchAddress(
"fitmeanerr", err2);
40 for(
int i=0;i<100;i++)
46 TGraph* gr2 =
new TGraphErrors(100,eangle2,dedx2);
49 TLegend* leg =
new TLegend(.65, .75, .89, .89);
50 leg->AddEntry(
gr,
"ori",
"p");
51 leg->AddEntry(gr2,
"cor",
"p");
54 TFile f_save(
"dEdxVsEang.root",
"recreate");
TFile f("ana_bhabha660a_dqa_mcPat_zy_old.root")