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 <TRestEventProcess.h>
11
12#include "TRestDetectorGas.h"
13#include "TRestDetectorHitsEvent.h"
14#include "TRestDetectorReadout.h"
15#include "TRestDetectorSignalEvent.h"
16
19 private:
20 TRestDetectorHitsEvent* fInputHitsEvent = nullptr;
21 TRestDetectorHitsEvent* fOutputHitsEvent = nullptr;
22
23 void InitFromConfigFile() override;
24 void Initialize() override;
25 void LoadDefaultConfig(){};
26
28 std::string fChannelType;
29 TVector3 fFiducialPosition;
30 Double_t fFiducialDiameter = 0;
31 bool fRemoveZeroEnergyEvents = false;
34 bool fIgnoreZ = false;
35
36 TRestDetectorReadout* fReadout = nullptr;
37
38 public:
39 RESTValue GetInputEvent() const override { return fInputHitsEvent; }
40 RESTValue GetOutputEvent() const override { return fOutputHitsEvent; }
41
42 void InitProcess() override;
43 TRestEvent* ProcessEvent(TRestEvent* inputEvent) override;
44 void EndProcess() override;
45
46 void PrintMetadata() override;
47
48 const char* GetProcessName() const override { return "readoutHitsAnalysis"; }
49
51 TRestDetectorHitsReadoutAnalysisProcess(const char* configFilename) {}
52
54
55 ClassDefOverride(TRestDetectorHitsReadoutAnalysisProcess, 3);
56};
57
58#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.
bool fIgnoreZ
If true, the Z coordinate will be ignored when checking if a position is inside the readout....
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