81{
83
86 int number_of_points;
87 double epsilon;
88 double D;
89 double ct;
91 double wavelength;
92 double absorptionLength;
93 double scatteringLength;
95
96 try {
97
98 JParser<> zap(
"Example program to draw PDF from LED beacon.");
99
104 zap[
'A'] =
make_field(absorptionLength) = 50.0;
105 zap[
'S'] =
make_field(scatteringLength) = 50.0;
111
112 zap(argc, argv);
113 }
114 catch(const exception &error) {
115 FATAL(error.what() << endl);
116 }
117
118
119 const double theta = dir.first;
120 const double phi = dir.second;
121
123
124
125
126 const double P_atm = 240.0;
127 const double tmin = -10.0;
128 const double tmax = +10.0;
129 const double A = 440e-4;
130 const double R_Hz = 0.0e3;
131
133
134
137
138 const double cs = 0.83 * 0.92;
139
142 const double l_att = l_abs *
lr / (l_abs +
lr);
143
144
146
147 cout <<
"Rayleigh scattering length " <<
lr <<
" m" <<
endl;
148 cout <<
"Mie scattering length " <<
lm <<
" m" <<
endl;
149 cout <<
"Absorption length " << l_abs <<
" m" <<
endl;
150
153 led,
154 ANTARES::getQE,
156 l_abs,
158 henyey_greenstein,
160 wavelength,
161 tmin,
162 tmax,
165 epsilon);
166
167
170 led,
171 ANTARES::getQE,
175 rayleigh,
177 wavelength,
178 tmin,
179 tmax,
182 epsilon);
183
184
186
187 TH1D h0(
"h0",
NULL, 430, -15.0, +200.0);
188 TH1D h1(
"h1",
NULL, 430, -15.0, +200.0);
189 TH1D h2(
"h2",
NULL, 430, -15.0, +200.0);
192
195
196
197 for (int i = 1; i <= h1.GetNbinsX(); ++i) {
198
199 const double t1 = h1.GetBinCenter(i);
200
201 const double F1 =
pdfMie .getDirectLightFromLED (D, ct, theta, phi, t1);
202 const double F2 =
pdfMie .getScatteredLightFromLED(D, ct, theta, phi, t1);
203 const double F3 =
pdfRayleigh.getScatteredLightFromLED(D, ct, theta, phi, t1);
204
205
206 h0.SetBinContent(i,
F1 +
F2 +
F3);
207 h1.SetBinContent(i,
F1);
208 h2.SetBinContent(i,
F2);
209 h3.SetBinContent(i,
F3);
210
215
217 }
218
219 f1.compile();
220
221 for (int i = 3; i != sizeof(f)/sizeof(f[0]); ++i) {
222
223 f[i].compile();
224
226
227
228 const double lz = l_abs *
ls / (l_abs*(1.0-cs) +
ls);
229
231
240 }
241
242
243 const double Tmin =
ha.GetXaxis()->GetXmin();
244 const double Tmax =
ha.GetXaxis()->GetXmax();
245
246 const double V = f1.rbegin()->getIntegral() + R_Hz * 1e-9 * (Tmax - Tmin);
247
248 for (
int i = 1; i <=
ha.GetNbinsX(); ++i) {
249
250 const double t1 =
ha.GetBinCenter(i);
251
252 JSplineFunction1S_t::result_type p = f1(t1);
253
254 double v = p.v + R_Hz * 1e-9 * (t1 - Tmin);
255 double y = p.f + R_Hz * 1e-9;
256
257 const double W =
exp(-v) *
y / (1.0 -
exp(-V));
258
259 ha.SetBinContent(i,W);
260 }
261
262 delete led;
263
264 out.Write();
265 out.Close();
266}
double getAngularAcceptance(const double x)
Angular acceptence of PMT.
#define DEBUG(A)
Message macros.
#define make_field(A,...)
macro to convert parameter to JParserTemplateElement object
Template definition of a multi-dimensional oscillation probability interpolation table.
Utility class to parse command line options.
Implementation of dispersion for water in deep sea.
Probability Density Functions of the time response of a PMT (C-like interface)
Light yield from LED (number of p.e.
This name space includes all other name spaces (except KM3NETDAQ, KM3NET and ANTARES).
Auxiliary data structure to list files in directory.