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