Update TRestDetectorSignalToRawSignalProcess
to support calibration points and shaping
#19
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR updates
TRestDetectorSignalToRawSignalProcess
with the following:"fixed"
has been implemented, where the user can manually set the exact time of the first bien (instead of using the time of the first deposit).For example, a configuration such as
would have a starting time of 55.0 us - 1.0 * 100 us as it is affected by the
triggerDelay
parameter.offset
(fCalibrationOffset
) has been introduced to allow for more calibration options besides the gain. This allows to set our zero elsewhere than on the middle of the range.would generate a gain and offset such that 0 energy corresponds to 0.1 or 10% of our range (-32768 + 0.1 * 65535 in ADC units) and 10 Mev to 90% of our range. I believe this way is more intuitive and allows an easier reproduction of experimental calibration.
TRestDetectorSignalToRawSignalProcess
. Even though shaping is implemented already in rawlib (TRestRawSignalShapingProcess
) it presents a few problems, mainly information loss when dealing with signals above the saturation limit.The image below corresponds to the output of
TRestDetectorSignalToRawSignalProcess
after these changes. Note how some of the peaks are cut off due to saturation (as would happen on a physical experiment).If we were to convert the detector signal into raw signal without the shaping, we would get something such as the image below.
If we were to perform shaping to this event, it would be impossible to get the first result, which is more physical, since the information of how much each signal is above the saturation limit is lost. We would get peaks with the maximum exactly equal to the saturation limit, which does not correspond to the physical event since signals with different energy would be exactly equal (such as the first peaks of green and yellow in the images).