Difference between revisions of "CDC prototype more on timing 3"

From GlueXWiki
Jump to: navigation, search
 
(24 intermediate revisions by the same user not shown)
Line 1: Line 1:
 
Latest approach to hit finding is as follows:
 
Latest approach to hit finding is as follows:
  
# Find a hit channel and event pedestal
+
# Find a hit channel and filter events
 
## Calculate mean pedestal P<sub>m</sub> & s.d. (&sigma;) for first 100 samples in 100 events (trigger is approx sample 200)
 
## Calculate mean pedestal P<sub>m</sub> & s.d. (&sigma;) for first 100 samples in 100 events (trigger is approx sample 200)
## Set a threshold T<sub>p</sub> (eg 3.5 &sigma;) for further investigation, eg P<sub>m</sub> + T<sub>p</sub> , select events & channels where adc value exceeds this  
+
## Set a threshold <span style= "color:#333399">P<sub>m</sub> + T<sub>pm</sub></span> (T<sub>pm</sub> ~ 3.5 &sigma;) for further investigation, select events & channels where adc value exceeds this  
## Calculate event pedestal P<sub>evt</sub> as mean of samples 90 to 190 in current event
+
#Calculate event pedestal
## Select events where adc value goes over high threshold T<sub>h1</sub> + P<sub>evt</sub> (T<sub>h1</sub> ~ 5sigma) 
+
## Calculate event pedestal P<sub>evt</sub> for current event & channel, as mean of 100 samples ending 10 samples before trigger time
 
# Use event pedestal to find high threshold time and new local pedestal
 
# Use event pedestal to find high threshold time and new local pedestal
 
## Upsample data from samples 150 to 350 (max drift time + trigger time is approx sample 290)
 
## Upsample data from samples 150 to 350 (max drift time + trigger time is approx sample 290)
## Search forward to find point x1 where data goes above a not quite so high threshold T<sub>h2</sub> + P<sub>evt</sub> where T<sub>h2</sub> ~ 4 &sigma;
+
## Select events where adc value goes over a high threshold <span style= "color:#333399">P<sub>evt</sub> + T<sub>pe</sub></span> at point x (T<sub>pe</sub> ~ 5sigma)) 
## Find a local pedestal P<sub>loc</sub> as adc value at N<sub>p</sub> upsampled points (minisamples) before x1 (eg N<sub>p</sub>=15)
+
## Find a local pedestal P<sub>loc</sub> as adc value at N<sub>p</sub> upsampled points (minisamples) before x (eg N<sub>p</sub>=15)
# Use local pedestal to find low threshold time
+
# Use local pedestal to find high and low threshold times
## Search backward from x1 to find point x2 where data goes below low threshold T<sub>l</sub> + P<sub>loc</sub>  where T<sub>l</sub> ~ &sigma;
+
## Search forward from x-N<sub>p</sub> to find point x1 where data goes over a slightly less high threshold <span style= "color:#333399">P<sub>loc</sub> + T<sub>h</sub></span>  where T<sub>h</sub> ~ 4 &sigma;
 
+
## Search backward from x1 to find point x2 where data goes below low threshold <span style= "color:#333399">P<sub>loc</sub> + T<sub>l</sub></span>  where T<sub>l</sub> ~ &sigma;
  
 
To find where to take local pedestal:
 
To find where to take local pedestal:
Line 39: Line 39:
  
 
{| border="0" cellpadding="2"  
 
{| border="0" cellpadding="2"  
|+Resolution after subtracting pedestal at different N<sub>p</sub>, T<sub>h1</sub> = 5sigma, T<sub>h2</sub> = 4sigma, T<sub>h1</sub> = 1sigma
+
|+Resolution after subtracting pedestal at different N<sub>p</sub> for T<sub>h1</sub> 5sigma, T<sub>h</sub> = 4sigma, T<sub>l</sub> = 1sigma
|[[Image:run_31761_track81c_np20.png|thumb|x250px|20 minisamples before threshold crossing]]
+
|[[Image:run_31761_track86_np20.png|thumb|x250px|20 minisamples before threshold crossing (tz=8)]]
|[[Image:run_31761_track81c_np15.png|thumb|x250px|15 minisamples before threshold crossing]]
+
|[[Image:run_31761_track86_np15.png|thumb|x250px|15 minisamples before threshold crossing (tz=7)]]
|[[Image:run_31761_track81c_np12.png|thumb|x250px|12 minisamples before threshold crossing]]
+
|[[Image:run_31761_track86_np12.png|thumb|x250px|12 minisamples before threshold crossing (tz=6)]]
|[[Image:run_31761_track81c_np10.png|thumb|x250px|10 minisamples before threshold crossing]]
+
|[[Image:run_31761_track86_np10.png|thumb|x250px|10 minisamples before threshold crossing (tz=6)]]
|[[Image:run_31761_track81c_np5.png|thumb|x250px|5 minisamples before threshold crossing]]
+
|[[Image:run_31761_track86_np5.png|thumb|x250px|5 minisamples before threshold crossing (tz=6)]]
 
|}
 
|}
 +
 +
