User Tools


Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
itop:documentation:code [2013/06/07 07:36]
kurtisn
itop:documentation:code [2013/06/17 04:36] (current)
kurtisn
Line 70: Line 70:
 Please note that we are currently assuming that all channels from the same ASIC use the same dt calibration,​ so even though all pulser data was taken for channel 1, it should be suitable for all channels on that ASIC. Please note that we are currently assuming that all channels from the same ASIC use the same dt calibration,​ so even though all pulser data was taken for channel 1, it should be suitable for all channels on that ASIC.
  
-==== Current Best Calibration Procedure ====+==== (My) Current Best Calibration Procedure ==== 
 + 
 +  * Data points are assumed to lie on a uniform grid with nominal sampling rate (2.7135 GSPS). 
 +  * All region-of-interest waveforms (sets of 4 windows) are aligned based on the first window. ​ If the first window is even, we align based on the number of sampling clock periods from the reference window. ​ One period is (1./​0.127216)*6.0 nanoseconds. ​ If the first window is odd, we align to the first window - 1 and project forward to the window boundary. ​ These should nominally match, but there are subtle potential differences between the two. 
 +  * Adjust all waveform times by the FTSW TDC measurement. ​ The scale per TDC count is (ftsw_clock_period / (1958.-914.)) ns.  This was extracted based on the known clock frequency and the width of the TDC distribution. ​ The resulting value is slightly different than the nominal 50 ps / count. 
 +  * Timing for fixed amplitude pulser data is obtained with the function FindTDCAndADC(). 
 +  * No interpolation is applied to data. 
 +  * Find the maximum waveform point and its corresponding ADC value with FindMax(). 
 +  * Collect data on the maximum pulse height as a function of the sample where the maximum was found. 
 +  * Use the above as a calibration to normalize pulse heights across all samples. 
 +  * Repeat all above steps with the calibration applied, then... 
 +  * Search backwards from the maximum for a fixed threshold using FindThresholdTime(). ​ For Fuji-hall pulser data the value was roughly optimized at 150 ADC counts, but may differ by dataset and pulse shape. 
 +  * Collect data on extracted timing versus sample number where the threshold edge was found. 
 +  * Any structure in the above plot is indicative of the timing calibration sample-to-sample. 
 +  
 +==== (My) Current Best MCP-PMT Timing Procedure ==== 
 + 
 +  * Do the alignment for first_window/​ref_window as above. 
 +  * Do the alignment for FTSW TDC value as above. 
 +  * Adjust each sample point time by the values obtained from the procedure above. 
 +  * Do NOT apply the amplitude corrections from above, as they'​re unlikely to be the same for MCP-PMT pulses. 
 +  * Apply a cubic spline to place the points back onto a uniform grid at the nominal sampling rate.  This is handled by InterpolateToUniformGrid(). 
 +  * Apply a simple IIR-style RC integrator with time constant of 5 times the nominal sampling rate.  This is handled by RCIntegrator(). 
 +  * Find the pulse maximum with FindMax(). 
 +  * Measure the baseline from the sample 50 before the max to the sample 15 before the max.  Truncate as necessary for the beginning of the ROI.  This is done with MeasureBaseline(). 
 +  * Subtract off this baseline from all samples. ​ This is done as part of the same function as above. 
 +  * Fit the leading edge of the pulse from 12 samples before the maximum to 6 samples before the maximum to obtain the timing. ​ This is done with FitThresholdEdge().
  
-==== Current Best MCP-PMT Timing Procedure ==== 
 ===== Produce Feature Extracted ROOT Trees ===== ===== Produce Feature Extracted ROOT Trees =====