Skip to content
Snippets Groups Projects
Commit e06d50f0 authored by hallc-online's avatar hallc-online Committed by Mark K Jones
Browse files

Modify fFpTimeAll filling in THcHodoscope

fFPTimeAll is the average focal plane time from all
  scintillator times. In EstimatedFocalPlaneTime fFPTimeAll is set to
  starttime which is the average FP time without using the DC track.

If there are tracks, then a focal plane time is calculated
for each track using the track information to improve the focal
plane time calculation and save for each track. Previously
 fFPTimeAll was being filled for each track, so in effect
fFPTimeAll was being filled with the FP time of the last track.
ALso there was no check that nFPTimeSum was not zero when
calculating average FP time, so one could get NaN values for
fFPTimeAll

To fix the problem , added  and modified line

Double_t fptime=-1000;
if (nFPTimeSum>0) fptime = FPTimeSum/nFPTimeSum;

And moved setting fFPTimeAll to THcHodoscope::FineProcess
Now fFPTimeAll is set the the average focal plane time of
the golden track.
parent a77e73a9
No related branches found
No related tags found
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment