1 {
2Double_t
x[10]={.1,.2,.3,.4,.5,.6,.7,.8,.9,1.};
4Double_t effpt[10];
5Double_t errpt[10];
7Char_t filename[100];
8Char_t name[100];
9
10for(Int_t i=0;i<10;i++){
12 strcpy(filename,
file);
13 strcat(filename,name);
14
16 runinfo->Draw("runinfo_ngood","runinfo_ngood>0.5");
17 effpt[i]=htemp->GetEntries()/
eventNo;
18}
19
20
21
22for (Int_t i=0;i<10;i++){
23 errpt[i]=sqrt(effpt[i]*(1.-effpt[i])/
eventNo);
24}
25
26
27
28TGraph *gr1 =
new TGraphErrors(10,x,effpt,
errx,errpt);
29
30TCanvas *c1 = new TCanvas ("c1","pioneff",100,10,600,400);
31TMultiGraph *mg = new TMultiGraph();
32
33
34c1->SetGrid();
35mg->SetTitle("pioneff");
36gr1->SetLineColor(2);
37
38mg->Add(gr1);
39mg->Draw("ALP");
40mg->GetYaxis()->SetRangeUser(0,1);
41mg->GetXaxis()->SetTitle("Pt/GeV");
42mg->GetYaxis()->SetTitle("Eff");
43
44TLegend *
legend=
new TLegend(0.7,0.65,0.85,0.75);
45legend->AddEntry(gr1,
"pion_Pt",
"l");
47}
sprintf(cut,"kal_costheta0_em>-0.93&&kal_costheta0_em<0.93&&kal_pxy0_em>=0.05+%d*0.1&&kal_pxy0_em<0.15+%d*0.1&&NGch>=2", j, j)
TFile f("ana_bhabha660a_dqa_mcPat_zy_old.root")