diff options
author | tlatorre <tlatorre@uchicago.edu> | 2019-07-16 11:18:09 -0500 |
---|---|---|
committer | tlatorre <tlatorre@uchicago.edu> | 2019-07-16 11:18:09 -0500 |
commit | 4178680c74627d6490b44ae6b59b4332700d952f (patch) | |
tree | 0593579ce29eeacb20d265c7933cbdaab3f0d821 /src/fit.c | |
parent | 9f63d7eae7d8be9b599955644aa4c7a92ccb640f (diff) | |
download | sddm-4178680c74627d6490b44ae6b59b4332700d952f.tar.gz sddm-4178680c74627d6490b44ae6b59b4332700d952f.tar.bz2 sddm-4178680c74627d6490b44ae6b59b4332700d952f.zip |
use QLX if QHS is railed
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; |