28int main(
int argc,
char **argv)
46 JParser<> zap(
"Program to plot PDF of Cherenkov light from bright point using interpolation tables.");
50 zap[
'E'] =
make_field(E,
"shower energy [GeV]") = 1.0;
53 zap[
'T'] =
make_field(TTS_ns,
"PMT time smearing [ns]") = 0.0;
59 catch(
const exception &error) {
60 FATAL(error.what() << endl);
70 const int N = inputFile.size();
77 for (
int i = 0; i != N; ++i) {
79 NOTICE(
"loading input from file " << inputFile[i] <<
"... " << flush);
81 type[i] = getPDFType(inputFile[i]);
83 pdf [i].load(inputFile[i].c_str());
85 pdf [i].setExceptionHandler(
new JFunction1D_t::JDefaultResult(
JMATH::zero));
95 FATAL(error.what() << endl);
101 cout <<
"enter time (^C to exit) > " << flush;
103 for (
double dt; cin >> dt; ) {
105 for (
int i = 0; i != N; ++i) {
107 JFunction1D_t::result_type y = pdf[i](D, ct, dt);
109 cout << setw(2) << type[i] <<
' '
111 <<
FIXED(5,1) << D <<
' '
112 <<
FIXED(5,2) << ct <<
' '
113 <<
FIXED(5,1) << dt <<
' '
115 <<
SCIENTIFIC(9,3) << get_derivative(y) <<
' '
117 <<
SCIENTIFIC(9,3) << get_total_integral(y) << endl;
129 if (inputFile.size() == 1 &&
130 inputFile.begin()->find(getLabel(SCATTERED_LIGHT_FROM_BRIGHT_POINT)) == string::npos) {
135 const double t0 = 0.0;
155 for (
int i = 1; i <= h0.GetNbinsX(); ++i) {
157 const double dt = h0.GetBinCenter(i) - t0;
161 for (
int j = 0; j != N; ++j) {
162 Y += pdf[j](D, ct, dt) * E;
165 h0.SetBinContent(i, get_value(Y));
Various implementations of functional maps.
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
int main(int argc, char **argv)
I/O formatting auxiliaries.
Utility class to parse command line options.
Multi-dimensional PDF table for arrival time of Cherenkov light.
static const JZero zero
Function object to assign zero value.
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.