21 int DrawLabels(
float xstart,
float ystart,
string label,
bool isbold=
true) ;
23 int DrawCMEAndLumi(
float xstart,
float ystart,
string lumiInFb,
string CME) ;
28 const std::string& xlabel,
const std::string& ylabel,
29 int xbins,
double xlow,
double xhigh,
30 bool sumw2 =
true,
bool overflow=
true)
33 tmp->GetXaxis()->SetTitle(xlabel.c_str()) ;
34 tmp->GetYaxis()->SetTitle(ylabel.c_str()) ;
35 if(sumw2)
tmp->Sumw2() ;
36 if(overflow)
tmp->StatOverflows() ;
40 string xlabel,
string ylabel,
41 int nbins,
float *bininterval,
45 tmp->GetXaxis()->SetTitle(xlabel.c_str()) ;
46 tmp->GetYaxis()->SetTitle(ylabel.c_str()) ;
47 if(sumw2)
tmp->Sumw2() ;
48 tmp->StatOverflows() ;
53 const string& xlabel,
const string& ylabel,
58 tmp->GetXaxis()->SetTitle(xlabel.c_str()) ;
59 tmp->GetYaxis()->SetTitle(ylabel.c_str()) ;
60 if(sumw2)
tmp->Sumw2() ;
61 tmp->StatOverflows() ;
66 const std::string& xlabel,
const std::string& ylabel,
67 int xbins,
double xlow,
double xhigh,
71 tmp->GetXaxis()->SetTitle(xlabel.c_str()) ;
72 tmp->GetYaxis()->SetTitle(ylabel.c_str()) ;
73 if(sumw2)
tmp->Sumw2() ;
74 tmp->StatOverflows() ;
81 std::cout<<
"Get Effective Entries."<<std::endl ;
83 hist->GetXaxis()->GetXbins()->GetArray()) ;
84 hee->SetDirectory(0) ;
88 if (
hist->GetBinError(
bin) != 0.)
92 hee->SetBinContent(
bin, nee);
93 hee->SetBinError(
bin, sqrt(nee)) ;
100 std::cout<<
"Get DataLike Entries."<<std::endl ;
102 eff->GetXaxis()->GetXbins()->GetArray()) ;
103 dataLike->SetDirectory(0) ;
105 TRandom3 rand3(1986) ;
111 float nee =
eff->GetBinContent(
bin) ;
112 if(nee>=scaled->GetBinContent(
bin))
116 int binSeed =
int(
eff->GetBinCenter(
bin) + jobSeed*1e5 );
117 rand3.SetSeed(binSeed);
120 for(
int jj=1 ; jj<=
int(nee) ; jj++)
121 if(rand3.Uniform()<(
float)scaled->GetBinContent(
bin)/nee)
122 dataLike->Fill(dataLike->GetBinCenter(
bin)) ;
137 while (getline(fileIn,
line))
139 istringstream iss(
line);
141 if(
channel.find_first_of(
'#')==0 )
146 sscanf(subStr.c_str(),
"%i", &
number);
148 cout <<
"channelvsbumber[" <<
channel <<
"]: " << (*channelvsbumber)[
channel] << endl;
155 gStyle->SetOptTitle(0);
156 float height=600,
width=600 ;
159 TCanvas *
c =
new TCanvas(canvasname.c_str(),
"",
width, height) ;
161 TPad *outpad =
new TPad(
"extpad",
"extpad",0,0,1,1) ;
162 outpad->SetFillStyle(4000) ;
163 TPad *interpad =
new TPad(
"interpad",
"interpad",0,0,1,1) ;
179 hist->Draw(drawoption.c_str()) ;
180 c->Print((canvasname+
".eps").c_str()) ;
181 c->Print((canvasname+
".pdf").c_str()) ;
188 hist->Draw(
"HISTSAME") ;
193 hist->Draw(
"PESAME") ;
201 for(std::vector< std::pair< TH1F*, bool > >::
iterator itr=histvec.begin() ; itr!=histvec.end() ; ++itr)
205 itr->first->Draw(
"HISTSAME") ;
206 leg->AddEntry(itr->first, itr->first->GetTitle(),
"L") ;
210 itr->first->Draw(
"PESAME") ;
211 leg->AddEntry(itr->first, itr->first->GetTitle(),
"LPE") ;
219 gStyle->SetOptTitle(0);
227 TCanvas *
c =
new TCanvas(canvasname.c_str(),
"",
width, height) ;
230 TPad *outpad =
new TPad(
"extpad",
"extpad",0,0,1,1) ;
231 outpad->SetFillStyle(4000) ;
232 TPad *interpad =
new TPad(
"interpad",
"interpad",0,0,1,1) ;
248 hist1->Draw(drawoption1.c_str()) ;
249 hist2->Draw(drawoption2.c_str()) ;
251 TLegend *
leg=
new TLegend(0.5,0.7,0.89,0.89) ;
252 leg->SetFillStyle(0) ;
253 leg->SetTextSize(0.04) ;
254 leg->SetBorderSize(0) ;
255 if(drawoption1.find(
"HIST")!=string::npos)
259 if(drawoption2.find(
"HIST")!=string::npos)
264 c->Print((canvasname+
".eps").c_str()) ;
268 int DrawThreeHistsOnCanvas(
string canvasname,
TH1F*
hist1,
TH1F*
hist2,
TH1F* hist3,
string drawopt1=
"PE",
string drawopt2=
"PESame",
string drawopt3=
"PESame",
bool logx=
false,
bool logy=
true,
bool isrectangle=
true,
string header=
"",
string label=
"")
270 gStyle->SetOptTitle(0);
278 TCanvas *
c =
new TCanvas(canvasname.c_str(),
"",
width, height) ;
281 TPad *outpad =
new TPad(
"extpad",
"extpad",0,0,1,1) ;
282 outpad->SetFillStyle(4000) ;
283 TPad *interpad =
new TPad(
"interpad",
"interpad",0,0,1,1) ;
290 if(canvasname.find(
"LongitudinalProfile")!=std::string::npos&&canvasname.find(
"Ratio")==std::string::npos)
305 hist1->Draw(drawopt1.c_str()) ;
306 hist2->Draw(drawopt2.c_str()) ;
307 hist3->Draw(drawopt3.c_str()) ;
309 TLegend *
leg=
new TLegend(0.57,0.65,0.92,0.9) ;
310 string PhysicsLists[4] = {
"FTFP_BERT",
"FTFP_BERT_ATL",
"QGSP_BERT",
"QGSP_BIC"} ;
311 for(
int i=0 ;
i<4 ;
i++)
321 leg->SetTextFont(42) ;
322 leg->SetTextAlign(22);
323 leg->SetFillStyle(0) ;
324 leg->SetTextSize(0.04) ;
325 leg->SetBorderSize(0) ;
327 TLegendEntry *theader = (TLegendEntry*)
leg->GetListOfPrimitives()->First();
328 theader->SetTextFont(22) ;
331 leg->AddEntry(hist3, hist3->GetTitle(),
"P") ;
333 c->Print((canvasname+
".eps").c_str()) ;
334 c->Print((canvasname+
".pdf").c_str()) ;
335 c->Print((canvasname+
".png").c_str()) ;
339 int DrawFourHistsOnCanvas(
string canvasname,
TH1F*
hist1,
TH1F*
hist2,
TH1F* hist3,
TH1F* hist4,
string drawopt1=
"PE",
string drawopt2=
"PESame",
string drawopt3=
"PESame",
string drawopt4=
"PESame",
bool logx=
false,
bool logy=
true,
bool isrectangle=
false,
string header=
"",
string label=
"")
341 gStyle->SetOptTitle(0);
349 TCanvas *
c =
new TCanvas(canvasname.c_str(),
"",
width, height) ;
352 TPad *outpad =
new TPad(
"extpad",
"extpad",0,0,1,1) ;
353 outpad->SetFillStyle(4000) ;
354 TPad *interpad =
new TPad(
"interpad",
"interpad",0,0,1,1) ;
361 if(canvasname.find(
"LongitudinalProfile")!=std::string::npos&&canvasname.find(
"Ratio")==std::string::npos)
377 hist1->Draw(drawopt1.c_str()) ;
378 hist2->Draw(drawopt2.c_str()) ;
379 hist3->Draw(drawopt3.c_str()) ;
380 hist4->Draw(drawopt4.c_str()) ;
382 TLegend *
leg=
new TLegend(0.57,0.6,0.92,0.9) ;
383 string PhysicsLists[4] = {
"FTFP_BERT",
"FTFP_BERT_ATL",
"QGSP_BERT",
"QGSP_BIC"} ;
384 for(
int i=0 ;
i<4 ;
i++)
394 leg->SetTextFont(42) ;
395 leg->SetTextAlign(22);
396 leg->SetBorderSize(0) ;
397 leg->SetFillStyle(0) ;
398 leg->SetTextSize(0.04) ;
400 TLegendEntry *theader = (TLegendEntry*)
leg->GetListOfPrimitives()->First();
401 theader->SetTextFont(22) ;
404 leg->AddEntry(hist3, hist3->GetTitle(),
"P") ;
405 leg->AddEntry(hist4, hist4->GetTitle(),
"P") ;
407 c->Print((canvasname+
".eps").c_str()) ;
408 c->Print((canvasname+
".pdf").c_str()) ;
409 c->Print((canvasname+
".png").c_str()) ;
415 string drawopt1=
"PE",
string drawopt2=
"PESame",
string drawopt3=
"PESame",
string drawopt4=
"PESame",
string drawopt5=
"PESame",
bool logx=
false,
bool logy=
true,
bool isrectangle=
true,
string header=
"",
string label=
"")
417 gStyle->SetOptTitle(0);
425 TCanvas *
c =
new TCanvas(canvasname.c_str(),
"",
width, height) ;
428 TPad *outpad =
new TPad(
"extpad",
"extpad",0,0,1,1) ;
429 outpad->SetFillStyle(4000) ;
430 TPad *interpad =
new TPad(
"interpad",
"interpad",0,0,1,1) ;
437 if(canvasname.find(
"LongitudinalProfile")!=std::string::npos&&canvasname.find(
"Ratio")==std::string::npos)
454 hist1->Draw(drawopt1.c_str()) ;
455 hist2->Draw(drawopt2.c_str()) ;
456 hist3->Draw(drawopt3.c_str()) ;
457 hist4->Draw(drawopt4.c_str()) ;
458 hist5->Draw(drawopt5.c_str()) ;
460 TLegend *
leg=
new TLegend(0.57,0.55,0.92,0.9) ;
461 string PhysicsLists[4] = {
"FTFP_BERT",
"FTFP_BERT_ATL",
"QGSP_BERT",
"QGSP_BIC"} ;
462 for(
int i=0 ;
i<4 ;
i++)
472 leg->SetTextFont(42);
473 leg->SetTextAlign(22);
474 leg->SetBorderSize(0) ;
475 leg->SetFillStyle(0) ;
476 leg->SetTextSize(0.04) ;
478 TLegendEntry *theader = (TLegendEntry*)
leg->GetListOfPrimitives()->First();
479 theader->SetTextFont(22) ;
482 leg->AddEntry(hist3, hist3->GetTitle(),
"P") ;
483 leg->AddEntry(hist4, hist4->GetTitle(),
"P") ;
484 leg->AddEntry(hist5, hist5->GetTitle(),
"P") ;
486 c->Print((canvasname+
".eps").c_str()) ;
487 c->Print((canvasname+
".pdf").c_str()) ;
488 c->Print((canvasname+
".png").c_str()) ;
492 int DrawTopFiveHistsAndBottomFourHistsOnCanvas(
string canvasname,
TH1F *top1,
TH1F* top2,
TH1F* top3,
TH1F* top4,
TH1F* top5,
TH1F* bottom1,
TH1F* bottom2,
TH1F* bottom3,
TH1F* bottom4,
string topdrawopt1 =
"PE",
string topdrawopt2 =
"PESAME",
string topdrawopt3 =
"PE",
string topdrawopt4 =
"PESAME",
string topdrawopt5 =
"PESAME",
string bottomdrawopt1=
"PE",
string bottomdrawopt2=
"PESame",
string bottomdrawopt3=
"PESame",
string bottomdrawopt4=
"PESame",
bool logx=
false,
bool toplogy=
true,
bool bottomlogy=
false,
bool isrectangle=
false,
string header=
"",
string label=
"")
494 gStyle->SetOptTitle(0);
502 TCanvas *
c =
new TCanvas(canvasname.c_str(),
"",
width, height) ;
505 TPad *outpad =
new TPad(
"extpad",
"extpad",0,0,1,1) ;
506 outpad->SetFillStyle(4000) ;
507 TPad *interpad1 =
new TPad(
"intpad1",
"pad1",0,0.33,1,1) ;
508 TPad *interpad2 =
new TPad(
"intpad2",
"pad2",0,0,1,0.33) ;
510 SetPadAttributes(interpad1, 0, 0, 0.15, 0.05, 0.00001, 0.05, 0, logx, toplogy) ;
511 SetPadAttributes(interpad2, 0, 0, 0.15, 0.05, 0.3, 0.00001, 0, logx, bottomlogy) ;
521 DrawLabels(0.2, 0.4,
"Tile Calorimeter",
false) ;
525 SetHistAttributes(top1, 1, 2, 1, 0, 1, 20, 1, 1, 0.06, 1.2, 0.06, 0.06, 1.2, 0.06) ;
526 SetHistAttributes(top2, 1, 2, 2, 0, 1, 21, 2, 1, 0.06, 1.2, 0.06, 0.06, 1.2, 0.06) ;
527 SetHistAttributes(top3, 1, 2, 3, 0, 1, 22, 3, 1, 0.06, 1.2, 0.06, 0.06, 1.2, 0.06) ;
528 SetHistAttributes(top4, 1, 2, 4, 0, 1, 23, 4, 1, 0.06, 1.2, 0.06, 0.06, 1.2, 0.06) ;
529 SetHistAttributes(top5, 1, 2, 6, 0, 1, 24, 6, 1, 0.06, 1.2, 0.06, 0.06, 1.2, 0.06) ;
531 top1->Draw(topdrawopt1.c_str()) ;
532 top2->Draw(topdrawopt2.c_str()) ;
533 top3->Draw(topdrawopt3.c_str()) ;
534 top4->Draw(topdrawopt4.c_str()) ;
535 top5->Draw(topdrawopt5.c_str()) ;
537 TLegend *
leg=
new TLegend(0.55,0.54,0.9,0.94) ;
538 string PhysicsLists[4] = {
"FTFP_BERT",
"FTFP_BERT_ATL",
"QGSP_BERT",
"QGSP_BIC"} ;
539 for(
int i=0 ;
i<4 ;
i++)
549 leg->SetTextFont(42);
550 leg->SetTextAlign(22);
551 leg->SetBorderSize(0) ;
552 leg->SetFillStyle(0) ;
553 leg->SetTextSize(0.05) ;
555 TLegendEntry *theader = (TLegendEntry*)
leg->GetListOfPrimitives()->First();
556 theader->SetTextFont(22) ;
557 leg->AddEntry(top1, top1->GetTitle(),
"P") ;
558 leg->AddEntry(top2, top2->GetTitle(),
"P") ;
559 leg->AddEntry(top3, top3->GetTitle(),
"P") ;
560 leg->AddEntry(top4, top4->GetTitle(),
"P") ;
561 leg->AddEntry(top5, top5->GetTitle(),
"P") ;
566 SetHistAttributes(bottom1, 1, 2, 2, 0, 1, 21, 2, 1, 0.12, 1.4, 0.1, 0.12, 0.7, 0.1) ;
567 SetHistAttributes(bottom2, 1, 2, 3, 0, 1, 22, 3, 1, 0.12, 1.4, 0.1, 0.12, 0.7, 0.1) ;
568 SetHistAttributes(bottom3, 1, 2, 4, 0, 1, 23, 4, 1, 0.12, 1.4, 0.1, 0.12, 0.7, 0.1) ;
569 SetHistAttributes(bottom4, 1, 2, 6, 0, 1, 24, 6, 1, 0.12, 1.4, 0.1, 0.12, 0.7, 0.1) ;
571 bottom1->Draw(bottomdrawopt1.c_str()) ;
572 bottom2->Draw(bottomdrawopt2.c_str()) ;
573 bottom3->Draw(bottomdrawopt3.c_str()) ;
574 bottom4->Draw(bottomdrawopt4.c_str()) ;
576 c->Print((canvasname+
".eps").c_str()) ;
577 c->Print((canvasname+
".pdf").c_str()) ;
578 c->Print((canvasname+
".png").c_str()) ;
582 int DrawTwelveHistsOnCanvas(
string canvasname,
TH1F*
hist1,
TH1F*
hist2,
TH1F* hist3,
TH1F* hist4,
TH1F* hist5,
TH1F* hist6,
TH1F* hist7,
TH1F* hist8,
TH1F* hist9,
TH1F* hist10,
TH1F* hist11,
TH1F* hist12,
string drawopt1=
"PE",
string drawopt2=
"PESame",
string drawopt3=
"PESame",
string drawopt4=
"PESame",
string drawopt5=
"PESame",
string drawopt6=
"PESame",
string drawopt7=
"PESame",
string drawopt8=
"PESame",
string drawopt9=
"PESame",
string drawopt10=
"PESame",
string drawopt11=
"PESame",
string drawopt12=
"PESame",
bool logx=
false,
bool logy=
true,
bool isrectangle=
true)
584 gStyle->SetOptTitle(0);
592 TCanvas *
c =
new TCanvas(canvasname.c_str(),
"",
width, height) ;
595 TPad *outpad =
new TPad(
"extpad",
"extpad",0,0,1,1) ;
596 outpad->SetFillStyle(4000) ;
597 TPad *interpad =
new TPad(
"interpad",
"interpad",0,0,1,1) ;
611 SetHistAttributes(
hist1, 1, 2, 1, 0, 1, 20, 1, 1, 0.04, 1., 0.04, 0.04, 1.2, 0.04,
false) ;
612 SetHistAttributes(
hist2, 1, 2, 2, 0, 1, 21, 2, 1, 0.04, 1., 0.04, 0.04, 1.2, 0.04,
false) ;
613 SetHistAttributes(hist3, 1, 2, 3, 0, 1, 22, 3, 1, 0.04, 1., 0.04, 0.04, 1.2, 0.04,
false) ;
614 SetHistAttributes(hist4, 1, 2, 4, 0, 1, 23, 4, 1, 0.04, 1., 0.04, 0.04, 1.2, 0.04,
false) ;
615 SetHistAttributes(hist5, 1, 2, 5, 0, 1, 24, 5, 1, 0.04, 1., 0.04, 0.04, 1.2, 0.04,
false) ;
616 SetHistAttributes(hist6, 1, 2, 6, 0, 1, 25, 6, 1, 0.04, 1., 0.04, 0.04, 1.2, 0.04,
false) ;
617 SetHistAttributes(hist7, 1, 2, 7, 0, 1, 26, 7, 1, 0.04, 1., 0.04, 0.04, 1.2, 0.04,
false) ;
618 SetHistAttributes(hist8, 1, 2, 8, 0, 1, 27, 8, 1, 0.04, 1., 0.04, 0.04, 1.2, 0.04,
false) ;
619 SetHistAttributes(hist9, 1, 2, 9, 0, 1, 28, 9, 1, 0.04, 1., 0.04, 0.04, 1.2, 0.04,
false) ;
620 SetHistAttributes(hist10, 1, 2, 15, 0, 1, 29, 15, 1, 0.04, 1., 0.04, 0.04, 1.2, 0.04,
false) ;
621 SetHistAttributes(hist11, 1, 2, 11, 0, 1, 30, 11, 1, 0.04, 1., 0.04, 0.04, 1.2, 0.04,
false) ;
622 SetHistAttributes(hist12, 1, 2, 12, 0, 1, 31, 12, 1, 0.04, 1., 0.04, 0.04, 1.2, 0.04,
false) ;
624 hist1->Draw(drawopt1.c_str()) ;
625 hist2->Draw(drawopt2.c_str()) ;
626 hist3->Draw(drawopt3.c_str()) ;
627 hist4->Draw(drawopt4.c_str()) ;
628 hist5->Draw(drawopt5.c_str()) ;
629 hist6->Draw(drawopt6.c_str()) ;
630 hist7->Draw(drawopt7.c_str()) ;
631 hist8->Draw(drawopt8.c_str()) ;
632 hist9->Draw(drawopt9.c_str()) ;
633 hist10->Draw(drawopt10.c_str()) ;
634 hist11->Draw(drawopt11.c_str()) ;
635 hist12->Draw(drawopt12.c_str()) ;
637 TLegend *
leg=
new TLegend(0.6,0.4,0.89,0.8) ;
638 leg->SetBorderSize(0) ;
639 leg->SetFillStyle(0) ;
640 leg->SetTextSize(0.03) ;
643 leg->AddEntry(hist3, hist3->GetTitle(),
"f") ;
644 leg->AddEntry(hist4, hist4->GetTitle(),
"f") ;
645 leg->AddEntry(hist5, hist5->GetTitle(),
"f") ;
646 leg->AddEntry(hist6, hist6->GetTitle(),
"f") ;
647 leg->AddEntry(hist7, hist7->GetTitle(),
"f") ;
648 leg->AddEntry(hist8, hist8->GetTitle(),
"f") ;
649 leg->AddEntry(hist9, hist9->GetTitle(),
"f") ;
650 leg->AddEntry(hist10, hist10->GetTitle(),
"f") ;
651 leg->AddEntry(hist11, hist11->GetTitle(),
"f") ;
652 leg->AddEntry(hist12, hist12->GetTitle(),
"f") ;
654 c->Print((canvasname+
".eps").c_str()) ;
655 c->Print((canvasname+
".pdf").c_str()) ;
661 gStyle->SetOptTitle(0);
663 TCanvas *
c =
new TCanvas(canvasname.c_str(),
"", 800, 800) ;
665 TPad *outpad =
new TPad(
"extpad",
"extpad",0,0,1,1) ;
666 TPad *pad1 =
new TPad(
"pad1",
"pad1",0,0.33,1,1) ;
667 TPad *pad2 =
new TPad(
"pad2",
"pad2",0,0,1,0.33) ;
669 outpad->SetFillStyle(4000) ;
687 SetHistAttributes(top1, 1, 2, 1, 0, 1, 20, 1, 1, 0.05, 1., 0.05, 0.05, 1., 0.05,
false) ;
688 SetHistAttributes(top2, 1, 2, 2, 0, 1, 21, 2, 1, 0.05, 1., 0.05, 0.05, 1., 0.05,
false) ;
689 SetHistAttributes(bottom1, 1, 2, 1, 0, 1, 20, 1, 1, 0.1, 1.0, 0.1, 0.1, 0.5, 0.1,
false) ;
692 top1->GetXaxis()->SetMoreLogLabels() ;
693 top2->GetXaxis()->SetMoreLogLabels() ;
694 bottom1->GetXaxis()->SetMoreLogLabels() ;
696 top1->Draw(topdrawopt1.c_str()) ;
697 top2->Draw(topdrawopt2.c_str()) ;
699 TLegend *
leg=
new TLegend(0.5,0.7,0.89,0.89) ;
700 leg->SetFillStyle(0) ;
701 leg->SetTextSize(0.03) ;
702 leg->SetBorderSize(0) ;
703 if(topdrawopt1.find(
"HIST")!=string::npos)
704 leg->AddEntry(top1, top1->GetTitle(),
"L") ;
706 leg->AddEntry(top1, top1->GetTitle(),
"LPE") ;
707 if(topdrawopt2.find(
"HIST")!=string::npos)
708 leg->AddEntry(top2, top2->GetTitle(),
"L") ;
710 leg->AddEntry(top2, top2->GetTitle(),
"LPE") ;
716 bottom1->Draw(bottomdrawopt.c_str()) ;
718 c->Print((canvasname+
".eps").c_str()) ;
725 bool TFirstDrawHistorNot=
true,
bool TSecondDrawHistorNot=
false,
726 bool DFirstDrawHistorNot=
true,
bool BSecondDrawHistorNot=
false,
727 bool logx=
false,
bool toplogy=
true,
bool bottomlogy=
false)
729 gStyle->SetOptTitle(0);
731 TCanvas *
c =
new TCanvas(canvasname.c_str(),
"", 800, 800) ;
734 TPad *outpad =
new TPad(
"extpad",
"extpad",0,0,1,1) ;
735 TPad *pad1 =
new TPad(
"pad1",
"pad1",0,0.33,1,1) ;
736 TPad *pad2 =
new TPad(
"pad2",
"pad2",0,0,1,0.33) ;
755 SetHistAttributes(top1, 1, 2, 1, 0, 1, 20, 1, 1, 0.04, 1., 0.04, 0.04, 1., 0.04,
false) ;
756 SetHistAttributes(top2, 1, 2, 2, 0, 1, 21, 2, 1, 0.04, 1., 0.04, 0.04, 1., 0.04,
false) ;
758 TLegend *
leg=
new TLegend(0.5,0.55,0.89,0.65) ;
759 leg->SetBorderSize(0) ;
761 std::vector< std::pair< TH1F*, bool > > histvec ;
762 histvec.push_back(std::make_pair(top1, TFirstDrawHistorNot)) ;
763 histvec.push_back(std::make_pair(top2, TSecondDrawHistorNot)) ;
771 SetHistAttributes(bottom1, 1, 2, 1, 3004, 1, 20, 1, 1, 0.1, 0.5, 0.1, 0.1, 0.5, 0.1,
false) ;
772 SetHistAttributes(bottom2, 1, 2, 2, 3005, 1, 21, 2, 1, 0.1, 0.5, 0.1, 0.1, 0.5, 0.1,
false) ;
774 bottom1->Draw(
"EP0") ;
775 bottom2->Draw(
"EP0same") ;
778 c->Print((canvasname+
".eps").c_str()) ;
783 bool logx=
false,
bool logy=
false,
784 bool drawlabel=
true,
string label=
"",
785 bool drawcmeandlumi=
false,
bool isrectangle=
true)
787 gStyle->SetOptTitle(0);
795 TCanvas *
c =
new TCanvas(canvasname.c_str(),
"",
width, height) ;
802 THStack *stack=
new THStack(
"stack",
"") ;
806 TPad *outpad =
new TPad(
"extpad",
"extpad",0,0,1,1) ;
807 TPad *pad1 =
new TPad(
"pad1",
"pad1",0,0,1,1) ;
809 outpad->SetFillStyle(4000) ;
826 stack->Draw(
"HIST") ;
827 stack->GetXaxis()->SetTitle(top1->GetXaxis()->GetTitle()) ;
828 stack->GetYaxis()->SetTitle(top1->GetYaxis()->GetTitle()) ;
832 TLegend *
leg=
new TLegend(0.65,0.75,0.89,0.89) ;
833 leg->SetBorderSize(0) ;
834 leg->AddEntry(top1, top1->GetTitle(),
"F") ;
835 leg->AddEntry(top2, top2->GetTitle(),
"F") ;
840 c->Print((canvasname+
".eps").c_str()) ;
845 bool logx=
false,
bool logy=
false,
846 bool isrectangle=
true,
bool drawlabel=
true,
string label=
"",
847 bool drawcmeandlumi=
false)
856 TCanvas *
c =
new TCanvas(canvasname.c_str(),
"",
width, height) ;
864 THStack *stack=
new THStack(
"stack",
"") ;
869 TPad *outpad =
new TPad(
"extpad",
"extpad",0,0,1,1) ;
870 TPad *pad1 =
new TPad(
"pad1",
"pad1",0,0,1,1) ;
872 outpad->SetFillStyle(4000) ;
887 stack->Draw(
"HIST") ;
888 stack->GetXaxis()->SetTitle(top1->GetXaxis()->GetTitle()) ;
889 stack->GetYaxis()->SetTitle(top1->GetYaxis()->GetTitle()) ;
894 TLegend *
leg=
new TLegend(0.65,0.75,0.89,0.89) ;
895 leg->SetBorderSize(0) ;
896 leg->AddEntry(top1, top1->GetTitle(),
"F") ;
897 leg->AddEntry(top2, top2->GetTitle(),
"F") ;
898 leg->AddEntry(top3, top2->GetTitle(),
"F") ;
903 c->Print((canvasname+
".eps").c_str()) ;
910 bool logx=
false,
bool logy=
false,
911 bool isrectangle=
true,
bool drawlabel=
true,
string label=
"",
912 bool drawcmeandlumi=
false)
921 TCanvas *
c =
new TCanvas(canvasname.c_str(),
"",
width, height) ;
930 THStack *stack=
new THStack(
"stack",
"") ;
936 TPad *outpad =
new TPad(
"extpad",
"extpad",0,0,1,1) ;
937 TPad *pad1 =
new TPad(
"pad1",
"pad1",0,0,1,1) ;
939 outpad->SetFillStyle(4000) ;
954 stack->Draw(
"HIST") ;
955 stack->GetXaxis()->SetTitle(top1->GetXaxis()->GetTitle()) ;
956 stack->GetYaxis()->SetTitle(top1->GetYaxis()->GetTitle()) ;
961 TLegend *
leg=
new TLegend(0.65,0.7,0.89,0.89) ;
962 leg->SetBorderSize(0) ;
963 leg->AddEntry(top1, top1->GetTitle(),
"F") ;
964 leg->AddEntry(top2, top2->GetTitle(),
"F") ;
965 leg->AddEntry(top3, top3->GetTitle(),
"F") ;
966 leg->AddEntry(top4, top4->GetTitle(),
"F") ;
971 c->Print((canvasname+
".eps").c_str()) ;
977 bool logx=
false,
bool logy=
false,
978 bool isrectangle=
true,
bool drawlabel=
true,
string label=
"",
979 bool drawcmeandlumi=
false)
988 TCanvas *
c =
new TCanvas(canvasname.c_str(),
"",
width, height) ;
996 THStack *stack=
new THStack(
"stack",
"") ;
1000 TPad *outpad =
new TPad(
"extpad",
"extpad",0,0,1,1) ;
1001 TPad *pad1 =
new TPad(
"pad1",
"pad1",0,0,1,1) ;
1003 outpad->SetFillStyle(4000) ;
1018 stack->Draw(
"HIST") ;
1019 hist->Draw(
"PESAME") ;
1021 stack->GetXaxis()->SetTitle(top1->GetXaxis()->GetTitle()) ;
1022 stack->GetYaxis()->SetTitle(top1->GetYaxis()->GetTitle()) ;
1025 TLegend *
leg=
new TLegend(0.5,0.55,0.89,0.65) ;
1027 leg->SetBorderSize(0) ;
1028 leg->AddEntry(top1, top1->GetTitle(),
"F") ;
1029 leg->AddEntry(top2, top2->GetTitle(),
"F") ;
1035 c->Print((canvasname+
".eps").c_str()) ;
1041 bool logx=
false,
bool logy=
false,
1042 bool isrectangle=
true,
bool drawlabel=
true,
string label=
"",
1043 bool drawcmeandlumi=
false)
1052 TCanvas *
c =
new TCanvas(canvasname.c_str(),
"",
width, height) ;
1061 THStack *stack=
new THStack(
"stack",
"") ;
1066 TPad *outpad =
new TPad(
"extpad",
"extpad",0,0,1,1) ;
1067 TPad *pad1 =
new TPad(
"pad1",
"pad1",0,0,1,1) ;
1069 outpad->SetFillStyle(4000) ;
1084 stack->GetXaxis()->SetTitle(top1->GetXaxis()->GetTitle()) ;
1085 stack->GetYaxis()->SetTitle(top1->GetYaxis()->GetTitle()) ;
1087 stack->Draw(
"HIST") ;
1088 hist->Draw(
"PESAME") ;
1091 TLegend *
leg=
new TLegend(0.5,0.55,0.89,0.65) ;
1092 leg->SetBorderSize(0) ;
1093 leg->AddEntry(top1, top1->GetTitle(),
"F") ;
1094 leg->AddEntry(top2, top2->GetTitle(),
"F") ;
1095 leg->AddEntry(top3, top3->GetTitle(),
"F") ;
1101 c->Print((canvasname+
".eps").c_str()) ;
1108 bool logx=
false,
bool logy=
false,
1109 bool isrectangle=
true,
bool drawlabel=
true,
string label=
"",
1110 bool drawcmeandlumi=
false)
1119 TCanvas *
c =
new TCanvas(canvasname.c_str(),
"",
width, height) ;
1129 THStack *stack=
new THStack(
"stack",
"") ;
1135 TPad *outpad =
new TPad(
"extpad",
"extpad",0,0,1,1) ;
1136 TPad *pad1 =
new TPad(
"pad1",
"pad1",0,0,1,1) ;
1138 outpad->SetFillStyle(4000) ;
1153 stack->GetXaxis()->SetTitle(top1->GetXaxis()->GetTitle()) ;
1154 stack->GetYaxis()->SetTitle(top1->GetYaxis()->GetTitle()) ;
1156 stack->Draw(
"HIST") ;
1157 hist->Draw(
"PESAME") ;
1160 TLegend *
leg=
new TLegend(0.5,0.55,0.89,0.65) ;
1161 leg->SetBorderSize(0) ;
1162 leg->AddEntry(top1, top1->GetTitle(),
"F") ;
1163 leg->AddEntry(top2, top2->GetTitle(),
"F") ;
1164 leg->AddEntry(top3, top3->GetTitle(),
"F") ;
1165 leg->AddEntry(top4, top4->GetTitle(),
"F") ;
1171 c->Print((canvasname+
".eps").c_str()) ;
1178 bool logx=
false,
bool toplogy=
false,
bool bottomlogy=
false,
1179 bool drawlabel=
true,
string label=
"",
1180 bool drawcmeandlumi=
false)
1183 TCanvas *
c =
new TCanvas(canvasname.c_str(),
"", 800, 800) ;
1189 SetHistAttributes(bottom, 1, 2, 1, 1001, 1, 20, 1, 1, 0.1, 0.5, 0.1, 0.1, 0.5, 0.1) ;
1192 THStack *stack=
new THStack(
"stack",
"") ;
1196 TPad *outpad =
new TPad(
"extpad",
"extpad",0,0,1,1) ;
1197 TPad *pad1 =
new TPad(
"pad1",
"pad1",0,0.33,1,1) ;
1198 TPad *pad2 =
new TPad(
"pad2",
"pad2",0,0,1,0.33) ;
1200 outpad->SetFillStyle(4000) ;
1202 SetPadAttributes(pad2, 0, 0, 0.1, 0.1, 0.3, 0.00001, 0, logx, bottomlogy) ;
1217 stack->GetXaxis()->SetTitle(top1->GetXaxis()->GetTitle()) ;
1218 stack->GetYaxis()->SetTitle(top1->GetYaxis()->GetTitle()) ;
1220 stack->Draw(
"HIST") ;
1221 hist->Draw(
"PESAME") ;
1224 TLegend *
leg=
new TLegend(0.5,0.55,0.89,0.65) ;
1225 leg->SetBorderSize(0) ;
1226 leg->AddEntry(top1, top1->GetTitle(),
"F") ;
1227 leg->AddEntry(top2, top2->GetTitle(),
"F") ;
1232 bottom->Draw(
"PE") ;
1235 c->Print((canvasname+
".eps").c_str()) ;
1242 bool logx=
false,
bool toplogy=
false,
bool bottomlogy=
false,
1243 bool drawlabel=
true,
string label=
"",
1244 bool drawcmeandlumi=
false)
1247 TCanvas *
c =
new TCanvas(canvasname.c_str(),
"", 800, 800) ;
1254 SetHistAttributes(bottom, 1, 2, 1, 1001, 1, 20, 1, 1, 0.1, 0.5, 0.1, 0.1, 0.5, 0.1) ;
1257 THStack *stack=
new THStack(
"stack",
"") ;
1262 TPad *outpad =
new TPad(
"extpad",
"extpad",0,0,1,1) ;
1263 TPad *pad1 =
new TPad(
"pad1",
"pad1",0,0.33,1,1) ;
1264 TPad *pad2 =
new TPad(
"pad2",
"pad2",0,0,1,0.33) ;
1266 outpad->SetFillStyle(4000) ;
1283 stack->GetXaxis()->SetTitle(top1->GetXaxis()->GetTitle()) ;
1284 stack->GetYaxis()->SetTitle(top1->GetYaxis()->GetTitle()) ;
1286 stack->Draw(
"HIST") ;
1287 hist->Draw(
"PESAME") ;
1290 TLegend *
leg=
new TLegend(0.5,0.55,0.89,0.65) ;
1291 leg->SetBorderSize(0) ;
1292 leg->AddEntry(top1, top1->GetTitle(),
"F") ;
1293 leg->AddEntry(top2, top2->GetTitle(),
"F") ;
1298 bottom->Draw(
"PE") ;
1301 c->Print((canvasname+
".eps").c_str()) ;
1308 bool logx=
false,
bool toplogy=
false,
bool bottomlogy=
false,
1309 bool drawlabel=
true,
string label=
"",
1310 bool drawcmeandlumi=
false)
1313 TCanvas *
c =
new TCanvas(canvasname.c_str(),
"", 800, 800) ;
1321 SetHistAttributes(bottom, 1, 2, 1, 1001, 1, 20, 1, 1, 0.1, 0.5, 0.1, 0.1, 0.5, 0.1) ;
1324 THStack *stack=
new THStack(
"stack",
"") ;
1330 TPad *outpad =
new TPad(
"extpad",
"extpad",0,0,1,1) ;
1331 TPad *pad1 =
new TPad(
"pad1",
"pad1",0,0.33,1,1) ;
1332 TPad *pad2 =
new TPad(
"pad2",
"pad2",0,0,1,0.33) ;
1334 outpad->SetFillStyle(4000) ;
1351 stack->GetXaxis()->SetTitle(top1->GetXaxis()->GetTitle()) ;
1352 stack->GetYaxis()->SetTitle(top1->GetYaxis()->GetTitle()) ;
1353 stack->Draw(
"HIST") ;
1354 hist->Draw(
"PESAME") ;
1357 TLegend *
leg=
new TLegend(0.5,0.55,0.89,0.65) ;
1358 leg->SetBorderSize(0) ;
1359 leg->AddEntry(top1, top1->GetTitle(),
"F") ;
1360 leg->AddEntry(top2, top2->GetTitle(),
"F") ;
1365 bottom->Draw(
"PE") ;
1368 c->Print((canvasname+
".eps").c_str()) ;
1377 m_latex.SetTextSize(0.04) ;
1378 m_latex.SetTextColor(kBlack) ;
1379 m_latex.SetTextFont(42) ;
1380 if(isbold) m_latex.SetTextFont(22) ;
1381 m_latex.DrawLatex(xstart, ystart,
label.c_str()) ;
1384 #ifndef DrawATLASLabels_Func
1385 #define DrawATLASLabels_Func
1393 m_latex.SetTextSize(0.04) ;
1394 m_latex.SetTextColor(kBlack) ;
1395 m_latex.SetTextFont(72) ;
1397 m_latex.DrawLatex(xstart, ystart,
"ATLAS") ;
1399 m_latex.SetTextFont(42) ;
1400 float spacing = 0.13 ;
1406 m_latex.DrawLatex(xstart+spacing, ystart,
"Preliminary") ;
1409 m_latex.DrawLatex(xstart+spacing, ystart,
"Internal") ;
1412 m_latex.DrawLatex(xstart+spacing, ystart,
"Simulation Preliminary") ;
1415 m_latex.DrawLatex(xstart+spacing, ystart,
"Work in Progress") ;
1425 TPaveText *pavetext =
new TPaveText() ;
1426 pavetext->SetOption(
"brNDC") ;
1427 pavetext->SetFillColor(0) ;
1428 pavetext->SetFillStyle(0) ;
1429 pavetext->SetBorderSize(0) ;
1430 pavetext->SetTextAlign(11) ;
1431 pavetext->SetTextFont(42) ;
1432 pavetext->SetTextSize(0.03) ;
1433 pavetext->SetTextColor(kBlack) ;
1434 pavetext->SetX1NDC(xstart-0.01) ;
1435 pavetext->SetY1NDC(ystart-0.01) ;
1436 pavetext->SetX2NDC(xstart+0.25) ;
1437 pavetext->SetY2NDC(ystart+0.05) ;
1439 pavetext->AddText(0.04, 1./8., (
"#sqrt{s}="+CME+
", #intLdt="+lumiInFb+
"fb^{-1}").c_str()) ;
1449 TH1F *ratiohist = (
TH1F*) numeratorhist->Clone() ;
1450 ratiohist->Sumw2() ;
1451 ratiohist->SetName(
name.c_str()) ;
1452 ratiohist->SetTitle(
title.c_str()) ;
1453 ratiohist->GetXaxis()->SetTitle(xaxistitle.c_str()) ;
1454 ratiohist->GetYaxis()->SetTitle(yaxistitle.c_str()) ;
1456 ratiohist->Divide(denominatorhist) ;
1464 TH1F *ratiohist =
new TH1F(
name.c_str(),
title.c_str(), numeratorhist->GetNbinsX(), numeratorhist->GetXaxis()->GetXbins()->GetArray()) ;
1465 ratiohist->GetYaxis()->SetTitle(yaxistitle.c_str()) ;
1466 ratiohist->GetXaxis()->SetTitle(xaxistitle.c_str()) ;
1468 for(
int n=1 ;
n<=ratiohist->GetNbinsX() ;
n++)
1470 if(denominatorhist->GetBinError(
n)==0)
1471 ratiohist->SetBinContent(
n, 0.) ;
1474 float over = numeratorhist->GetBinError(
n)/denominatorhist->GetBinError(
n) ;
1475 ratiohist->SetBinContent(
n, over) ;
1483 return hist1->GetMaximum()>
hist2->GetMaximum() ;
1487 return p1.first->GetMaximum()>
p2.first->GetMaximum() ; ;