Skip to content
Snippets Groups Projects
Commit e08f4f58 authored by Mark Jones's avatar Mark Jones Committed by Mark K Jones
Browse files

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.
parent e92f6b9b
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