Optimised thresholds and N<sub>p</sub> - best combination for this data (2100V, 50/50 Ar/CO<sub>2</sub>, prototype tilted at 25<sup>o</sup> to horizontal) is T<sub>h1</sub> 5sigma, T<sub>h</sub> = 4sigma, T<sub>l</sub> = 1sigma and N<sub>p</sub> = 13 or 14 with dt=6ns.
 +
{| border="0" cellpadding="2"
 +
|+Drift-time=T<sub>l</sub> crossing time; T<sub>h1</sub> 5sigma, T<sub>h</sub> = 4sigma, T<sub>l</sub> = 1sigma, N<sub>p</sub>=14, dt=6
 +
|[[Image:run_31761_track86_np14_res20.png|thumb|x250px|Resolution ch20]]
 +
|[[Image:run_31761_track86_np14_xchunks.png|thumb|x250px|Resolution with drift distance ch20]]
 +
|[[Image:run_31761_track86_np14_resdist20.png|thumb|x250px|Resolution with drift distance ch20]]
 +
|[[Image:run_31761_track86_np14_xchunks3.png|thumb|x250px|Resolution with drift distance ch20]]
 +
|}
 +
 +
{| border="0" cellpadding="2"
 +
|+Drift-time=Projection from T<sub>h</sub> through T<sub>l</sub> to P<sub>loc</sub>; T<sub>h1</sub> 5sigma, T<sub>h</sub> = 4sigma, T<sub>l</sub> = 1sigma, N<sub>p</sub>=13, dt=6
 +
|[[Image:run_31761_track90_np13_res20.png|thumb|x250px|Resolution ch20]]
 +
|[[Image:run_31761_track90_np13_xchunks.png|thumb|x250px|Resolution with drift distance ch20]]
 +
|[[Image:run_31761_track90_np13_resdist20.png|thumb|x250px|Resolution with drift distance ch20]]
 +
|[[Image:run_31761_track90_np13_xchunks3.png|thumb|x250px|Resolution with drift distance ch20]]
 +
|}
 +
 +
{| border="0" cellpadding="2"
 +
|+Drift-time=Intercept of straight line fit of crossing-points of T<sub>h</sub> T<sub>l</sub> and their midpoint with P<sub>loc</sub>; T<sub>h1</sub> 5sigma, T<sub>h</sub> = 4sigma, T<sub>l</sub> = 1sigma, N<sub>p</sub>=13, dt=6
 +
|[[Image:run_31761_track88_np13_res20.png|thumb|x250px|Resolution ch20]]
 +
|[[Image:run_31761_track88_np13_xchunks.png|thumb|x250px|Resolution with drift distance ch20]]
 +
|[[Image:run_31761_track88_np13_resdist20.png|thumb|x250px|Resolution with drift distance ch20]]
 +
|[[Image:run_31761_track88_np13_xchunks3.png|thumb|x250px|Resolution with drift distance ch20]]
 +
|}
 +
