// PrimEx D run, Spring 2019 void plot_rate_nim(){ gROOT->Reset(); gROOT->SetStyle("Plain"); gROOT->ForceStyle(); gStyle->SetOptStat(0); gStyle->SetOptFit(0); gStyle->SetTitleX(0.1f); gStyle->SetTitleW(0.8f); gStyle->SetTextSize(1.5); gStyle->SetTitleFont(132,"xy"); gStyle->SetLabelFont(132,"xy"); gStyle->SetLabelSize(0.055,"xy"); gStyle->SetTitleSize(0.065,"xy"); gStyle->SetTitleOffset(1.0,"x"); gStyle->SetTitleOffset(0.8,"y"); gStyle->SetTitleBorderSize(0); double em_thr[8] = {2., 2.5, 3., 3.5, 4., 4.5, 5., 5.5}; double em_er[8]; double em_rate[8] = {799, 405, 249, 162, 116, 88, 62, 49}; memset(em_er,0,sizeof(em_er)); for(int ii = 0; ii < 8; ii++){ em_rate[ii] *= 50./1000.; } double x[11] = {2.0, 2.5, 3.0, 3.5, 4.0, 4.5, 5.0, 5.5, 6.0, 7.0, 8.0}; double ex[11]; memset(ex,0,sizeof(ex)); double x_he[11] = {57., 31., 17., 10.5, 6.9, 5.3, 3.8, 3., 2.3, 1.33, 0.88}; double ratio[8]; for(int ii = 0; ii < 8; ii++){ ratio[ii] = x_he[ii] / em_rate[ii]; } double eps[8]; memset(eps,0,sizeof(eps)); double ps_rate[8] = {1.41, 2.72, 4.2, 5.66, 6.9, 8.06, 9.798, 11.02 }; double main[8] = {4.03, 7.98, 13.29, 17.95, 22.47, 27.19, 34.48, 40.12 }; double fcal[8] = {0.28, 0.577, 0.918, 1.247, 1.56, 1.84, 2.247, 2.6}; double ccal[8] = {3.5, 7.0, 11.5, 15.8, 19.5, 24.0, 30.0, 35.0 }; for(int ii = 0; ii < 8; ii++){ fcal[ii] *= 5; } TCanvas *c1 = new TCanvas("c1","c1", 200, 10, 600, 400); // gPad->SetGrid(0); // TGraphErrors *gr = new TGraphErrors(11, x, x_he , ex, ex); TGraphErrors *gr = new TGraphErrors(8, x, x_he , ex, ex); TGraphErrors *gr1 = new TGraphErrors(8, em_thr, em_rate , em_er, em_er); gPad->SetBottomMargin(0.15); gPad->SetTopMargin(0.05); gPad->SetLeftMargin(0.15); gPad->SetRightMargin(0.005); gr->SetMarkerStyle(20); gr->SetMarkerSize(1.14); gr->SetMarkerColor(2); gr->SetMaximum(60); gr->SetMinimum(0); gr->GetXaxis()->SetTitle("Energy threshold (GeV)"); gr->GetYaxis()->SetTitle("Trigger rate (kHz)"); gr->Draw("APL"); gr1->SetMarkerStyle(25); gr1->SetMarkerSize(1.14); gr1->SetMarkerColor(4); gr->SetLineWidth(2); gr1->Draw("Psame"); TArrow *ar = new TArrow(3.,32.,3.,22,0.012,">"); ar->SetLineWidth(2); ar->SetLineColor(1); ar->Draw(); TLatex *text = new TLatex(); text -> SetTextFont(42); text -> SetTextColor(1); text -> SetTextSize(0.05); text -> SetTextAlign(22); text -> SetTextAngle(0); text -> DrawLatex(3., 37, " PrimEx #eta"); gr->SetTitle(""); leg = new TLegend(0.45,0.7,0.72,0.9); leg->SetFillColor(0); leg->SetTextSize(0.05); leg->SetBorderSize(0.); leg->AddEntry(gr,"Data ","p"); leg->AddEntry(gr1,"Simulation ","p"); leg->Draw(); #if 0 TCanvas *c2 = new TCanvas("c2","c2", 200, 10, 600, 400); TGraphErrors *gr2 = new TGraphErrors(8, x, ratio , ex, ex); gPad->SetBottomMargin(0.15); gPad->SetTopMargin(0.05); gPad->SetLeftMargin(0.15); gPad->SetRightMargin(0.005); gr2->SetMarkerStyle(20); gr2->SetMarkerSize(1.14); gr2->SetMarkerColor(2); gr2->SetMaximum(2); gr2->SetMinimum(0); gr2->GetXaxis()->SetTitle("Energy threshold (GeV)"); gr2->GetYaxis()->SetTitle("Trigger rate (kHz)"); gr2->Draw("APL"); #endif }