67#include "TRestRawFindResponseSignalProcess.h"
110 SetName(
"findResponseSignal-Default");
111 SetTitle(
"Default config");
122 fInputSignalEvent =
nullptr;
156 if (fInputSignalEvent->GetNumberOfSignals() <= 0)
return nullptr;
157 if (fInputSignalEvent->GetNumberOfSignals() > 8)
return nullptr;
159 Int_t dominantSignal = -1;
160 Double_t maxPeak = 0;
162 for (
int n = 0; n < fInputSignalEvent->GetNumberOfSignals(); n++) {
170 if (maxPeak < 400 || maxPeak > 600)
return nullptr;
172 TRestRawSignal* sgnl = fInputSignalEvent->GetSignal(dominantSignal);
173 sgnl->
Scale(1000. / maxPeak);
175 fOutputSignalEvent->AddSignal(*sgnl);
177 return fOutputSignalEvent;
A base class for any REST event.
A process to find a representative signal to generate a response signal.
void InitProcess() override
Process initialization. Function to be executed once at the beginning of process (before starting the...
TRestRawFindResponseSignalProcess()
Default constructor.
TRestEvent * ProcessEvent(TRestEvent *inputEvent) override
The main processing event function.
void EndProcess() override
End of procesing. Function to be executed once at the end of the process. It gets access to all the a...
void LoadDefaultConfig()
Function to load the default config in absence of RML input.
void Initialize() override
Function to initialize input/output event members and define the section name.
void PrintMetadata() override
Implemented it in the derived metadata class to print out specific metadata information.
~TRestRawFindResponseSignalProcess()
Default destructor.
void LoadConfig(const std::string &configFilename, const std::string &name="")
Function to load the configuration from an external configuration file.
An event container for time rawdata signals with fixed length.
It defines a Short_t array with a physical parameter that evolves in time using a fixed time bin.
Double_t GetMaxPeakValue()
It returns the amplitude of the signal maximum, baseline will be corrected if CalculateBaseLine was c...
void Scale(Double_t value)
This method scales the signal by a given value.