WaveformAnalysisSinc Class Reference
|
Ratpac-two
|
Interpolate waveforms by convolution using sinc kernel. More...
#include <WaveformAnalysisSinc.hh>
Public Member Functions | |
| WaveformAnalysisSinc (std::string config_name) | |
| void | Configure (const std::string &config_name) override |
| virtual void | SetI (std::string param, int value) override |
| virtual void | SetD (std::string param, double value) override |
| std::vector< double > | ConvolveWaveform (const std::vector< double > &wfm) |
| void | InterpolateWaveform (const std::vector< double > &voltWfm) |
Public Member Functions inherited from RAT::WaveformAnalyzerBase | |
| WaveformAnalyzerBase ()=delete | |
| WaveformAnalyzerBase (std::string _procname, std::string config_name) | |
| virtual void | SetS (std::string param, std::string value) override |
| virtual void | RunAnalysis (DS::DigitPMT *digitpmt, int pmtID, Digitizer *fDigitizer) |
| virtual void | RunAnalysis (DS::DigitPMT *digitpmt, int pmtID, DS::Digit *dsdigit) |
| Processor::Result | Event (DS::Root *ds, DS::EV *ev) override |
| virtual std::string | GetAnalyzerName () const |
Public Member Functions inherited from RAT::Processor | |
| Processor (std::string _name) | |
| virtual | ~Processor () |
| std::string | GetName () const |
| virtual void | SetF (std::string param, float value) |
| virtual Processor::Result | DSEvent (DS::Root *ds) |
| virtual void | BeginOfRun (DS::Run *run) |
| virtual void | EndOfRun (DS::Run *run) |
Protected Member Functions | |
| void | calculateTSincKernel () |
| void | DoAnalysis (DS::DigitPMT *pmt, const std::vector< UShort_t > &digitWfm) override |
Protected Attributes | |
| DBLinkPtr | fDigit |
| double | fFitWindowLow |
| double | fFitWindowHigh |
| int | fNumInterpPoints |
| double | fTaperingConst |
| int | fNumSincLobes |
| double | fDigitTimeInWindow |
| double | fFitTime |
| double | fFitCharge |
| double | fFitPeak |
| std::vector< double > | tsinc_kernel |
Protected Attributes inherited from RAT::WaveformAnalyzerBase | |
| double | fTimeStep |
| double | fVoltageRes |
| double | fTermOhms |
| double | fMinTotalCharge = std::numeric_limits<double>::lowest() |
| double | fMaxTotalCharge = std::numeric_limits<double>::max() |
Protected Attributes inherited from RAT::Processor | |
| std::string | name |
Additional Inherited Members | |
Public Types inherited from RAT::Processor | |
| enum | Result { OK = 0 , FAIL = 1 , ABORT = 2 } |
Detailed Description
Interpolate waveforms by convolution using sinc kernel.
REVISION HISTORY:
25 Nov 2024: Initial commit
This class provides full support for interpolating the waveforms by convolution using a tapered sinc (tsinc) kernel. Based on the implementation of the existing WaveformAnalysis class and WaveformAnalysisLognormal class.
Algorithm is from W. K. Warburton and W. Hennig, "New Algorithms for Improved Digital Pulse Arrival Timing With Sub-GSps ADCs," in IEEE Transactions on Nuclear Science, vol. 64, no. 12, pp. 2938-2950, Dec. 2017, doi: 10.1109/TNS.2017.2766074.
A window for interpolation is chosen around the peak of the digitized waveform. Interpolation is performed by convolving the samples within this window and the tsinc kernel. The algorithm for the discrete convolution code used here is similar to the one specified in the paper (optimized to make use of sinc being an even function).
Member Function Documentation
◆ Configure()
|
overridevirtual |
Configure the processor. This method will be called upon processor instantiation.
- Parameters
-
config_name An index that is typically used to index table DIGITIZER_ANALYSIS in ratdb. Although technically you can use it for anything. In the base class this does nothing for now. But stuff can be added in the future if we would like to set parameters for all processors.
Reimplemented from RAT::WaveformAnalyzerBase.
◆ DoAnalysis()
|
overrideprotectedvirtual |
Implementation of the waveform analysis.
- Parameters
-
digitpmt Pointer to the digitpmt where analysis results are written to. digitwfm Waveform to analyze, in ADC units.
See WaveformAnalysisLognormal for a concrete example. In order to write results, instantiate a RAT::DS::WaveformAnalysisResult object via digitpmt->GetOrCreateWaveformAnalysisResult("procName").
Implements RAT::WaveformAnalyzerBase.
◆ SetD()
|
overridevirtual |
Functions that gets called for /procset lines in the macro. Base class does nothing.
Reimplemented from RAT::WaveformAnalyzerBase.
◆ SetI()
|
overridevirtual |
Set integer parameter.
- Parameters
-
[in] param Name of parameter. [in] value Value of parameter.
- Exceptions
-
ParamUnknown if param is not recognized. ParamInvalid if value is not allowed for param.
Reimplemented from RAT::WaveformAnalyzerBase.
The documentation for this class was generated from the following files:
- /home/docs/checkouts/readthedocs.org/user_builds/ratpac/checkouts/latest/src/daq/include/RAT/WaveformAnalysisSinc.hh
- /home/docs/checkouts/readthedocs.org/user_builds/ratpac/checkouts/latest/src/daq/src/WaveformAnalysisSinc.cc
Generated by
Public Member Functions inherited from