33 int main(
int argc,
char **argv)
43 JParser<> zap(
"Program to convert multi-dimensional histograms of shower light to multi-dimensional PDFs.");
51 catch(
const exception &error) {
52 FATAL(error.what() << endl);
59 JMAPLIST<JHistogramMap_t,
63 JHistogramGridMap_t>::maplist> JMultiHistogram_t;
65 typedef JPDFTransformer<5, abscissa_type> JFunction5DTransformer_t;
70 h1.transformer.reset(
new JFunction5DTransformer_t());
74 NOTICE(
"Loading in input, " << flush);
76 JFileStreamReader
in(inputFile.c_str());
78 for (JMultiHistogram_t* buffer[] = { &h0, &
h1, NULL }, **i = buffer; *i != NULL; ++i) {
88 for (JMultiHistogram_t::super_iterator
89 i0 = h0.super_begin(),
90 i1 =
h1.super_begin(); i1 !=
h1.super_end(); ++i0, ++i1) {
92 const double W = i0.getValue().getIntegral();
96 const JDirection3D
u(JAngle3D(i0->second->second->first, i0->second->second->second->first));
99 int number_of_bins = (int) (2 + u.getDot(v));
102 i1.getValue().div(W);
110 const JMultiHistogram_t& value;
113 typedef JPDFTable<JPolint1Function1D_t,
114 JMAPLIST<JPolint1FunctionalMap,
115 JPolint1FunctionalMap,
116 JPolint1FunctionalMap,
117 JPolint1FunctionalGridMap,
118 JPolint1FunctionalGridMap>::maplist> JPDF_t;
123 const JPDF_t pdf(
h1);
129 catch(
const JException& error) {
130 FATAL(error.what() << endl);
132 NOTICE(
"JMakeHDE done." << endl);
Utility class to parse command line options.
esac print_variable DETECTOR INPUT_FILE OUTPUT_FILE CDF for TYPE in
then for HISTOGRAM in h0 h1
Various implementations of functional maps.
Numbering scheme for PDF types.
#define make_field(A,...)
macro to convert parameter to JParserTemplateElement object
General purpose messaging.
Utility class to parse command line options.
int main(int argc, char *argv[])