{ #include #include c1 = new TCanvas("c1","A Simple Graph ",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("Vdrop.txt"); for (int i=0; i> x[i] >> y1[i]>> y2[i]>>y3[i]>>y4[i]>>y5[i]; fin.close(); // g1 = new TGraph(n,x, dummy); g1->SetTitle(); g1->SetLineWidth(2); g1->SetMarkerColor(2); g1->SetMarkerStyle(1); g1->SetLineColor(2); Double_t ymax= 50., xmax=12.; g1->SetMaximum(ymax); g1->GetYaxis()->SetTitle("Voltage drop [Volt] "); 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_n=13); g1->Draw("ALP"); // 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],&y1[i-25]); h0->SetLineWidth(2);h0->SetMarkerColor(2); h0->SetMarkerStyle(1); h0->SetLineColor(2);h0->Draw("SAME LP"); h0 = new TGraph(26,&x[i-25],&y3[i-25]); h0->SetLineWidth(2);h0->SetMarkerColor(4); h0->SetMarkerStyle(1); h0->SetLineColor(4);h0->Draw("SAME LP"); h0 = new TGraph(26,&x[i-25],&y4[i-25]); h0->SetLineWidth(2);h0->SetMarkerColor(6); h0->SetMarkerStyle(1); h0->SetLineColor(6);h0->Draw("SAME LP"); h0 = new TGraph(26,&x[i-25],&y5[i-25]); h0->SetLineWidth(2);h0->SetMarkerColor(1); h0->SetMarkerStyle(1); h0->SetLineColor(1);h0->Draw("SAME LP"); h0 = new TGraph(26,&x[i-25],&y2[i-25]); h0->SetLineWidth(2);h0->SetMarkerColor(3); h0->SetMarkerStyle(1); 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(); } // b= new TLine(0,0, 0,ymax); b->SetLineWidth(2); b->Draw(); b= new TLine(0,0, xmax,0); b->SetLineWidth(2); b->Draw(); b= new TLine(0,ymax, xmax,ymax); b->SetLineWidth(2); b->Draw(); b= new TLine(xmax,0, xmax,ymax); b->SetLineWidth(2); b->Draw(); b= new TLine(10.,0, 10.,ymax); b->SetLineWidth(1); b->Draw(); t=new TLatex(10.08, 2,"optional years");t->SetTextSize(0.035); t->SetTextFont(132); t->Draw(); // p = new TPave(0.2,34.,7.2,49.); p->SetFillColor(10); p->SetLineColor(1);p->SetBorderSize(2); p->Draw(); // Double_t h=47; Double_t q1=0.5, q2=0.8, q3=1.1, q4=1.5 , q5=4.2, q6=2.4, q7=4.5, q8=6.3; 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 = 45.; t=new TLatex(q1-0.2, h,"scenario"); t->SetTextFont(132); t->SetTextSize(0.035); t->Draw(); t=new TLatex(q4, h,"50 116 50 23 126 50 116 50 23 126 days"); t->SetTextFont(132); t->SetTextSize(0.035); t->Draw(); // h = 43.; u=new TLatex(q3,h,"A -7 -7 -7 20 -22 -7 -7 -7 20 -22"); u->SetTextFont(132); u->SetTextSize(0.035); u->Draw(); u=new TLatex(q8,h,"^{o}C"); u->SetTextFont(132); u->SetTextSize(0.035); u->Draw(); xx = new TLine(q1,h+0.8, q2,h+0.8); xx->SetLineColor(2); xx->SetLineWidth(2); xx->Draw(); // h = 41.; u=new TLatex(q3,h,"B 0 0 0 20 -15 -7 -7 -7 20 -22"); u->SetTextFont(132); u->SetTextSize(0.035); u->Draw(); u=new TLatex(q8,h,"^{o}C"); u->SetTextFont(132); u->SetTextSize(0.035); u->Draw(); xx = new TLine(q1,h+0.8, q2,h+0.8); xx->SetLineColor(3); xx->SetLineWidth(2); xx->Draw(); // h = 39.; u=new TLatex(q3,h,"D 15 15 15 20 0 -7 -7 -7 20 -22"); u->SetTextFont(132); u->SetTextSize(0.035); u->Draw(); u=new TLatex(q8,h,"^{o}C"); u->SetTextFont(132); u->SetTextSize(0.035); u->Draw(); xx = new TLine(q1,h+0.8, q2,h+0.8); xx->SetLineColor(4); xx->SetLineWidth(2); xx->Draw(); // h = 37.; u=new TLatex(q3,h,"G 0 0 0 20 -15 -10 -10 -10 20 -25"); u->SetTextFont(132); u->SetTextSize(0.035); u->Draw(); u=new TLatex(q8,h,"^{o}C"); u->SetTextFont(132); u->SetTextSize(0.035); u->Draw(); xx = new TLine(q1,h+0.8, q2,h+0.8); xx->SetLineColor(6); xx->SetLineWidth(2); xx->Draw(); // h = 35.; u=new TLatex(q3,h,"I 0 0 0 20 -15 0 0 0 20 -15"); u->SetTextFont(132); u->SetTextSize(0.035); u->Draw(); u=new TLatex(q8,h,"^{o}C"); u->SetTextFont(132); u->SetTextSize(0.035); u->Draw(); xx = new TLine(q1,h+0.8, q2,h+0.8); xx->SetLineColor(1); xx->SetLineWidth(2); xx->Draw(); // }