23 #ifndef RestCore_TRestDetectorSignalToRawSignalProcess
24 #define RestCore_TRestDetectorSignalToRawSignalProcess
26 #include <TRestDetectorReadout.h>
27 #include <TRestDetectorSignalEvent.h>
28 #include <TRestEventProcess.h>
29 #include <TRestRawSignalEvent.h>
68 Double_t fCalibrationOffset = 0.0;
86 inline Double_t GetSampling()
const {
return fSampling; }
88 inline Int_t GetNPoints()
const {
return fNPoints; }
90 inline std::string GetTriggerMode()
const {
return fTriggerMode; }
92 inline Int_t GetTriggerDelay()
const {
return fTriggerDelay; }
98 inline bool IsLinearCalibration()
const {
107 Double_t GetEnergyFromADC(Double_t adc,
const std::string& type =
"")
const;
109 Double_t GetADCFromEnergy(Double_t energy,
const std::string& type =
"")
const;
111 Double_t GetTimeFromBin(Double_t bin,
const std::string& type =
"")
const;
113 Double_t GetBinFromTime(Double_t time,
const std::string& type =
"")
const;
116 Double_t sampling = 1.0;
117 Double_t shapingTime = 0.0;
118 Double_t calibrationGain = 100;
119 Double_t calibrationOffset = 0;
120 TVector2 calibrationEnergy = {0, 0};
121 TVector2 calibrationRange = {0, 0};
128 void LoadConfig(
const std::string& configFilename,
const std::string& name =
"");
148 std::map<std::string, Parameters> fParametersMap;
149 std::set<std::string> fReadoutTypes;
A metadata class to generate/store a readout description.
A process to convert a TRestDetectorSignalEvent into a TRestRawSignalEvent.
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
To be executed at the beginning of the run (outside event loop)
TRestRawSignalEvent * fOutputRawSignalEvent
A pointer to the specific TRestRawSignalEvent input.
TRestEventProcess * Maker()
Returns a new instance of this class.
std::string fTriggerMode
It is used to define the way the time start will be fixed.
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.
Int_t fNPoints
The number of points of the resulting output signal.
TRestDetectorSignalToRawSignalProcess()
Default constructor.
std::string fTriggerModeObservableName
The name of the observable used to define the trigger mode (i.e. g4Ana_sensitiveVolumeFirstHitTime)
RESTValue GetOutputEvent() const override
Get pointer to output event. Must be implemented in the derived class.
~TRestDetectorSignalToRawSignalProcess()
Default destructor.
Int_t fTriggerFixedStartTime
The starting time for the "fixed" trigger mode (can be offset by the trigger delay)
Double_t fCalibrationGain
const char * GetProcessName() const override
Returns the name of this process.
Int_t fTriggerDelay
The number of time bins the time start is delayed in the resulting output signal.
RESTValue GetInputEvent() const override
Get pointer to input 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.
void InitFromConfigFile() override
Function reading input parameters from the RML TRestDetectorSignalToRawSignalProcess metadata section...
A base class for any REST event process.
A base class for any REST event.
An event container for time rawdata signals with fixed length.