30int main(
int argc,
char **argv)
51 JParser<> zap(
"Auxiliary program to plot PDF of Cherenkov light from EM-shower using interpolation tables.");
55 zap[
'E'] =
make_field(E,
"shower energy [GeV]") = 1.0;
57 zap[
'c'] =
make_field(cd,
"cosine emission angle");
58 zap[
'D'] =
make_field(dir,
"(theta, phi) of PMT [rad]");
59 zap[
'T'] =
make_field(TTS_ns,
"PMT time smearing [ns]") = 0.0;
60 zap[
'N'] =
make_field(profile,
"steps shower profile") = 0;
61 zap[
'C'] =
make_field(cms,
"center shower profile");
67 catch(
const exception &error) {
68 FATAL(error.what() << endl);
79 const int N = inputFile.size();
86 for (
int i = 0; i != N; ++i) {
88 NOTICE(
"loading input from file " << inputFile[i] <<
"... " << flush);
90 type[i] = getPDFType(inputFile[i]);
92 pdf [i].load(inputFile[i].c_str());
94 pdf [i].setExceptionHandler(
new JFunction1D_t::JDefaultResult(
JMATH::zero));
104 FATAL(error.what() << endl);
110 for (
double dt; cin >> dt; ) {
112 for (
int i = 0; i != N; ++i) {
114 JFunction1D_t::result_type y = pdf[i](D, cd, dir.
getTheta(), dir.
getPhi(), dt);
116 cout << setw(2) << type[i] <<
' '
118 <<
FIXED(5,1) << D <<
' '
119 <<
FIXED(5,2) << cd <<
' '
122 <<
FIXED(5,1) << dt <<
' '
124 <<
SCIENTIFIC(9,3) << get_derivative(y) <<
' '
126 <<
SCIENTIFIC(9,3) << get_total_integral(y) << endl;
138 if (inputFile.size() == 1 &&
139 inputFile.begin()->find(getLabel(SCATTERED_LIGHT_FROM_EMSHOWER)) == string::npos) {
144 const double t0 = 0.0;
165 const double z0 = D0 * cd;
166 const double R = D0 * sqrt((1.0 + cd) * (1.0 - cd));
174 const double z1 = (cms ? geanz.getMaximum(E) :0.0);
176 W = 1.0 / (double) profile;
178 for (
double x = 0.5*W; x < 1.0; x += W) {
179 Z.push_back(geanz.getLength(E, x) - z1);
188 for (
int i = 1; i <= h0.GetNbinsX(); ++i) {
190 const double dt = h0.GetBinCenter(i) - t0;
194 for (
const double z1 : Z) {
196 const double z = z0 - z1;
201 const double t1 = dt - (z1 + (D - D0) * getIndexOfRefraction()) / C;
203 for (
int j = 0; j != N; ++j) {
208 <<
FIXED(7,2) << dt <<
' '
209 <<
FIXED(7,2) << z1 <<
' '
210 <<
FIXED(7,2) << t1 <<
' '
215 h0.SetBinContent(i, get_value(Y));