REST-for-Physics  v2.3
Rare Event Searches ToolKit for Physics
TRestRawSignalConvolutionFittingProcess.h
1/*************************************************************************
2 * This file is part of the REST software framework. *
3 * *
4 * Copyright (C) 2016 GIFNA/TREX (University of Zaragoza) *
5 * For more information see http://gifna.unizar.es/trex *
6 * *
7 * REST is free software: you can redistribute it and/or modify *
8 * it under the terms of the GNU General Public License as published by *
9 * the Free Software Foundation, either version 3 of the License, or *
10 * (at your option) any later version. *
11 * *
12 * REST is distributed in the hope that it will be useful, *
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of *
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
15 * GNU General Public License for more details. *
16 * *
17 * You should have a copy of the GNU General Public License along with *
18 * REST in $REST_PATH/LICENSE. *
19 * If not, see http://www.gnu.org/licenses/. *
20 * For the list of contributors see $REST_PATH/CREDITS. *
21 *************************************************************************/
22
23#ifndef RestCore_TRestRawSignalConvolutionFittingProcess
24#define RestCore_TRestRawSignalConvolutionFittingProcess
25
26#include <TRestRawSignalEvent.h>
27
28#include "TF1Convolution.h"
29#include "TH1D.h"
30#include "TRestEventProcess.h"
31
35 private:
38
39 /* Metadata members
40 TVector2 fBaseLineRange;
41 TVector2 fIntegralRange;
42 Double_t fPointThreshold;
43 Double_t fSignalThreshold;
44 Int_t fNPointsOverThreshold; */
45
46 void InitFromConfigFile() override;
47
48 void Initialize() override;
49
50 void LoadDefaultConfig();
51
52 protected:
53 // add here the members of your event process
54
55 public:
56 RESTValue GetInputEvent() const override { return fRawSignalEvent; }
57 RESTValue GetOutputEvent() const override { return fRawSignalEvent; }
58
59 void InitProcess() override;
60 TRestEvent* ProcessEvent(TRestEvent* inputEvent) override;
61 void EndProcess() override;
62
63 void LoadConfig(const std::string& configFilename, const std::string& name = "");
64
65 void PrintMetadata() override {
67
68 /*
69 metadata << "Baseline range : ( " << fBaseLineRange.X() << " , " <<
70 fBaseLineRange.Y() << " ) "
71 << endl;
72 metadata << "Integral range : ( " << fIntegralRange.X() << " , " <<
73 fIntegralRange.Y() << " ) " << endl;
74 metadata << "Point Threshold : " << fPointThreshold << " sigmas" << endl;
75 metadata << "Signal threshold : " << fSignalThreshold << " sigmas" << endl;
76 metadata << "Number of points over threshold : " << fNPointsOverThreshold << endl;
77 metadata << " " << endl;
78 */
79
80 EndPrintProcess();
81 }
82
83 const char* GetProcessName() const override { return "rawSignalConvolutionFitting"; }
84
86 TRestRawSignalConvolutionFittingProcess(const char* configFilename);
88
89 ClassDefOverride(TRestRawSignalConvolutionFittingProcess, 1);
90};
91#endif
A base class for any REST event process.
void BeginPrintProcess()
[name, cut range]
A base class for any REST event.
Definition: TRestEvent.h:38
RESTValue GetInputEvent() const override
Get pointer to input event. Must be implemented in the derived class.
TRestEvent * ProcessEvent(TRestEvent *inputEvent) override
The main processing event function.
void LoadDefaultConfig()
Function to load the default config in absence of RML input.
void EndProcess() override
Function to include required actions after all events have been processed. This method will write the...
void PrintMetadata() override
Implemented it in the derived metadata class to print out specific metadata information.
void Initialize() override
Function to initialize input/output event members and define the section name.
void LoadConfig(const std::string &configFilename, const std::string &name="")
Function to load the configuration from an external configuration file.
RESTValue GetOutputEvent() const override
Get pointer to output event. Must be implemented in the derived class.
TRestRawSignalEvent * fRawSignalEvent
A pointer to the specific TRestRawSignalEvent input.
void InitFromConfigFile() override
Function to read input parameters.
An event container for time rawdata signals with fixed length.