Jpp 20.0.0-195-g190c9e876
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 rate is based on the value quoted on slide 13 of this <a href="https://indico.cern.ch/event/1470768/contributions/6192000/attachments/2962431/5211357/LIghtInKM3NeT.pdf">presentation</a>.\n
33 * Multiplicity rates are obtatined with $JPP_DIR/examples/JCalibrate/JOMGsim.sh type A processing, \n
34 * see $JPP_DIR/examples/JCalibrate/README.md \n
35 * See also %KM3NeT internal <a href="https://simulation.pages.km3net.de/input_tables/Simulations_Description.pdf">note</a>.
36 *
37 * \return K40 rates [Hz]
38 */
39 inline const JK40Rates& getK40Rates()
40 {
41 static const JK40Rates rates_Hz(6200, { 593.39, 55.22, 6.07, 0.60 });
42
43 return rates_Hz;
44 }
45
46
47 /**
48 * Get ambient pressure.
49 *
50 * \return pressure [Atm]
51 */
52 inline double getAmbientPressure()
53 {
54 return 240.0; // ambient pressure [Atm]
55 }
56
57
58 /**
59 * Get photo-cathode area of %KM3NeT PMT.
60 *
61 * \return photo-cathode area [m^2]
62 */
63 inline double getPhotocathodeArea()
64 {
65 return 70.768818 * 1.0e-4; // photo-cathode area [m^2]
66 }
67
68
69 /**
70 * Get absorption length.
71 *
72 * \param lambda wavelength of light [nm]
73 * \return absorption length [m]
74 */
75 inline double getAbsorptionLength(const double lambda)
76 {
77 static JPolint1Function1D_t f1;
78
79 if (f1.empty()) {
80
81 f1[290] = 0.0;
82 f1[310] = 11.9;
83 f1[330] = 16.4;
84 f1[350] = 20.6;
85 f1[375] = 29.5;
86 f1[412] = 48.5;
87 f1[440] = 67.5;
88 f1[475] = 59.0;
89 f1[488] = 55.1;
90 f1[510] = 26.1;
91 f1[532] = 19.9;
92 f1[555] = 14.7;
93 f1[650] = 2.8;
94 f1[676] = 2.3;
95 f1[715] = 1.0;
96 f1[720] = 0.0;
97
98 f1.compile();
99
100 f1.setExceptionHandler(new JPolint1Function1D_t::JDefaultResult(0.0));
101 }
102
103 return f1(lambda);
104 }
105
106
107 /**
108 * Get scattering length.
109 *
110 * Use the Kopelevich model for spectral volume scattering functions.\n
111 * The model separates the contributions by:
112 * - pure_sea: pure sea water;
113 * - small_par: 'small' particles (size < 1 micro meter);
114 * - large_par: 'large' particles (size > 1 micro meter).
115 * Values are taken from reference C.D. Mobley "Light and Water", ISBN 0-12-502750-8, pag. 119.
116 *
117 *
118 * \param lambda wavelength of light [nm]
119 * \return scattering length [m]
120 */
121 inline double getScatteringLength(const double lambda)
122 {
123 static const double Vs = 0.0075;
124 static const double Vl = 0.0075;
125 static const double bw = 0.0017;
126 static const double bs = 1.340;
127 static const double bl = 0.312;
128
129 const double x = 550.0/lambda;
130
131 const double pure_sea = bw * pow(x, 4.3);
132 const double small_par = bs * Vs * pow(x, 1.7);
133 const double large_par = bl * Vl * pow(x, 0.3);
134
135 return 1.0 / (pure_sea + small_par + large_par);
136 }
137
138
139 /**
140 * Function to describe light scattering in water.
141 *
142 * \param x cosine scattering angle
143 * \return probability
144 */
145 inline double getScatteringProbability(const double x)
146 {
147 return JPHYSICS::p00075(x);
148 }
149
150
151 /**
152 * Get angular acceptance of %KM3NeT PMT.
153 *
154 * \param x cosine of angle of incidence
155 * \return probability
156 */
157 inline double getAngularAcceptance(const double x)
158 {
159 static JGridPolint1Function1D_t f1;
160
161 if (f1.empty()) {
162
163 f1[-1.00] = 1.0000;
164 f1[-0.95] = 0.8301;
165 f1[-0.90] = 0.7357;
166 f1[-0.85] = 0.6619;
167 f1[-0.80] = 0.5998;
168 f1[-0.75] = 0.5410;
169 f1[-0.70] = 0.4874;
170 f1[-0.65] = 0.4387;
171 f1[-0.60] = 0.3947;
172 f1[-0.55] = 0.3544;
173 f1[-0.50] = 0.3190;
174 f1[-0.45] = 0.2777;
175 f1[-0.40] = 0.2445;
176 f1[-0.35] = 0.2101;
177 f1[-0.30] = 0.1818;
178 f1[-0.25] = 0.1535;
179 f1[-0.20] = 0.1276;
180 f1[-0.15] = 0.1025;
181 f1[-0.10] = 0.0788;
182 f1[-0.05] = 0.0586;
183 f1[0.00] = 0.0400;
184 f1[0.05] = 0.0233;
185 f1[0.10] = 0.0104;
186 f1[0.15] = 0.0039;
187 f1[0.20] = 0.0017;
188 f1[0.25] = 0.0000;
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 as well as the collection efficiency.
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 = 1.0; // collection efficiency
211
212 if (f1.empty()) {
213
214 f1[290] = 0.000;
215 f1[300] = 0.000;
216 f1[310] = 1.860;
217 f1[320] = 7.721;
218 f1[330] = 15.912;
219 f1[340] = 21.981;
220 f1[350] = 24.729;
221 f1[360] = 26.476;
222 f1[370] = 27.525;
223 f1[380] = 27.213;
224 f1[390] = 28.295;
225 f1[400] = 27.973;
226 f1[410] = 27.435;
227 f1[420] = 26.905;
228 f1[430] = 26.527;
229 f1[440] = 25.978;
230 f1[450] = 25.203;
231 f1[460] = 23.898;
232 f1[470] = 22.252;
233 f1[480] = 20.827;
234 f1[490] = 19.997;
235 f1[500] = 19.326;
236 f1[510] = 18.546;
237 f1[520] = 16.584;
238 f1[530] = 13.321;
239 f1[540] = 10.680;
240 f1[550] = 9.096;
241 f1[560] = 7.924;
242 f1[570] = 7.131;
243 f1[580] = 6.252;
244 f1[590] = 5.373;
245 f1[600] = 4.577;
246 f1[610] = 3.738;
247 f1[620] = 3.111;
248 f1[630] = 2.442;
249 f1[640] = 1.947;
250 f1[650] = 1.578;
251 f1[660] = 1.270;
252 f1[670] = 0.907;
253 f1[680] = 0.626;
254 f1[690] = 0.435;
255 f1[700] = 0.252;
256 f1[710] = 0.000;
257 f1[720] = 0.000;
258
259 f1.compile();
260
261 f1.setExceptionHandler(new JGridPolint1Function1D_t::JDefaultResult(0.0));
262 }
263
264 return f1(lambda) * 0.01 * cola;
265 }
266
267
268 /**
269 * Get effective photo-cathode area of PMT.
270 *
271 * \param x cosine of angle of incidence
272 * \param lambda wavelength of photon [nm]
273 * \return photo-cathode area [m^2]
274 */
275 inline double getPhotocathodeArea2D(const double x, const double lambda)
276 {
277 return getPhotocathodeArea() * getQE(lambda) * getAngularAcceptance(x);
278 }
279}
280
281/**
282 * Name space for %KM3NeT with high-QE PMTs.
283 */
284namespace KM3NET_HIGHQE {
285
288
289
290 /**
291 * Get K40 rates.
292 *
293 * This method returns an object with default values.\n
294 * The singles and multiples rates are based on Analysis e-log entry <a href="https://elog.km3net.de/Analysis/597">575</a>.\n
295 * 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
296 * (see GIT issue <a href="https://git.km3net.de/common/jpp/-/issues/351">351</a>).
297 *
298 * \return K40 rates [Hz]
299 */
300 inline const JK40Rates& getK40Rates()
301 {
302 static const JK40Rates rates_Hz(8529, { 1014.4, 103.77, 15.44, 1.44});
303
304 return rates_Hz;
305 }
306
307
308 /**
309 * Get ambient pressure.
310 *
311 * \return pressure [Atm]
312 */
313 inline double getAmbientPressure()
314 {
315 return KM3NET::getAmbientPressure();
316 }
317
318
319 /**
320 * Get photo-cathode area of PMT.
321 *
322 * \return photo-cathode area [m^2]
323 */
324 inline double getPhotocathodeArea()
325 {
326 return KM3NET::getPhotocathodeArea();
327 }
328
329
330 /**
331 * Get absorption length.
332 *
333 * \param lambda wavelength of light [nm]
334 * \return absorption length [m]
335 */
336 inline double getAbsorptionLength(const double lambda)
337 {
338 return KM3NET::getAbsorptionLength(lambda);
339 }
340
341
342 /**
343 * Get scattering length.
344 *
345 * \param lambda wavelength of light [nm]
346 * \return scattering length [m]
347 */
348 inline double getScatteringLength(const double lambda)
349 {
350 return KM3NET::getScatteringLength(lambda);
351 }
352
353
354 /**
355 * Function to describe light scattering in water.
356 *
357 * \param x cosine scattering angle
358 * \return probability
359 */
360 inline double getScatteringProbability(const double x)
361 {
362 return KM3NET::getScatteringProbability(x);
363 }
364
365
366 /**
367 * Get angular acceptance of PMT.
368 *
369 * \param x cosine of angle of incidence
370 * \return probability
371 */
372 inline double getAngularAcceptance(const double x)
373 {
374 return KM3NET::getAngularAcceptance(x);
375 }
376
377
378 /**
379 * Get quantum efficiency of %KM3NeT PMT.
380 *
381 * Note that the QE includes absorption in glass and gel as well as the collection efficiency.
382 *
383 * \param lambda wavelength of photon [nm]
384 * \return quantum efficiency
385 */
386 inline double getQE(const double lambda)
387 {
388 static JGridPolint1Function1D_t f1;
389 static const double cola = 1.00; // collection efficiency
390
391 if (f1.empty()) {
392
393 f1[280] = 0.0;
394 f1[285] = 0.0;
395 f1[290] = 0.0;
396 f1[295] = 0.2;
397 f1[300] = 0.3;
398 f1[305] = 2.3;
399 f1[310] = 3.9;
400 f1[315] = 9.1;
401 f1[320] = 13.7;
402 f1[325] = 19.5;
403 f1[330] = 25.2;
404 f1[335] = 28.9;
405 f1[340] = 33.0;
406 f1[345] = 34.6;
407 f1[350] = 36.6;
408 f1[355] = 37.5;
409 f1[360] = 38.3;
410 f1[365] = 38.2;
411 f1[370] = 37.8;
412 f1[375] = 36.8;
413 f1[380] = 36.3;
414 f1[385] = 36.8;
415 f1[390] = 37.3;
416 f1[395] = 36.6;
417 f1[400] = 36.5;
418 f1[405] = 36.2;
419 f1[410] = 35.5;
420 f1[415] = 35.2;
421 f1[420] = 34.7;
422 f1[425] = 34.1;
423 f1[430] = 33.7;
424 f1[435] = 33.2;
425 f1[440] = 32.6;
426 f1[445] = 31.8;
427 f1[450] = 31.1;
428 f1[455] = 30.1;
429 f1[460] = 29.1;
430 f1[465] = 28.4;
431 f1[470] = 27.6;
432 f1[475] = 27.0;
433 f1[480] = 26.2;
434 f1[485] = 25.8;
435 f1[490] = 25.2;
436 f1[495] = 24.0;
437 f1[500] = 22.8;
438 f1[505] = 20.9;
439 f1[510] = 19.1;
440 f1[515] = 17.1;
441 f1[520] = 15.3;
442 f1[525] = 14.0;
443 f1[530] = 12.9;
444 f1[535] = 12.3;
445 f1[540] = 11.6;
446 f1[545] = 11.3;
447 f1[550] = 10.7;
448 f1[555] = 10.3;
449 f1[560] = 9.6;
450 f1[565] = 9.1;
451 f1[570] = 8.6;
452 f1[575] = 8.0;
453 f1[580] = 7.3;
454 f1[585] = 6.6;
455 f1[590] = 5.9;
456 f1[595] = 5.3;
457 f1[600] = 4.7;
458 f1[605] = 4.0;
459 f1[610] = 3.4;
460 f1[615] = 2.9;
461 f1[620] = 2.5;
462 f1[625] = 2.1;
463 f1[630] = 1.6;
464 f1[635] = 1.3;
465 f1[640] = 1.0;
466 f1[645] = 0.8;
467 f1[650] = 0.6;
468 f1[655] = 0.5;
469 f1[660] = 0.4;
470 f1[665] = 0.3;
471 f1[670] = 0.2;
472 f1[675] = 0.1;
473 f1[680] = 0.1;
474 f1[685] = 0.1;
475 f1[690] = 0.0;
476 f1[695] = 0.0;
477 f1[700] = 0.0;
478 f1[705] = 0.0;
479
480 f1.compile();
481
482 f1.setExceptionHandler(new JGridPolint1Function1D_t::JDefaultResult(0.0));
483 }
484
485 return f1(lambda) * 0.01 * cola;
486 }
487
488
489 /**
490 * Get effective photo-cathode area of PMT.
491 *
492 * \param x cosine of angle of incidence
493 * \param lambda wavelength of photon [nm]
494 * \return photo-cathode area [m^2]
495 */
496 inline double getPhotocathodeArea2D(const double x, const double lambda)
497 {
498 return getPhotocathodeArea() * getQE(lambda) * getAngularAcceptance(x);
499 }
500}
501
502#endif
double getAngularAcceptance(const double x)
Angular acceptence of PMT.
Definition JDrawLED.cc:68
Mathematical constants.
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:284
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.