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.
Loading
Please register or sign in to comment