RMS is least for Drift-time=Projection from T<sub>h</sub> through T<sub>l</sub> to P<sub>loc</sub>.  Use this to look at data taken with prototype at different angles. All data above were with prototype at 25<sup>o</sup> to horizontal
 +
 +
{| border="0" cellpadding="2"
 +
|+Prototype horizontal Drift-time=Projection from T<sub>h</sub> through T<sub>l</sub> to P<sub>loc</sub>; T<sub>h1</sub> 5sigma, T<sub>h</sub> = 4sigma, T<sub>l</sub> = 1sigma, N<sub>p</sub>=13, dt=6
 +
|[[Image:run_31757_track90_np13_res20.png|thumb|x250px|Resolution ch20]]
 +
|[[Image:run_31757_track90_np13_xchunks.png|thumb|x250px|Resolution with drift distance ch20]]
 +
|[[Image:run_31757_track90_np13_resdist20.png|thumb|x250px|Resolution with drift distance ch20]]
 +
|[[Image:run_31757_track90_np13_xchunks3.png|thumb|x250px|Resolution with drift distance ch20]]
 +
|}
 +
 +
{| border="0" cellpadding="2"
 +
|+Prototype 25<sup>o</sup> to horizontal Drift-time=Projection from T<sub>h</sub> through T<sub>l</sub> to P<sub>loc</sub>; T<sub>h1</sub> 5sigma, T<sub>h</sub> = 4sigma, T<sub>l</sub> = 1sigma, N<sub>p</sub>=13, dt=6
 +
|[[Image:run_31761_track90_np13_res20.png|thumb|x250px|Resolution ch20]]
 +
|[[Image:run_31761_track90_np13_xchunks.png|thumb|x250px|Resolution with drift distance ch20]]
 +
|[[Image:run_31761_track90_np13_resdist20.png|thumb|x250px|Resolution with drift distance ch20]]
 +
|[[Image:run_31761_track90_np13_xchunks3.png|thumb|x250px|Resolution with drift distance ch20]]
 +
|}
 +
 +
{| border="0" cellpadding="2"
 +
|+Prototype 35<sup>o</sup> to horizontal Drift-time=Projection from T<sub>h</sub> through T<sub>l</sub> to P<sub>loc</sub>; T<sub>h1</sub> 5sigma, T<sub>h</sub> = 4sigma, T<sub>l</sub> = 1sigma, N<sub>p</sub>=13, dt=6
 +
|[[Image:run_31763_track90_np13_res20.png|thumb|x250px|Resolution ch20]]
 +
|[[Image:run_31763_track90_np13_xchunks.png|thumb|x250px|Resolution with drift distance ch20]]
 +
|[[Image:run_31763_track90_np13_resdist20.png|thumb|x250px|Resolution with drift distance ch20]]
 +
|[[Image:run_31763_track90_np13_xchunks3.png|thumb|x250px|Resolution with drift distance ch20]]
 +
|}
 +
 +
 +
{| border="0" cellpadding="2"
 +
|+Prototype 45<sup>o</sup> to horizontal Drift-time=Projection from T<sub>h</sub> through T<sub>l</sub> to P<sub>loc</sub>; T<sub>h1</sub> 5sigma, T<sub>h</sub> = 4sigma, T<sub>l</sub> = 1sigma, N<sub>p</sub>=13, dt=6
 +
|[[Image:run_31765_track90_np13_res20.png|thumb|x250px|Resolution ch20]]
 +
|[[Image:run_31765_track90_np13_xchunks.png|thumb|x250px|Resolution with drift distance ch20]]
 +
|[[Image:run_31765_track90_np13_resdist20.png|thumb|x250px|Resolution with drift distance ch20]]
 +
|[[Image:run_31765_track90_np13_xchunks3.png|thumb|x250px|Resolution with drift distance ch20]]
 +
|}
 +
 +
{| border="0" cellpadding="2"
 +
|+Leading edge gradient from T<sub>h</sub> to T<sub>l</sub> with P<sub>loc</sub>; T<sub>h1</sub> 5sigma, T<sub>h</sub> = 4sigma, T<sub>l</sub> = 1sigma, N<sub>p</sub>=13, dt=6
 +
|[[Image:run_31757_track91_LE_grad.png|thumb|x250px|Prototype horizontal]]
 +
|[[Image:run_31761_track91_LE_grad.png|thumb|x250px|Prototype 25<sup>o</sup> to horizontal]]
 +
|[[Image:run_31763_track91_LE_grad.png|thumb|x250px|Prototype 35<sup>o</sup> to horizontal]]
 +
|[[Image:run_31765_track91_LE_grad.png|thumb|x250px|Prototype 45<sup>o</sup> to horizontal]]
 +
|}
 +
 +
{| border="0" cellpadding="2"
 +
|+Drift times for untracked, tracked and first hits in ch20 (first hit = earliest hit of all hits for that event) <br/> Plotted on the suspicion that the peaks in the drift time
 +
histogram are caused by after-event ringing in the prototype.
 +
|[[Image:run_31756_dt.png|thumb|x250px|track91 prototype horizontal, same settings as previous set]]
 +
|[[Image:run_31756_dtz.png|thumb|x250px|larger scale]]
 +
|}
 +
 +
{| border="0" cellpadding="2"
 +
|+Drift time with top scint disc signal expanded to cover whole of lower scint signal (not just its leading edge)
 +
[[Image:run_31769_drift20.png|thumb|x250px|track91 horizontal same settings as previous]]
 +
|}
 +
 +
