1 #ifndef G4E_CI_DRICH_MODEL_HH
2 #define G4E_CI_DRICH_MODEL_HH
51 std::cout <<
"#=======================================================================" << std::endl;
52 std::cout <<
"# Set Optical Properties" << std::endl;
67 if (matName !=
"_NA_")
76 std::cout <<
"# ERROR: Cannot retrieve " << matName.
data() <<
" material in EICG4dRICH" << std::endl;
88 std::cout <<
"# No properties table available for " << matName.
data() <<
", allocated a new one\n" << std::endl;
98 if (logVolName !=
"_NA_")
104 std::cout <<
"# ERROR: Cannot retrieve " << logVolName.
data() <<
" logical volume in EICG4dRICH" << std::endl;
137 double wl2e(
double wl) {
return 1239.84193 *
eV / (wl /
nm); }
138 double e2wl(
double e) {
return 1239.84193 *
nm / (e /
eV); }
152 std::cout <<
"# Optical Table for material " <<
materialName.
data() <<
" with " << nEntries <<
" points:" << std::endl;
167 std::cout <<
"# Optical Table for volume " <<
logicalVName.
data() <<
" with " << nE <<
" points:" << std::endl;
174 double linint(
double val,
int n,
const double *
x,
const double *
y)
176 if (val <= x[0])
return y[0];
177 if (val >= x[n - 1])
return y[n - 1];
178 for (
int i = 0; i < (n - 1); i++)
180 if ((val >= x[i]) && (val < x[i + 1]))
182 return (y[i + 1] - y[i]) / (x[i + 1] - x[i]) * (val - x[i]) + y[i];
211 const double aeroE[] =
212 {1.87855 *
eV, 1.96673 *
eV, 2.05490 *
eV, 2.14308 *
eV, 2.23126 *
eV,
213 2.31943 *
eV, 2.40761 *
eV, 2.49579 *
eV, 2.58396 *
eV, 2.67214 *
eV,
214 2.76032 *
eV, 2.84849 *
eV, 2.93667 *
eV, 3.02485 *
eV, 3.11302 *
eV,
215 3.20120 *
eV, 3.28938 *
eV, 3.37755 *
eV, 3.46573 *
eV, 3.55391 *
eV,
216 3.64208 *
eV, 3.73026 *
eV, 3.81844 *
eV, 3.90661 *
eV, 3.99479 *
eV,
217 4.08297 *
eV, 4.17114 *
eV, 4.25932 *
eV, 4.34750 *
eV, 4.43567 *
eV,
218 4.52385 *
eV, 4.61203 *
eV, 4.70020 *
eV, 4.78838 *
eV, 4.87656 *
eV,
219 4.96473 *
eV, 5.05291 *
eV, 5.14109 *
eV, 5.22927 *
eV, 5.31744 *
eV,
220 5.40562 *
eV, 5.49380 *
eV, 5.58197 *
eV, 5.67015 *
eV, 5.75833 *
eV,
221 5.84650 *
eV, 5.93468 *
eV, 6.02286 *
eV, 6.11103 *
eV, 6.19921 *
eV};
223 const double aeroN[] =
225 {1.01825, 1.01829, 1.01834, 1.01839, 1.01844, 1.01849, 1.01854, 1.01860,
226 1.01866, 1.01872, 1.01878, 1.01885, 1.01892, 1.01899, 1.01906, 1.01914,
227 1.01921, 1.01929, 1.01938, 1.01946, 1.01955, 1.01964, 1.01974, 1.01983,
228 1.01993, 1.02003, 1.02014, 1.02025, 1.02036, 1.02047, 1.02059, 1.02071,
229 1.02084, 1.02096, 1.02109, 1.02123, 1.02137, 1.02151, 1.02166, 1.02181,
230 1.02196, 1.02212, 1.02228, 1.02244, 1.02261, 1.02279, 1.02297, 1.02315,
233 const double aeroA[] =
235 {17.5000 *
cm, 17.7466 *
cm, 17.9720 *
cm, 18.1789 *
cm, 18.3694 *
cm,
236 18.5455 *
cm, 18.7086 *
cm, 18.8602 *
cm, 19.0015 *
cm, 19.1334 *
cm,
237 19.2569 *
cm, 19.3728 *
cm, 19.4817 *
cm, 19.5843 *
cm, 19.6810 *
cm,
238 19.7725 *
cm, 19.8590 *
cm, 19.9410 *
cm, 20.0188 *
cm, 20.0928 *
cm,
239 18.4895 *
cm, 16.0174 *
cm, 13.9223 *
cm, 12.1401 *
cm, 10.6185 *
cm,
240 9.3147 *
cm, 8.1940 *
cm, 7.2274 *
cm, 6.3913 *
cm, 5.6659 *
cm,
241 5.0347 *
cm, 4.4841 *
cm, 4.0024 *
cm, 3.5801 *
cm, 3.2088 *
cm,
242 2.8817 *
cm, 2.5928 *
cm, 2.3372 *
cm, 2.1105 *
cm, 1.9090 *
cm,
243 1.7296 *
cm, 1.5696 *
cm, 1.4266 *
cm, 1.2986 *
cm, 1.1837 *
cm,
244 1.0806 *
cm, 0.9877 *
cm, 0.9041 *
cm, 0.8286 *
cm, 0.7603 *
cm};
246 const double aeroS[] =
248 {35.1384 *
cm, 29.24805 *
cm, 24.5418 *
cm, 20.7453 *
cm, 17.6553 *
cm,
249 15.1197 *
cm, 13.02345 *
cm, 11.2782 *
cm, 9.81585 *
cm, 8.58285 *
cm,
250 7.53765 *
cm, 6.6468 *
cm, 5.88375 *
cm, 5.22705 *
cm, 4.6596 *
cm,
251 4.167 *
cm, 3.73785 *
cm, 3.36255 *
cm, 3.03315 *
cm, 2.7432 *
cm,
252 2.48700 *
cm, 2.26005 *
cm, 2.05845 *
cm, 1.87875 *
cm, 1.71825 *
cm,
253 1.57455 *
cm, 1.44555 *
cm, 1.3296 *
cm, 1.2249 *
cm, 1.1304 *
cm,
254 1.04475 *
cm, 0.9672 *
cm, 0.89655 *
cm, 0.83235 *
cm, 0.77385 *
cm,
255 0.7203 *
cm, 0.67125 *
cm, 0.6264 *
cm, 0.58515 *
cm, 0.54735 *
cm,
256 0.51255 *
cm, 0.48045 *
cm, 0.45075 *
cm, 0.4233 *
cm, 0.39795 *
cm,
257 0.37455 *
cm, 0.3528 *
cm, 0.33255 *
cm, 0.3138 *
cm, 0.29625 *
cm};
259 const int nEntries =
sizeof(aeroE) /
sizeof(
double);
264 std::cout <<
"# Aerogel Density : " << density / (
g /
cm3) <<
" g/cm3" << std::endl;
268 double refwl = 400 *
nm;
270 double refee =
wl2e(refwl) /
eV;
271 double an0 =
linint(refee, nEntries, aeroE, aeroN);
285 scaledE =
new double[nEntries];
286 scaledN =
new double[nEntries];
287 scaledS =
new double[nEntries];
288 scaledA =
new double[nEntries];
291 for (
int i = 0; i < nEntries; i++)
293 double ee = aeroE[i];
294 double wl =
e2wl(ee) /
nm;
307 rnscale = sqrt(1. + (a0 * refwl * refwl) / (refwl * refwl - a0 * a0));
308 nn = sqrt(1. + (a0 * wl * wl) / (wl * wl - a0 * a0)) * refn / rnscale;
316 rnscale = sqrt(1. + (a0 * refwl * refwl) / (refwl * refwl - a0 * a0));
317 nn = sqrt(1. + (a0 * wl * wl) / (wl * wl - a0 * a0)) * refn / rnscale;
321 nn = aeroN[i] * refn / an0;
336 std::cout <<
"# Aerogel Refractive Index, Absorption and Scattering Lengths rescaled to density ";
337 std::cout << density /
g *
cm3 <<
" g/cm3, method: " << mode << std::endl;
350 double nn = sqrt(1 + 0.6961663 * x * x / (x * x - pow(0.0684043, 2)) +
351 0.4079426 * x * x / (x * x - pow(0.1162414, 2)) +
352 0.8974794 * x * x / (x * x - pow(9.896161, 2)));
355 std::cout <<
"# WARNING: estimated quartz refractive index is " <<
nn;
356 std::cout <<
"at wavelength " << x <<
" nm -> set to 1" << std::endl;
367 double nn = 1.0 + (0.05792105 / (238.0185 - 1.0 / x /
x) +
368 0.00167917 / (57.362 - 1.0 / x / x));
371 std::cout <<
"# WARNING: estimated air refractive index is " <<
nn;
372 std::cout <<
"at wavelength " << x <<
" nm -> set to 1" << std::endl;
386 double rna =
riAir(rlambda);
387 double a = (rnq - rn) / (rnq - rna);
398 return (aa * 1.1939 *
mg /
cm3 + (1. - aa) * 2.32 *
g /
cm3);
404 double nn2 = 1. + 0.438 * rho /
g *
cm3;
422 const double acryE[] =
423 {1.87855 *
eV, 1.96673 *
eV, 2.05490 *
eV, 2.14308 *
eV, 2.23126 *
eV,
424 2.31943 *
eV, 2.40761 *
eV, 2.49579 *
eV, 2.58396 *
eV, 2.67214 *
eV,
425 2.76032 *
eV, 2.84849 *
eV, 2.93667 *
eV, 3.02485 *
eV, 3.11302 *
eV,
426 3.20120 *
eV, 3.28938 *
eV, 3.37755 *
eV, 3.46573 *
eV, 3.55391 *
eV,
427 3.64208 *
eV, 3.73026 *
eV, 3.81844 *
eV, 3.90661 *
eV, 3.99479 *
eV,
428 4.08297 *
eV, 4.17114 *
eV, 4.25932 *
eV, 4.34750 *
eV, 4.43567 *
eV,
429 4.52385 *
eV, 4.61203 *
eV, 4.70020 *
eV, 4.78838 *
eV, 4.87656 *
eV,
430 4.96473 *
eV, 5.05291 *
eV, 5.14109 *
eV, 5.22927 *
eV, 5.31744 *
eV,
431 5.40562 *
eV, 5.49380 *
eV, 5.58197 *
eV, 5.67015 *
eV, 5.75833 *
eV,
432 5.84650 *
eV, 5.93468 *
eV, 6.02286 *
eV, 6.11103 *
eV, 6.19921 *
eV};
434 const double acryN[] =
435 {1.4902, 1.4907, 1.4913, 1.4918, 1.4924, 1.4930, 1.4936, 1.4942, 1.4948,
436 1.4954, 1.4960, 1.4965, 1.4971, 1.4977, 1.4983, 1.4991, 1.5002, 1.5017,
437 1.5017, 1.5017, 1.5017, 1.5017, 1.5017, 1.5017, 1.5017, 1.5017, 1.5017,
438 1.5017, 1.5017, 1.5017, 1.5017, 1.5017, 1.5017, 1.5017, 1.5017, 1.5017,
439 1.5017, 1.5017, 1.5017, 1.5017, 1.5017, 1.5017, 1.5017, 1.5017, 1.5017,
440 1.5017, 1.5017, 1.5017, 1.5017, 1.5017};
442 const double acryA[] =
443 {14.8495 *
cm, 14.8495 *
cm, 14.8495 *
cm, 14.8495 *
cm,
444 14.8495 *
cm, 14.8495 *
cm, 14.8495 *
cm, 14.8495 *
cm,
445 14.8495 *
cm, 14.8495 *
cm, 14.8495 *
cm, 14.8495 *
cm,
446 14.8495 *
cm, 14.8495 *
cm, 14.8495 *
cm, 14.8495 *
cm,
447 14.8495 *
cm, 14.8494 *
cm, 14.8486 *
cm, 14.844 *
cm,
448 14.8198 *
cm, 14.7023 *
cm, 14.1905 *
cm, 12.3674 *
cm,
449 8.20704 *
cm, 3.69138 *
cm, 1.33325 *
cm, 0.503627 *
cm,
450 0.23393 *
cm, 0.136177 *
cm, 0.0933192 *
cm, 0.0708268 *
cm,
451 0.0573082 *
cm, 0.0483641 *
cm, 0.0420282 *
cm, 0.0373102 *
cm,
452 0.033662 *
cm, 0.0307572 *
cm, 0.0283899 *
cm, 0.0264235 *
cm,
453 0.0247641 *
cm, 0.0233451 *
cm, 0.0221177 *
cm, 0.0210456 *
cm,
454 0.0201011 *
cm, 0.0192627 *
cm, 0.0185134 *
cm, 0.0178398 *
cm,
455 0.0172309 *
cm, 0.0166779 *
cm};
457 const int nEntries =
sizeof(acryE) /
sizeof(
double);
461 scaledE =
new double[nEntries];
462 scaledN =
new double[nEntries];
463 scaledS =
new double[nEntries];
464 scaledA =
new double[nEntries];
467 double e0 = acryE[24];
469 double ethr =
wl2e(wlthr);
474 for (
int i = 0; i < (nEntries - 1); i++)
476 double d1 = ethr - acryE[i];
486 std::cerr <<
"# ERROR filter: wavelength threshold " << wlthr /
nm <<
" nm is out of range" << std::endl;
490 for (
int i = 0; i < nEntries; i++)
492 scaledE[i] = acryE[i] + eshift;
500 std::cout <<
"# Acrylic Filter Refractive Index, Absorption and Scattering Lengths";
501 std::cout <<
" rescaled to wavelength threshold " << wlthr /
nm <<
" nm" << std::endl;
524 std::cout <<
"# Gas material number of elements " << nel << std::endl;
528 for (
int i = 0; i < nel; i++)
531 std::cout <<
"# Element " << i;
532 std::cout <<
" : Z " <<
ele->GetZ();
533 std::cout <<
" Name " <<
ele->GetSymbol().data();
538 std::cout <<
"# Chemical Formula : " <<
chemFormula.
data() << std::endl;
555 G4String gasType[] = {
"C2F6",
"CF4"};
562 double Ksr[] = {0.131 *
cm3 /
g, 0.122 *
cm3 /
g};
568 double Asel[] = {0.18994, 0.124523};
569 double L0sel[] = {65.47 *
nm, 61.88 *
nm};
573 for (
int i = 0; i < 2; i++)
580 std::cout <<
"# Selected gas index " << igas <<
" for gas " <<
chemFormula.
data() << std::endl;
584 double refn = Ksr[igas] * density + 1.;
585 double wlref = 633 *
nm;
588 double wl0 = 200. *
nm;
589 double wl1 = 700. *
nm;
590 double dwl = (wl1 - wl0) / (nEntries - 1.);
594 scaledE =
new double[nEntries];
595 scaledN =
new double[nEntries];
596 scaledS =
new double[nEntries];
597 scaledA =
new double[nEntries];
600 double l02 = 1. / (L0sel[igas] /
nm) / (L0sel[igas] /
nm);
602 double rnscale = Asel[igas] / 1
e6 / (l02 - 1. / (wlref /
nm) / (wlref /
nm)) + 1.;
604 for (
int i = 0; i < nEntries; i++)
606 double wl = wl1 - i * dwl;
607 double ee =
wl2e(wl);
610 scaledN[i] = (Asel[igas] / 1
e6 / (l02 - 1. / (wl /
nm) / (wl /
nm)) + 1.) * refn / rnscale;
617 std::cout <<
"# Gas Refractive Index, Absorption and Scattering Lengths rescaled ";
618 std::cout <<
"to density " << density /
g *
cm3 <<
" g/cm3, gas index: " << igas << std::endl;
643 G4String surfaceName = pSurfName +
"mirrorSurf";
644 G4String skinSurfaceName = pSurfName +
"mirrorSkinSurf";
646 const double mirrorE[] = {
647 2.04358 *
eV, 2.0664 *
eV, 2.09046 *
eV, 2.14023 *
eV, 2.16601 *
eV,
648 2.20587 *
eV, 2.23327 *
eV, 2.26137 *
eV, 2.31972 *
eV, 2.35005 *
eV,
649 2.38116 *
eV, 2.41313 *
eV, 2.44598 *
eV, 2.47968 *
eV, 2.53081 *
eV,
650 2.58354 *
eV, 2.6194 *
eV, 2.69589 *
eV, 2.73515 *
eV, 2.79685 *
eV,
651 2.86139 *
eV, 2.95271 *
eV, 3.04884 *
eV, 3.12665 *
eV, 3.2393 *
eV,
652 3.39218 *
eV, 3.52508 *
eV, 3.66893 *
eV, 3.82396 *
eV, 3.99949 *
eV,
653 4.13281 *
eV, 4.27679 *
eV, 4.48244 *
eV, 4.65057 *
eV, 4.89476 *
eV,
654 5.02774 *
eV, 5.16816 *
eV, 5.31437 *
eV, 5.63821 *
eV, 5.90401 *
eV,
657 const double mirrorR[] =
659 {0.8678125, 0.8651562, 0.8639063, 0.8637500, 0.8640625, 0.8645313,
660 0.8643750, 0.8656250, 0.8653125, 0.8650000, 0.8648437, 0.8638281,
661 0.8635156, 0.8631250, 0.8621875, 0.8617188, 0.8613281, 0.8610156,
662 0.8610938, 0.8616016, 0.8623047, 0.8637500, 0.8655859, 0.8673828,
663 0.8700586, 0.8741992, 0.8781055, 0.8825195, 0.8876172, 0.8937207,
664 0.8981836, 0.9027441, 0.9078369, 0.9102002, 0.9093164, 0.9061743,
665 0.9004223, 0.8915210, 0.8599536, 0.8208313, 0.7625024};
667 const int nEntries =
sizeof(mirrorE) /
sizeof(
double);
671 scaledE =
new double[nEntries];
675 for (
int i = 0; i < nEntries; i++)
718 G4String surfaceName = pSurfName +
"phseSurf";
719 G4String skinSurfaceName = pSurfName +
"phseSkinSurf";
721 double E[] = {1. *
eV, 4. *
eV, 7. *
eV};
722 double SE[] = {1.0, 1.0, 1.0};
723 double N[] = {1.92, 1.92, 1.92};
724 double IN[] = {1.69, 1.69, 1.69};
731 for (
int i = 0; i < 3; i++)
750 #endif // G4E_CI_DRICH_MODEL_HH