diff options
Diffstat (limited to 'src/fit.c')
-rw-r--r-- | src/fit.c | 10 |
1 files changed, 5 insertions, 5 deletions
@@ -5155,9 +5155,9 @@ double guess_t0(event *ev, double *pos) /* Add the charge weighted time difference between the PMT hit time and * the time it would take a photon to hit the PMT from `pos`. */ - t0 += ev->pmt_hits[i].qhs*(ev->pmt_hits[i].t - distance*n/SPEED_OF_LIGHT); + t0 += ev->pmt_hits[i].q*(ev->pmt_hits[i].t - distance*n/SPEED_OF_LIGHT); - qhs_sum += ev->pmt_hits[i].qhs; + qhs_sum += ev->pmt_hits[i].q; } /* Divide by the total QHS sum. */ @@ -5195,7 +5195,7 @@ void guess_direction(event *ev, double *pos, double *theta, double *phi) normalize(pmt_dir); /* Multiply the vector by the QHS charge in the PMT. */ - MUL(pmt_dir,ev->pmt_hits[i].qhs); + MUL(pmt_dir,ev->pmt_hits[i].q); /* Add this to the estimated direction. */ ADD(dir,dir,pmt_dir); @@ -5229,7 +5229,7 @@ double guess_energy(event *ev, double *pos, double *dir) SUB(pmt_dir,pmts[i].pos,pos); normalize(pmt_dir); if (DOT(pmt_dir,dir) > 1/n_d2o) - qhs_sum += ev->pmt_hits[i].qhs; + qhs_sum += ev->pmt_hits[i].q; } return qhs_sum/6.0; @@ -5571,7 +5571,7 @@ int fit_event(event *ev, double *xopt, double *fmin, int id, double maxtime) qhs_sum = 0.0; for (i = 0; i < MAX_PMTS; i++) { if (ev->pmt_hits[i].flags || pmts[i].pmt_type != PMT_NORMAL || !ev->pmt_hits[i].hit) continue; - qhs_sum += ev->pmt_hits[i].qhs; + qhs_sum += ev->pmt_hits[i].q; } T0 = qhs_sum/6.0; |