REST-for-Physics  v2.3
Rare Event Searches ToolKit for Physics
TRestDetectorHitsSpecularProcess.h
1/*************************************************************************
2 * This file is part of the REST software framework. *
3 * *
4 * Copyright (C) 2016 GIFNA/TREX (University of Zaragoza) *
5 * For more information see http://gifna.unizar.es/trex *
6 * *
7 * REST is free software: you can redistribute it and/or modify *
8 * it under the terms of the GNU General Public License as published by *
9 * the Free Software Foundation, either version 3 of the License, or *
10 * (at your option) any later version. *
11 * *
12 * REST is distributed in the hope that it will be useful, *
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of *
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
15 * GNU General Public License for more details. *
16 * *
17 * You should have a copy of the GNU General Public License along with *
18 * REST in $REST_PATH/LICENSE. *
19 * If not, see http://www.gnu.org/licenses/. *
20 * For the list of contributors see $REST_PATH/CREDITS. *
21 *************************************************************************/
22
23#ifndef RestCore_TRestDetectorHitsSpecularProcess
24#define RestCore_TRestDetectorHitsSpecularProcess
25
26#include <TRestDetectorHitsEvent.h>
27#include <TRestEventProcess.h>
28
31 private:
34
37
38 void InitFromConfigFile() override;
39 void Initialize() override;
40
41 protected:
43 TVector3 fPosition = {0, 0, 0}; //<
44
46 TVector3 fNormal = {0, 0, 1}; //<
47
48 public:
49 RESTValue GetInputEvent() const override { return fInputEvent; }
50 RESTValue GetOutputEvent() const override { return fOutputEvent; }
51
52 TRestEvent* ProcessEvent(TRestEvent* inputEvent) override;
53
54 void PrintMetadata() override;
55
57 const char* GetProcessName() const override { return "hitsSpecular"; }
58
60 inline TVector3 GetNormal() const { return fNormal; }
61
63 inline TVector3 GetPosition() const { return fPosition; }
64
66 TRestDetectorHitsSpecularProcess(const char* configFilename);
68
69 ClassDefOverride(TRestDetectorHitsSpecularProcess, 1);
70};
71#endif
A process to create specular hit images using a plane definition.
RESTValue GetOutputEvent() const override
Get pointer to output event. Must be implemented in the derived class.
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.
TVector3 GetPosition() const
It returns the position of the point contained in the plane.
const char * GetProcessName() const override
It returns the given process name.
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.
TVector3 GetNormal() const
It returns the plane normal.
RESTValue GetInputEvent() const override
Get pointer to input event. Must be implemented in the derived class.
A base class for any REST event process.
A base class for any REST event.
Definition: TRestEvent.h:38