23#ifndef RestCore_TRestDetectorSignalToRawSignalProcess
24#define RestCore_TRestDetectorSignalToRawSignalProcess
26#include <TRestDetectorSignalEvent.h>
27#include <TRestEventProcess.h>
28#include <TRestRawSignalEvent.h>
60 Double_t fCalibrationOffset = 0.0;
81 inline Double_t GetSampling()
const {
return fSampling; }
82 inline void SetSampling(Double_t sampling) {
fSampling = sampling; }
84 inline Int_t GetNPoints()
const {
return fNPoints; }
85 inline void SetNPoints(Int_t nPoints) {
fNPoints = nPoints; }
87 inline TString GetTriggerMode()
const {
return fTriggerMode; }
88 inline void SetTriggerMode(
const TString& triggerMode) {
fTriggerMode = triggerMode; }
90 inline Int_t GetTriggerDelay()
const {
return fTriggerDelay; }
91 inline void SetTriggerDelay(Int_t triggerDelay) {
fTriggerDelay = triggerDelay; }
96 inline Double_t GetCalibrationOffset()
const {
return fCalibrationOffset; }
97 inline void SetCalibrationOffset(Double_t offset) { fCalibrationOffset = offset; }
100 inline void SetIntegralThreshold(Double_t integralThreshold) {
fIntegralThreshold = integralThreshold; }
102 inline Double_t GetShapingTime()
const {
return fShapingTime; }
103 inline void SetShapingTime(Double_t shapingTime) {
fShapingTime = shapingTime; }
105 inline bool IsShapingEnabled()
const {
return fShapingTime > 0; }
107 inline bool IsLinearCalibration()
const {
113 inline void SetCalibrationEnergy(TVector2 calibrationEnergy) {
fCalibrationEnergy = calibrationEnergy; }
116 inline void SetCalibrationRange(TVector2 calibrationRange) {
fCalibrationRange = calibrationRange; }
125 void LoadConfig(
const std::string& configFilename,
const std::string& name =
"");
136 if (IsLinearCalibration()) {
143 RESTMetadata <<
"ADC Offset : " << fCalibrationOffset <<
RESTendl;
145 if (IsShapingEnabled()) {
A process to convert a TRestDetectorSignalEvent into a TRestRawSignalEvent.
any GetInputEvent() const override
Get pointer to input event. Must be implemented in the derived class.
TVector2 fCalibrationEnergy
two distinct energy values used for calibration
TRestDetectorSignalEvent * fInputSignalEvent
A pointer to the specific TRestDetectorSignalEvent input.
TRestEvent * ProcessEvent(TRestEvent *inputEvent) override
The main processing event function.
Double_t fSampling
The sampling time from the binned raw output signal.
void Initialize() override
Function to initialize input/output event members and define the section name.
void InitProcess() override
Some actions taken before start the event data processing.
TRestRawSignalEvent * fOutputRawSignalEvent
A pointer to the specific TRestRawSignalEvent input.
void PrintMetadata() override
It prints out the process parameters stored in the metadata structure.
TVector2 fCalibrationRange
position in the range corresponding to the energy in 'fCalibrationEnergy'. Values between 0 and 1
Double_t fIntegralThreshold
This parameter is used by integralWindow trigger mode to define the acquisition window.
TRestEventProcess * Maker()
Returns a new instance of this class.
TString fTriggerMode
It is used to define the way the time start will be fixed.
Int_t fNPoints
The number of points of the resulting output signal.
TRestDetectorSignalToRawSignalProcess()
Default constructor.
~TRestDetectorSignalToRawSignalProcess()
Default destructor.
Int_t fTriggerFixedStartTime
The starting time for the "fixed" trigger mode (can be offset by the trigger delay)
const char * GetProcessName() const override
Returns the name of this process.
Double_t fCalibrationGain
Int_t fTriggerDelay
The number of time bins the time start is delayed in the resulting output signal.
any GetOutputEvent() const override
Get pointer to output event. Must be implemented in the derived class.
void LoadConfig(const std::string &configFilename, const std::string &name="")
Function to load the configuration from an external configuration file.
A base class for any REST event process.
void BeginPrintProcess()
[name, cut range]
A base class for any REST event.
An event container for time rawdata signals with fixed length.