26int main(
int argc,
char **argv)
40 JParser<> zap(
"Example program to histogram energy corrections.");
44 zap[
'x'] =
make_field(X,
"axis range in log(E/GeV)");
49 catch(
const exception& error) {
50 FATAL(error.what() << endl);
54 JManager<string, TH1D> zmap(
new TH1D(
"h[%]", NULL, 1000, X.getLowerLimit(), X.getUpperLimit()));
56 for (vector<string>::const_iterator f1 = energy_correction.begin(); f1 != energy_correction.end(); ++f1) {
60 DEBUG(getFilename(*f1) << endl << correct << endl);
62 for (
int i = 1; i <= zmap->GetNbinsX(); ++i) {
64 const double x = zmap->GetBinCenter (i);
65 const double E = pow(10.0, x);
66 const double y = pow(10.0, correct(x)) / E;
70 zmap[getFilename(*f1)]->SetBinContent(i, y);