{ #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]; ifstream fin("I_B6.txt"); for (int i=0; i> x[i] >> y1[i]; fin.close(); // g1 = new TGraph(n,x,y1); // g1->SetTitle(); g1->SetMarkerColor(2); g1->SetMarkerStyle(1); g1->SetLineColor(2);g1->SetLineWidth(2); Double_t ymax= 4.0, xmax = 12.; g1->SetMaximum(ymax); g1->GetYaxis()->SetTitle("Leak current/module at beam-on Temp [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"); // 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(); } //read-in the points just for Maintenance int k = 0; for (int i=0; i> x[i] >> y1[i]; if(x[i]-int(x[i]) < 0.58) continue; if(x[i]-int(x[i]) > 0.66) continue; k++; if(k<4)continue; h0 = new TGraph(4,&x[i-3],&y1[i-3]); h0->SetLineWidth(2);h0->SetMarkerColor(4); h0->SetMarkerStyle(1); h0->SetLineColor(4);h0->Draw("SAME LP"); k=0; } // 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(); TLatex *u=new TLatex(10.08,0.20,"optional years");u->SetTextSize(0.035); u->SetTextFont(132); u->Draw(); // p = new TPave(0.2,2.5,7.0,3.95); p->SetFillColor(10); p->SetLineColor(1);p->SetBorderSize(2); p->Draw(); // Float_t h=3.5; Double_t q1=0.5, q2=0.8, q3=0.9, q4=1.2 , q5=1.4, q6=2.4, q7=4.5, q8=5.5; // h = 3.8; t=new TLatex(q1, h,"Leakage currents with cooling scenario J for B6"); t->SetTextSize(0.035); t->SetTextColor(1); t->SetTextFont(132); t->Draw(); // h = 3.6; t=new TLatex(q5, h,"Days");t->SetTextSize(0.035); t->SetTextFont(132); t->Draw(); t=new TLatex(q6, h,"Status");t->SetTextSize(0.035); t->SetTextFont(132); t->Draw(); t=new TLatex(q7-0.5, h,"Sensor Temp");t->SetTextSize(0.035); t->SetTextFont(132); t->Draw(); // h = 3.4; t=new TLatex(q5, h," 50");t->SetTextSize(0.035); t->SetTextFont(132); t->Draw(); t=new TLatex(q6, h,"pre-beam");t->SetTextSize(0.035); t->SetTextFont(132); t->Draw(); t=new TLatex(q7, h,"+5 ^{o}C");t->SetTextSize(0.035); t->SetTextFont(132); t->Draw(); TLine x0(q1,h+0.05, q4,h+0.05); x0->SetLineStyle(1); x0->SetLineColor(2); x0->SetLineWidth(2); x0->Draw(); // h = 3.2; t=new TLatex(q5, h,"116");t->SetTextSize(0.035); t->SetTextFont(132); t->Draw(); t=new TLatex(q6, h,"beam on");t->SetTextSize(0.035); t->SetTextFont(132); t->Draw(); t=new TLatex(q7, h,"+5 ^{o}C");t->SetTextSize(0.035); t->SetTextFont(132); t->Draw(); TLine xc(q1,h+0.05, q4,h+0.05); xc->SetLineStyle(1); xc->SetLineColor(2); xc->SetLineWidth(2); xc->Draw(); // h = 3.0; t=new TLatex(q5, h," 50");t->SetTextSize(0.035); t->SetTextFont(132); t->Draw(); t=new TLatex(q6, h,"beam off");t->SetTextSize(0.035); t->SetTextFont(132); t->Draw(); t=new TLatex(q7, h,"+5 ^{o}C");t->SetTextSize(0.035); t->SetTextFont(132); t->Draw(); TLine xd(q1,h+0.05, q4,h+0.05); xd->SetLineStyle(1); xd->SetLineColor(2); xd->SetLineWidth(2); xd->Draw(); // h = 2.8; t=new TLatex(q5, h," 23");t->SetTextSize(0.035); t->SetTextFont(132); t->Draw(); t=new TLatex(q6, h,"maintenance");t->SetTextSize(0.035); t->SetTextFont(132); t->Draw(); t=new TLatex(q7, h,"+20 ^{o}C");t->SetTextSize(0.035); t->SetTextFont(132); t->Draw(); TLine xe(q1,h+0.05, q4,h+0.05); xe->SetLineStyle(1); xe->SetLineColor(4); xe->SetLineWidth(2); xe->Draw(); // h = 2.6; t=new TLatex(q5, h,"126");t->SetTextSize(0.035); t->SetTextFont(132); t->Draw(); t=new TLatex(q6, h,"beam off");t->SetTextSize(0.035); t->SetTextFont(132); t->Draw(); t=new TLatex(q7, h,"+5 ^{o}C");t->SetTextSize(0.035); t->SetTextFont(132); t->Draw(); TLine xf(q1,h+0.05, q4,h+0.05); xf->SetLineStyle(1); xf->SetLineColor(2); xf->SetLineWidth(2); xf->Draw(); //s // }