29 int main(
int argc,
char **argv)
48 JParser<> zap(
"Program to plot PDF of Cherenkov light from EM-shower or scattered light from muon using interpolation tables.");
52 zap[
'E'] =
make_field(E,
"shower energy [GeV]") = 1.0;
54 zap[
'c'] =
make_field(cd,
"cosine emission angle");
55 zap[
'D'] =
make_field(dir,
"(theta, phi) of PMT [rad]");
56 zap[
'T'] =
make_field(TTS_ns,
"PMT time smearing [ns]") = 0.0;
62 catch(
const exception &error) {
63 FATAL(error.what() << endl);
74 const int N = inputFile.size();
81 for (
int i = 0; i != N; ++i) {
83 NOTICE(
"loading input from file " << inputFile[i] <<
"... " << flush);
87 pdf [i].load(inputFile[i].c_str());
89 pdf [i].setExceptionHandler(
new JFunction1D_t::JDefaultResult(
JMATH::zero));
99 FATAL(error.what() << endl);
105 for (
double dt; cin >> dt; ) {
107 for (
int i = 0; i != N; ++i) {
109 JFunction1D_t::result_type
y = pdf[i](D, cd, dir.
getTheta(), dir.
getPhi(), dt);
111 cout << setw(2) << type[i] <<
' '
113 <<
FIXED(5,1) << D <<
' '
114 <<
FIXED(5,2) << cd <<
' '
117 <<
FIXED(5,1) << dt <<
' '
133 if (inputFile.size() == 1 &&
139 const double t0 = 0.0;
159 for (
int i = 1; i <= h0.GetNbinsX(); ++i) {
161 const double dt = h0.GetBinCenter(i) - t0;
165 for (
int j = 0;
j != N; ++
j) {
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.
Data structure for angles in three dimensions.
double getTheta() const
Get theta angle.
double getPhi() const
Get phi angle.
Utility class to parse command line options.
Multi-dimensional PDF table for arrival time of Cherenkov light.
JAbstractHistogram< double > JHistogram_t
Type definition for scan along axis.
std::string getLabel(const JLocation &location)
Get module label for monitoring and other applications.
static const JZero zero
Function object to assign zero value.
@ SCATTERED_LIGHT_FROM_EMSHOWER
scattered light from EM shower
int getPDFType(const std::string &file_name)
Get PDF type.
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.