REST-for-Physics  v2.3
Rare Event Searches ToolKit for Physics
TRestDetectorHitsGaussAnalysisProcess.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_TRestDetectorHitsGaussAnalysisProcess
24 #define RestCore_TRestDetectorHitsGaussAnalysisProcess
25 
26 #include <TCanvas.h>
27 #include <TH1D.h>
28 #include <TRestDetectorGas.h>
29 #include <TRestDetectorHitsEvent.h>
30 #include <TRestDetectorReadout.h>
31 #include <TRestDetectorSignalEvent.h>
32 
33 #include "TRestEventProcess.h"
34 
37  private:
39 
41  TRestDetectorHitsEvent* fOutputHitsEvent;
42 
43  void InitProcess() override;
44 
45  void Initialize() override;
46 
47  void LoadDefaultConfig();
48 
49  protected:
51  Double_t fPitch = 0.5;
52 
54  Double_t fError = 150;
55 
57  Int_t fNHitsMin = 100000;
58 
59  public:
60  RESTValue GetInputEvent() const override { return fInputHitsEvent; }
61  RESTValue GetOutputEvent() const override { return fOutputHitsEvent; }
62 
63  TRestEvent* ProcessEvent(TRestEvent* inputEvent) override;
64 
65  void LoadConfig(const std::string& configFilename, const std::string& name = "");
66 
67  void PrintMetadata() override;
68 
71 
73  const char* GetProcessName() const override { return "hitsGaussAnalysis"; }
74 
76  TRestDetectorHitsGaussAnalysisProcess(const char* configFilename);
77 
79 
80  // If new members are added, removed or modified in this class version number must be increased!
81  ClassDefOverride(TRestDetectorHitsGaussAnalysisProcess, 2);
82 };
83 #endif
An analysis REST process to extract valuable information from Hits type of data performing gaussian f...
TRestEvent * ProcessEvent(TRestEvent *inputEvent) override
The main processing event function.
Double_t fError
Error assigned to the hits on the sides.
TRestEventProcess * Maker()
Returns a new instance of this class.
Int_t fNHitsMin
The minimum number of hits required to apply the hit correction.
void InitProcess() override
Function to use in initialization of process members before starting to process the event.
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 and library version.
const char * GetProcessName() const override
Returns the name of this process.
RESTValue GetOutputEvent() const override
Get pointer to output event. Must be implemented in the derived class.
RESTValue GetInputEvent() const override
Get pointer to input event. Must be implemented in the derived class.
void PrintMetadata() override
It prints out the process parameters stored in the metadata structure.
Double_t fPitch
The pitch or size of the strips in mm.
TRestDetectorHitsEvent * fInputHitsEvent
A pointer to the specific TRestDetectorHitsEvent.
void LoadConfig(const std::string &configFilename, const std::string &name="")
Function to load the configuration from an external configuration file.
A base class for any REST event process.
A base class for any REST event.
Definition: TRestEvent.h:38