|
21 | 21 | *************************************************************************/
|
22 | 22 |
|
23 | 23 | /////////////////////////////////////////////////////////////////////////
|
24 |
| -/// Write the process description Here |
25 |
| -/// |
26 |
| -/// ### Parameters |
27 |
| -/// Describe any parameters this process receives: |
28 |
| -/// * **parameter1**: This parameter ... |
29 |
| -/// * **parameter2**: This parameter is ... |
| 24 | +/// This class is a process to recover the signals that saturated the ADC. |
| 25 | +/// The process uses a fit to recover the signal lost information. If the fit |
| 26 | +/// is successful, the points of the signal that are saturating are replaced |
| 27 | +/// by the fit values at those bins. |
| 28 | +/// \htmlonly <style>div.image img[src="RecoverSignalProcess_eventRecovered.png"]{width:350px;}</style> \endhtmlonly |
30 | 29 | ///
|
| 30 | +/// The idea of the process is to recover the signal information that is lost |
| 31 | +/// when the signal saturates the ADC in order to continue the analysis of the |
| 32 | +/// event as if the signal was not saturated at all. For example, here is the |
| 33 | +/// comparison in the spectrum of the observable ThresholdIntegral of the |
| 34 | +/// TRestRawSignalAnalysisProcess before (red) and after (blue) applying this |
| 35 | +/// TRestRawSignalRecoverSaturationProcess: |
| 36 | +/// \htmlonly <style>div.image img[src="RecoverSignalProcess_spectrumComparison.png"]{width:350px;}</style> \endhtmlonly |
31 | 37 | ///
|
32 |
| -/// ### Examples |
33 |
| -/// Give examples of usage and RML descriptions that can be tested. |
| 38 | +/// ### Fitting function |
| 39 | +/// The fitting function is fixed (hardcoded) to the AGET response function |
| 40 | +/// (without the sin) times a logistic function: |
34 | 41 | /// \code
|
35 |
| -/// <WRITE A CODE EXAMPLE HERE> |
| 42 | +/// [0]+[1]*TMath::Exp(-3. * (x-[3])/[2]) * |
| 43 | +/// (x-[3])/[2] * (x-[3])/[2] * (x-[3])/[2] / |
| 44 | +/// (1+TMath::Exp(-10000*(x-[3]))) |
| 45 | +/// |
| 46 | +/// [0] = "Baseline", |
| 47 | +/// [1] = "Amplitude", |
| 48 | +/// [2] = "ShapingTime", |
| 49 | +/// [3] = "PeakPosition" |
36 | 50 | /// \endcode
|
| 51 | +/// \htmlonly <style>div.image img[src="RecoverSignalProcess_signalFit.png"]{width:350px;}</style> \endhtmlonly |
| 52 | +/// |
| 53 | +/// |
| 54 | +/// ### Parameters |
| 55 | +/// The default behaviour is to process only the saturated signals, but it |
| 56 | +/// can be configured to process all signals in the event |
| 57 | +/// (using the fProcessAllSignals parameter). The saturated signals are |
| 58 | +/// identified by a minimun number of bins (fMinSaturatedBins) that must |
| 59 | +/// have the maximum value of the signal and by a threshold value which |
| 60 | +/// this saturating value must exceed (fMinSaturationValue). |
| 61 | +/// |
| 62 | +/// The fit can be configured with the fBaseLineRange and fFitRange parameters. |
| 63 | +/// The baseline range is used to calculate the baseline of the signal and fix |
| 64 | +/// that parameter in the fit. This will make the fit faster and more reliable. |
| 65 | +/// The fit range is the range of bins to fit the signal. If not provided, the |
| 66 | +/// whole signal will be used. |
37 | 67 | ///
|
38 |
| -/// ### Running pipeline example |
39 |
| -/// Add the examples to a pipeline to guarantee the code will be running |
40 |
| -/// on future framework upgrades. |
| 68 | +/// To debug the process, you may use _debug_ or _extreme_ verbose levels. |
| 69 | +/// In the extreme level, a canvas will be created to draw the signal and |
| 70 | +/// the fit for each processed signal of the event. In the debug level, the |
| 71 | +/// fit result will be printed in the console but no canvas will be created. |
41 | 72 | ///
|
| 73 | +/// * **minSaturatedBins**: Minimum number of saturated bins to consider a signal as saturated. |
| 74 | +/// Default is 3. |
| 75 | +/// * **minSaturationValue**: Threshold to consider a maximum value of the signal as possible saturation. |
| 76 | +/// Default is 0. |
| 77 | +/// * **baseLineRange**: Range of bins to calculate the baseline and fix that parameter in the fit. |
| 78 | +/// * **fitRange**: Range of bins to fit the signal. |
| 79 | +/// * **processAllSignals**: If false (default), only signals considered as saturated will be processed. |
| 80 | +/// If true, all signals will be processed. |
| 81 | +/// * **nBinsIfNotSaturated**: Number of bins to consider as 'saturated' if the signal is not saturated. |
| 82 | +/// This is used when fProcessAllSignals is true to set the 'saturated' bins. |
42 | 83 | ///
|
43 |
| -/// Please, add any figure that may help to ilustrate the process |
| 84 | +/// ### Observables |
| 85 | +/// The process will add the following observables to the event: |
| 86 | +/// * **addedAmplitude**: Sum of the extra amplitude (newamplitude - previousamplitude) of the |
| 87 | +/// recovered saturated signals of the event. |
| 88 | +/// * **addedIntegral**: Sum of the extra integral (sum of newvalue-previousvalue of the saturated bins) |
| 89 | +/// of the recovered saturated signals of the event. |
| 90 | +/// * **saturatedSignals**: number of signals of the event detected as saturated. |
| 91 | +/// * **recoveredSignals**: number of signals of the event detected as saturated and that have been |
| 92 | +/// modified by the fitted pulse. It is always <=saturatedSignals. If it is less, it means that |
| 93 | +/// the fit values of the saturated bins of the those signals were lower than the original value |
| 94 | +/// of the signal so they are not replaced and those signals has not been recovered. |
| 95 | +/// \htmlonly <style>div.image img[src="RecoverSignalProcess_addedAmplIntegral.png"]{width:350px;}</style> \endhtmlonly |
44 | 96 | ///
|
45 |
| -/// \htmlonly <style>div.image img[src="trigger.png"]{width:500px;}</style> \endhtmlonly |
46 |
| -///  |
47 | 97 | ///
|
48 |
| -/// The png image should be uploaded to the ./images/ directory |
| 98 | +/// ### Examples |
| 99 | +/// Give examples of usage and RML descriptions that can be tested. |
| 100 | +/// \code |
| 101 | +/// <addProcess type="TRestRawSignalRecoverSaturationProcess" name="recSat" value="ON" verboseLevel="info" observable="all"> |
| 102 | +/// <parameter name="minSaturatedBins" value="3" /> |
| 103 | +/// <parameter name="minSaturationValue" value="3500" /> |
| 104 | +/// <parameter name="baseLineRange" value="(20,150)" /> |
| 105 | +/// <parameter name="fitRange" value="(150,300)" /> |
| 106 | +/// </addProcess> |
| 107 | +/// \endcode |
| 108 | +/// |
49 | 109 | ///
|
50 | 110 | ///----------------------------------------------------------------------
|
51 | 111 | ///
|
52 | 112 | /// REST-for-Physics - Software for Rare Event Searches Toolkit
|
53 | 113 | ///
|
54 | 114 | /// History of developments:
|
55 | 115 | ///
|
56 |
| -/// YEAR-Month: First implementation of TRestRawSignalRecoverSaturationProcess |
57 |
| -/// WRITE YOUR FULL NAME |
| 116 | +/// 2025-Jan: First implementation of TRestRawSignalRecoverSaturationProcess |
| 117 | +/// Álvaro Ezquerro |
58 | 118 | ///
|
59 | 119 | /// \class TRestRawSignalRecoverSaturationProcess
|
60 |
| -/// \author: TODO. Write full name and e-mail: aezquerro |
| 120 | +/// \author: aezquerro |
61 | 121 | ///
|
62 | 122 | /// <hr>
|
63 | 123 | ///
|
|
0 commit comments