55#include "TRestDetectorHitsGaussAnalysisProcess.h"
91 delete fOutputHitsEvent;
98 SetName(this->ClassName());
99 SetTitle(
"Default config");
151 for (
unsigned int n = 0; n < hits->GetNumberOfHits(); n++) {
152 Double_t eDep = hits->GetEnergy(n);
154 Double_t x = hits->GetX(n);
155 Double_t y = hits->GetY(n);
156 Double_t z = hits->GetZ(n);
158 auto time = hits->GetTime(n);
159 auto type = hits->GetType(n);
161 fOutputHitsEvent->
AddHit(x, y, z, eDep, time, type);
164 Double_t gausSigmaX = fOutputHitsEvent->GetGaussSigmaX(
fError,
fNHitsMin);
165 Double_t gausSigmaY = fOutputHitsEvent->GetGaussSigmaY(
fError,
fNHitsMin);
166 Double_t gausSigmaZ = fOutputHitsEvent->GetGaussSigmaZ(
fError,
fNHitsMin);
167 Double_t xy2SigmaGaus = (gausSigmaX == -1. || gausSigmaY == -1.)
169 : (gausSigmaX * gausSigmaX) + (gausSigmaY * gausSigmaY);
170 Double_t xySigmaBalanceGaus = (gausSigmaX == -1. || gausSigmaY == -1.)
172 : (gausSigmaX - gausSigmaY) / (gausSigmaX + gausSigmaY);
174 if (hits->GetNumberOfHits() > 30 && xy2SigmaGaus < 0.05)
191 return fOutputHitsEvent;
204 RESTMetadata <<
"Minimum number of hits to apply correction : " <<
fNHitsMin <<
RESTendl;
virtual void PrintEvent() const
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.
An analysis REST process to extract valuable information from Hits type of data performing gaussian f...
TRestEvent * ProcessEvent(TRestEvent *inputEvent) override
The main processing event function.
Double_t fError
Error assigned to the hits on the sides.
Int_t fNHitsMin
The minimum number of hits required to apply the hit correction.
TRestDetectorHitsGaussAnalysisProcess()
Default constructor.
void InitProcess() override
Function to use in initialization of process members before starting to process the event.
~TRestDetectorHitsGaussAnalysisProcess()
Default destructor.
void LoadDefaultConfig()
Function to load the default config in absence of RML input.
void Initialize() override
Function to initialize input/output event members and define the section name and library version.
void PrintMetadata() override
It prints out the process parameters stored in the metadata structure.
Double_t fPitch
The pitch or size of the strips in mm.
TRestDetectorHitsEvent * fInputHitsEvent
A pointer to the specific TRestDetectorHitsEvent.
void LoadConfig(const std::string &configFilename, const std::string &name="")
Function to load the configuration from an external configuration file.
void BeginPrintProcess()
[name, cut range]
void SetObservableValue(const std::string &name, const T &value)
Set observable value for AnalysisTree.
A base class for any REST event.
It saves a 3-coordinate position and an energy for each punctual deposition.
@ REST_Extreme
show everything
@ REST_Debug
+show the defined debug messages
Int_t GetChar(std::string hint="Press a KEY to continue ...")
Helps to pause the program, printing a message before pausing.