<hr>
 +
 +
{| border="0" cellpadding="2"
 +
|+Drift time fit|[[Image:dtfit.png|thumb|x250px|Fit to drift time histogram, untracked hits in ch20 vs drift time (ns)]]
 +
|}
 +
 +
  Function from G.Avolio et al NIM A523 (2004) 309-322
 +
 +
  TF1 *f = new TF1("f","[0] + [1]*(1+[2]*exp(([4]-x)/[3]) ) / ( (1+exp(([4]-x)/[6])) * (1+exp((x-[5])/[7])) )")
 +
 +
Parameter 0 is constant background; 4 is t0, 6 is the slope of the leading edge at t0; 5 is tmax and 7 is the slope of the tail at tmax; 2,3 and 4 describe the fall-off after the peak.
 +
I didn't use param [0] as there is so little noise. To get a reasonable looking fit, tmax was fixed at 750 and the tmax tail slope was fixed at 10.
 +
 +
 +
 +
Added another term to the function to model the fall-off better.
 +
 +
TF1 *g2 = new TF1("g2","[0] * (1 + [1]*exp(([3]-x)/[2]) + [7]*exp(([3]-x)/[8]) ) / ( (1+exp(([3]-x)/[5])) * (1+exp((x-[4])/[6])) )")
 +
 +
 +
{| border="0" cellpadding="2"
 +
|+Drift time fit improved
 +
|[[Image:run_31768_dt20fit.png|thumb|x250px|Fit to drift time histogram]]
 +
|[[Image:run_31768_dt20fitz.png|thumb|x250px|Expanded time axis]]
 +
|}
 +
 +
The fit gives a t0 estimate of 86.6. 
 +
The value which gives best resolution (and least dependence of resolution on drift time) is  86ns (80.0 from straight line fit to leading edge + 6ns to optimize the resolution), with early arrivals moved to t0+2ns.  The extra 6ns were determined by trial and error after starting from a rough estimate of the time at 2/3 of the way up the leading edge (84ns).

Latest revision as of 09:46, 10 May 2012

Latest approach to hit finding is as follows:

  1. Find a hit channel and filter events
    1. Calculate mean pedestal Pm & s.d. (σ) for first 100 samples in 100 events (trigger is approx sample 200)
    2. Set a threshold Pm + Tpm (Tpm ~ 3.5 σ) for further investigation, select events & channels where adc value exceeds this
  2. Calculate event pedestal
    1. Calculate event pedestal Pevt for current event & channel, as mean of 100 samples ending 10 samples before trigger time
  3. Use event pedestal to find high threshold time and new local pedestal
    1. Upsample data from samples 150 to 350 (max drift time + trigger time is approx sample 290)
    2. Select events where adc value goes over a high threshold Pevt + Tpe at point x (Tpe ~ 5sigma))
    3. Find a local pedestal Ploc as adc value at Np upsampled points (minisamples) before x (eg Np=15)
  4. Use local pedestal to find high and low threshold times
    1. Search forward from x-Np to find point x1 where data goes over a slightly less high threshold Ploc + Th where Th ~ 4 σ
    2. Search backward from x1 to find point x2 where data goes below low threshold Ploc + Tl where Tl ~ σ

To find where to take local pedestal:

Mean change in ADC value
Mean change in ADC value
Distribution of ADC values after subtracting pedestal at different Np
20 minisamples before threshold crossing
15 minisamples before threshold crossing
12 minisamples before threshold crossing
10 minisamples before threshold crossing
5 minisamples before threshold crossing
ADC values after subtracting pedestal at different Np
20 minisamples before threshold crossing
15 minisamples before threshold crossing
12 minisamples before threshold crossing
10 minisamples before threshold crossing
5 minisamples before threshold crossing
Resolution after subtracting pedestal at different Np for Th1 5sigma, Th = 4sigma, Tl = 1sigma
20 minisamples before threshold crossing (tz=8)
15 minisamples before threshold crossing (tz=7)
12 minisamples before threshold crossing (tz=6)
10 minisamples before threshold crossing (tz=6)
File:Run 31761 track86 np5.png
5 minisamples before threshold crossing (tz=6)

