Jpp  master_rocky-40-g5f0272dcd
the software that should make you happy
Antares.hh
Go to the documentation of this file.
1 #ifndef __JPHYSICS__ANTARES__
2 #define __JPHYSICS__ANTARES__
3 
4 #include <map>
5 #include <cmath>
6 
8 #include "JPhysics/JK40Rates.hh"
9 
10 
11 /**
12  * \file
13  *
14  * Properties of %Antares PMT and deep-sea water.
15  * \author mdejong
16  */
17 namespace ANTARES {
18 
19  using JPHYSICS::JK40Rates;
20 
21 
22  /**
23  * Get K40 rates.
24  *
25  * \return K40 rates [Hz]
26  */
27  inline const JK40Rates& getK40Rates()
28  {
29  static const JK40Rates rates_Hz(70e3, { 25.0 });
30 
31  return rates_Hz;
32  }
33 
34 
35  /**
36  * Get ambient pressure.
37  *
38  * \return pressure [Atm]
39  */
40  inline double getAmbientPressure()
41  {
42  return 240.0; // ambient pressure [Atm]
43  }
44 
45 
46  /**
47  * Get photo-cathode area of PMT.
48  *
49  * \return photo-cathode area [m^2]
50  */
51  inline double getPhotocathodeArea()
52  {
53  return 440e-4; // photo-cathode area [m^2]
54  }
55 
56 
57  /**
58  * Get absorption length.
59  *
60  * \param lambda wavelength of light [nm]
61  * \return absorption length [m]
62  */
63  inline double getAbsorptionLength(const double lambda)
64  {
65  typedef std::map<double, double> map_t;
66 
67  static map_t zmap;
68 
69  if (zmap.empty()) {
70  /**
71  * values taken from:
72  *
73  * afs/in2p3.fr/home/throng/antares/src/km3/v3r6/src/hit-ini_optic.f
74  */
75  //static const double a0 = 0.971;
76  static const double a0 = 1.0;
77 
78  zmap[620.0] = 0.0;
79  zmap[610.0] = a0/0.2890;
80  zmap[600.0] = a0/0.2440;
81  zmap[590.0] = a0/0.1570;
82  zmap[580.0] = a0/0.1080;
83  zmap[570.0] = a0/0.0799;
84  zmap[560.0] = a0/0.0708;
85  zmap[550.0] = a0/0.0638;
86  zmap[540.0] = a0/0.0558;
87  zmap[530.0] = a0/0.0507;
88  zmap[520.0] = a0/0.0477;
89  zmap[510.0] = a0/0.0357;
90  zmap[500.0] = a0/0.0257;
91  zmap[490.0] = a0/0.0196;
92  zmap[480.0] = a0/0.0182;
93  zmap[470.0] = a0/0.0182;
94  zmap[460.0] = a0/0.0191;
95  zmap[450.0] = a0/0.0200;
96  zmap[440.0] = a0/0.0218;
97  zmap[430.0] = a0/0.0237;
98  zmap[420.0] = a0/0.0255;
99  zmap[410.0] = a0/0.0291;
100  zmap[400.0] = a0/0.0325;
101  zmap[390.0] = a0/0.0363;
102  zmap[380.0] = a0/0.0415;
103  zmap[370.0] = a0/0.0473;
104  zmap[360.0] = a0/0.0528;
105  zmap[350.0] = a0/0.0629;
106  zmap[340.0] = a0/0.0710;
107  zmap[330.0] = a0/0.0792;
108  zmap[320.0] = a0/0.0946;
109  zmap[310.0] = a0/0.1090;
110  zmap[300.0] = a0/0.1390;
111  zmap[290.0] = 0.0;
112  }
113 
114  const double x = lambda;
115 
116  if (x > zmap.begin()->first && x < zmap.rbegin()->first) {
117 
118  map_t::const_iterator i = zmap.lower_bound(x);
119  map_t::const_iterator j = i;
120 
121  --j;
122 
123  if (i == zmap.begin()) {
124  ++i;
125  ++j;
126  }
127 
128  const double x1 = i->first;
129  const double x2 = j->first;
130 
131  const double y1 = i->second;
132  const double y2 = j->second;
133 
134  return y1 + (y2 - y1) * (x - x1) / (x2 - x1);
135 
136  } else
137 
138  return 0.0;
139  }
140 
141 
142  /**
143  * Get scattering length.
144  *
145  * \param lambda wavelength of light [nm]
146  * \return scattering length [m]
147  */
148  inline double getScatteringLength(const double lambda)
149  {
150  typedef std::map<double, double> map_t;
151 
152  static map_t zmap;
153 
154  if (zmap.empty()) {
155 
156  zmap[200.0] = 0.0;
157  zmap[307.0] = 19.7132;
158  zmap[330.0] = 23.8280;
159  zmap[350.0] = 27.6075;
160  zmap[370.0] = 31.5448;
161  zmap[390.0] = 35.6151;
162  zmap[410.0] = 39.7971;
163  zmap[430.0] = 44.0726;
164  zmap[450.0] = 48.4261;
165  zmap[470.0] = 52.8447;
166  zmap[490.0] = 57.3172;
167  zmap[510.0] = 61.8344;
168  zmap[530.0] = 66.3884;
169  zmap[550.0] = 70.9723;
170  zmap[570.0] = 75.5804;
171  zmap[590.0] = 80.2077;
172  zmap[610.0] = 84.8497;
173  zmap[650.0] = 95.0;
174  }
175 
176  const double x = lambda;
177 
178  if (x > zmap.begin()->first && x < zmap.rbegin()->first) {
179 
180  map_t::const_iterator i = zmap.lower_bound(x);
181  map_t::const_iterator j = i;
182 
183  --j;
184 
185  if (i == zmap.begin()) {
186  ++i;
187  ++j;
188  }
189 
190  const double x1 = i->first;
191  const double x2 = j->first;
192 
193  const double y1 = i->second;
194  const double y2 = j->second;
195 
196  return y1 + (y2 - y1) * (x - x1) / (x2 - x1);
197 
198  } else
199 
200  return 0.0;
201  }
202 
203 
204  /**
205  * Function to describe light scattering in water.
206  *
207  * \param x cosine scattering angle
208  * \return probability
209  */
210  inline double getScatteringProbability(const double x)
211  {
212  return JPHYSICS::p00075(x);
213  }
214 
215 
216  /**
217  * Angular acceptance of PMT (Genova).
218  *
219  * \param x cosine of angle of incidence
220  * \return probability
221  */
222  inline double genova(const double x)
223  {
224  static const double a0 = 0.3265;
225  static const double a1 = 0.6144;
226  static const double a2 = -0.0343;
227  static const double a3 = -0.0641;
228  static const double a4 = 0.2988;
229  static const double a5 = -0.1422;
230 
231  const double z = -x;
232 
233  double y = 0.0;
234 
235  if (z < -0.65)
236  y = 0.0;
237  else
238  y = a0 + z*(a1 + z*(a2 + z*(a3 + z*(a4 + z*a5))));
239 
240  return y;
241  }
242 
243 
244  /**
245  * Angular acceptance of PMT (Gamelle).
246  *
247  * \param x cosine angle of incidence
248  * \return probability
249  */
250  inline double gamelle(const double x)
251  {
252  static const double a0 = 59.115;
253  static const double a1 = 0.52258;
254  static const double a2 = 0.60944E-02;
255  static const double a3 = -0.16955E-03;
256  static const double a4 = 0.60929E-06;
257 
258  double y = 0.0;
259 
260  if (x > +0.36)
261  y = 0.0;
262  else if (x < -1.00)
263  y = 1.0;
264  else {
265 
266  const double z = acos(-x)*57.29578 + 57.75;
267 
268  y = (a0 + z*(a1 + z*(a2 + z*(a3 + z*a4)))) / 84.0;
269  }
270 
271  return y;
272  }
273 
274 
275  /**
276  * Get angular acceptance of PMT.
277  *
278  * \param x cosine of angle of incidence
279  * \return probability
280  */
281  inline double getAngularAcceptance(const double x)
282  {
283  return genova(x);
284  }
285 
286 
287  /**
288  * Get quantum efficiency of PMT.
289  *
290  * \param lambda wavelength of photon [nm]
291  * \param option include absorption in glass and gel (if true, otherwise not)
292  * \return quantum efficiency
293  */
294  inline double getQE(const double lambda, const bool option)
295  {
296  class tuple {
297  public:
298  tuple(const double __QE,
299  const double __l_gel,
300  const double __l_glass) :
301  QE (__QE),
302  l_gel (__l_gel),
303  l_glass(__l_glass)
304  {}
305 
306  double QE; // Quantum efficiiency
307  double l_gel; // gel absorption length [cm]
308  double l_glass; // glass absorption length [cm]
309  };
310 
311  static const tuple ntuple[] = {
312  tuple(0.000e-2, 0.00, 0.00),
313  tuple(1.988e-2, 100.81, 148.37),
314  tuple(2.714e-2, 99.94, 142.87),
315  tuple(3.496e-2, 99.89, 135.64),
316  tuple(4.347e-2, 96.90, 134.58),
317  tuple(5.166e-2, 96.42, 138.27),
318  tuple(6.004e-2, 94.36, 142.40),
319  tuple(6.885e-2, 89.09, 147.16),
320  tuple(8.105e-2, 90.10, 151.80),
321  tuple(10.13e-2, 86.95, 150.88),
322  tuple(13.03e-2, 85.88, 145.68),
323  tuple(15.29e-2, 84.49, 139.70),
324  tuple(16.37e-2, 81.08, 126.55),
325  tuple(17.11e-2, 78.18, 118.86),
326  tuple(17.86e-2, 76.48, 113.90),
327  tuple(18.95e-2, 74.55, 116.08),
328  tuple(20.22e-2, 72.31, 109.23),
329  tuple(21.26e-2, 68.05, 81.63),
330  tuple(22.10e-2, 66.91, 65.66),
331  tuple(22.65e-2, 64.48, 77.30),
332  tuple(23.07e-2, 62.53, 73.02),
333  tuple(23.14e-2, 59.38, 81.25),
334  tuple(23.34e-2, 56.64, 128.04),
335  tuple(22.95e-2, 53.29, 61.84),
336  tuple(22.95e-2, 48.96, 19.23),
337  tuple(22.74e-2, 45.71, 27.21),
338  tuple(23.48e-2, 41.88, 18.09),
339  tuple(22.59e-2, 37.14, 8.41),
340  tuple(20.61e-2, 30.49, 3.92),
341  tuple(17.68e-2, 23.08, 1.82),
342  tuple(13.18e-2, 15.60, 0.84),
343  tuple(7.443e-2, 8.00, 0.39),
344  tuple(2.526e-2, 0.00, 0.17),
345  tuple(0.000e-2, 0.00, 0.00)
346  };
347 
348  static const double cola = 0.9; // collection efficiency
349  static const double x_glass = 1.5; // glass thickness [cm]
350  static const double x_gel = 1.0; // gel thickness [cm]
351 
352  // ntuple
353  static const int N = sizeof(ntuple) / sizeof(ntuple[0]) - 1;
354 
355  static const double xmax = 620.0; // maximal wavelength [nm] (tuple[ 0 ])
356  static const double xmin = 290.0; // minimal wavelength [nm] (tuple[N-1])
357 
358  const double x = lambda;
359 
360  double y = 0.0;
361 
362  if (x > xmin && x < xmax) {
363 
364  const int i = (int) (N * (x - xmax) / (xmin - xmax));
365  const int j = (i == N ? i - 1 : i + 1);
366 
367  const double x1 = xmax + i * (xmin - xmax) / N;
368  const double x2 = xmax + j * (xmin - xmax) / N;
369 
370  const double dx = (x - x1) / (x1 - x2);
371 
372  const double QE = ntuple[i].QE + (ntuple[i].QE - ntuple[j].QE ) * dx;
373  const double l_gel = ntuple[i].l_gel + (ntuple[i].l_gel - ntuple[j].l_gel ) * dx;
374  const double l_glass = ntuple[i].l_glass + (ntuple[i].l_glass - ntuple[j].l_glass) * dx;
375 
376  y = cola * QE;
377 
378  if (option) {
379 
380  if (l_glass > 0.0 && l_gel > 0.0)
381  y *= exp(-x_glass/l_glass) * exp(-x_gel/l_gel);
382  else
383  y = 0.0;
384  }
385  }
386 
387  return y;
388  }
389 
390 
391  /**
392  * Get quantum efficiency of PMT.
393  *
394  * \param lambda wavelength of photon [nm]
395  * \return quantum efficiency
396  */
397  inline double getQE(const double lambda)
398  {
399  return getQE(lambda, true);
400  }
401 
402 
403  /**
404  * Get effective photo-cathode area of PMT.
405  *
406  * \param x cosine of angle of incidence
407  * \param lambda wavelength of photon [nm]
408  * \return photo-cathode area [m^2]
409  */
410  inline double getPhotocathodeArea2D(const double x, const double lambda)
411  {
412  return getPhotocathodeArea() * getQE(lambda) * getAngularAcceptance(x);
413  }
414 }
415 
416 #endif
Name space for Antares.
Definition: Jpp.hh:21
double getAngularAcceptance(const double x)
Get angular acceptance of PMT.
Definition: Antares.hh:281
double getAmbientPressure()
Get ambient pressure.
Definition: Antares.hh:40
double getScatteringLength(const double lambda)
Get scattering length.
Definition: Antares.hh:148
double gamelle(const double x)
Angular acceptance of PMT (Gamelle).
Definition: Antares.hh:250
double getQE(const double lambda, const bool option)
Get quantum efficiency of PMT.
Definition: Antares.hh:294
double getScatteringProbability(const double x)
Function to describe light scattering in water.
Definition: Antares.hh:210
const JK40Rates & getK40Rates()
Get K40 rates.
Definition: Antares.hh:27
double getPhotocathodeArea()
Get photo-cathode area of PMT.
Definition: Antares.hh:51
double getAbsorptionLength(const double lambda)
Get absorption length.
Definition: Antares.hh:63
double getPhotocathodeArea2D(const double x, const double lambda)
Get effective photo-cathode area of PMT.
Definition: Antares.hh:410
double genova(const double x)
Angular acceptance of PMT (Genova).
Definition: Antares.hh:222
const double xmax
Definition: JQuadrature.cc:24
const double xmin
Definition: JQuadrature.cc:23
double p00075(const double x)
Model specific function to describe light scattering in water (p00075).
int j
Definition: JPolint.hh:792
Auxiliary class for K40 rates.
Definition: JK40Rates.hh:41