22#include "TRestDetectorHitsNormalizationProcess.h"
28TRestDetectorHitsNormalizationProcess::TRestDetectorHitsNormalizationProcess() {
Initialize(); }
30TRestDetectorHitsNormalizationProcess::TRestDetectorHitsNormalizationProcess(
const char* configFilename) {
40TRestDetectorHitsNormalizationProcess::~TRestDetectorHitsNormalizationProcess() {
41 delete fHitsOutputEvent;
45void TRestDetectorHitsNormalizationProcess::LoadDefaultConfig() {
46 SetTitle(
"Default config");
57 fHitsInputEvent =
nullptr;
61void TRestDetectorHitsNormalizationProcess::LoadConfig(
const string& configFilename,
const string& name) {
80 for (
unsigned int hit = 0; hit < fHitsInputEvent->GetNumberOfHits(); hit++)
81 fHitsOutputEvent->
AddHit(fHitsInputEvent->
GetX(hit), fHitsInputEvent->
GetY(hit),
82 fHitsInputEvent->
GetZ(hit), fHitsInputEvent->GetEnergy(hit) * fFactor,
83 fHitsInputEvent->GetTime(hit), fHitsInputEvent->GetType(hit));
86 cout <<
"TRestDetectorHitsNormalizationProcess. Hits added : " << fHitsOutputEvent->GetNumberOfHits()
88 cout <<
"TRestDetectorHitsNormalizationProcess. Hits total energy : "
89 << fHitsOutputEvent->GetTotalEnergy() << endl;
92 return fHitsOutputEvent;
Double_t GetX(int n) const
Returns the X-coordinate of hit entry n in mm.
Double_t GetY(int n) const
Returns the Y-coordinate of hit entry n in mm.
Double_t GetZ(int n) const
Returns the Z-coordinate of hit entry n in mm.
void AddHit(Double_t x, Double_t y, Double_t z, Double_t en, Double_t t=0, REST_HitType type=XYZ)
Adds a new hit to this event.
TRestEvent * ProcessEvent(TRestEvent *inputEvent) override
Process one event.
void EndProcess() override
To be executed at the end of the run (outside event loop)
void InitProcess() override
To be executed at the beginning of the run (outside event loop)
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.
void Initialize() override
Making default settings.
A base class for any REST event.
void SetEventInfo(TRestEvent *eve)
@ REST_Debug
+show the defined debug messages
Double_t StringToDouble(std::string in)
Gets a double from a string.