aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authortlatorre <tlatorre@uchicago.edu>2018-11-14 10:53:56 -0600
committertlatorre <tlatorre@uchicago.edu>2018-11-14 10:53:56 -0600
commitc604b9d5b91a17175bac88d27b53193d98e1d332 (patch)
treec53c15e2b3830d9b1f20103f454984ad7b6192a0 /src
parent95f95be5f87f0fa4f5e9f7c8568dbb23a843cff6 (diff)
downloadsddm-c604b9d5b91a17175bac88d27b53193d98e1d332.tar.gz
sddm-c604b9d5b91a17175bac88d27b53193d98e1d332.tar.bz2
sddm-c604b9d5b91a17175bac88d27b53193d98e1d332.zip
fix some compiler warnings
Diffstat (limited to 'src')
-rw-r--r--src/likelihood.c10
-rw-r--r--src/test.c10
2 files changed, 1 insertions, 19 deletions
diff --git a/src/likelihood.c b/src/likelihood.c
index ca0b2b6..ca73902 100644
--- a/src/likelihood.c
+++ b/src/likelihood.c
@@ -165,7 +165,7 @@ void particle_free(particle *p)
static double get_expected_charge_shower(double *pos, double *dir, double *pmt_pos, double *pmt_normal, double r, double *reflected, double n_d2o, double n_h2o, double l_d2o, double l_h2o, double alpha, double beta, double rad)
{
- double pmt_dir[3], cos_theta, n, omega, R, f, f_reflec, cos_theta_pmt, absorption_length_h2o, absorption_length_d2o, absorption_length_acrylic, l_acrylic, theta_pmt, charge;
+ double pmt_dir[3], cos_theta, omega, f, f_reflec, cos_theta_pmt, absorption_length_h2o, absorption_length_d2o, absorption_length_acrylic, l_acrylic, theta_pmt, charge;
SUB(pmt_dir,pmt_pos,pos);
@@ -182,14 +182,6 @@ static double get_expected_charge_shower(double *pos, double *dir, double *pmt_p
omega = get_solid_angle_fast(pos,pmt_pos,pmt_normal,r);
- R = NORM(pos);
-
- if (R <= AV_RADIUS) {
- n = n_d2o;
- } else {
- n = n_h2o;
- }
-
theta_pmt = acos(-cos_theta_pmt);
f_reflec = get_weighted_pmt_reflectivity(theta_pmt);
f = get_weighted_pmt_response(theta_pmt);
diff --git a/src/test.c b/src/test.c
index 7179f6b..fe5cb66 100644
--- a/src/test.c
+++ b/src/test.c
@@ -1151,8 +1151,6 @@ int test_solid_angle_fast(char *err)
double n[3] = {0,0,1};
double r = 1.0;
double solid_angle;
- double dir[3];
- double L, r0, R;
double expected;
init_genrand(0);
@@ -1163,14 +1161,6 @@ int test_solid_angle_fast(char *err)
rand_sphere(n);
r = genrand_real2();
- dir[0] = pos[0] - pmt[0];
- dir[1] = pos[1] - pmt[1];
- dir[2] = pos[2] - pmt[2];
-
- L = fabs(dir[0]*n[0] + dir[1]*n[1] + dir[2]*n[2]);
- R = sqrt(dir[0]*dir[0] + dir[1]*dir[1] + dir[2]*dir[2]);
- r0 = sqrt(R*R - L*L);
-
solid_angle = get_solid_angle_fast(pos,pmt,n,r);
expected = get_solid_angle(pos,pmt,n,r);