30int main(
int argc,
char **argv)
51 JParser<> zap(
"Auxiliary program to plot PDF of Cherenkov light from EM-shower using interpolation tables.");
59 zap[
'T'] =
make_field(TTS_ns,
"PMT time smearing [ns]") = 0.0;
67 catch(
const exception &error) {
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));
110 cout <<
"enter time (^C to exit) > " << flush;
114 for (
int i = 0; i != N; ++i) {
120 <<
FIXED(5,1) << D <<
' '
126 <<
SCIENTIFIC(9,3) << get_derivative(y) <<
' '
140 if (inputFile.size() == 1 &&
141 inputFile.begin()->find(getLabel(SCATTERED_LIGHT_FROM_EMSHOWER)) == string::npos) {
146 const double t0 = 0.0;
167 const double z0 = D0 *
cd;
168 const double R = D0 * sqrt((1.0 +
cd) * (1.0 -
cd));
176 const double z1 = (
cms ? geanz.getMaximum(E) :0.0);
180 for (
double x = 0.5*W; x < 1.0; x += W) {
181 Z.push_back(geanz.getLength(E, x) -
z1);
190 for (
int i = 1; i <= h0.GetNbinsX(); ++i) {
192 const double dt = h0.GetBinCenter(i) - t0;
196 for (
const double z1 : Z) {
198 const double z = z0 -
z1;
203 const double t1 =
dt - (
z1 + (D - D0) * getIndexOfRefraction()) / C;
205 for (
int j = 0; j != N; ++j) {
212 <<
FIXED(7,2) << t1 <<
' '
217 h0.SetBinContent(i, get_value(Y));