Software for analysis of waveforms acquired by digital Doppler broadening spectrometer

High-resolution digital spectrometer for coincidence measurement of Doppler broadening of positron annihilation radiation was recently developed and tested. In this spectrometer pulses from high purity Ge (HPGe) detectors are sampled in the real time by fast digitizers and subsequently analyzed off-line by software. We present description of the software routines used for pulse shape analysis in two spectrometer configurations: (i) semi-digital setup in which detector pulses shaped in spectroscopic amplifiers (SA's) are digitized; (ii) pure digital setup in which pulses from detector pre-amplifiers are digitized directly. Software developed in this work will be freely available in the form of source code and pre-compiled binaries.


Introduction
Measurement of Doppler broadening of positron annihilation radiation in coincidence is a well established experimental technique capable of characterizing chemical composition of materials in vicinity of open volume defects. Recent advances in this technique include development of a high-resolution digital spectrometer [1]. Excellent performance of this spectrometer was demonstrated by precise measurement of positron annihilation-in-flight [2]. Digital spectrometer exhibit not only superior energy resolution and signal-to-noise ratio over traditional analogue spectrometers but represent also more economical alternative. It employs real time sampling of pulses from HPGe detectors by fast 12-bit digitizers and their subsequent off-line analysis by software routines. This approach provides several advantages compared to traditional analogue setup: (i) all detector signals are recorded and accessible for latter analysis, (ii) data analysis can be repeated several times to optimize its parameters and to filter out pulses damaged by pile-up or by ballistic deficit, (iii) tedious adjustment of the analogue NIM devices is not necessary anymore.
However, a proper design and implementation of software routines for waveform analysis is crucial for performance of the digital spectrometer.
In this work, algorithms for pulse shape analysis in two spectrometer configurations are described: (i) semi-digital setup in which detector signals are firstly processed by pseudo-Gaussian filter in SA's in order to improve the signal-to-noise-ratio and the output SA signals are digitized, (ii) pure digital setup where pulses from detector pre-amplifiers are digitized directly.

Data analysis 2.1. Semi-digital setup
In semi-digital configuration, waveforms has pseudo-Gaussian shape shown in figure 1(a). We use shaping with time constant of 4 µs and the waveforms consist of 1000 points taken with sampling period of 20 ns. The analysis of sampled waveforms is performed by a code CMFIT [3] in sequence of two runs. In the first run, maximum of the waveform is determined by parabolic fitting. Base-line level prior to the pulse is fitted by a constant line. The onset of the pulse is defined as a point, where derivative of the waveform exceeds a preselected threshold value. If RMS of the base-line or χ 2 value of the parabolic fit exceed preselected levels, waveform is discarded. Pulse height is calculated as a difference between maximum obtained by parabolic fitting and estimated base-line level prior to the pulse. Calculated value is added to the histogram of pulse heights which is then calibrated using known energies of the photo-peaks in the spectrum.
Waveform is further normalized by shifting position of maximum to a common reference point on the horizontal scale and by vertical scaling to a common height. Normalized waveform is finally added to two-dimensional histogram of pulse shapes. Ideal shape of the waveform shown in figure 1(a) is determined using the most frequent values in the two-dimensional histogram of pulse shapes for each channel. Upper and lower bound around the ideal pulse shape (see inset in figure 1(a)) are determined at points where the counts in the two-dimensional histogram fall to 1 10 of the maximum for each channel. In the second run the shape of each waveform is examined by the shape filter constructed in the first run, i.e. shape of the normalized waveform is compared with the ideal shape. Only the waveforms which fall everywhere into the corridor between the lower and the upper bound are accepted. Time interval between maxima of the pulses from first and second detector is calculated. The waveforms are accepted only if their time difference is smaller than 100 ns. Finally, at the end of second run, two-dimensional histogram of E 1 + E 2 − 2m 0 c 2 versus E 1 − E 2 and its one-dimensional vertical and horizontal cuts are constructed.

Pure digital setup
Typical waveform acquired in pure digital setup consisting of 2500 points with sampling period of 60 ns is shown in figure 1(b). Pulse shape analysis in pure digital setup is performed in two runs. In the first run, waveforms are analyzed by DCDB MPI program [3]. At first, waveform is convoluted with differentiating smoothing window. Convoluted waveform is then used to determine number of pulses in the waveform and raw initial values of their amplitudes and positions.. Waveforms containing zero or more than two pulses are discarded. Original waveform is then fitted by model function Main pulse f main is modeled as product of Heaviside step function H s and exponential decay function with amplitude β 0 , decay constant β 1 and time origin β 2 . The product is than convoluted with a Gaussian with standard deviation β 3 to approximate finite rise-time of the sampled signal.
Possible additional pile-up pulse occurring on the decaying tail of the main pulse is described by formally identical equation where β 4 and β 5 are amplitude and time origin of pile-up pulse, respectively. Exponential tail produced by another possible pulse with amplitude β 6 preceding the main pulse is approximated by an exponential decay f prec (t) = β 6 exp(−β 1 t).
Baseline level bcg is assumed to be constant. To check the goodness of fit the χ 2 value is calculated and stored together with fitted parameters β i in an output file. The second processing run is performed by DCDB Hist code [3] which performs energy calibration and constructs one and two-dimensional spectra. The χ 2 value and the fitted parameters β i are read from outpu file created in the first run. Histograms of the amplitudes β 0 of the main pulses from the first and the second detector are constructed and time interval between the main pulses from first and second detector is calculated. Waveform is discarded if time interval exceeds preselected value of 200 ns. Histogram of pulse amplitude is calibrated using known energies of two gamma peaks, e.g. energy of annihilation peak (511 keV) and 22 Na start photon (1274 kev). The waveforms where fitting resulted in too high χ 2 values are discarded. Finally, two-dimensional histogram of E 1 + E 2 − 2m 0 c 2 versus E 1 − E 2 and its onedimensional cuts in horizontal and vertical direction corresponding to the Doppler broadened profile of annihilation peak and resolution function of the spectrometer, are constructed. Results of benchmark measurement of reference 99.9999% Al sample are shown in figure 2 and 3. CDB spectra with quality improved in comparison to the traditional analogue configuration were obtained both in the semi-digital and the pure-digital setup. Semi-digital configuration exhibits slightly lower background, while pure-digital setup has better energy resolution.

Conclusion
Software for off-line analysis of pulse signals from HPGe detectors has been developed. Two configurations were considered: (i) semi-digital setup where pulses shaped in SA are sampled; (ii) pure digital setup where pulses from detector pre-amplifiers are digitized directly. The algorithms employed in software analysis are described. Software developed in this work is freely available in the form of source code and pre-compiled binaries at http://physics.mff.cuni.cz/kfnt/us/groups/pas/software.html.