31{
34
36
39 double E;
40 double D;
43 double TTS_ns;
48
49 try {
50
51 JParser<> zap(
"Auxiliary program to plot PDF of Cherenkov light from EM-shower using interpolation tables.");
52
59 zap[
'T'] =
make_field(TTS_ns,
"PMT time smearing [ns]") = 0.0;
64
66 }
67 catch(const exception &error) {
69 }
70
71
78
79 const int N = inputFile.size();
80
81 int type[N];
82 JPDF_t pdf [N];
83
84 try {
85
86 for (int i = 0; i != N; ++i) {
87
88 NOTICE(
"loading input from file " << inputFile[i] <<
"... " << flush);
89
91
92 pdf [i].load(inputFile[i].c_str());
93
94 pdf [i].setExceptionHandler(
new JFunction1D_t::JDefaultResult(
JMATH::zero));
95
96 if (TTS_ns > 0.0) {
97 pdf[i].blur(TTS_ns);
98 }
99
101 }
102 }
105 }
106
107
109
110 cout <<
"enter time (^C to exit) > " << flush;
111
113
114 for (int i = 0; i != N; ++i) {
115
117
120 <<
FIXED(5,1) << D <<
' '
129 }
130 }
131
132 return 0;
133 }
134
135
137
138 int function = 0;
139
140 if (inputFile.size() == 1 &&
141 inputFile.begin()->find(
getLabel(SCATTERED_LIGHT_FROM_EMSHOWER)) == string::npos) {
142 function = 1;
143 }
144
145
146 const double t0 = 0.0;
147
149
150 if (function == 1) {
151
153
155
156 } else {
157
159
161 }
162 }
163
165
166 const double D0 = D;
167 const double z0 = D0 *
cd;
168 const double R = D0 * sqrt((1.0 +
cd) * (1.0 -
cd));
169
170 double W = 1.0;
171
173
175
176 const double z1 = (
cms ? geanz.getMaximum(E) :0.0);
177
179
180 for (
double x = 0.5*W;
x < 1.0;
x += W) {
181 Z.push_back(geanz.getLength(E, x) -
z1);
182 }
183
184 } else {
185
186 W = 1.0;
187 Z = { 0.0 };
188 }
189
190 for (int i = 1; i <= h0.GetNbinsX(); ++i) {
191
192 const double dt = h0.GetBinCenter(i) - t0;
193
195
196 for (
const double z1 : Z) {
197
198 const double z = z0 -
z1;
199
200 D = sqrt(R*R + z*z);
202
203 const double t1 =
dt - (
z1 + (D - D0) * getIndexOfRefraction()) / C;
204
205 for (
int j = 0;
j != N; ++
j) {
207 }
208
212 <<
FIXED(7,2) << t1 <<
' '
214 }
216
217 h0.SetBinContent(i, get_value(Y));
218 }
219
220 out.Write();
221 out.Close();
222}
#define DEBUG(A)
Message macros.
#define make_field(A,...)
macro to convert parameter to JParserTemplateElement object
Data structure for angles in three dimensions.
double getTheta() const
Get theta angle.
double getPhi() const
Get phi angle.
virtual const char * what() const override
Get error message.
Template definition of a multi-dimensional oscillation probability interpolation table.
Utility class to parse command line options.
std::string getLabel(const JLocation &location)
Get module label for monitoring and other applications.
static const JZero zero
Function object to assign zero value.
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.