Achim Czasch Wed 12/7/2016 5:57 AM To: Dubrovin, Mikhail; Cc: Osipov, Timur; Action Items Dear Mikhail and Timur, I have compiled the lib on CentOS 7 (which is basically RedHat???) on gcc version Here are 2 example programs that show how to use the lib: a) This program can read the LMF-data files that our software "CoboldPC" produces. Timur Osipov may have some sample files from his beam times. http://www.roentdek.com/download/LCLS_Linux/sort_LMF_1_detector.zip b) This is basically the same. But it does not read LMFs. It expects a simple binary file format. So you will start with this one because you have your own ADC data. http://www.roentdek.com/download/LCLS_Linux/sort_non-LMF_from_1_detector.zip Roadmap: - measure the detector signals with your ADCs - write a program that extracts the timing info from the signals. Simple method: look for the 2 samples which are just above and just below A. A is the half amplitude of this signal. The interpolate between the 2 points to find the timing value @ half ampl.. Advantage: Very robust. Works always. better method: Mimic the CFD-mechanism. Superimpose the signal with an inverted and delayed copy of itself. Look for the point where this new signal crosses zero. Advantage: better resolution (about factor sqrt(2)). But the simple method is already very precise. - Now you have the timing values of all 7 detector signals. Now you can use my example programs. Some histograms that you will need: Let's call the signals u1,u2,v1,v2,w1,w2 and mcp. (values in nanoseconds) - 1D: u1+u2-2*mcp - 1D: v1+v2-2*mcp - 1D: w1+w2-2*mcp - 1D: u1-u2 - 1D: v1-v2 - 1D: w1-w2 - 2D u1+u2-2*mcp versus u1-u2 - 2D v1+v2-2*mcp versus v1-v2 - 2D w1+w2-2*mcp versus w1-w2 3 position images: Xuv versus Yuv Xuw versus Yuw Xvw versus Yvw with u= u1-u2 v= v1-v2 w= w1-w2 - w_offset and Xuv = u * fu; Yuv = (u * fu - 2.*v * fv)*0.5773502691896; Xuw = u * fu; Yuw = (2.*w * fw - u * fu)*0.5773502691896; Xvw = (v * fv + w * fw); Yvw = (w * fw - v * fv)*0.5773502691896; fu, fv, fw are constants close to 0.7. w_offset is a constant close to zero. The exact values for these constants will be extracted from real data later during the calibration. (Timur can tell you more about this.) And it is also good to plot this data for each signals: FWHM versus amplitude You can calculate the FWHM (full width at half maximum) similar to the "simple method" that I have described further above. Just do the some on the trailing edge of the signal. We will have to exchange some more emails until everything is working. best, Achim