32int main(
int argc,
char **argv)
43 JParser<> zap(
"Program to add multi-dimensional histograms of shower light");
49 if (zap.
read(argc, argv) != 0)
52 catch(
const exception &error) {
53 FATAL(error.what() << endl);
71 h1.transformer.reset(
new JFunction5DTransformer_t());
75 for(vector<string>::const_iterator file_name = inputFile.begin(); file_name != inputFile.end(); ++file_name) {
77 NOTICE(
"loading input from file " << *file_name <<
"... " << flush);
88 p1.transformer.reset(
new JFunction5DTransformer_t());
90 for(JMultiHistogram_t* p : { &p0, &
p1 }) {
100 double integral1 = 0.0;
101 double integral2 = 0.0;
103 for(JMultiHistogram_t::super_iterator
104 i0 = h0.super_begin(), i1 = h1.super_begin(),
105 j0 = p0.super_begin(), j1 =
p1.super_begin(); i1 != h1.super_end(); ++i0, ++i1, ++j0, ++j1) {
107 integral1 += i0.getValue().getIntegral();
109 i0.getValue().add(j0.getValue());
110 i1.getValue().add(j1.getValue());
112 integral2 += i0.getValue().getIntegral();
117 for(JMultiHistogram_t* p : { &h0, &h1 }) {
137 for (
const JMultiHistogram_t* p : { &h0, &h1 }) {
142 NOTICE(
"JAddHDE done." << endl);