REST-for-Physics  v2.3
Rare Event Searches ToolKit for Physics
TRestDetectorHitsReadoutAnalysisProcess.h
1//
2// Created by lobis on 03-Sep-23.
3//
4
5#ifndef REST_TRESTDETECTORHITSREADOUTANALYSISPROCESS_H
6#define REST_TRESTDETECTORHITSREADOUTANALYSISPROCESS_H
7
8#include <TCanvas.h>
9#include <TH1D.h>
10#include <TRestDetectorGas.h>
11#include <TRestDetectorHitsEvent.h>
12#include <TRestDetectorReadout.h>
13#include <TRestDetectorSignalEvent.h>
14#include <TRestEventProcess.h>
15
18 private:
19 TRestDetectorHitsEvent* fInputHitsEvent = nullptr;
20 TRestDetectorHitsEvent* fOutputHitsEvent = nullptr;
21
22 void InitFromConfigFile() override;
23 void Initialize() override;
24 void LoadDefaultConfig(){};
25
27 std::string fChannelType;
28 TVector3 fFiducialPosition;
29 Double_t fFiducialDiameter = 0;
30 bool fRemoveZeroEnergyEvents = false;
31
32 TRestDetectorReadout* fReadout = nullptr;
33
34 public:
35 RESTValue GetInputEvent() const override { return fInputHitsEvent; }
36 RESTValue GetOutputEvent() const override { return fOutputHitsEvent; }
37
38 void InitProcess() override;
39 TRestEvent* ProcessEvent(TRestEvent* inputEvent) override;
40 void EndProcess() override;
41
42 void PrintMetadata() override;
43
44 const char* GetProcessName() const override { return "readoutHitsAnalysis"; }
45
47 TRestDetectorHitsReadoutAnalysisProcess(const char* configFilename) {}
48
50
51 ClassDefOverride(TRestDetectorHitsReadoutAnalysisProcess, 2);
52};
53
54#endif // REST_TRESTDETECTORHITSREADOUTANALYSISPROCESS_H
An analysis REST process to extract valuable information from Hits type of data.
void InitProcess() override
To be executed at the beginning of the run (outside event loop)
TRestEvent * ProcessEvent(TRestEvent *inputEvent) override
Process one event.
std::string fChannelType
This process will only work on hits corresponding to this channel type (using readout)
void PrintMetadata() override
Implemented it in the derived metadata class to print out specific metadata information.
RESTValue GetInputEvent() const override
Get pointer to input event. Must be implemented in the derived class.
void InitFromConfigFile() override
To make settings from rml file. This method must be implemented in the derived class.
RESTValue GetOutputEvent() const override
Get pointer to output event. Must be implemented in the derived class.
void EndProcess() override
To be executed at the end of the run (outside event loop)
A metadata class to generate/store a readout description.
A base class for any REST event process.
A base class for any REST event.
Definition: TRestEvent.h:38