aboutsummaryrefslogtreecommitdiff
path: root/src/optics.h
diff options
context:
space:
mode:
authortlatorre <tlatorre@uchicago.edu>2019-03-25 19:29:25 -0500
committertlatorre <tlatorre@uchicago.edu>2019-03-25 19:29:25 -0500
commitbf60d08d517e7887417f0aa4068b726a8c749e58 (patch)
tree30425882b75dc154e406457fa70e55f359085c8d /src/optics.h
parent40e79187eb1037966fc723291936b96b7847f4fb (diff)
downloadsddm-bf60d08d517e7887417f0aa4068b726a8c749e58.tar.gz
sddm-bf60d08d517e7887417f0aa4068b726a8c749e58.tar.bz2
sddm-bf60d08d517e7887417f0aa4068b726a8c749e58.zip
update rayleigh scattering calculation
This commit updates the optics code to calculate the rayleigh scattering length using the Einstein-Smoluchowski formula instead of using the effective rayleigh scattering lengths from the RSPR bank.
Diffstat (limited to 'src/optics.h')
-rw-r--r--src/optics.h31
1 files changed, 21 insertions, 10 deletions
diff --git a/src/optics.h b/src/optics.h
index 4b41c6b..0e7740b 100644
--- a/src/optics.h
+++ b/src/optics.h
@@ -1,4 +1,7 @@
-/* Copyright (c) 2019, Anthony Latorre <tlatorre at uchicago>
+/* Library for computing optical properites of the heavy water, light water,
+ * and acrylic in the SNO detector.
+ *
+ * Copyright (c) 2019, Anthony Latorre <tlatorre at uchicago>
*
* This program is free software: you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the Free
@@ -17,21 +20,31 @@
#ifndef OPTICS_H
#define OPTICS_H
-#include "dict.h"
-
/* Global error string when optics_init() returns -1. */
extern char optics_err[256];
+/* Index of refraction in water and heavy water averaged over the Cerenkov
+ * spectrum and the PMT quantum efficiency.
+ *
+ * Note: You must call optics_init() before using these! */
extern double avg_index_h2o, avg_index_d2o;
-/* Initialize the optics data by reading in the RSPR bank and precomputing the
- * average absorption and scattering tables. */
-int optics_init(dict *db);
+/* Initialize the optics data by precomputing the average absorption and
+ * scattering tables. */
+int optics_init(void);
/* Functions for computing the index of refraction. */
double get_index(double p, double wavelength, double T);
double get_index_snoman_h2o(double wavelength);
double get_index_snoman_d2o(double wavelength);
+double get_index_snoman_acrylic(double wavelength);
+
+/* Functions for computing the scattering probability as a funcion of
+ * wavelength. */
+double rayint_prob(double wavelength, double n, double isothermal_comp);
+double rayint_prob_d2o(double wavelength);
+double rayint_prob_h2o(double wavelength);
+double rayint_prob_acrylic(double wavelength);
/* Functions for computing the probability that a photon is not absorbed or
* scattered after a certain distance. */
@@ -40,13 +53,11 @@ double get_fabs_h2o(double x);
double get_fabs_acrylic(double x);
double get_fsct_d2o(double x);
double get_fsct_h2o(double x);
+double get_fsct_acrylic(double x);
-/* Functions for computing the absorption and scattering length as a funcion of
- * wavelength. */
+/* Functions for computing the absorption length as a funcion of wavelength. */
double get_absorption_length_snoman_d2o(double wavelength);
double get_absorption_length_snoman_h2o(double wavelength);
double get_absorption_length_snoman_acrylic(double wavelength);
-double get_rayleigh_scattering_length_snoman_d2o(double wavelength);
-double get_rayleigh_scattering_length_snoman_h2o(double wavelength);
#endif