22 #include "TRestDetectorHitsNormalizationProcess.h"
28 TRestDetectorHitsNormalizationProcess::TRestDetectorHitsNormalizationProcess() { Initialize(); }
30 TRestDetectorHitsNormalizationProcess::TRestDetectorHitsNormalizationProcess(
const char* configFilename) {
33 if (LoadConfigFromFile(configFilename)) {
40 TRestDetectorHitsNormalizationProcess::~TRestDetectorHitsNormalizationProcess() {
41 delete fHitsOutputEvent;
45 void TRestDetectorHitsNormalizationProcess::LoadDefaultConfig() {
46 SetTitle(
"Default config");
52 SetSectionName(this->ClassName());
53 SetLibraryVersion(LIBRARY_VERSION);
57 fHitsInputEvent =
nullptr;
61 void TRestDetectorHitsNormalizationProcess::LoadConfig(
const string& configFilename,
const string& name) {
62 if (LoadConfigFromFile(configFilename, name)) LoadDefaultConfig();
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;
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 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.