void event_size(){ gROOT->Reset(); gROOT->SetStyle("Plain"); gROOT->ForceStyle(); gStyle->SetOptStat(0); gStyle->SetOptFit(0); gStyle->SetTitleX(0.1f); gStyle->SetTitleW(0.8f); gStyle->SetLineWidth(1.5); gStyle->SetTextSize(1.5); gStyle->SetTitleFont(132,"xy"); gStyle->SetLabelFont(132,"xy"); // gStyle->SetLabelFont(62,"xy"); // gStyle->SetLabelSize(0.073,"xy"); gStyle->SetLabelSize(0.05,"xy"); gStyle->SetTitleSize(0.052,"xy"); gStyle->SetTitleOffset(1.0,"x"); gStyle->SetTitleOffset(1.2,"y"); gStyle->SetTitleBorderSize(0); Double_t x[6] = {50, 100, 200, 300, 400, 500}; Double_t ex[6]; Double_t event_size[6] = {8.8, 9.74, 11.38, 13.01, 14.46, 15.92 }; Double_t event_size_st[6] = {10.2, 11.03, 12.72, 14.14, 15.83, 17.0 }; Double_t data_rate[6] = {0.104, 0.248, 0.572, 1.03, 1.54, 2.14 }; Double_t data_rate_st[6] = {0.074, 0.158, 0.404, 0.68, 1.08, 1.53 }; TGraph *gr_size = new TGraph(6, x, event_size); TGraph *gr_size_st = new TGraph(6, x, event_size_st); TGraph *gr_rate = new TGraph(6, x, data_rate); TGraph *gr_rate_st = new TGraph(6, x, data_rate_st); TCanvas *c1 = new TCanvas("c1","c1",200,10, 900, 500); c1->Divide(2,1,0,0); c1->cd(1); gPad->SetBottomMargin(0.19); gPad->SetTopMargin(0.1); gPad->SetLeftMargin(0.15); gPad->SetRightMargin(0.015); gPad->SetGrid(1); gr_size->SetMarkerStyle(20); gr_size->SetMarkerSize(0.9); gr_size->SetMarkerColor(2); // gr_size->SetMaximum(25); gr_size->GetXaxis()->SetRangeUser(0.,600); gr_size->GetYaxis()->SetRangeUser(0.,30); // TF1 *f1 = new TF1("f1","[0]*x"); // gr_spring->Fit("f1"); gr_size->Draw("APL"); gr_size->SetTitle("Event Size"); gr_size->GetXaxis()->SetTitle("Current (nA)"); gr_size->GetYaxis()->SetTitle("Event size (kB)"); gr_size_st->SetMarkerStyle(21); gr_size_st->SetMarkerSize(0.9); gr_size_st->SetMarkerColor(4); gr_size_st->SetMaximum(170); gr_size_st->Draw("plsame"); leg = new TLegend(0.2,0.65,0.65,0.85); leg->SetFillColor(0); leg->SetTextSize(0.03); leg->AddEntry(gr_size,"New FCAL & BCAL ","p"); leg->AddEntry(gr_size_st,"New FCAL & BCAL & ST","p"); leg->Draw(); c1->cd(2); gPad->SetBottomMargin(0.19); gPad->SetTopMargin(0.1); gPad->SetLeftMargin(0.15); gPad->SetRightMargin(0.015); gPad->SetGrid(1); gr_rate->GetXaxis()->SetRangeUser(0.,600.); gr_rate->GetYaxis()->SetRangeUser(0.,3.); gr_rate->SetMarkerStyle(20); gr_rate->SetMarkerSize(0.9); gr_rate->SetMarkerColor(2); gr_rate->SetTitle("Data Rate"); gr_rate->Draw("APL"); gr_rate_st->SetMarkerStyle(21); gr_rate_st->SetMarkerSize(0.9); gr_rate_st->SetMarkerColor(4); gr_rate_st->Draw("PLsame"); gr_rate->GetYaxis()->SetTitle("Data Rate (GB/sec)"); gr_rate->GetXaxis()->SetTitle("Current (nA)"); }