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* p : { &h0, &
h1 }) {
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.
then for HISTOGRAM in h0 h1
Various implementations of functional maps.
Numbering scheme for PDF types.
double getCosThetaC()
Get average cosine of Cherenkov angle of water corresponding to group velocity.
#define make_field(A,...)
macro to convert parameter to JParserTemplateElement object
General purpose messaging.
Utility class to parse command line options.
then fatal Wrong number of arguments fi set_variable DETECTOR $argv[1] set_variable INPUT_FILE $argv[2] eval JPrintDetector a $DETECTOR O IDENTIFIER eval JPrintDetector a $DETECTOR O SUMMARY source JAcoustics sh $DETECTOR_ID typeset A TRIPODS get_tripods $WORKDIR tripod txt TRIPODS for EMITTER in
double getSinThetaC()
Get average sine of Cherenkov angle of water corresponding to group velocity.
int main(int argc, char *argv[])