====== Data processing version 2 ====== Data location: ''/data/Reconstructed_GAGG_v2'' Reprocessed only GAGG background data so far. ====New features==== * Data processed with a single config file for all runs, available at * Added average pulse for alpha events * Added average power spectrum for alpha events * Fixed bug in Chi2 module, which prevented to find the correct min-Chi2 for a fraction of the events. However, this bug had a very small effect, in fact the PSD was working pretty well anyway. * Added Chi2 calculation in Fourier complex space, i.e. including the phase information, to identify pileup events. From here on, we can use the chi2 computed on the power spectrum (i.e. without phase information) to perform particle discrimination, and the chi2 computed on the complex space for pileup rejection. * Updated the PSD module to fit the beta-gamma and alpha bands, and store in the output tree a list of output variables that make the application of the PSD much easier. * Implemented the auto-calibration of the beta-gamma band on the 40K peak. * Optimized the frequency range for the calculation of the Chi2. As a result, the PSD cut will change. ==== Variables and cuts to be used for data analysis ==== * Baseline **slope**, for cutting events sitting on the tail of a previous one: ''fabs(baseline.slope)<1.e7'' * Trigger **delay**, for cutting (mildly) pileup events: ''triggerdelay.delay>0.45e-6 && triggerdelay.delay<0.47e-6'' * **Chi2** on Fourier-transformed complex pulse for cutting (strongly) pileup events: ''chi2_freqsingleevent.Chi2<0.004'' * **Energy** calibrated on the 40K peak: ''gammacalibration.energy'' * **PSD** variable, defined as ''gaggpsd.psd'' and equal to ''chi2_poweraverage.amplitude/integral''. The new PSD threshold for cutting beta-gamma vs alpha events could be e.g. at ''gaggpsd.psd=0.53''. Alternatively, we can use the two variables described below. * **Beta-Gamma flag** (''gaggpsd.betagamma''), defined as true for events within +-4 sigma from the mean of the beta-gamma band, and as false otherwise * **Distance from the mean of the beta-gamma band**, normalized to the corresponding sigma. This variable is useful for re-defining the PSD cut more easily. For example, if we want to select the beta-gamma events within +-3 sigma from the mean of the band, we can apply the cut ''fabs(gaggpsd.nSigmaBetaGamma)<3''