{ #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 = 409; Double_t x[n], dummy[n]={n*0.}; Double_t y1[n], y2[n], y3[n], y4[n], y5[n], z1[n], z2[n], z3[n], z4[n], z5[n]; ifstream fin("Vd_npOnly.txt"); for (int i=0; i> x[i] >> y1[i]>> y2[i]>>y3[i]; fin.close(); // gd = new TGraph(n,x,dummy); g1 = new TGraph(n,x,y1); g2 = new TGraph(n,x,y2); g3 = new TGraph(n,x,y3); // g1->SetLineWidth(2);g1->SetMarkerColor(1); g1->SetLineColor(1); g2->SetLineWidth(2);g2->SetMarkerColor(2); g2->SetLineColor(2); g3->SetLineWidth(2);g3->SetMarkerColor(4); g3->SetLineColor(4); gd->SetTitle(); Double_t ymax= 350., xmax=12.; gd->SetMaximum(ymax); gd->GetYaxis()->SetTitle("V_{D} [Volt]"); gd->GetXaxis()->SetTitle("LHC years"); gd->GetYaxis()->SetTitleSize(0.04); gd->GetYaxis()->SetTitleFont(132); gd->GetYaxis()->SetLabelSize(0.04); gd->GetYaxis()->SetLabelFont(132); gd->GetXaxis()->SetTitleSize(0.04); gd->GetXaxis()->SetTitleFont(132); gd->GetXaxis()->SetLabelSize(0.04); gd->GetXaxis()->SetLabelFont(132); gd->GetYaxis()->SetTitleOffset(1.2); gd->GetXaxis()->SetTitleOffset(1.0); gd->GetXaxis()->SetRangeUser(0.,xmax); gd->GetXaxis()->SetNdivisions(Int_n=13); gd->Draw("ALP"); g1->Draw("SAME LP"); g2->Draw("SAME LP"); g3->Draw("SAME LP"); // // for (i=0;i<12; i++) { box = new TBox(i+0.14,0.,i+0.45, ymax); box->SetFillColor(13); box->SetFillStyle(3003); box->Draw(); } // TLine *b= new TLine(0,0, 0,ymax); b->SetLineWidth(2); b->Draw(); TLine *b= new TLine(0,0, xmax,0); b->SetLineWidth(2); b->Draw(); TLine *b= new TLine(0,ymax, xmax,ymax); b->SetLineWidth(2); b->Draw(); TLine *b= new TLine(xmax,0, xmax,ymax); b->SetLineWidth(2); b->Draw(); TLine *b= new TLine(10.,0, 10.,ymax); b->SetLineWidth(1); b->Draw(); TLatex *t=new TLatex(10.08, 20,"optional years");t->SetTextSize(0.035); t->SetTextFont(132); t->Draw(); // leg = new TLegend(0.12 ,0.60 ,0.65,0.88 ); leg->SetFillColor(10);leg->SetBorderSize(1);leg->SetTextFont(132); leg->SetHeader(" Cooling scienario B, Hamburg Model"); leg->AddEntry(t, "Using damage constants of", ""); leg->AddEntry(g1,"Hamburg model","l"); leg->AddEntry(g2,"neutron damage constans","L"); leg->AddEntry(g3,"proton damage constans","L"); leg->Draw(); }