Example program to histogram energy corrections.
More...
#include <string>
#include <iostream>
#include <iomanip>
#include "TROOT.h"
#include "TFile.h"
#include "TH1D.h"
#include "JReconstruction/JEvtToolkit.hh"
#include "JReconstruction/JEnergyCorrection.hh"
#include "JROOT/JManager.hh"
#include "JTools/JRange.hh"
#include "JLang/JManip.hh"
#include "Jeep/JeepToolkit.hh"
#include "Jeep/JParser.hh"
#include "Jeep/JMessage.hh"
Go to the source code of this file.
|
| int | main (int argc, char **argv) |
| |
Example program to histogram energy corrections.
- Author
- mdejong
Definition in file examples/JReconstruction/JEnergyCorrection.cc.
◆ main()
| int main |
( |
int | argc, |
|
|
char ** | argv ) |
Definition at line 26 of file examples/JReconstruction/JEnergyCorrection.cc.
27{
30
32
35 JRange_t X;
37
38 try {
39
40 JParser<> zap(
"Example program to histogram energy corrections.");
41
46
48 }
49 catch(const exception& error) {
51 }
52
53
54 JManager<string, TH1D> zmap(
new TH1D(
"h[%]",
NULL, 1000, X.getLowerLimit(), X.getUpperLimit()));
55
57
59
61
62 for (int i = 1; i <= zmap->GetNbinsX(); ++i) {
63
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;
67
69
70 zmap[getFilename(*f1)]->SetBinContent(i, y);
71 }
72 }
73
75}
#define DEBUG(A)
Message macros.
#define make_field(A,...)
macro to convert parameter to JParserTemplateElement object
Template definition of a multi-dimensional oscillation probability interpolation table.
Utility class to parse command line options.
Auxiliary class for correction of energy determined by JEnergy.cc.
T pow(const T &x, const double y)
Power .
This name space includes all other name spaces (except KM3NETDAQ, KM3NET and ANTARES).
Auxiliary data structure for floating point format specification.
Auxiliary data structure for floating point format specification.