aboutsummaryrefslogtreecommitdiff
path: root/src/pmt_response.h
diff options
context:
space:
mode:
authortlatorre <tlatorre@uchicago.edu>2018-09-11 10:05:05 -0500
committertlatorre <tlatorre@uchicago.edu>2018-09-11 10:05:05 -0500
commit25e75ad0ed81436ea50de5bbe7bf900427ff17aa (patch)
tree44c387e020b4147db9a4c97a72a7507faa996550 /src/pmt_response.h
parentc8bff440e7848a33f369dff1ce11f726cecbbe20 (diff)
downloadsddm-25e75ad0ed81436ea50de5bbe7bf900427ff17aa.tar.gz
sddm-25e75ad0ed81436ea50de5bbe7bf900427ff17aa.tar.bz2
sddm-25e75ad0ed81436ea50de5bbe7bf900427ff17aa.zip
add PMT response
This commit adds code to read in the PMT response from the PMTR bank from SNOMAN. This file was used for the grey disk model in SNOMAN and was created using a full 3D simulation of the PMT and concentrator. Since the PMT response in SNOMAN included the quantum efficiency of the PMT, we have to divide that out to get just the PMT response independent of the quantum efficiency. I also updated the likelihood calculation to use the pmt response. Currently the energy is being fit too high which I think will improve when we update the solid angle calculation to use the radius of the concentrator instead of the PMT.
Diffstat (limited to 'src/pmt_response.h')
-rw-r--r--src/pmt_response.h23
1 files changed, 23 insertions, 0 deletions
diff --git a/src/pmt_response.h b/src/pmt_response.h
new file mode 100644
index 0000000..300f6b2
--- /dev/null
+++ b/src/pmt_response.h
@@ -0,0 +1,23 @@
+#ifndef PMT_RESPONSE_H
+#define PMT_RESPONSE_H
+
+#include "dict.h"
+
+extern char pmtr_err[256];
+
+#define NUM_ANGLES 90
+#define NUM_WAVELENGTHS 50
+
+#define KPMTR_TRTI 1
+#define KPMTR_DECA 2
+#define KPMTR_SPRD 3
+#define KPMTR_CERF 4
+#define KPMTR_RESP 5
+#define KPMTR_REFLEC 4506
+
+double get_weighted_pmt_response(double theta);
+double get_pmt_response(double wavelength, double theta);
+int pmt_response_init(dict *db);
+void pmt_response_free(void);
+
+#endif