{ gROOT->LoadMacro("AtlasUtils.C"); ATLAS->SetPadTickX(1); ATLAS->SetPadTickY(0); ATLAS->SetPadRightMargin(0.12); c1 = new TCanvas("c1","A Simple Graph",0,0,700,500); c1->SetFillStyle(4100); c1->SetGrid(); // double ymin = 1.0; double ymax = 1.5; // TFile *f = new TFile("tscan_3.root"); // tscan_0->SetTitle(); tscan_0->GetXaxis()->SetTitle("clock time [ns]"); tscan_0->GetXaxis()->SetTitleOffset(1.1); tscan_0->GetYaxis()->SetTitle(""); tscan_0->GetYaxis()->SetTitleOffset(1.3); tscan_0->SetMinimum(ymin); tscan_0->SetMaximum(ymax); tscan_0->SetMarkerSize(0.8); tscan_1->SetMarkerSize(0.8); tscan_2->SetMarkerSize(0.8); tscan_0->SetMarkerColor(2); tscan_1->SetMarkerColor(4); tscan_0->SetLineColor(2); tscan_1->SetLineColor(4); tscan_0->Draw("PZ"); tscan_1->Draw("SAME PZ"); tscan_2->Draw("SAME PZ"); // double x[100], y_0[100], y_1[100], y_2[100]; double nmax=1000.; ymax = 1.4; double scale = ymax - ymin; for(int i=0; i<100;i++) { x[i] = tscan_0->GetBinLowEdge(i+1); double n_0 = tscan_0->GetBinEntries(i+1); double n_1 = tscan_1->GetBinEntries(i+1); double n_2 = tscan_2->GetBinEntries(i+1); y_0[i] = n_0/nmax*scale + ymin; y_1[i] = n_1/nmax*scale + ymin; y_2[i] = n_2/nmax*scale + ymin; cout<SetLineColor(2); h0->Draw("SAME L"); h1 = new TGraph(100,x,y_1); h1->SetLineColor(4); h1->Draw("SAME L"); h2 = new TGraph(100,x,y_2); h2->SetLineColor(1); h2->Draw("SAME L"); // axis = new TGaxis(75.,1.,75.,1.5,0.,0.5/0.4,510,"+L"); axis->SetLabelSize(0.05); axis->SetLabelFont(42); axis->SetTitle("efficiency"); axis->SetTitleOffset(1.0); axis->SetTitleFont(42); axis->SetTitleSize(0.05); axis->Draw(); // t=new TLatex(-6,1.41,"001"); t->SetTextSize(0.06);t->SetTextColor(1);t->SetTextFont(42);t->Draw(); t=new TLatex(19,1.41,"01X"); t->SetTextSize(0.06);t->SetTextColor(4);t->SetTextFont(42);t->Draw(); t=new TLatex(44,1.41,"1XX"); t->SetTextSize(0.06);t->SetTextColor(2);t->SetTextFont(42);t->Draw(); // leg = new TLegend(0.23,0.87,0.82,0.94); leg->SetHeader("New pulse shape, -1<#eta<+1, -16^{o}AddEntry(tscan_0,"ICM, new pulse (tot 25ns)","p"); leg->SetBorderSize(1); leg->SetFillColor(10); leg->SetTextSize(0.04); leg->SetTextFont(42); leg->Draw(); // c1.Print("tscan_2.pdf"); }