Optimised thresholds and Np - best combination for this data (2100V, 50/50 Ar/CO2, prototype tilted at 25o to horizontal) is Th1 5sigma, Th = 4sigma, Tl = 1sigma and Np = 13 or 14 with dt=6ns.

Drift-time=Tl crossing time; Th1 5sigma, Th = 4sigma, Tl = 1sigma, Np=14, dt=6
Resolution ch20
Resolution with drift distance ch20
Resolution with drift distance ch20
Resolution with drift distance ch20
Drift-time=Projection from Th through Tl to Ploc; Th1 5sigma, Th = 4sigma, Tl = 1sigma, Np=13, dt=6
Resolution ch20
Resolution with drift distance ch20
Resolution with drift distance ch20
Resolution with drift distance ch20
Drift-time=Intercept of straight line fit of crossing-points of Th Tl and their midpoint with Ploc; Th1 5sigma, Th = 4sigma, Tl = 1sigma, Np=13, dt=6
Resolution ch20
Resolution with drift distance ch20
Resolution with drift distance ch20
Resolution with drift distance ch20

RMS is least for Drift-time=Projection from Th through Tl to Ploc. Use this to look at data taken with prototype at different angles. All data above were with prototype at 25o to horizontal

Prototype horizontal Drift-time=Projection from Th through Tl to Ploc; Th1 5sigma, Th = 4sigma, Tl = 1sigma, Np=13, dt=6
Resolution ch20
Resolution with drift distance ch20
Resolution with drift distance ch20
Resolution with drift distance ch20
Prototype 25o to horizontal Drift-time=Projection from Th through Tl to Ploc; Th1 5sigma, Th = 4sigma, Tl = 1sigma, Np=13, dt=6
Resolution ch20
Resolution with drift distance ch20
Resolution with drift distance ch20
Resolution with drift distance ch20
Prototype 35o to horizontal Drift-time=Projection from Th through Tl to Ploc; Th1 5sigma, Th = 4sigma, Tl = 1sigma, Np=13, dt=6
Resolution ch20
Resolution with drift distance ch20
Resolution with drift distance ch20
Resolution with drift distance ch20


Prototype 45o to horizontal Drift-time=Projection from Th through Tl to Ploc; Th1 5sigma, Th = 4sigma, Tl = 1sigma, Np=13, dt=6
Resolution ch20
Resolution with drift distance ch20
Resolution with drift distance ch20
Resolution with drift distance ch20
Leading edge gradient from Th to Tl with Ploc; Th1 5sigma, Th = 4sigma, Tl = 1sigma, Np=13, dt=6
Prototype horizontal
Prototype 25o to horizontal
Prototype 35o to horizontal
Prototype 45o to horizontal
Drift times for untracked, tracked and first hits in ch20 (first hit = earliest hit of all hits for that event)
Plotted on the suspicion that the peaks in the drift time histogram are caused by after-event ringing in the prototype.
track91 prototype horizontal, same settings as previous set
larger scale
Drift time with top scint disc signal expanded to cover whole of lower scint signal (not just its leading edge)
track91 horizontal same settings as previous

Fit to drift time histogram, untracked hits in ch20 vs drift time (ns)
 Function from G.Avolio et al NIM A523 (2004) 309-322
 TF1 *f = new TF1("f","[0] + [1]*(1+[2]*exp(([4]-x)/[3]) ) / ( (1+exp(([4]-x)/[6])) * (1+exp((x-[5])/[7])) )")

Parameter 0 is constant background; 4 is t0, 6 is the slope of the leading edge at t0; 5 is tmax and 7 is the slope of the tail at tmax; 2,3 and 4 describe the fall-off after the peak. I didn't use param [0] as there is so little noise. To get a reasonable looking fit, tmax was fixed at 750 and the tmax tail slope was fixed at 10.


Added another term to the function to model the fall-off better.

TF1 *g2 = new TF1("g2","[0] * (1 + [1]*exp(([3]-x)/[2]) + [7]*exp(([3]-x)/[8]) ) / ( (1+exp(([3]-x)/[5])) * (1+exp((x-[4])/[6])) )")


Drift time fit improved
Fit to drift time histogram
Expanded time axis

The fit gives a t0 estimate of 86.6. The value which gives best resolution (and least dependence of resolution on drift time) is 86ns (80.0 from straight line fit to leading edge + 6ns to optimize the resolution), with early arrivals moved to t0+2ns. The extra 6ns were determined by trial and error after starting from a rough estimate of the time at 2/3 of the way up the leading edge (84ns).