195 {
197 double mean_error;
199 double rms_error;
201
203 if(offset != 0)
options =
"Psame";
207 histo->GetYaxis()->SetTitle(
"Fraction of pixel clusters");
208 histo->GetXaxis()->SetTitle(
"Residual [#mum]");
209 std::ostringstream LegendString1;
210 LegendString1.flags(std::ios::fixed);
211 LegendString1 <<
name <<
" - ";
212 int precision = 1-int(log10(rms_error));
213 if(precision < 0) precision = 0;
214 LegendString1.precision(precision);
215 LegendString1 <<
"RMS: " <<
rms <<
" #pm " << rms_error <<
" #mum" <<
" - ";
216 precision = 1-int(log10(mean_error));
217 if(precision < 0) precision = 0;
218 LegendString1.precision(precision);
219 LegendString1 <<
"Mean: " <<
mean <<
" #pm " << mean_error <<
" #mum" <<
" - ";
221}
void GetCoreParameters(const TH1 *hist, double &mean, double &mean_error, double &rms, double &rms_error, double &nentries)
void DrawLegendLatex(const char *chartitle, int markertype, float x, float y, int color=1, float textsize=0.034)
TH1 * DrawHisto(const char *name, const char *options="", int color=1, int marker=20, float offset=0)
void mean(std::vector< double > &bins, std::vector< double > &values, const std::vector< std::string > &files, const std::string &histname, const std::string &tplotname, const std::string &label="")