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;
72 Double_t fIntegralThresholdTPCkeV = 0.1;
87 Double_t fNoiseLevel = 0.0;
90 inline Double_t GetSampling()
const {
return fSampling; }
92 inline Int_t GetNPoints()
const {
return fNPoints; }
94 inline std::string GetTriggerMode()
const {
return fTriggerMode; }
96 inline Int_t GetTriggerDelay()
const {
return fTriggerDelay; }
102 inline bool IsLinearCalibration()
const {
111 Double_t GetEnergyFromADC(Double_t adc,
const std::string& type =
"")
const;
113 Double_t GetADCFromEnergy(Double_t energy,
const std::string& type =
"")
const;
115 Double_t GetTimeFromBin(Double_t bin,
const std::string& type =
"")
const;
117 Double_t GetBinFromTime(Double_t time,
const std::string& type =
"")
const;
120 Double_t sampling = 1.0;
121 Double_t shapingTime = 0.0;
122 Double_t calibrationGain = 100;
123 Double_t calibrationOffset = 0;
124 Double_t noiseLevel = 0.0;
125 TVector2 calibrationEnergy = {0, 0};
126 TVector2 calibrationRange = {0, 0};
133 void LoadConfig(
const std::string& configFilename,
const std::string& name =
"");
151 std::map<std::string, Parameters> fParametersMap;
152 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.
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
~TRestDetectorSignalToRawSignalProcess() override
Default destructor.
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.
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.
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.
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.