This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
itop:documentation:code [2013/06/03 17:43] – [Timing Calibration Resolution Studies] kurtisn | itop:documentation:code [2013/06/17 14:36] (current) – kurtisn | ||
---|---|---|---|
Line 3: | Line 3: | ||
The latest version of the code is available here: | The latest version of the code is available here: | ||
- | LINK ME | + | [[http:// |
+ | |||
+ | Calibration constants are posted [[itop: | ||
+ | |||
+ | (Please note that although there are some variables in this ROOT tree to handle crosstalk, they are not quite working right yet. I will post an update when I debug them.) | ||
The following is the general procedure to produce summary ROOT files. | The following is the general procedure to produce summary ROOT files. | ||
Line 21: | Line 25: | ||
Your next steps will depend on what you're trying to do. I suggest below some things that I often do. | Your next steps will depend on what you're trying to do. I suggest below some things that I often do. | ||
- | |||
===== Visual Waveform Checks ===== | ===== Visual Waveform Checks ===== | ||
If you want to look over a few waveforms by eye to see if they look reasonable, do the following: | If you want to look over a few waveforms by eye to see if they look reasonable, do the following: | ||
+ | In ROOT, open the file produced with ConvertToRootNoAuxDataMultiScrod with a command like: | ||
+ | TFile *f1 = new TFile("< | ||
+ | |||
+ | Load the script: | ||
+ | |||
+ | .L scripts/ | ||
+ | |||
+ | Then: | ||
+ | |||
+ | DrawAll() | ||
+ | |||
+ | And press enter to cycle through waveforms. | ||
===== Timing Calibration Resolution Studies ===== | ===== Timing Calibration Resolution Studies ===== | ||
- | The following are the best known procedures for performing timing calibration using the pulser, and performing MCP-PMT timing measurements. | + | The following are the best known procedures for performing timing calibration using the pulser, and performing MCP-PMT timing measurements. |
+ | |||
+ | The calibration script can be loaded with: | ||
+ | |||
+ | .L DrawWaveform4SegmentsWithCamac.C+ | ||
+ | |||
+ | The arguments are: | ||
+ | |||
+ | DrawWaveform4SegmentsWithCamac(< | ||
+ | |||
+ | The three calibration files can be left out by passing 0 or NULL as an argument in their place. | ||
+ | |||
+ | * amplitude.cal - Sample-to-sample amplitude correction (useful for pulser data, not recommended for laser data). | ||
+ | * pulser.cal - Correction for sample-to-sample timing (preferably based on high statistics pulser data). | ||
+ | * ph.cal - Correction for overall pulse timing based on pulse height. | ||
+ | |||
+ | ==== Previously compiled calibration constants ==== | ||
+ | |||
+ | Calibration constants based on the 2013-05-26 Fuji Hall pulser data are available here: | ||
+ | |||
+ | [[http:// | ||
+ | |||
+ | In the tarball of calibration constants posted here, these calibration files are renamed as scrod< | ||
+ | |||
+ | Please note that we are currently assuming that all channels from the same ASIC use the same dt calibration, | ||
+ | |||
+ | ==== (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. | ||
+ | * Adjust all waveform times by the FTSW TDC measurement. | ||
+ | * 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(). | ||
+ | * 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/ | ||
+ | * 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' | ||
+ | * 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. | ||
+ | * Fit the leading edge of the pulse from 12 samples before the maximum to 6 samples before the maximum to obtain the timing. | ||
+ | |||
+ | ===== Produce Feature Extracted ROOT Trees ===== | ||
+ | |||
+ | To do TOP analysis, the waveform is often superfluous information. | ||
+ | |||
+ | - Use the code scripts/ | ||
+ | - .x scripts/ | ||
- | ==== Current Best Calibration Procedure ==== | + | The output file will have just the summary data, no waveforms. |
- | ==== Current Best MCP-PMT Timing Procedure ==== | + | For further analysis, here are the branch names and types (see [[http:// |
- | ===== Produce Summary Files ===== | + | |
+ | * " | ||
+ | * " | ||
+ | * " | ||
+ | * " | ||
+ | * " | ||
+ | * " | ||
+ | * " | ||
+ | * " | ||
+ | * " | ||
+ | * " | ||
+ | * " | ||
+ | * " | ||
+ | * " | ||
+ | * " | ||
+ | * " | ||
+ | Other CAMAC quantities can and should be added as we know what they correspond to. |