33 int main(
int argc,
char **argv)
39 string fileDescriptor;
44 JParser<> zap(
"Program to convert multi-dimensional histograms of shower light to multi-dimensional PDFs.");
47 zap[
'o'] =
make_field(fileDescriptor) =
"J%p.dat";
52 catch(
const exception &error) {
53 FATAL(error.what() << endl);
58 FATAL(
"error file descriptor " << fileDescriptor << endl);
74 h1.transformer.reset(
new JFunction4DTransformer_t());
78 NOTICE(
"Loading in input, " << flush);
82 for (JMultiHistogram_t* p : { &h0, &h1 }) {
92 for (JMultiHistogram_t::super_iterator
93 i0 = h0.super_begin(),
94 i1 = h1.super_begin(); i1 != h1.super_end(); ++i0, ++i1) {
96 const double W = i0.getValue().getIntegral();
103 int number_of_bins = (int) (2 +
u.getDot(
v));
106 i1.getValue().div(W);
116 const JMultiHistogram_t& value;
128 NOTICE(
"storing output to file " << file_name <<
"... " << flush);
130 const JPDF_t pdf(h1);
132 pdf.store(file_name.c_str());
137 FATAL(error.what() << endl);
Various implementations of functional maps.
int main(int argc, char **argv)
General purpose messaging.
Numbering scheme for PDF types.
Utility class to parse command line options.
#define make_field(A,...)
macro to convert parameter to JParserTemplateElement object
Data structure for angles in three dimensions.
Data structure for direction in three dimensions.
Binary buffered file input.
JReader & load(JSerialisable &object)
Read object.
Utility class to parse command line options.
Multi-dimensional PDF table for arrival time of Cherenkov light.
std::string getFilename(const std::string &file_name)
Get file name part, i.e. part after last JEEP::PATHNAME_SEPARATOR if any.
bool hasWildCard(const std::string &file_name)
Check presence of wild card.
double getCosThetaC()
Get average cosine of Cherenkov angle of water corresponding to group velocity.
double getSinThetaC()
Get average sine of Cherenkov angle of water corresponding to group velocity.
@ DIRECT_LIGHT_FROM_EMSHOWER
direct light from EM shower
This name space includes all other name spaces (except KM3NETDAQ, KM3NET and ANTARES).