17 m_latex.SetTextSize(0.04) ;
18 m_latex.SetTextColor(kBlack) ;
19 m_latex.SetTextFont(42) ;
20 m_latex.DrawLatex(xstart, ystart,
label.c_str()) ;
26 m_latex.SetTextSize(0.04) ;
27 m_latex.SetTextColor(kBlack) ;
28 m_latex.SetTextFont(22) ;
29 m_latex.DrawLatex(xstart, ystart,
label.c_str()) ;
32 #ifndef DrawATLASLabels_Func
33 #define DrawATLASLabels_Func
37 m_latex.SetTextSize(0.04) ;
38 m_latex.SetTextColor(kBlack) ;
39 m_latex.SetTextFont(72) ;
40 m_latex.DrawLatex(xstart, ystart,
"ATLAS") ;
41 m_latex.SetTextFont(42) ;
42 float spacing = 0.13 ;
48 m_latex.DrawLatex(xstart+spacing, ystart,
"Preliminary") ;
51 m_latex.DrawLatex(xstart+spacing, ystart,
"Internal") ;
54 m_latex.DrawLatex(xstart+spacing, ystart,
"Simulation Preliminary") ;
57 m_latex.DrawLatex(xstart+spacing, ystart,
"Work in Progress") ;
66 if(!isdrawline&&!isdrawbar)
67 {
gr->Draw(
"AP") ;
return 0 ;}
69 {
gr->Draw(
"ALP") ;
return 0 ;}
76 bool logx=
false,
bool logy=
false,
bool isrectangle=
true)
79 gStyle->SetOptTitle(0) ;
80 float height = 600,
width = 600 ;
83 TCanvas *
c =
new TCanvas(canvasname.c_str(),
"",
width, height) ;
86 if(logx)
c->SetLogx() ;
87 if(
logy)
c->SetLogy() ;
91 gr->Draw(drawoption.c_str()) ;
92 c->Print((canvasname+
".eps").c_str()) ;
97 string drawoption1=
"APL",
string drawoption2=
"PL",
98 bool logx=
false,
bool logy=
false,
bool isrectangle=
true)
101 gStyle->SetOptTitle(0) ;
102 float height = 600,
width = 600 ;
105 TCanvas *
c =
new TCanvas(canvasname.c_str(),
"",
width, height) ;
108 if(logx)
c->SetLogx() ;
109 if(
logy)
c->SetLogy() ;
115 gr1->Draw(drawoption1.c_str()) ;
116 gr2->Draw(drawoption2.c_str()) ;
118 TLegend *
leg=
new TLegend(0.55,0.7,0.89,0.89) ;
119 leg->SetFillStyle(0) ;
120 leg->SetBorderSize(0) ;
121 leg->AddEntry(
gr1,
gr1->GetTitle(),
"LP") ;
122 leg->AddEntry(
gr2,
gr2->GetTitle(),
"LP") ;
124 c->Print((canvasname+
".eps").c_str()) ;
129 string drawopt1=
"APL",
string drawopt2=
"PL",
string drawopt3=
"PL",
130 bool logx=
false,
bool logy=
false,
bool isrectangle=
true)
133 gStyle->SetOptTitle(0) ;
134 float height = 600,
width = 600 ;
137 TCanvas *
c =
new TCanvas(canvasname.c_str(),
"",
width, height) ;
140 if(logx)
c->SetLogx() ;
141 if(
logy)
c->SetLogy() ;
148 gr1->Draw(drawopt1.c_str()) ;
149 gr2->Draw(drawopt2.c_str()) ;
150 gr3->Draw(drawopt3.c_str()) ;
152 TLegend *
leg=
new TLegend(0.55,0.7,0.89,0.89) ;
153 leg->SetTextSize(0.03) ;
154 leg->SetFillStyle(0) ;
155 leg->SetBorderSize(0) ;
156 leg->AddEntry(
gr1,
gr1->GetTitle(),
"LP") ;
157 leg->AddEntry(
gr2,
gr2->GetTitle(),
"LP") ;
158 leg->AddEntry(
gr3,
gr3->GetTitle(),
"LP") ;
160 c->Print((canvasname+
".eps").c_str()) ;
165 string drawopt1=
"APL",
string drawopt2=
"PL",
string drawopt3=
"PL",
string drawopt4=
"PL",
166 bool logx=
false,
bool logy=
false,
bool isrectangle=
true)
169 gStyle->SetOptTitle(0) ;
170 float height = 600,
width = 600 ;
173 TCanvas *
c =
new TCanvas(canvasname.c_str(),
"",
width, height) ;
176 if(logx)
c->SetLogx() ;
177 if(
logy)
c->SetLogy() ;
184 gr1->Draw(drawopt1.c_str()) ;
185 gr2->Draw(drawopt2.c_str()) ;
186 gr3->Draw(drawopt3.c_str()) ;
187 gr4->Draw(drawopt4.c_str()) ;
189 TLegend *
leg=
new TLegend(0.55,0.5,0.89,0.89) ;
190 leg->SetTextSize(0.03) ;
191 leg->SetFillStyle(0) ;
192 leg->SetBorderSize(0) ;
193 leg->AddEntry(
gr1,
gr1->GetTitle(),
"LP") ;
194 leg->AddEntry(
gr2,
gr2->GetTitle(),
"LP") ;
195 leg->AddEntry(
gr3,
gr3->GetTitle(),
"LP") ;
196 leg->AddEntry(gr4, gr4->GetTitle(),
"LP") ;
198 c->Print((canvasname+
".eps").c_str()) ;
202 string drawopt1=
"APL",
string drawopt2=
"PL",
string drawopt3=
"PL",
string drawopt4=
"PL",
string drawopt5=
"PL",
203 bool logx=
false,
bool logy=
false,
bool isrectangle=
true)
206 gStyle->SetOptTitle(0) ;
207 float height = 600,
width = 600 ;
210 TCanvas *
c =
new TCanvas(canvasname.c_str(),
"",
width, height) ;
213 if(logx)
c->SetLogx() ;
214 if(
logy)
c->SetLogy() ;
222 gr1->Draw(drawopt1.c_str()) ;
223 gr2->Draw(drawopt2.c_str()) ;
224 gr3->Draw(drawopt3.c_str()) ;
225 gr4->Draw(drawopt4.c_str()) ;
226 gr5->Draw(drawopt5.c_str()) ;
228 TLegend *
leg=
new TLegend(0.55,0.5,0.89,0.89) ;
229 leg->SetTextSize(0.03) ;
230 leg->SetFillStyle(0) ;
231 leg->SetBorderSize(0) ;
232 leg->AddEntry(
gr1,
gr1->GetTitle(),
"LP") ;
233 leg->AddEntry(
gr2,
gr2->GetTitle(),
"LP") ;
234 leg->AddEntry(
gr3,
gr3->GetTitle(),
"LP") ;
235 leg->AddEntry(gr4, gr4->GetTitle(),
"LP") ;
236 leg->AddEntry(gr5, gr5->GetTitle(),
"LP") ;
238 c->Print((canvasname+
".eps").c_str()) ;
244 if(!isdrawline&&!isdrawerrorrectangle&&!isdrawerrorband)
245 { gre->Draw(
"AP") ;
return 0 ;}
247 { gre->Draw(
"APL") ;
return 0 ;}
248 if(isdrawerrorrectangle)
266 float height = 600,
width = 600 ;
269 TCanvas *
c =
new TCanvas(canvasname.c_str(),
"",
width, height) ;
270 TPad *outpad =
new TPad(
"extpad",
"extpad",0,0,1,1) ;
271 outpad->SetFillStyle(4000) ;
272 TPad *interpad =
new TPad(
"interpad",
"interpad",0,0,1,1) ;
283 gre->Draw(drawoption.c_str()) ;
286 TLegend *
leg=
new TLegend(0.6,0.7,0.8,0.8) ;
287 leg->SetTextSize(0.04) ;
288 leg->SetFillStyle(0) ;
289 leg->SetBorderSize(0) ;
290 leg->AddEntry(gre, gre->GetTitle(),
"LP") ;
292 c->Print((canvasname+
".eps").c_str()) ;
293 c->Print((canvasname+
".pdf").c_str()) ;
298 string drawoption1=
"APL",
string drawoption2=
"PL",
299 bool logx=
false,
bool logy=
false,
bool isrectangle=
true)
301 gStyle->SetOptTitle(0) ;
303 float height = 600,
width = 600 ;
306 TCanvas *
c =
new TCanvas(canvasname.c_str(),
"",
width, height) ;
307 TPad *outpad =
new TPad(
"extpad",
"extpad",0,0,1,1) ;
308 outpad->SetFillStyle(4000) ;
309 TPad *interpad =
new TPad(
"interpad",
"interpad",0,0,1,1) ;
322 TMultiGraph *
mg =
new TMultiGraph();
323 mg->Add(gre1, drawoption1.c_str()) ;
324 mg->Add(gre2, drawoption2.c_str()) ;
328 for (
int i=0 ;
i<gre1->GetN() ;
i++)
330 if(gre1->GetY()[
i]>=
max)
max=gre1->GetY()[
i] ;
331 if(gre1->GetY()[
i]<=
min)
min=gre1->GetY()[
i] ;
336 mg->GetXaxis()->SetTitle(gre1->GetXaxis()->GetTitle()) ;
337 mg->GetYaxis()->SetTitle(gre1->GetYaxis()->GetTitle()) ;
339 TLegend *
leg=
new TLegend(0.6,0.7,0.9,0.9) ;
340 if(gre1->GetY()[0]<gre1->GetY()[1])
347 leg->SetTextSize(0.03) ;
348 leg->SetFillStyle(0) ;
349 leg->SetBorderSize(0) ;
350 leg->AddEntry(gre1, gre1->GetTitle(),
"P") ;
351 leg->AddEntry(gre2, gre2->GetTitle(),
"P") ;
353 c->Print((canvasname+
".eps").c_str()) ;
354 c->Print((canvasname+
".pdf").c_str()) ;
359 TGraphErrors *gre1, TGraphErrors *gre2, TGraphErrors *gre3,
360 string drawopt1=
"APL",
string drawopt2=
"PL",
string drawopt3=
"PL",
361 bool logx=
false,
bool logy=
false,
bool isrectangle=
true,
string header=
"",
string label=
"")
363 gStyle->SetOptTitle(0) ;
365 float height = 600,
width = 600 ;
368 TCanvas *
c =
new TCanvas(canvasname.c_str(),
"",
width, height) ;
369 TPad *outpad =
new TPad(
"extpad",
"extpad",0,0,1,1) ;
370 outpad->SetFillStyle(4000) ;
371 TPad *interpad =
new TPad(
"interpad",
"interpad",0,0,1,1) ;
386 TMultiGraph *
mg =
new TMultiGraph();
387 mg->Add(gre1, drawopt1.c_str()) ;
388 mg->Add(gre2, drawopt2.c_str()) ;
389 mg->Add(gre3, drawopt3.c_str()) ;
393 for (
int i=0 ;
i<gre1->GetN() ;
i++)
395 if(gre1->GetY()[
i]>=
max)
max=gre1->GetY()[
i] ;
396 if(gre1->GetY()[
i]<=
min)
min=gre1->GetY()[
i] ;
398 mg->SetMinimum(
min*0.9) ;
399 mg->SetMaximum(
max*1.1) ;
401 mg->GetXaxis()->SetTitle(gre1->GetXaxis()->GetTitle()) ;
402 mg->GetYaxis()->SetTitle(gre1->GetYaxis()->GetTitle()) ;
404 TLegend *
leg=
new TLegend(0.55,0.65,0.9,0.9) ;
405 leg->SetTextFont(42);
406 leg->SetTextAlign(22);
407 leg->SetTextSize(0.05);
408 leg->SetFillStyle(0) ;
409 leg->SetBorderSize(0) ;
411 TLegendEntry *theader = (TLegendEntry*)
leg->GetListOfPrimitives()->First();
412 theader->SetTextFont(22);
413 leg->AddEntry(gre1, gre1->GetTitle(),
"P") ;
414 leg->AddEntry(gre2, gre2->GetTitle(),
"P") ;
415 leg->AddEntry(gre3, gre3->GetTitle(),
"P") ;
417 c->Print((canvasname+
".eps").c_str()) ;
418 c->Print((canvasname+
".pdf").c_str()) ;
419 c->Print((canvasname+
".png").c_str()) ;
424 TGraphErrors *gre1, TGraphErrors *gre2, TGraphErrors *gre3, TGraphErrors *gre4,
425 string drawopt1=
"APL",
string drawopt2=
"PL",
string drawopt3=
"PL",
string drawopt4=
"PL",
426 bool logx=
false,
bool logy=
false,
bool isrectangle=
false,
string header=
"",
string label=
"")
428 gStyle->SetOptTitle(0) ;
430 float height = 600,
width = 600 ;
433 TCanvas *
c =
new TCanvas(canvasname.c_str(),
"",
width, height) ;
434 TPad *outpad =
new TPad(
"extpad",
"extpad",0,0,1,1) ;
435 outpad->SetFillStyle(4000) ;
436 TPad *interpad =
new TPad(
"interpad",
"interpad",0,0,1,1) ;
452 TMultiGraph *
mg =
new TMultiGraph();
453 mg->Add(gre1, drawopt1.c_str()) ;
454 mg->Add(gre2, drawopt2.c_str()) ;
455 mg->Add(gre3, drawopt3.c_str()) ;
456 mg->Add(gre4, drawopt4.c_str()) ;
461 mg->GetXaxis()->SetTitle(gre1->GetXaxis()->GetTitle()) ;
462 mg->GetYaxis()->SetTitle(gre1->GetYaxis()->GetTitle()) ;
463 if(canvasname.find(
"pi")!=std::string::npos)
465 if(canvasname.find(
"Ratio")!=std::string::npos)
467 if(canvasname.find(
"LateralSpread")!=std::string::npos)
469 mg->GetYaxis()->SetRangeUser(0.76, 1.26) ;
470 mg->GetYaxis()->SetNdivisions(510) ;
472 if(canvasname.find(
"Resolution")!=std::string::npos)
474 mg->GetYaxis()->SetRangeUser(0.91, 1.41) ;
475 mg->GetYaxis()->SetNdivisions(510) ;
477 if(canvasname.find(
"Response")!=std::string::npos)
479 mg->GetYaxis()->SetRangeUser(0.96, 1.11) ;
480 mg->GetYaxis()->SetNdivisions(503) ;
485 if(canvasname.find(
"LateralSpread")!=std::string::npos)
487 mg->GetYaxis()->SetRangeUser(0.025, 0.055) ;
488 mg->GetYaxis()->SetNdivisions(503) ;
494 if(canvasname.find(
"Ratio")!=std::string::npos)
496 if(canvasname.find(
"LateralSpread")!=std::string::npos)
498 mg->GetYaxis()->SetRangeUser(0.94, 1.39) ;
499 mg->GetYaxis()->SetNdivisions(509) ;
501 if(canvasname.find(
"Resolution")!=std::string::npos)
503 mg->GetYaxis()->SetRangeUser(0.81, 1.36) ;
504 mg->GetYaxis()->SetNdivisions(511) ;
506 if(canvasname.find(
"Response")!=std::string::npos)
508 mg->GetYaxis()->SetRangeUser(0.91, 1.16) ;
509 mg->GetYaxis()->SetNdivisions(505) ;
514 if(canvasname.find(
"LateralSpread")!=std::string::npos)
516 mg->GetYaxis()->SetRangeUser(0.025, 0.065) ;
517 mg->GetYaxis()->SetNdivisions(504) ;
522 TLegend *
leg=
new TLegend(0.55,0.6,0.9,0.9) ;
523 leg->SetTextFont(42);
524 leg->SetTextAlign(22);
525 leg->SetTextSize(0.04);
526 leg->SetFillStyle(0) ;
527 leg->SetBorderSize(0) ;
529 TLegendEntry *theader = (TLegendEntry*)
leg->GetListOfPrimitives()->First();
530 theader->SetTextFont(22);
531 if(canvasname.find(
"Response")!=std::string::npos&&canvasname.find(
"Ratio")==std::string::npos)
538 leg->AddEntry(gre1, gre1->GetTitle(),
"P") ;
539 leg->AddEntry(gre2, gre2->GetTitle(),
"P") ;
540 leg->AddEntry(gre3, gre3->GetTitle(),
"P") ;
541 leg->AddEntry(gre4, gre4->GetTitle(),
"P") ;
543 c->Print((canvasname+
".eps").c_str()) ;
544 c->Print((canvasname+
".pdf").c_str()) ;
545 c->Print((canvasname+
".png").c_str()) ;
550 TGraphErrors *gre1, TGraphErrors *gre2, TGraphErrors *gre3, TGraphErrors *gre4, TGraphErrors *gre5,
string drawopt1=
"APL",
string drawopt2=
"PL",
string drawopt3=
"PL",
string drawopt4=
"PL",
string drawopt5=
"PL",
551 bool logx=
false,
bool logy=
false,
bool isrectangle=
false,
string header=
"",
string label=
"")
553 gStyle->SetOptTitle(0) ;
555 float height = 600,
width = 600 ;
558 TCanvas *
c =
new TCanvas(canvasname.c_str(),
"",
width, height) ;
559 TPad *outpad =
new TPad(
"extpad",
"extpad",0,0,1,1) ;
560 outpad->SetFillStyle(4000) ;
561 TPad *interpad =
new TPad(
"interpad",
"interpad",0,0,1,1) ;
578 TMultiGraph *
mg =
new TMultiGraph();
579 mg->Add(gre1, drawopt1.c_str()) ;
580 mg->Add(gre2, drawopt2.c_str()) ;
581 mg->Add(gre3, drawopt3.c_str()) ;
582 mg->Add(gre4, drawopt4.c_str()) ;
583 mg->Add(gre5, drawopt5.c_str()) ;
586 mg->GetXaxis()->SetTitle(gre1->GetXaxis()->GetTitle()) ;
587 mg->GetYaxis()->SetTitle(gre1->GetYaxis()->GetTitle()) ;
588 if(canvasname.find(
"pi")!=std::string::npos)
590 if(canvasname.find(
"Ratio")!=std::string::npos)
592 if(canvasname.find(
"LateralSpread")!=std::string::npos)
594 mg->GetYaxis()->SetRangeUser(0.76, 1.16) ;
595 mg->GetYaxis()->SetNdivisions(508) ;
597 if(canvasname.find(
"Resolution")!=std::string::npos)
599 mg->GetYaxis()->SetRangeUser(0.91, 1.21) ;
600 mg->GetYaxis()->SetNdivisions(506) ;
602 if(canvasname.find(
"Response")!=std::string::npos)
604 mg->GetYaxis()->SetRangeUser(0.96, 1.16) ;
605 mg->GetYaxis()->SetNdivisions(504) ;
610 if(canvasname.find(
"LateralSpread")!=std::string::npos)
612 mg->GetYaxis()->SetRangeUser(0.025, 0.055) ;
613 mg->GetYaxis()->SetNdivisions(503) ;
619 if(canvasname.find(
"Ratio")!=std::string::npos)
621 if(canvasname.find(
"LateralSpread")!=std::string::npos)
623 mg->GetYaxis()->SetRangeUser(0.94, 1.39) ;
624 mg->GetYaxis()->SetNdivisions(509) ;
626 if(canvasname.find(
"Resolution")!=std::string::npos)
628 mg->GetYaxis()->SetRangeUser(0.81, 1.21) ;
629 mg->GetYaxis()->SetNdivisions(508) ;
631 if(canvasname.find(
"Response")!=std::string::npos)
633 mg->GetYaxis()->SetRangeUser(0.91, 1.26) ;
634 mg->GetYaxis()->SetNdivisions(507) ;
639 if(canvasname.find(
"LateralSpread")!=std::string::npos)
641 mg->GetYaxis()->SetRangeUser(0.025, 0.065) ;
642 mg->GetYaxis()->SetNdivisions(504) ;
648 TLegend *
leg=
new TLegend(0.55,0.55,0.9,0.9) ;
649 leg->SetTextFont(42);
650 leg->SetTextAlign(22);
651 leg->SetTextSize(0.04);
652 leg->SetFillStyle(0) ;
653 leg->SetBorderSize(0) ;
655 TLegendEntry *theader = (TLegendEntry*)
leg->GetListOfPrimitives()->First();
656 theader->SetTextFont(22) ;
657 if(canvasname.find(
"Response")!=std::string::npos&&canvasname.find(
"Ratio")==std::string::npos)
664 leg->AddEntry(gre1, gre1->GetTitle(),
"P") ;
665 leg->AddEntry(gre2, gre2->GetTitle(),
"P") ;
666 leg->AddEntry(gre3, gre3->GetTitle(),
"P") ;
667 leg->AddEntry(gre4, gre4->GetTitle(),
"P") ;
668 leg->AddEntry(gre5, gre5->GetTitle(),
"P") ;
670 c->Print((canvasname+
".eps").c_str()) ;
671 c->Print((canvasname+
".pdf").c_str()) ;
672 c->Print((canvasname+
".png").c_str()) ;
677 TGraphErrors *topgre1, TGraphErrors *topgre2, TGraphErrors *topgre3, TGraphErrors *topgre4, TGraphErrors *topgre5, TGraphErrors *bottomgre1, TGraphErrors *bottomgre2, TGraphErrors *bottomgre3, TGraphErrors *bottomgre4,
string topdrawopt1=
"APL",
string topdrawopt2=
"PL",
string topdrawopt3=
"PL",
string topdrawopt4=
"PL",
string topdrawopt5=
"PL",
string bottomdrawopt1=
"APL",
string bottomdrawopt2=
"PL",
string bottomdrawopt3=
"PL",
string bottomdrawopt4=
"PL",
678 bool logx=
false,
bool toplogy=
false,
bool bottomlogy=
false,
bool isrectangle=
false,
string header=
"")
680 gStyle->SetOptTitle(0) ;
682 float height = 600,
width = 600 ;
685 TCanvas *
c =
new TCanvas(canvasname.c_str(),
"",
width, height) ;
686 TPad *outpad =
new TPad(
"extpad",
"extpad",0,0,1,1) ;
687 outpad->SetFillStyle(4000) ;
688 TPad *interpad1 =
new TPad(
"intpad1",
"pad1",0,0.33,1,1) ;
689 TPad *interpad2 =
new TPad(
"intpad2",
"pad2",0,0,1,0.33) ;
690 SetPadAttributes(interpad1, 0, 0, 0.15, 0.05, 0.00001, 0.05, 0, logx, toplogy) ;
691 SetPadAttributes(interpad2, 0, 0, 0.15, 0.05, 0.3, 0.00001, 0, logx, bottomlogy) ;
699 DrawLabel(0.23,0.85,
"Tile Calorimeter") ;
704 SetGraphErrorsAttributes(topgre1, 1, 2, 1, 1001, 1, 20, 1, 1, 0.05, 1.4, 0.05, 0.05, 1.4, 0.05) ;
705 SetGraphErrorsAttributes(topgre2, 1, 2, 2, 1001, 2, 21, 2, 1, 0.05, 1.4, 0.05, 0.05, 1.4, 0.05) ;
706 SetGraphErrorsAttributes(topgre3, 1, 2, 3, 1001, 3, 22, 3, 1, 0.05, 1.4, 0.05, 0.05, 1.4, 0.05) ;
707 SetGraphErrorsAttributes(topgre4, 1, 2, 4, 1001, 4, 23, 4, 1, 0.05, 1.4, 0.05, 0.05, 1.4, 0.05) ;
708 SetGraphErrorsAttributes(topgre5, 1, 2, 6, 1001, 6, 24, 6, 1, 0.05, 1.4, 0.05, 0.05, 1.4, 0.05) ;
709 TMultiGraph *topmg =
new TMultiGraph();
710 topmg->Add(topgre1, topdrawopt1.c_str()) ;
711 topmg->Add(topgre2, topdrawopt2.c_str()) ;
712 topmg->Add(topgre3, topdrawopt3.c_str()) ;
713 topmg->Add(topgre4, topdrawopt4.c_str()) ;
714 topmg->Add(topgre5, topdrawopt5.c_str()) ;
718 topmg->GetXaxis()->SetTitle(topgre2->GetXaxis()->GetTitle()) ;
719 topmg->GetYaxis()->SetTitle(topgre2->GetYaxis()->GetTitle()) ;
720 if(canvasname.find(
"pi")!=std::string::npos)
722 if(canvasname.find(
"LateralSpread")!=std::string::npos)
724 topmg->GetYaxis()->SetRangeUser(0.025, 0.055) ;
725 topmg->GetYaxis()->SetNdivisions(503) ;
730 if(canvasname.find(
"LateralSpread")!=std::string::npos)
732 topmg->GetYaxis()->SetRangeUser(0.03, 0.055) ;
733 topmg->GetYaxis()->SetNdivisions(503) ;
738 TLegend *
leg=
new TLegend(0.55,0.45,0.9,0.9) ;
739 leg->SetTextFont(42);
740 leg->SetTextAlign(22);
741 leg->SetTextSize(0.05);
742 leg->SetFillStyle(0) ;
743 leg->SetBorderSize(0) ;
745 TLegendEntry *theader = (TLegendEntry*)
leg->GetListOfPrimitives()->First();
746 theader->SetTextFont(22) ;
747 if(canvasname.find(
"Response")!=std::string::npos)
754 leg->AddEntry(topgre1, topgre1->GetTitle(),
"P") ;
755 leg->AddEntry(topgre2, topgre2->GetTitle(),
"P") ;
756 leg->AddEntry(topgre3, topgre3->GetTitle(),
"P") ;
757 leg->AddEntry(topgre4, topgre4->GetTitle(),
"P") ;
758 leg->AddEntry(topgre5, topgre5->GetTitle(),
"P") ;
764 SetGraphErrorsAttributes(bottomgre1, 1, 2, 2, 1001, 2, 21, 2, 1, 0.12, 1.2, 0.1, 0.12, 0.7, 0.1) ;
765 SetGraphErrorsAttributes(bottomgre2, 1, 2, 3, 1001, 3, 22, 3, 1, 0.12, 1.2, 0.1, 0.12, 0.7, 0.1) ;
766 SetGraphErrorsAttributes(bottomgre3, 1, 2, 4, 1001, 4, 23, 4, 1, 0.12, 1.2, 0.1, 0.12, 0.7, 0.1) ;
767 SetGraphErrorsAttributes(bottomgre4, 1, 2, 6, 1001, 6, 24, 6, 1, 0.12, 1.2, 0.1, 0.12, 0.7, 0.1) ;
768 TMultiGraph *bottommg =
new TMultiGraph();
769 bottommg->Add(bottomgre1, bottomdrawopt1.c_str()) ;
770 bottommg->Add(bottomgre2, bottomdrawopt2.c_str()) ;
771 bottommg->Add(bottomgre3, bottomdrawopt3.c_str()) ;
772 bottommg->Add(bottomgre4, bottomdrawopt4.c_str()) ;
773 bottommg->Draw(
"A") ;
775 bottommg->GetXaxis()->SetTitle(bottomgre1->GetXaxis()->GetTitle()) ;
776 bottommg->GetYaxis()->SetTitle(bottomgre1->GetYaxis()->GetTitle()) ;
779 c->Print((canvasname+
".eps").c_str()) ;
780 c->Print((canvasname+
".pdf").c_str()) ;
781 c->Print((canvasname+
".png").c_str()) ;
786 int DrawSixGraphErrorsOnCanvas(
string canvasname, TGraphErrors *gre1, TGraphErrors *gre2, TGraphErrors *gre3, TGraphErrors *gre4,TGraphErrors *gre5, TGraphErrors *gre6,
string drawopt1=
"APL",
string drawopt2=
"PL",
string drawopt3=
"PL",
string drawopt4=
"PL",
string drawopt5=
"PL",
string drawopt6=
"PL",
bool logx=
false,
bool logy=
false,
bool isrectangle=
true)
788 gStyle->SetOptTitle(0) ;
790 float height = 600,
width = 600 ;
793 TCanvas *
c =
new TCanvas(canvasname.c_str(),
"",
width, height) ;
796 if(logx)
c->SetLogx() ;
797 if(
logy)
c->SetLogy() ;
806 TMultiGraph *
mg =
new TMultiGraph();
807 mg->Add(gre1, drawopt1.c_str()) ;
808 mg->Add(gre2, drawopt2.c_str()) ;
809 mg->Add(gre3, drawopt3.c_str()) ;
810 mg->Add(gre4, drawopt4.c_str()) ;
811 mg->Add(gre5, drawopt5.c_str()) ;
812 mg->Add(gre6, drawopt6.c_str()) ;
816 for (
int i=0 ;
i<gre1->GetN() ;
i++)
818 if(gre1->GetY()[
i]>=
max)
max=gre1->GetY()[
i] ;
819 if(gre1->GetY()[
i]<=
min)
min=gre1->GetY()[
i] ;
821 mg->SetMinimum(
min*0.8) ;
822 mg->SetMaximum(
max*1.2) ;
824 mg->GetXaxis()->SetTitle(gre1->GetXaxis()->GetTitle()) ;
825 mg->GetYaxis()->SetTitle(gre1->GetYaxis()->GetTitle()) ;
827 TLegend *
leg=
new TLegend(0.5,0.5,0.89,0.89) ;
828 leg->SetTextSize(0.03) ;
829 leg->SetFillStyle(0) ;
830 leg->SetBorderSize(0) ;
831 leg->AddEntry(gre1, gre1->GetTitle(),
"P") ;
832 leg->AddEntry(gre2, gre2->GetTitle(),
"P") ;
833 leg->AddEntry(gre3, gre3->GetTitle(),
"P") ;
834 leg->AddEntry(gre4, gre4->GetTitle(),
"P") ;
835 leg->AddEntry(gre5, gre5->GetTitle(),
"P") ;
836 leg->AddEntry(gre6, gre6->GetTitle(),
"P") ;
838 c->Print((canvasname+
".eps").c_str()) ;
839 c->Print((canvasname+
".pdf").c_str()) ;
845 if(!isdrawline&&!isdrawerrorrectangle&&!isdrawerrorband)
846 { grae->Draw(
"AP") ;
return 0 ;}
848 { grae->Draw(
"APL") ;
return 0 ;}
849 if(isdrawerrorrectangle)
864 string drawoption=
"APL" ,
bool logx=
false,
bool logy=
false,
bool isrectangle=
true)
866 gStyle->SetOptTitle(0) ;
868 float height = 600,
width = 600 ;
871 TCanvas *
c =
new TCanvas(canvasname.c_str(),
"",
width, height) ;
874 if(logx)
c->SetLogx() ;
875 if(
logy)
c->SetLogy() ;
878 agre->Draw(drawoption.c_str()) ;
879 c->Print((canvasname+
".eps").c_str()) ;
884 string drawopt1=
"APL",
string drawopt2=
"PL",
885 bool logx=
false,
bool logy=
false,
886 bool isrectangle=
true)
888 gStyle->SetOptTitle(0) ;
890 float height = 600,
width = 600 ;
893 TCanvas *
c =
new TCanvas(canvasname.c_str(),
"",
width, height) ;
896 if(logx)
c->SetLogx();
897 if(
logy)
c->SetLogy();
901 agre1->Draw(drawopt1.c_str()) ;
902 agre2->Draw(drawopt2.c_str()) ;
904 TLegend *
leg=
new TLegend(0.55,0.7,0.89,0.89) ;
905 leg->SetTextSize(0.03) ;
906 leg->SetFillStyle(0) ;
907 leg->SetBorderSize(0) ;
908 leg->AddEntry(agre1, agre1->GetTitle(),
"LEP") ;
909 leg->AddEntry(agre2, agre2->GetTitle(),
"LEP") ;
911 c->Print((canvasname+
".eps").c_str()) ;
915 int DrawThreeAsymmGraphErrorsOnCanvas(
string canvasname, TGraphAsymmErrors *agre1, TGraphAsymmErrors *agre2, TGraphAsymmErrors *agre3,
string drawopt1=
"APL",
string drawopt2=
"PL",
string drawopt3=
"PL",
916 bool logx=
false,
bool logy=
false,
917 bool isrectangle=
true)
919 gStyle->SetOptTitle(0) ;
921 float height = 600,
width = 600 ;
924 TCanvas *
c =
new TCanvas(canvasname.c_str(),
"",
width, height) ;
927 if(logx)
c->SetLogx() ;
928 if(
logy)
c->SetLogy() ;
933 agre1->Draw(drawopt1.c_str()) ;
934 agre2->Draw(drawopt2.c_str()) ;
935 agre3->Draw(drawopt3.c_str()) ;
937 TLegend *
leg=
new TLegend(0.55,0.6,0.89,0.89) ;
938 leg->SetTextSize(0.03) ;
939 leg->SetFillStyle(0) ;
940 leg->SetBorderSize(0) ;
941 leg->AddEntry(agre1, agre1->GetTitle(),
"LEP") ;
942 leg->AddEntry(agre2, agre2->GetTitle(),
"LEP") ;
943 leg->AddEntry(agre3, agre3->GetTitle(),
"LEP") ;
945 c->Print((canvasname+
".eps").c_str()) ;
949 int DrawFourAsymmGraphErrorsOnCanvas(
string canvasname, TGraphAsymmErrors *agre1, TGraphAsymmErrors *agre2, TGraphAsymmErrors *agre3, TGraphAsymmErrors *agre4,
string drawopt1=
"APL",
string drawopt2=
"PL",
string drawopt3=
"PL",
string drawopt4=
"PL",
bool logx=
false,
bool logy=
false,
bool isrectangle=
true)
951 gStyle->SetOptTitle(0) ;
953 float height = 600,
width = 600 ;
956 TCanvas *
c =
new TCanvas(canvasname.c_str(),
"",
width, height) ;
959 if(logx)
c->SetLogx() ;
960 if(
logy)
c->SetLogy() ;
966 agre1->Draw(drawopt1.c_str()) ;
967 agre2->Draw(drawopt2.c_str()) ;
968 agre3->Draw(drawopt3.c_str()) ;
969 agre4->Draw(drawopt4.c_str()) ;
971 TLegend *
leg=
new TLegend(0.55,0.5,0.89,0.89) ;
972 leg->SetTextSize(0.03) ;
973 leg->SetFillStyle(0) ;
974 leg->SetBorderSize(0) ;
975 leg->AddEntry(agre1, agre1->GetTitle(),
"LEP") ;
976 leg->AddEntry(agre2, agre2->GetTitle(),
"LEP") ;
977 leg->AddEntry(agre3, agre3->GetTitle(),
"LEP") ;
978 leg->AddEntry(agre4, agre4->GetTitle(),
"LEP") ;
980 c->Print((canvasname+
".eps").c_str()) ;
984 int DrawFiveAsymmGraphErrorsOnCanvas(
string canvasname, TGraphAsymmErrors *agre1, TGraphAsymmErrors *agre2, TGraphAsymmErrors *agre3, TGraphAsymmErrors *agre4,TGraphAsymmErrors *agre5,
string drawopt1=
"APL",
string drawopt2=
"PL",
string drawopt3=
"PL",
string drawopt4=
"PL",
string drawopt5=
"PL",
bool logx=
false,
bool logy=
false,
bool isrectangle=
true)
986 gStyle->SetOptTitle(0) ;
988 float height = 600,
width = 600 ;
991 TCanvas *
c =
new TCanvas(canvasname.c_str(),
"",
width, height) ;
994 if(logx)
c->SetLogx() ;
995 if(
logy)
c->SetLogy() ;
1002 agre1->Draw(drawopt1.c_str()) ;
1003 agre2->Draw(drawopt2.c_str()) ;
1004 agre3->Draw(drawopt3.c_str()) ;
1005 agre4->Draw(drawopt4.c_str()) ;
1006 agre5->Draw(drawopt5.c_str()) ;
1008 TLegend *
leg=
new TLegend(0.55,0.5,0.89,0.89) ;
1009 leg->SetTextSize(0.03) ;
1010 leg->SetFillStyle(0) ;
1011 leg->SetBorderSize(0) ;
1012 leg->AddEntry(agre1, agre1->GetTitle(),
"LEP") ;
1013 leg->AddEntry(agre2, agre2->GetTitle(),
"LEP") ;
1014 leg->AddEntry(agre3, agre3->GetTitle(),
"LEP") ;
1015 leg->AddEntry(agre4, agre4->GetTitle(),
"LEP") ;
1016 leg->AddEntry(agre5, agre5->GetTitle(),
"LEP") ;
1018 c->Print((canvasname+
".eps").c_str()) ;