|
REST-for-Physics
v2.3
Rare Event Searches ToolKit for Physics
|
A class to store the readout pixel definition used in TRestDetectorReadoutChannel.
This class stores the readout pixel geometrical description, origin position, orientation, and size. A readout pixel is the most elementary component of a readout used to construct a readout channel.
RESTsoft - Software for Rare Event Searches with TPCs
History of developments:
2015-aug: First concept. Javier Galan
Definition at line 32 of file TRestDetectorReadoutPixel.h.
#include <TRestDetectorReadoutPixel.h>
Public Member Functions | |
| TVector2 | GetCenter () const |
| Returns the center TVector2 position of the pixel. | |
| TVector2 | GetOrigin () const |
| Returns a TVector2 with the pixel origin. | |
| Double_t | GetOriginX () const |
| Returns the x-coordinate pixel origin. | |
| Double_t | GetOriginY () const |
| Returns the y-coordinate pixel origin. | |
| Double_t | GetRotation () const |
| Returns the rotation angle in degrees. | |
| TVector2 | GetSize () |
| Returns a TVector2 with the pixel size. | |
| Double_t | GetSizeX () const |
| Returns the pixel size in X. | |
| Double_t | GetSizeY () const |
| Returns the pixel size in Y. | |
| Bool_t | GetTriangle () const |
| Returns true if the pixel is a triangle. | |
| TVector2 | GetVertex (int n) const |
| Returns the specified pixel vertex position. | |
| Bool_t | IsInside (const TVector2 &pos) |
| Determines if a given TVector2 pos coordinates are found inside the pixel. The coordinates are referenced to the readout module system. | |
| void | Print () const |
| Prints on screen the pixel details, origin, size, rotation. | |
| void | SetOrigin (const TVector2 &origin) |
| Sets the origin of the pixel using a TVector2. | |
| void | SetRotation (Double_t rot) |
| Sets the rotation angle of the pixel in degrees. | |
| void | SetSize (const TVector2 &size) |
| Sets the size of the pixel using a TVector2. | |
| void | SetTolerance (Double_t tol) |
| Sets the value of the tolerance in mm. Used in IsInside method. | |
| void | SetTriangle (Bool_t type) |
| Sets the type of the pixel. | |
| TVector2 | TransformToPixelCoordinates (const TVector2 &pixel) const |
| Transforms the coordinates given in a TVector2 to the internal pixel coordinate system. The coordinates are referenced to the readout module system. | |
| TRestDetectorReadoutPixel () | |
| TRestDetectorReadoutPixel default constructor. | |
| virtual | ~TRestDetectorReadoutPixel () |
| TRestDetectorReadoutPixel default destructor. | |
Private Member Functions | |
| void | Initialize () |
| Initializes the pixel members. | |
Private Attributes | |
| Double_t | fPixelOriginX = 0 |
| The pixel x-origin position, left-bottom corner. | |
| Double_t | fPixelOriginY = 0 |
| The pixel y-origin position, left-bottom corner. | |
| Double_t | fPixelSizeX = 0 |
| The pixel x size. | |
| Double_t | fPixelSizeY = 0 |
| The pixel y size. | |
| Double_t | fRotation = 0 |
| Double_t | fTolerance = 1.e-6 |
| It will be initialized with the module parameter "pixelTolerance". | |
| Bool_t | fTriangle = false |
| TRestDetectorReadoutPixel::TRestDetectorReadoutPixel | ( | ) |
TRestDetectorReadoutPixel default constructor.
Definition at line 54 of file TRestDetectorReadoutPixel.cxx.
|
virtual |
TRestDetectorReadoutPixel default destructor.
Definition at line 59 of file TRestDetectorReadoutPixel.cxx.
| TVector2 TRestDetectorReadoutPixel::GetCenter | ( | ) | const |
Returns the center TVector2 position of the pixel.
Definition at line 69 of file TRestDetectorReadoutPixel.cxx.
|
inline |
Returns a TVector2 with the pixel origin.
Definition at line 62 of file TRestDetectorReadoutPixel.h.
|
inline |
Returns the x-coordinate pixel origin.
Definition at line 56 of file TRestDetectorReadoutPixel.h.
|
inline |
Returns the y-coordinate pixel origin.
Definition at line 59 of file TRestDetectorReadoutPixel.h.
|
inline |
Returns the rotation angle in degrees.
Definition at line 65 of file TRestDetectorReadoutPixel.h.
|
inline |
Returns a TVector2 with the pixel size.
Definition at line 74 of file TRestDetectorReadoutPixel.h.
|
inline |
Returns the pixel size in X.
Definition at line 68 of file TRestDetectorReadoutPixel.h.
|
inline |
Returns the pixel size in Y.
Definition at line 71 of file TRestDetectorReadoutPixel.h.
|
inline |
Returns true if the pixel is a triangle.
Definition at line 77 of file TRestDetectorReadoutPixel.h.
| TVector2 TRestDetectorReadoutPixel::GetVertex | ( | int | n | ) | const |
Returns the specified pixel vertex position.
| n | A value between 0-3 defining the vertex position to be returned. |
Definition at line 87 of file TRestDetectorReadoutPixel.cxx.
|
private |
Initializes the pixel members.
Definition at line 64 of file TRestDetectorReadoutPixel.cxx.
| Bool_t TRestDetectorReadoutPixel::IsInside | ( | const TVector2 & | pos | ) |
Determines if a given TVector2 pos coordinates are found inside the pixel. The coordinates are referenced to the readout module system.
Definition at line 116 of file TRestDetectorReadoutPixel.cxx.
| void TRestDetectorReadoutPixel::Print | ( | ) | const |
Prints on screen the pixel details, origin, size, rotation.
Definition at line 147 of file TRestDetectorReadoutPixel.cxx.
|
inline |
Sets the origin of the pixel using a TVector2.
Definition at line 84 of file TRestDetectorReadoutPixel.h.
|
inline |
Sets the rotation angle of the pixel in degrees.
Definition at line 96 of file TRestDetectorReadoutPixel.h.
|
inline |
Sets the size of the pixel using a TVector2.
Definition at line 90 of file TRestDetectorReadoutPixel.h.
|
inline |
Sets the value of the tolerance in mm. Used in IsInside method.
Definition at line 102 of file TRestDetectorReadoutPixel.h.
|
inline |
Sets the type of the pixel.
Definition at line 99 of file TRestDetectorReadoutPixel.h.
| TVector2 TRestDetectorReadoutPixel::TransformToPixelCoordinates | ( | const TVector2 & | pixel | ) | const |
Transforms the coordinates given in a TVector2 to the internal pixel coordinate system. The coordinates are referenced to the readout module system.
Definition at line 138 of file TRestDetectorReadoutPixel.cxx.
|
private |
The pixel x-origin position, left-bottom corner.
Definition at line 36 of file TRestDetectorReadoutPixel.h.
|
private |
The pixel y-origin position, left-bottom corner.
Definition at line 37 of file TRestDetectorReadoutPixel.h.
|
private |
The pixel x size.
Definition at line 39 of file TRestDetectorReadoutPixel.h.
|
private |
The pixel y size.
Definition at line 40 of file TRestDetectorReadoutPixel.h.
|
private |
The pixel rotation angle in degrees, rotation with axis at the origin position.
Definition at line 42 of file TRestDetectorReadoutPixel.h.
|
private |
It will be initialized with the module parameter "pixelTolerance".
Definition at line 49 of file TRestDetectorReadoutPixel.h.
|
private |
The type of the pixel : false is rectangular, true is triangle
Definition at line 45 of file TRestDetectorReadoutPixel.h.