Skip to content
Snippets Groups Projects
  • hallc-online's avatar
    e06d50f0
    Modify fFpTimeAll filling in THcHodoscope · e06d50f0
    hallc-online authored
    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.
    e06d50f0
    History
    Modify fFpTimeAll filling in THcHodoscope
    hallc-online authored
    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.
THcHodoscope.cxx 63.69 KiB