From bf60d08d517e7887417f0aa4068b726a8c749e58 Mon Sep 17 00:00:00 2001 From: tlatorre Date: Mon, 25 Mar 2019 19:29:25 -0500 Subject: 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. --- src/optics.h | 31 +++++++++++++++++++++---------- 1 file changed, 21 insertions(+), 10 deletions(-) (limited to 'src/optics.h') 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 +/* Library for computing optical properites of the heavy water, light water, + * and acrylic in the SNO detector. + * + * Copyright (c) 2019, Anthony Latorre * * 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 -- cgit