73 |
|
|
74 |
|
} |
75 |
|
|
76 |
– |
struct HistoDescription |
77 |
– |
{ |
78 |
– |
unsigned int linecolor; |
79 |
– |
std::string algoName; |
80 |
– |
}; |
81 |
– |
|
82 |
– |
|
76 |
|
|
77 |
|
void Layout::Draw(const std::vector<HistoBlock>& histos, |
78 |
< |
std::string& xlabel, float K, float MU, float SIG) |
78 |
> |
const std::string& xlabel, float K, float MU, float SIG) |
79 |
|
{ |
80 |
|
// safety |
81 |
|
if (histos.empty()) return; |
88 |
|
// SetLineColor |
89 |
|
for (unsigned int i=0;i<histos.size();i++) |
90 |
|
{ |
91 |
+ |
std::cout << "TEST : " << histos[i].linecolor << std::endl; |
92 |
|
histos[i].histo->SetLineColor( histos[i].linecolor ); |
93 |
|
} |
94 |
|
|
119 |
|
// To Fit |
120 |
|
for (unsigned int i=0;i<histos.size();i++) |
121 |
|
{ |
122 |
< |
TF1* fitter = new TF1(dummy().c_str(),dummy().c_str(),xmin,xmax); |
122 |
> |
TF1* fitter = new TF1(dummy().c_str(),"gaus",xmin,xmax); |
123 |
|
fitter->SetParameter(0,K); |
124 |
|
fitter->SetParameter(1,MU); |
125 |
|
fitter->SetParameter(2,SIG); |
126 |
< |
histos[i].histo->Fit(fitter,"R+"); |
126 |
> |
histos[i].histo->Fit(fitter,"0"); |
127 |
|
} |
128 |
|
|
129 |
|
// Save |
130 |
|
std::string filename = GetFileName(histos[0].histo->GetTitle()); |
131 |
|
mycanvas->SaveAs((filename+".gif").c_str()); |
132 |
+ |
mycanvas->SaveAs((filename+".root").c_str()); |
133 |
+ |
|
134 |
|
} |
135 |
|
|