67#include "TRestDetectorHitsSpecularProcess.h"
73TRestDetectorHitsSpecularProcess::TRestDetectorHitsSpecularProcess() {
Initialize(); }
87TRestDetectorHitsSpecularProcess::TRestDetectorHitsSpecularProcess(
const char* configFilename) {
92TRestDetectorHitsSpecularProcess::~TRestDetectorHitsSpecularProcess() {}
106 for (
unsigned int hit = 0; hit <
fInputEvent->GetNumberOfHits(); hit++) {
117 const TVector3 relativePosition = position -
fPosition;
118 const TVector3 reflectionVector = relativePosition - 2 * relativePosition.Dot(
fNormal) *
fNormal;
130 fNormal = Get3DVectorParameterWithUnits(
"normal", {0, 0, 1});
132 fPosition = Get3DVectorParameterWithUnits(
"position", {0, 0, 1});
140 RESTMetadata <<
" - Plane position : ( " <<
fPosition.X() <<
", " <<
fPosition.Y() <<
", "
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 create specular hit images using a plane definition.
TRestDetectorHitsEvent * fOutputEvent
A pointer to the process output event.
TRestEvent * ProcessEvent(TRestEvent *inputEvent) override
Process one event.
TVector3 fNormal
Defines the normal to the plane we use to generate the specular image.
TRestDetectorHitsEvent * fInputEvent
A pointer to the process input event.
void InitFromConfigFile() override
To make settings from rml file. This method must be implemented in the derived class.
void PrintMetadata() override
Implemented it in the derived metadata class to print out specific metadata information.
TVector3 fPosition
Defines the position of the plane. A point inside the plane.
void Initialize() override
Making default settings.
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)