Fix logical flaw in THcScintillator::ProcessHits in finding good adc hit in...
Fix logical flaw in THcScintillator::ProcessHits in finding good adc hit in multiple hits in one channel When looping over hits to find the best ADC hit, the code was looping over frNegAdcPulseInt->GetEntries() or frPosAdcPulseInt->GetEntries() which are the raw arrays that are filled for all raw hits in the plane The code was not using the proper indexes to access the right hits. The logic is simpler if one loops over rawNegAdcHit.GetNPulses() or rawPosAdcHit.GetNPulses() which are the the raw hit object for the paritcular hit. NPulses is the number of ADC pulses that were found for that adc channel. The first adc pulse for the channel which is within the adc time window then has its information saved for late insertion into the "good" vectors for the hit if either the hit passes 'good" tdc and adc for the POS or NEG side of the PMT.
Loading
Please register or sign in to comment