TH1D *hexpcw0,*hexpcw90,*hexpaw0,*hexpaw90;
TH1D *hsimcw0,*hsimcw90,*hsimaw0,*hsimaw90;
TFile *f=new TFile("fana.root");
TCanvas *c1=new TCanvas;
tree->Draw("-ea:ec>>hexp(500,1000,6000,500,0,8000)","","colz");
hexp->SetStats(0);
c1->Draw();
TCut the0="-ea>5780 && -ea<5820 && ec>3080 && ec<3100";
TCut the90="-ea>5830 && -ea<5870 && ec>5510 && ec<5535";
tree->Draw("cwave:Iteration$>>hexpcw0(600,1800,2400,4000,-200,3500)",the0);
hexpcw0=(TH1D*)gROOT->FindObject("hexpcw0");
hexpcw0->SetStats(0);
c1->Draw();
tree->Draw("cwave:Iteration$>>hexpcw90(600,1800,2400,4000,-500,6000)",the90);
hexpcw90=(TH1D*)gROOT->FindObject("hexpcw90");
hexpcw90->SetStats(0);
c1->Draw();
tree->Draw("-awave:Iteration$>>hexpaw0(600,1800,2400,4000,-200,7000)",the0);
hexpaw0=(TH1D*)gROOT->FindObject("hexpaw0");
hexpaw0->SetStats(0);
c1->Draw();
tree->Draw("-awave:Iteration$>>hexpaw90(600,1800,2400,4000,-200,7000)",the90);
hexpaw90=(TH1D*)gROOT->FindObject("hexpaw90");
hexpaw90->SetStats(0);
c1->Draw();
TFile *f=new TFile("gic.root");
tree->Draw("aqmax:cqmax","","");
c1->Draw();
TCut theta0="cqmax>3.15&&cqmax<3.16 && aqmax>5.820&& aqmax<5.822";
TCut theta90="cqmax>5.3&&cqmax<5.4 && aqmax>5.820&& aqmax<5.822";
tree->Draw("cu:Iteration$+1560>>hsimcw0(600,1800,2400,500,-0.1,3.4)",theta0,"");
hsimcw0=(TH1D*)gROOT->FindObject("hsimcw0");
hsimcw0->SetStats(0);
c1->Draw();
tree->Draw("cu:Iteration$+1560>>hsimcw90(600,1800,2400,500,-0.1,5.7)",theta90,"");
hsimcw90=(TH1D*)gROOT->FindObject("hsimcw90");
hsimcw90->SetStats(0);
c1->Draw();
tree->Draw("au:Iteration$+1560>>hsimaw0(600,1800,2400,500,-0.1,6.6)",theta0,"");
hsimaw0=(TH1D*)gROOT->FindObject("hsimaw0");
hsimaw0->SetStats(0);
c1->Draw();
tree->Draw("au:Iteration$+1560>>hsimaw90(600,1800,2400,500,-0.1,6.6)",theta90,"");
hsimaw90=(TH1D*)gROOT->FindObject("hsimaw90");
hsimaw90->SetStats(0);
c1->Draw();
c1->Clear();
c1->Divide(2,1);
c1->cd(1);
hexpcw0->SetMarkerColor(kBlue);
hexpcw0->Draw();
c1->cd(2);
hsimcw0->SetMarkerColor(kRed);
hsimcw0->Draw();
c1->Draw();
c1->Clear();
c1->Divide(2,1);
c1->cd(1);
hexpcw90->SetMarkerColor(kBlue);
hexpcw90->Draw();
c1->cd(2);
hsimcw90->SetMarkerColor(kRed);
hsimcw90->Draw();
c1->Draw();
c1->Clear();
c1->Divide(2,1);
c1->cd(1);
hexpaw0->SetMarkerColor(kBlue);
hexpaw0->Draw();
c1->cd(2);
hsimaw0->SetMarkerColor(kRed);
hsimaw0->Draw();
c1->Draw();
c1->Clear();
c1->Divide(2,1);
c1->cd(1);
hexpaw90->SetMarkerColor(kBlue);
hexpaw90->Draw();
c1->cd(2);
hsimaw90->SetMarkerColor(kRed);
hsimaw90->Draw();
c1->Draw();