66#include "TRestDetectorHitsRotationProcess.h"
72TRestDetectorHitsRotationProcess::TRestDetectorHitsRotationProcess() {
Initialize(); }
86TRestDetectorHitsRotationProcess::TRestDetectorHitsRotationProcess(
const char* configFilename) {
91TRestDetectorHitsRotationProcess::~TRestDetectorHitsRotationProcess() {}
105 for (
unsigned int hit = 0; hit <
fInputEvent->GetNumberOfHits(); hit++) {
131 fAxis = Get3DVectorParameterWithUnits(
"axis",
fAxis);
139 RESTMetadata <<
" - Rotation center : ( " <<
fCenter.X() <<
", " <<
fCenter.Y() <<
", " <<
fCenter.Z()
141 RESTMetadata <<
" - Rotation axis : ( " <<
fAxis.X() <<
", " <<
fAxis.Y() <<
", " <<
fAxis.Z() <<
")"
143 RESTMetadata <<
" - Rotation angle : " <<
fAngle *
units(
"degrees") <<
" degrees" <<
RESTendl;
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.
A process to rotate hits from a given center and axis.
TVector3 fAxis
Axis of rotation.
void InitFromConfigFile() override
To make settings from rml file. This method must be implemented in the derived class.
TRestDetectorHitsEvent * fInputEvent
A pointer to the process input event.
void Initialize() override
Making default settings.
void PrintMetadata() override
Implemented it in the derived metadata class to print out specific metadata information.
TRestEvent * ProcessEvent(TRestEvent *inputEvent) override
Process one event.
TVector3 fCenter
Center of rotation.
Double_t fAngle
Angle of rotation respect to the given axis.
TRestDetectorHitsEvent * fOutputEvent
A pointer to the process output event.
virtual void InitFromConfigFile() override
To make settings from rml file. This method must be implemented in the derived class.
void BeginPrintProcess()
[name, cut range]
A base class for any REST event.
void SetEventInfo(TRestEvent *eve)