17 |
|
gStyle->SetFrameBorderMode(0); |
18 |
|
gStyle->SetFrameBorderSize(0); |
19 |
|
gStyle->SetFrameFillColor(0); |
20 |
< |
gStyle->SetOptStat(0); |
20 |
> |
// gStyle->SetOptStat(0); |
21 |
|
|
22 |
|
gStyle->SetLabelOffset(0.005,"X"); |
23 |
|
gStyle->SetLabelSize(0.03,"X"); |
75 |
|
} |
76 |
|
|
77 |
|
|
78 |
< |
void Layout::Draw(const std::vector<HistoBlock>& histos, |
78 |
> |
void Layout::Draw(const std::string title, const std::vector<HistoBlock>& histos, |
79 |
|
const std::string& xlabel, bool fit, float K, float MU, float SIG) |
80 |
|
{ |
81 |
|
std::cout << "----------------- Draw : " << histos[0].histo->GetName() << std::endl; |
87 |
|
TCanvas* mycanvas = new TCanvas((std::string(histos[0].histo->GetName())+ |
88 |
|
"_canvas").c_str(), |
89 |
|
histos[0].histo->GetTitle()); |
90 |
– |
|
90 |
|
// SetLineColor |
91 |
|
for (unsigned int i=0;i<histos.size();i++) |
92 |
|
{ |
108 |
|
float xmax = mystack->GetXaxis()->GetXmin(); |
109 |
|
|
110 |
|
// Draw legend |
111 |
< |
TLegend* mylegend = new TLegend(0.40,0.85-(0.04*histos.size()),0.90,0.85); |
111 |
> |
TLegend* mylegend = new TLegend(0.55,0.90-(0.04*histos.size()),0.90,0.90); |
112 |
|
mylegend->SetFillColor(0); |
113 |
|
for (unsigned int i=0;i<histos.size();i++) |
114 |
|
{ |
153 |
|
} |
154 |
|
|
155 |
|
// Save |
156 |
< |
std::string filename = GetFileName(histos[0].histo->GetTitle()); |
156 |
> |
std::string filename = GetFileName(title); |
157 |
|
mycanvas->SaveAs((filename+".gif").c_str()); |
158 |
|
mycanvas->SaveAs((filename+".root").c_str()); |
159 |
|
|