{ #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]; Double_t y1[n], y2[n], y3[n], y4[n], y5[n], z1[n], z2[n], z3[n], z4[n], z5[n]; //----y1 to y5 at operating Temperature, z1 to z5 at T = -7 degree------------------ ifstream fin("I_scenarios.txt"); for (int i=0; i> x[i] >> y1[i]>> y2[i]>>y3[i]>>y4[i]>>y5[i]>>z1[i]>> z2[i]>>z3[i]>>z4[i]>>z5[i]; fin.close(); // g1 = new TGraph(n,x,y1); g2 = new TGraph(n,x,y2); g3 = new TGraph(n,x,y3); g4 = new TGraph(n,x,y4); g5 = new TGraph(n,x,y5); //g1 = new TGraph(n,x,z1); //g2 = new TGraph(n,x,z2); //g3 = new TGraph(n,x,z3); //g4 = new TGraph(n,x,z4); //g5 = new TGraph(n,x,z5); g1->SetTitle(); g1->SetMarkerColor(2); g1->SetMarkerStyle(1); g1->SetLineColor(2); g2->SetMarkerColor(3); g2->SetMarkerStyle(1); g2->SetLineColor(3); g3->SetMarkerColor(4); g3->SetMarkerStyle(1); g3->SetLineColor(4); g4->SetMarkerColor(6); g4->SetMarkerStyle(1); g4->SetLineColor(6); g5->SetMarkerColor(1); g5->SetMarkerStyle(1); g5->SetLineColor(1); Double_t ymax= 4.0, xmax = 12.; g1->SetMaximum(ymax); g1->GetYaxis()->SetTitle("Leak current/module at beam-on Temperature (mA)"); //g1->GetYaxis()->SetTitle("Leak current/module at -7^{o}C (mA)"); 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"); g2->Draw("SAME LP"); g3->Draw("SAME LP"); g4->Draw("SAME LP"); g5->Draw("SAME LP"); g1->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 *u=new TLatex(10.08,0.20,"optional years");u->SetTextSize(0.035); u->SetTextFont(132); u->Draw(); // Double_t q1=0.5, q2=0.8, q3=1.1, q4=1.5 , q5=4.2, q6=2.4, q7=4.5, q8=5.5; // Float_t hh=2.1; //TLatex *t=new TLatex(1.0, hh,"based on Harper's model"); //t->SetTextSize(0.04); t->SetTextFont(132); t->SetTextColor(1); t->Draw(); p = new TPave(0.2,2.4,7.2,3.9); p->SetFillColor(10); p->SetLineColor(1);p->SetBorderSize(2); p->Draw(); // Float_t h=3.7; 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; TLatex *t=new TLatex(q1-0.2, h,"cooling"); t->SetTextFont(132); t->SetTextSize(0.035); t->Draw(); TLatex *t=new TLatex(q4, h,"----first 3 yrs----"); t->SetTextFont(132); t->SetTextSize(0.035); t->Draw(); TLatex *t=new TLatex(q5, h,"----next 9 yrs----"); t->SetTextFont(132); t->SetTextSize(0.035); t->Draw(); // h = 3.5; TLatex *t=new TLatex(q1-0.2, h,"scenario"); t->SetTextFont(132); t->SetTextSize(0.035); t->Draw(); TLatex *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 = 3.3; TLatex *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(); TLatex *u=new TLatex(q8,h,"^{o}C"); u->SetTextFont(132); u->SetTextSize(0.035); u->Draw(); TLine *xx = new TLine(q1,h+0.05, q2,h+0.05); xx->SetLineColor(2); xx->Draw(); // h = 3.1; TLatex *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(); TLatex *u=new TLatex(q8,h,"^{o}C"); u->SetTextFont(132); u->SetTextSize(0.035); u->Draw(); TLine *xx = new TLine(q1,h+0.05, q2,h+0.05); xx->SetLineColor(3); xx->Draw(); // h = 2.9; TLatex *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(); TLatex *u=new TLatex(q8,h,"^{o}C"); u->SetTextFont(132); u->SetTextSize(0.035); u->Draw(); TLine *xx = new TLine(q1,h+0.05, q2,h+0.05); xx->SetLineColor(4); xx->Draw(); // h = 2.7; TLatex *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(); TLatex *u=new TLatex(q8,h,"^{o}C"); u->SetTextFont(132); u->SetTextSize(0.035); u->Draw(); TLine *xx = new TLine(q1,h+0.05, q2,h+0.05); xx->SetLineColor(6); xx->Draw(); // h = 2.5; TLatex *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(); TLatex *u=new TLatex(q8,h,"^{o}C"); u->SetTextFont(132); u->SetTextSize(0.035); u->Draw(); TLine *xx = new TLine(q1,h+0.05, q2,h+0.05); xx->SetLineColor(1); xx->Draw(); // }