Jpp 20.0.0-rc.2
the software that should make you happy
Loading...
Searching...
No Matches
KM3NeT.hh
Go to the documentation of this file.
1#ifndef __JPHYSICS__KM3NET__
2#define __JPHYSICS__KM3NET__
3
4#include <map>
5#include <cmath>
6
8
9#include "JMath/JConstants.hh"
10
12#include "JPhysics/JK40Rates.hh"
13
14
15/**
16 * \file
17 *
18 * Properties of %KM3NeT PMT and deep-sea water.
19 * \author mdejong
20 */
21namespace KM3NET {
22
26
27
28 /**
29 * Get K40 rates.
30 *
31 * This method returns an object with default values.\n
32 * The singles and multiples rates are based on Analysis e-log entry <a href="https://elog.km3net.de/Analysis/597">575</a>.\n
33 * A dark count of 700 Hz has been included in the singles rate.\n
34 * See also %KM3NeT internal <a href="https://simulation.pages.km3net.de/input_tables/Simulations_Description.pdf">note</a>.
35 *
36 * \return K40 rates [Hz]
37 */
38 inline const JK40Rates& getK40Rates()
39 {
40 static const JK40Rates rates_Hz(5200, { 568.0, 49.10, 5.48, 0.48});
41
42 return rates_Hz;
43 }
44
45
46 /**
47 * Get ambient pressure.
48 *
49 * \return pressure [Atm]
50 */
51 inline double getAmbientPressure()
52 {
53 return 240.0; // ambient pressure [Atm]
54 }
55
56
57 /**
58 * Get photo-cathode area of %KM3NeT PMT.
59 *
60 * \return photo-cathode area [m^2]
61 */
62 inline double getPhotocathodeArea()
63 {
64 using namespace JPP;
65
66 static const double R = 0.5*3.0*2.54; // photo-cathode radius [cm]
67
68 return PI * R*R * 1.0e-4; // photo-cathode area [m^2]
69 }
70
71
72 /**
73 * Get absorption length.
74 *
75 * \param lambda wavelength of light [nm]
76 * \return absorption length [m]
77 */
78 inline double getAbsorptionLength(const double lambda)
79 {
80 static JPolint1Function1D_t f1;
81
82 if (f1.empty()) {
83
84 f1[290] = 0.0;
85 f1[310] = 11.9;
86 f1[330] = 16.4;
87 f1[350] = 20.6;
88 f1[375] = 29.5;
89 f1[412] = 48.5;
90 f1[440] = 67.5;
91 f1[475] = 59.0;
92 f1[488] = 55.1;
93 f1[510] = 26.1;
94 f1[532] = 19.9;
95 f1[555] = 14.7;
96 f1[650] = 2.8;
97 f1[676] = 2.3;
98 f1[715] = 1.0;
99 f1[720] = 0.0;
100
101 f1.compile();
102
103 f1.setExceptionHandler(new JPolint1Function1D_t::JDefaultResult(0.0));
104 }
105
106 return f1(lambda);
107 }
108
109
110 /**
111 * Get scattering length.
112 *
113 * Use the Kopelevich model for spectral volume scattering functions.\n
114 * The model separates the contributions by:
115 * - pure_sea: pure sea water;
116 * - small_par: 'small' particles (size < 1 micro meter);
117 * - large_par: 'large' particles (size > 1 micro meter).
118 * Values are taken from reference C.D. Mobley "Light and Water", ISBN 0-12-502750-8, pag. 119.
119 *
120 *
121 * \param lambda wavelength of light [nm]
122 * \return scattering length [m]
123 */
124 inline double getScatteringLength(const double lambda)
125 {
126 static const double Vs = 0.0075;
127 static const double Vl = 0.0075;
128 static const double bw = 0.0017;
129 static const double bs = 1.340;
130 static const double bl = 0.312;
131
132 const double x = 550.0/lambda;
133
134 const double pure_sea = bw * pow(x, 4.3);
135 const double small_par = bs * Vs * pow(x, 1.7);
136 const double large_par = bl * Vl * pow(x, 0.3);
137
138 return 1.0 / (pure_sea + small_par + large_par);
139 }
140
141
142 /**
143 * Function to describe light scattering in water.
144 *
145 * \param x cosine scattering angle
146 * \return probability
147 */
148 inline double getScatteringProbability(const double x)
149 {
150 return JPHYSICS::p00075(x);
151 }
152
153
154 /**
155 * Get angular acceptance of %KM3NeT PMT.
156 *
157 * \param x cosine of angle of incidence
158 * \return probability
159 */
160 inline double getAngularAcceptance(const double x)
161 {
162 static JGridPolint1Function1D_t f1;
163
164 if (f1.empty()) {
165
166 f1[-1.00] = 1.621;
167 f1[-0.95] = 1.346;
168 f1[-0.90] = 1.193;
169 f1[-0.85] = 1.073;
170 f1[-0.80] = 0.973;
171 f1[-0.75] = 0.877;
172 f1[-0.70] = 0.790;
173 f1[-0.65] = 0.711;
174 f1[-0.60] = 0.640;
175 f1[-0.55] = 0.575;
176 f1[-0.50] = 0.517;
177 f1[-0.45] = 0.450;
178 f1[-0.40] = 0.396;
179 f1[-0.35] = 0.341;
180 f1[-0.30] = 0.295;
181 f1[-0.25] = 0.249;
182 f1[-0.20] = 0.207;
183 f1[-0.15] = 0.166;
184 f1[-0.10] = 0.128;
185 f1[-0.05] = 0.095;
186 f1[0.00] = 0.065;
187 f1[0.05] = 0.038;
188 f1[0.10] = 0.017;
189 f1[0.15] = 0.006;
190 f1[0.20] = 0.003;
191 f1[0.25] = 0.002;
192 f1[0.30] = 0.001;
193 f1[0.35] = 0.001;
194 f1[0.40] = 0.001;
195
196 f1.compile();
197
198 f1.setExceptionHandler(new JGridPolint1Function1D_t::JDefaultResult(0.0));
199 }
200
201 return f1(x);
202 }
203
204
205 /**
206 * Get quantum efficiency of %KM3NeT PMT.
207 *
208 * Note that the QE includes absorption in glass and gel as well as the collection efficiency.
209 *
210 * \param lambda wavelength of photon [nm]
211 * \return quantum efficiency
212 */
213 inline double getQE(const double lambda)
214 {
215 static JGridPolint1Function1D_t f1;
216 static const double cola = 1.0; // collection efficiency
217
218 if (f1.empty()) {
219
220 f1[270] = 0.0;
221 f1[275] = 0.0;
222 f1[280] = 0.0;
223 f1[285] = 0.0;
224 f1[290] = 0.0;
225 f1[295] = 0.1;
226 f1[300] = 0.1;
227 f1[305] = 0.9;
228 f1[310] = 1.8;
229 f1[315] = 4.6;
230 f1[320] = 7.4;
231 f1[325] = 11.3;
232 f1[330] = 15.2;
233 f1[335] = 18.1;
234 f1[340] = 21.0;
235 f1[345] = 22.4;
236 f1[350] = 23.7;
237 f1[355] = 24.5;
238 f1[360] = 25.3;
239 f1[365] = 25.8;
240 f1[370] = 26.3;
241 f1[375] = 26.2;
242 f1[380] = 26.0;
243 f1[385] = 26.6;
244 f1[390] = 27.1;
245 f1[395] = 26.9;
246 f1[400] = 26.8;
247 f1[405] = 26.5;
248 f1[410] = 26.3;
249 f1[415] = 26.0;
250 f1[420] = 25.7;
251 f1[425] = 25.6;
252 f1[430] = 25.4;
253 f1[435] = 25.1;
254 f1[440] = 24.9;
255 f1[445] = 24.5;
256 f1[450] = 24.1;
257 f1[455] = 23.5;
258 f1[460] = 22.9;
259 f1[465] = 22.1;
260 f1[470] = 21.3;
261 f1[475] = 20.6;
262 f1[480] = 19.9;
263 f1[485] = 19.5;
264 f1[490] = 19.1;
265 f1[495] = 18.8;
266 f1[500] = 18.5;
267 f1[505] = 18.1;
268 f1[510] = 17.7;
269 f1[515] = 16.8;
270 f1[520] = 15.9;
271 f1[525] = 14.3;
272 f1[530] = 12.7;
273 f1[535] = 11.5;
274 f1[540] = 10.2;
275 f1[545] = 9.5;
276 f1[550] = 8.7;
277 f1[555] = 8.1;
278 f1[560] = 7.6;
279 f1[565] = 7.2;
280 f1[570] = 6.8;
281 f1[575] = 6.4;
282 f1[580] = 6.0;
283 f1[585] = 5.6;
284 f1[590] = 5.1;
285 f1[595] = 4.8;
286 f1[600] = 4.4;
287 f1[605] = 4.0;
288 f1[610] = 3.6;
289 f1[615] = 3.3;
290 f1[620] = 3.0;
291 f1[625] = 2.7;
292 f1[630] = 2.3;
293 f1[635] = 2.1;
294 f1[640] = 1.9;
295 f1[645] = 1.7;
296 f1[650] = 1.5;
297 f1[655] = 1.4;
298 f1[660] = 1.2;
299 f1[665] = 1.0;
300 f1[670] = 0.9;
301 f1[675] = 0.7;
302 f1[680] = 0.6;
303 f1[685] = 0.5;
304 f1[690] = 0.4;
305 f1[695] = 0.3;
306 f1[700] = 0.2;
307 f1[705] = 0.1;
308 f1[710] = 0.0;
309
310 f1.compile();
311
312 f1.setExceptionHandler(new JGridPolint1Function1D_t::JDefaultResult(0.0));
313 }
314
315 return f1(lambda) * 0.01 * cola;
316 }
317
318
319 /**
320 * Get effective photo-cathode area of PMT.
321 *
322 * \param x cosine of angle of incidence
323 * \param lambda wavelength of photon [nm]
324 * \return photo-cathode area [m^2]
325 */
326 inline double getPhotocathodeArea2D(const double x, const double lambda)
327 {
328 return getPhotocathodeArea() * getQE(lambda) * getAngularAcceptance(x);
329 }
330}
331
332/**
333 * Name space for %KM3NeT with high-QE PMTs.
334 */
335namespace KM3NET_HIGHQE {
336
339
340
341 /**
342 * Get K40 rates.
343 *
344 * This method returns an object with default values.\n
345 * The singles and multiples rates are based on Analysis e-log entry <a href="https://elog.km3net.de/Analysis/597">575</a>.\n
346 * They have been scaled with the outputs of JRateK40.cc and JMultiplicityK40.cc for the standard and high-QE PMT, respectively using script JPrintK40Rates.sh
347 * (see GIT issue <a href="https://git.km3net.de/common/jpp/-/issues/351">351</a>).
348 *
349 * \return K40 rates [Hz]
350 */
351 inline const JK40Rates& getK40Rates()
352 {
353 static const JK40Rates rates_Hz(8529, { 1014.4, 103.77, 15.44, 1.44});
354
355 return rates_Hz;
356 }
357
358
359 /**
360 * Get ambient pressure.
361 *
362 * \return pressure [Atm]
363 */
364 inline double getAmbientPressure()
365 {
366 return KM3NET::getAmbientPressure();
367 }
368
369
370 /**
371 * Get photo-cathode area of PMT.
372 *
373 * \return photo-cathode area [m^2]
374 */
375 inline double getPhotocathodeArea()
376 {
377 return KM3NET::getPhotocathodeArea();
378 }
379
380
381 /**
382 * Get absorption length.
383 *
384 * \param lambda wavelength of light [nm]
385 * \return absorption length [m]
386 */
387 inline double getAbsorptionLength(const double lambda)
388 {
389 return KM3NET::getAbsorptionLength(lambda);
390 }
391
392
393 /**
394 * Get scattering length.
395 *
396 * \param lambda wavelength of light [nm]
397 * \return scattering length [m]
398 */
399 inline double getScatteringLength(const double lambda)
400 {
401 return KM3NET::getScatteringLength(lambda);
402 }
403
404
405 /**
406 * Function to describe light scattering in water.
407 *
408 * \param x cosine scattering angle
409 * \return probability
410 */
411 inline double getScatteringProbability(const double x)
412 {
413 return KM3NET::getScatteringProbability(x);
414 }
415
416
417 /**
418 * Get angular acceptance of PMT.
419 *
420 * \param x cosine of angle of incidence
421 * \return probability
422 */
423 inline double getAngularAcceptance(const double x)
424 {
425 return KM3NET::getAngularAcceptance(x);
426 }
427
428
429 /**
430 * Get quantum efficiency of %KM3NeT PMT.
431 *
432 * Note that the QE includes absorption in glass and gel as well as the collection efficiency.
433 *
434 * \param lambda wavelength of photon [nm]
435 * \return quantum efficiency
436 */
437 inline double getQE(const double lambda)
438 {
439 static JGridPolint1Function1D_t f1;
440 static const double cola = 1.00; // collection efficiency
441
442 if (f1.empty()) {
443
444 f1[280] = 0.0;
445 f1[285] = 0.0;
446 f1[290] = 0.0;
447 f1[295] = 0.2;
448 f1[300] = 0.3;
449 f1[305] = 2.3;
450 f1[310] = 3.9;
451 f1[315] = 9.1;
452 f1[320] = 13.7;
453 f1[325] = 19.5;
454 f1[330] = 25.2;
455 f1[335] = 28.9;
456 f1[340] = 33.0;
457 f1[345] = 34.6;
458 f1[350] = 36.6;
459 f1[355] = 37.5;
460 f1[360] = 38.3;
461 f1[365] = 38.2;
462 f1[370] = 37.8;
463 f1[375] = 36.8;
464 f1[380] = 36.3;
465 f1[385] = 36.8;
466 f1[390] = 37.3;
467 f1[395] = 36.6;
468 f1[400] = 36.5;
469 f1[405] = 36.2;
470 f1[410] = 35.5;
471 f1[415] = 35.2;
472 f1[420] = 34.7;
473 f1[425] = 34.1;
474 f1[430] = 33.7;
475 f1[435] = 33.2;
476 f1[440] = 32.6;
477 f1[445] = 31.8;
478 f1[450] = 31.1;
479 f1[455] = 30.1;
480 f1[460] = 29.1;
481 f1[465] = 28.4;
482 f1[470] = 27.6;
483 f1[475] = 27.0;
484 f1[480] = 26.2;
485 f1[485] = 25.8;
486 f1[490] = 25.2;
487 f1[495] = 24.0;
488 f1[500] = 22.8;
489 f1[505] = 20.9;
490 f1[510] = 19.1;
491 f1[515] = 17.1;
492 f1[520] = 15.3;
493 f1[525] = 14.0;
494 f1[530] = 12.9;
495 f1[535] = 12.3;
496 f1[540] = 11.6;
497 f1[545] = 11.3;
498 f1[550] = 10.7;
499 f1[555] = 10.3;
500 f1[560] = 9.6;
501 f1[565] = 9.1;
502 f1[570] = 8.6;
503 f1[575] = 8.0;
504 f1[580] = 7.3;
505 f1[585] = 6.6;
506 f1[590] = 5.9;
507 f1[595] = 5.3;
508 f1[600] = 4.7;
509 f1[605] = 4.0;
510 f1[610] = 3.4;
511 f1[615] = 2.9;
512 f1[620] = 2.5;
513 f1[625] = 2.1;
514 f1[630] = 1.6;
515 f1[635] = 1.3;
516 f1[640] = 1.0;
517 f1[645] = 0.8;
518 f1[650] = 0.6;
519 f1[655] = 0.5;
520 f1[660] = 0.4;
521 f1[665] = 0.3;
522 f1[670] = 0.2;
523 f1[675] = 0.1;
524 f1[680] = 0.1;
525 f1[685] = 0.1;
526 f1[690] = 0.0;
527 f1[695] = 0.0;
528 f1[700] = 0.0;
529 f1[705] = 0.0;
530
531 f1.compile();
532
533 f1.setExceptionHandler(new JGridPolint1Function1D_t::JDefaultResult(0.0));
534 }
535
536 return f1(lambda) * 0.01 * cola;
537 }
538
539
540 /**
541 * Get effective photo-cathode area of PMT.
542 *
543 * \param x cosine of angle of incidence
544 * \param lambda wavelength of photon [nm]
545 * \return photo-cathode area [m^2]
546 */
547 inline double getPhotocathodeArea2D(const double x, const double lambda)
548 {
549 return getPhotocathodeArea() * getQE(lambda) * getAngularAcceptance(x);
550 }
551}
552
553#endif
double getAngularAcceptance(const double x)
Angular acceptence of PMT.
Definition JDrawLED.cc:68
double getAbsorptionLength(const double lambda)
Definition JDrawPD0.cc:27
double getScatteringLength(const double lambda)
Definition JDrawPD0.cc:33
Mathematical constants.
double p00075(const double x)
Model specific function to describe light scattering in water (p00075).
This name space includes all other name spaces (except KM3NETDAQ, KM3NET and ANTARES).
Name space for KM3NeT with high-QE PMTs.
Definition KM3NeT.hh:335
Name space for KM3NeT.
Definition Jpp.hh:16
Auxiliary class for K40 rates.
Definition JK40Rates.hh:41
void setExceptionHandler(const JSupervisor &supervisor)
Set the supervisor for handling of exceptions.
Type definition of a 1st degree polynomial interpolation based on a JGridCollection with result type ...
Type definition of a 1st degree polynomial interpolation with result type double.