LE algo

From GlueXWiki
Revision as of 15:30, 23 May 2011 by Nsjarvis (Talk | contribs)

Jump to: navigation, search
  • Page still under edit* read at your own risk (and don't believe any of it... yet)*

Results using Gerard's leading edge algo to extract drift-time from CDC prototype cosmics data

  • 50/50 mixed Ar, CO2
  • Recalibrated MFCs
  • Outer plenum added to CDC prototype to prevent leaks
  • New modified HVB
  • 2050V
  • Modified preamp4 (terminating resistors removed)
  • Prototype tilted at 45o to enclosing scintillators (scints trigger the daq)


The original algorithm is here LE algo It takes a number of samples from the ADC data, interpolates 4 extra points between each sample, convolutes them with the filter to give an approximation to the original pre-sampled data, and returns the first value above a predefined threshold. There are a variety of implementations below. The "without interpolation" results are from a simple comparison between ADC data and threshold.

Below: excerpt from one event in one straw showing interpolated and sampled fADC data

Interpolated (blue) and raw (black circles) ADC data

Below: Events with ADC data going above pedestal mean + 5 pedestal sigma are selected. 20 samples starting 10 samples before the threshold crossing are sent to the LE algo after subtracting mean pedestal. Pedestal mean is for 10 samples starting 15 samples before the threshold crossing. The threshold for the LE algo is 2 pedestal sigma. Pedestal sigma is for 100 early samples in 100 events. Left: all samples Right: zoomed

Event 11, ADC data, LE with interpolation, green=threshold, pink=pedestal (horiz.) and pedestal window (vert.), blue=LE threshold (horiz.) and LE window (vert.), grey=LE extracted
Event 11, ADC data, LE with interpolation, green=threshold, pink=pedestal (horiz.) and pedestal window (vert.), blue=LE threshold (horiz.) and LE window (vert.), grey=LE extracted
Event 29, Ch23, ADC data, LE with interpolation, green=threshold, pink=pedestal (horiz.) and pedestal window (vert.), blue=LE threshold (horiz.) and LE window (vert.), grey=LE extracted
Event 29, Ch23, ADC data, LE with interpolation, green=threshold, pink=pedestal (horiz.) and pedestal window (vert.), blue=LE threshold (horiz.) and LE window (vert.), grey=LE extracted
Event 45, Ch23, ADC data, LE with interpolation, green=threshold, pink=pedestal (horiz.) and pedestal window (vert.), blue=LE threshold (horiz.) and LE window (vert.), grey=LE extracted
Event 45, Ch23, ADC data, LE with interpolation, green=threshold, pink=pedestal (horiz.) and pedestal window (vert.), blue=LE threshold (horiz.) and LE window (vert.), grey=LE extracted




Left: drift-time with interpolation; Right: no interpolation


Below: 20 samples starting 10 samples before the threshold crossing are sent to the LE algo after pedestal subtraction.

Drift time ch23, with interpolation, 20 samples
Drift time ch23, without interpolation, 20 samples

Below: Events with ADC data going above pedestal mean + 5 sigma are selected. Events with 5 or more hits are selected. 20 samples starting 10 samples before the threshold crossing are sent to the LE algo after subtracting mean pedestal. The threshold for the LE algo is 3 sigma. Left: drift-time with interpolation; Right: no interpolation

Drift time ch23, with interpolation
Drift time ch23, without interpolation

Below: As above, for the interpolated data, but only events where a track can be fitted are selected. Tzero was obtained by fitting a straight line to the leading edge of the drift time histo (between the overall maximum and the minimum preceding it) and taking the value where it crosses the x-axis (this needs work). First the drift-time histo was put into 4ns bins to unify any double-maxima in the histogram. (Events with ADC data going above pedestal mean + 5 sigma are selected. Events with 5 or more hits are selected. 20 samples starting 10 samples before the threshold crossing are sent to the LE algo after subtracting mean pedestal. The threshold for the LE algo is 3 sigma.)

Drift time ch23 (tracks), with interpolation
Residuals ch23, with interpolation
Residuals vs drift time ch23, with interpolation
Residuals ch23 for drift time > 2100ns ch23, with interpolation

Negative residuals come from a tzero that is too small (or drift time that is too large). 3 sigma is ~ 30 in ADC value, probably too late. Lowering the LE threshold makes it more likely to accept noise before the signal and so the # tracked events decreases slightly.

Below: as above, for LE threshold of 1 sigma. (Events with ADC data going above pedestal mean + 5 sigma are selected. Events with 5 or more hits are selected. 20 samples starting 10 samples before the threshold crossing are sent to the LE algo after subtracting mean pedestal. The threshold for the LE algo is 1 sigma.)

Pink line: pedestal from samples 0-100 Green line: threshold to find the signal Blue line: LE threshold Grey line: fitted drift time


ADC data ch23 event 11
ADC data ch23 event 11 (time expanded)
ADC data ch23 event 29
ADC data ch23 event 29 (time expanded)

The above pics look too wrong to be true. Maybe I made an error in the plot. ?? In any case the pedestal is not optimal.

For most of the above pics I had calculated the interpolated threshold crossing time wrong. For the pics below I had accidentally switched interpolation off. I did say don't believe any of this stuff yet, it's early days.


Changed the code to use mean pedestal of 5th to 15th samples before the higher threshold-crossing point. Blue vertical lines mark the region sent to the LE filter algo.

ADC data ch23 event 11 new ped
ADC data ch23 event 11 new ped (time expanded)
ADC data ch23 event 29 new ped
ADC data ch23 event 29 new ped (time expanded)



Drift time ch23 (tracks), with interpolation, LE threshold 1sigma
Residuals ch23, with interpolation, LE threshold 1sigma
Residuals vs drift time ch23, with interpolation, LE threshold 1sigma
Residuals ch23 for drift time > 2100ns ch23, with interpolation, LE threshold 1sigma