REST-for-Physics  v2.3
Rare Event Searches ToolKit for Physics
TRestRawReadoutAnalysisProcess.h
1
11
12#ifndef RestCore_TRestRawReadoutAnalysisProcess
13#define RestCore_TRestRawReadoutAnalysisProcess
14
15#include <TH1D.h>
16#include <TRestDetectorGas.h>
17#include <TRestDetectorHitsEvent.h>
18#include <TRestDetectorReadout.h>
19#include <TRestRawSignalEvent.h>
20
21#include "TRestEventProcess.h"
22
24 private:
25#ifndef __CINT__
26 TRestRawSignalEvent* fSignalEvent;
27
28 TRestDetectorReadout* fReadout;
29
30#endif
31
32 void InitFromConfigFile() override;
33
34 void Initialize() override;
35
36 std::string fModuleCanvasSave;
37
38 // plots (saved directly in root file)
39 std::map<int, TH2D*> fModuleHitMaps;
40 std::map<int, TH1D*> fModuleActivityX;
41 std::map<int, TH1D*> fModuleActivityY;
42 std::map<int, TH2D*> fModuleBSLSigmaX;
43 std::map<int, TH2D*> fModuleBSLSigmaY;
44
45 public:
46 RESTValue GetInputEvent() const override { return fSignalEvent; }
47 RESTValue GetOutputEvent() const override { return fSignalEvent; }
48
49 void InitProcess() override;
50 TRestEvent* ProcessEvent(TRestEvent* inputEvent) override;
51 void EndProcess() override;
52
53 void PrintMetadata() override {
55
56 RESTMetadata << "channel activity and hitmap histograms required for module: ";
57 auto iter2 = fModuleHitMaps.begin();
58 while (iter2 != fModuleHitMaps.end()) {
59 RESTMetadata << iter2->first << ", ";
60 iter2++;
61 }
62 RESTMetadata << RESTendl;
63
64 RESTMetadata << "path for output plots: " << fModuleCanvasSave << RESTendl;
65
66 EndPrintProcess();
67 }
68
69 const char* GetProcessName() const override { return "readoutAnalysis"; }
70
71 // Constructor
73 TRestRawReadoutAnalysisProcess(const char* configFilename);
74 // Destructor
76
77 ClassDefOverride(TRestRawReadoutAnalysisProcess, 1); // Template for a REST "event process" class
78 // inherited from TRestEventProcess
79};
80#endif
A metadata class to generate/store a readout description.
A base class for any REST event process.
void BeginPrintProcess()
[name, cut range]
A base class for any REST event.
Definition: TRestEvent.h:38
endl_t RESTendl
Termination flag object for TRestStringOutput.
void EndProcess() override
To be executed at the end of the run (outside event loop)
TRestEvent * ProcessEvent(TRestEvent *inputEvent) override
Process one event.
RESTValue GetOutputEvent() const override
Get pointer to output event. Must be implemented in the derived class.
void Initialize() override
Making default settings.
void PrintMetadata() override
Implemented it in the derived metadata class to print out specific metadata information.
void InitFromConfigFile() override
To make settings from rml file. This method must be implemented in the derived class.
std::map< int, TH1D * > fModuleActivityY
[MM id, channel activity]
std::map< int, TH2D * > fModuleBSLSigmaY
[MM id, channel activity]
RESTValue GetInputEvent() const override
[MM id, channel activity]
std::map< int, TH2D * > fModuleBSLSigmaX
[MM id, channel activity]
void InitProcess() override
To be executed at the beginning of the run (outside event loop)
std::map< int, TH1D * > fModuleActivityX
[MM id, channel activity]
An event container for time rawdata signals with fixed length.