{ #include #include c1 = new TCanvas("c1","A Simple Graph with error bars",0,0,700,500); c1->SetFillStyle(4100); c1->SetGrid(); c1->GetFrame()->SetBorderSize(12); TStyle *default = new TStyle("Default","Default Style"); //default->SetPadBorderMode(0); default->SetCanvasColor(0); default->cd(); // this becomes now the current style gStyle // create the arrays for the points Int_t n = 29; Double_t x[n], dummy[n]={n*0.}; Double_t tc[n] ,q0[n],year[n],q0SF2[n] ,yearSF2[n]; ifstream fin("runaway_year.txt"); for (int i=0; i> tc[i] >>q0[i]>>year[i]>>q0SF2[i] >>yearSF2[i]; fin.close(); // g1 = new TGraph(n,year,tc); g2 = new TGraph(n,yearSF2,tc); // Double_t ymax= -5.; Double_t ymin= -30.; Double_t xmax= 12.; Double_t xmin= 0.; g1->SetTitle(); g1->SetMaximum(ymax); g1->SetMinimum(ymin); g1->GetXaxis()->SetTitle("LHC year"); g1->GetYaxis()->SetTitle("T_{C} [^{o}C] for last 9 years)"); g1->GetYaxis()->SetTitleSize(0.04); g1->GetYaxis()->SetTitleFont(132); g1->GetYaxis()->SetLabelSize(0.04); g1->GetYaxis()->SetLabelFont(132); g1->GetXaxis()->SetTitleSize(0.04); g1->GetXaxis()->SetTitleFont(132); g1->GetXaxis()->SetLabelSize(0.04); g1->GetXaxis()->SetLabelFont(132); g1->GetYaxis()->SetTitleOffset(1.0); g1->GetXaxis()->SetTitleOffset(1.0); g1->GetXaxis()->SetRangeUser(xmin, xmax); g1->GetXaxis()->SetNdivisions(Int_j=13); g1->SetLineWidth(2);g1->SetLineColor(1);g1->Draw("ALP"); g2->SetLineWidth(2);g2->SetLineColor(4); g2->Draw("SAME LP"); //---------------------------------------------------- // for (i=0;i<12; i++) { box = new TBox(i+0.14,ymin,i+0.45, ymax); box->SetFillColor(13); box->SetFillStyle(3003); box->Draw(); } // x6 = new TLine(xmin,ymin,xmin, ymax); x6->SetLineWidth(2); x6->Draw(); x6 = new TLine(xmin,ymax,xmax, ymax); x6->SetLineWidth(2); x6->Draw(); x6 = new TLine(xmax,ymin,xmax, ymax); x6->SetLineWidth(2); x6->Draw(); x6 = new TLine(xmin,ymin,xmax, ymin); x6->SetLineWidth(2); x6->Draw(); x6 = new TLine(10.,ymin,10., ymax); x6->SetLineWidth(1); x6->Draw(); t=new TLatex(10.08, -29.,"optional years");t->SetTextFont(132); t->SetTextSize(0.035),t->Draw(); //----------------------------------------------------- Float_t h=-18; TText *u=new TText(5., -14.,"thermally stable"); u->SetTextFont(32); u->SetTextSize(0.055); u->SetTextColor(1); u->Draw(); TText *u=new TText(10.2, -6.5,"thermal"); u->SetTextFont(32); u->SetTextSize(0.053); u->SetTextColor(2); u->Draw(); TText *u=new TText(10.2, -8,"runaway"); u->SetTextFont(32); u->SetTextSize(0.053); u->SetTextColor(2); u->Draw(); // leg = new TLegend(0.12 ,0.13 ,0.45,0.35 ); leg->SetFillColor(10);leg->SetBorderSize(2);leg->SetTextFont(132); leg->SetTextSize(0.04); leg->SetHeader("Limits due to thermal runaway"); leg->AddEntry(u,"(B3, Hamburg model)",""); leg->AddEntry(g1,"safety factor = 1","l"); leg->AddEntry(g2,"safety factor = 2","L"); leg->Draw(); }