115#include "TRestRawSignalIdTaggingProcess.h"
166 TiXmlElement* tagDefinition =
GetElement(
"tag");
167 while (tagDefinition) {
169 fIdRanges.push_back(Get2DVectorParameterWithUnits(
"ids", tagDefinition));
181 std::vector<int> tagCode;
183 for (
int j = 0; j <
fSignalEvent->GetNumberOfSignals(); j++) {
194 for (
unsigned int n = 0; n <
fIdRanges.size(); n++) {
197 if (std::find(tagCode.begin(), tagCode.end(), n + 1) == tagCode.end()) {
198 tagCode.push_back(n + 1);
204 std::sort(tagCode.begin(), tagCode.end());
207 for (
auto d : tagCode) {
208 result = result * 10 + d;
213 if (ApplyCut())
return nullptr;
virtual void InitFromConfigFile() override
To make settings from rml file. This method must be implemented in the derived class.
void SetObservableValue(const std::string &name, const T &value)
Set observable value for AnalysisTree.
A base class for any REST event.
An event container for time rawdata signals with fixed length.
An analysis process helping to assign tags to user defined ranges of signal ids.
std::vector< TVector2 > fIdRanges
A list containing the id range for each tag.
Double_t fSignalThreshold
A parameter to define a minimum signal fluctuation. Measured in sigmas.
TRestEvent * ProcessEvent(TRestEvent *inputEvent) override
The main processing event function.
TRestRawSignalEvent * fSignalEvent
A pointer to the specific TRestRawSignalEvent input.
~TRestRawSignalIdTaggingProcess()
Default destructor.
void InitFromConfigFile() override
Process initialization.
void InitProcess() override
Process initialization.
void Initialize() override
Function to initialize input/output event members and define the section name.
Double_t fPointThreshold
The number of sigmas over baseline fluctuations to identify a point overthreshold.
TVector2 fBaseLineRange
The range where the baseline range will be calculated.
Int_t fPointsOverThreshold
The minimum number of points over threshold to identify a signal as such.
TRestRawSignalIdTaggingProcess()
Default constructor.
std::vector< std::string > fTagNames
A list containing the tag names for each signal ids range.
It defines a Short_t array with a physical parameter that evolves in time using a fixed time bin.
Int_t GetID() const
Returns the value of signal ID.
void CalculateBaseLine(Int_t startBin, Int_t endBin, const std::string &option="")
This method calculates the average and fluctuation of the baseline in the specified range and writes ...
std::vector< Int_t > GetPointsOverThreshold() const
Returns a std::vector containing the indexes of data points over threshold.
void InitializePointsOverThreshold(const TVector2 &thrPar, Int_t nPointsOver, Int_t nPointsFlat=512)
It initializes the fPointsOverThreshold array with the indexes of data points that are found over thr...