30 static const double a = 0.924;
38 static const double a = 0.853;
65 const double dt)
const
69 static const double sigma = 2.0;
71 const double x = dt / sigma;
73 return exp(-0.5*x*x) / (sigma*sqrt(2*
PI)) / (4*
PI);
96 int main(
int argc,
char **argv)
102 int number_of_points;
108 double absorptionLength;
109 double scatteringLength;
114 JParser<> zap(
"Example program to draw PDF from LED beacon.");
120 zap[
'A'] =
make_field(absorptionLength) = 50.0;
121 zap[
'S'] =
make_field(scatteringLength) = 50.0;
130 catch(
const exception &error) {
131 FATAL(error.what() << endl);
135 const double theta = dir.first;
136 const double phi = dir.second;
142 const double P_atm = 240.0;
143 const double tmin = -10.0;
144 const double tmax = +10.0;
145 const double A = 440e-4;
146 const double R_Hz = 0.0e3;
148 const JDispersion dispersion(P_atm);
151 const double lm = scatteringLength / 0.83;
152 const double lr = scatteringLength / 0.17;
154 const double cs = 0.83 * 0.92;
156 const double l_abs = absorptionLength;
157 const double ls = scatteringLength;
158 const double l_att = l_abs * lr / (l_abs + lr);
163 cout <<
"Rayleigh scattering length " << lr <<
" m" << endl;
164 cout <<
"Mie scattering length " << lm <<
" m" << endl;
165 cout <<
"Absorption length " << l_abs <<
" m" << endl;
179 JCotangent(number_of_points),
196 JCotangent(number_of_points),
204 TH1D h0(
"h0", NULL, 430, -15.0, +200.0);
205 TH1D h1(
"h1", NULL, 430, -15.0, +200.0);
206 TH1D h2(
"h2", NULL, 430, -15.0, +200.0);
207 TH1D h3(
"h3", NULL, 430, -15.0, +200.0);
208 TH1D ha(
"ha", NULL, 430, -15.0, +200.0);
210 JSplineFunction1S_t f[4];
211 JSplineFunction1S_t f1;
214 for (
int i = 1; i <= h1.GetNbinsX(); ++i) {
216 const double t1 = h1.GetBinCenter(i);
218 const double F1 = pdfMie .getDirectLightFromLED (D, ct, theta, phi, t1);
219 const double F2 = pdfMie .getScatteredLightFromLED(D, ct, theta, phi, t1);
220 const double F3 = pdfRayleigh.getScatteredLightFromLED(D, ct, theta, phi, t1);
223 h0.SetBinContent(i, F1 + F2 + F3);
224 h1.SetBinContent(i, F1);
225 h2.SetBinContent(i, F2);
226 h3.SetBinContent(i, F3);
231 f[3][t1] = F1 + F2 + F3;
233 f1[t1] = F1 + F2 + F3;
238 for (
int i = 3; i !=
sizeof(f)/
sizeof(f[0]); ++i) {
242 JQuantiles quantiles(f[i]);
245 const double lz = l_abs * ls / (l_abs*(1.0-cs) + ls);
247 NOTICE(
"int " << quantiles.getIntegral() * D*D * exp(D/lz) << endl);
249 DEBUG(
"D " << D << endl);
250 DEBUG(
"ct " << ct << endl);
251 DEBUG(
"theta " << theta << endl);
252 DEBUG(
"phi " << phi << endl);
253 DEBUG(
"int " << quantiles.getIntegral() << endl);
254 DEBUG(
"t1 " << quantiles.getX() << endl);
255 DEBUG(
"max " << quantiles.getY() << endl);
256 DEBUG(
"FWHM " << quantiles.getFWHM() << endl);
260 const double Tmin = ha.GetXaxis()->GetXmin();
261 const double Tmax = ha.GetXaxis()->GetXmax();
263 const double V = f1.rbegin()->getIntegral() + R_Hz * 1e-9 * (Tmax - Tmin);
265 for (
int i = 1; i <= ha.GetNbinsX(); ++i) {
267 const double t1 = ha.GetBinCenter(i);
269 JSplineFunction1S_t::result_type p = f1(t1);
271 double v = p.v + R_Hz * 1e-9 * (t1 - Tmin);
272 double y = p.f + R_Hz * 1e-9;
274 const double W = exp(-v) * y / (1.0 - exp(-V));
276 ha.SetBinContent(i,W);
Utility class to parse command line options.
std::istream & operator>>(std::istream &in, JHead &header)
Read header from input.
double rayleigh(const double ct)
double getQE(const double lambda, const bool option)
Quantum efficiency of 10-inch Hamamatsu PMT.
Optical properties of Antares deep-sea site.
Interface for emission profile from LED.
Light yield from LED (number of p.e.
double getLightFromLED(const double ct, const double phi, const double dt) const
Light yield from LED (number of p.e.
Optical properties of KM3NeT deep-sea site.
#define make_field(A,...)
macro to convert parameter to JParserTemplateElement object
double henyey_greenstein(const double g, const double x)
Auxiliary method to describe light scattering in water (Heneyey-Greenstein)
General purpose messaging.
Utility class to parse command line options.
double getAngularAcceptance(const double x)
Angular acceptence of Antares PMT.
double henyey_greenstein(const double ct)
std::pair< double, double > orientation
double rayleigh(const double a, const double x)
Auxiliary method to describe light scattering in water (Rayleigh)
#define DEBUG(A)
Message macros.
double getAngularAcceptance(const double x)
Angular acceptence of PMT.
int main(int argc, char *argv[])