{ #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]; ifstream fin("runaway_safetyFactor.txt"); for (int i=0; i> x[i] >>y1[i]>>y2[i]>>y3[i]; fin.close(); // g1 = new TGraph(n,x, dummy); // Double_t ymax= 3., ymin= 0., xmax = 12.; g1->SetTitle(); g1->SetMaximum(ymax); g1->SetMinimum(ymin); g1->GetYaxis()->SetTitle("Safety factor in power density"); g1->GetXaxis()->SetTitle("LHC year"); 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(0.,xmax); g1->GetXaxis()->SetNdivisions(Int_j=13); g1->Draw("AP"); //--------------------------------------------------- int k = 0; for (int i=0; i 0.60) continue; k++; if(k<26)continue; x[i-25]=x[i-26]; h0 = new TGraph(26,&x[i-25],&y3[i-25]); h0->SetLineWidth(2);h0->SetMarkerColor(2); h0->SetLineColor(2);h0->Draw("SAME LP"); h0 = new TGraph(26,&x[i-25],&y2[i-25]); h0->SetLineWidth(2);h0->SetMarkerColor(4); h0->SetLineColor(4);h0->Draw("SAME LP"); h0 = new TGraph(26,&x[i-25],&y1[i-25]); h0->SetLineWidth(2);h0->SetMarkerColor(3); h0->SetLineColor(3);h0->Draw("SAME LP");k=0; } // 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(); } //---------------------------------------------------- L=new TLine(0,0, 12,0); L->SetLineStyle(1); L->Draw(); L=new TLine(10,ymin, 10,ymax); L->SetLineStyle(1); L->Draw(); L=new TLine(0,1,12,1); L->SetLineStyle(1); L->Draw(); L=new TLine( 0,ymin,12,ymin); L->SetLineStyle(1); L->SetLineWidth(2); L->Draw(); L=new TLine(0,ymin,0,ymax); L->SetLineStyle(1); L->SetLineWidth(2); L->Draw(); L=new TLine( 0,ymax,12,ymax); L->SetLineStyle(1); L->SetLineWidth(2); L->Draw(); L=new TLine(12,ymin, 12,ymax); L->SetLineStyle(1); L->SetLineWidth(2); L->Draw(); t=new TLatex(10.08, 0.2,"optional years");t->SetTextFont(132);t->SetTextSize(0.035),t->Draw(); //----------------------------------------------------- // p = new TPave(0.2,2.0,6.0,2.9); p->SetFillColor(10); p->SetLineColor(1);p->SetBorderSize(2); p->Draw(); // Double_t h=1.6; TLatex *u=new TLatex(4.0, h,"Thermally stable"); u->SetTextSize(0.045); u->SetTextFont(132); u->SetTextColor(1); u->Draw(); TArrow *ar = new TArrow(5,1.02,5,1.5,0.02,"|>"); ar->SetLineWidth(3);ar->Draw(); h=0.1; TLatex *u=new TLatex(4., 0.2,"Thermal runaway"); u->SetTextSize(0.045); u->SetTextFont(132); u->SetTextColor(2); u->Draw(); TArrow *ar = new TArrow(5,0.98,5,0.4,0.02,"|>"); ar->SetLineWidth(3);ar->Draw(); ar->SetLineWidth(3); ar->SetLineColor(2); ar->SetFillColor(2); ar->Draw(); h= 2.7; Double dh=0.15,ddh=0.05,q1=0.5, q2=q1+0.5, q3=q2+0.2, q4=q3+0.5, q5=q4+2.0, q6=q5+1.; t=new TLatex(q1-0.2, h,"cooling"); t->SetTextFont(132); t->SetTextSize(0.035); t->Draw(); t=new TLatex(q4, h,"--first 3 yrs--"); t->SetTextFont(132); t->SetTextSize(0.035); t->Draw(); t=new TLatex(q5, h,"--next 9 yrs--"); t->SetTextFont(132); t->SetTextSize(0.035); t->Draw(); // h = h-dh; t=new TLatex(q1-0.2, h,"scenario"); t->SetTextFont(132); t->SetTextSize(0.035); t->Draw(); t=new TLatex(q4, h,"216 23 126"); t->SetTextFont(132); t->SetTextSize(0.035); t->Draw(); t=new TLatex(q5, h,"216 23 126 days"); t->SetTextFont(132); t->SetTextSize(0.035); t->Draw(); // h = h-dh ; t=new TLatex(q3, h,"G"); t->SetTextFont(132); t->SetTextSize(0.035); t->Draw(); t=new TLatex(q4, h," 0 20 -15 ^{o}C"); t->SetTextFont(132); t->SetTextSize(0.035); t->Draw(); t=new TLatex(q5, h,"-10 20 -25 ^{o}C"); t->SetTextFont(132); t->SetTextSize(0.035); t->Draw(); TLine *xx = new TLine(q1,h+ddh, q2,h+ddh); xx->SetLineWidth(2); xx->SetLineColor(3); xx->Draw(); // h = h-dh; t=new TLatex(q3, h,"H"); t->SetTextFont(132); t->SetTextSize(0.035); t->Draw(); t=new TLatex(q4, h," 0 20 -15 ^{o}C"); t->SetTextFont(132); t->SetTextSize(0.035); t->Draw(); t=new TLatex(q5, h," -5 20 -20 ^{o}C"); t->SetTextFont(132); t->SetTextSize(0.035); t->Draw(); L = new TLine(q1,h+ddh, q2,h+ddh); L->SetLineWidth(2); L->SetLineColor(4); L->Draw(); // h = h-dh; t=new TLatex(q3+0.05, h,"I"); t->SetTextFont(132); t->SetTextSize(0.035); t->Draw(); t=new TLatex(q4, h," 0 20 -15 ^{o}C"); t->SetTextFont(132); t->SetTextSize(0.035); t->Draw(); t=new TLatex(q5, h," 0 20 -15 ^{o}C"); t->SetTextFont(132); t->SetTextSize(0.035); t->Draw(); TLine *xx = new TLine(q1,h+ddh, q2,h+ddh); xx->SetLineWidth(2); xx->SetLineColor(2); xx->Draw(); }