REST-for-Physics  v2.3
Rare Event Searches ToolKit for Physics
Public Member Functions | Private Member Functions | Private Attributes
TRestDetectorReadoutPixel Class Reference

Detailed Description

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

Author
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. More...
 
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
 

Member Function Documentation

◆ GetVertex()

TVector2 TRestDetectorReadoutPixel::GetVertex ( int  n) const

Returns the specified pixel vertex position.

Parameters
nA value between 0-3 defining the vertex position to be returned.

Definition at line 87 of file TRestDetectorReadoutPixel.cxx.

Field Documentation

◆ fRotation

Double_t TRestDetectorReadoutPixel::fRotation = 0
private

The pixel rotation angle in degrees, rotation with axis at the origin position.

Definition at line 42 of file TRestDetectorReadoutPixel.h.

◆ fTriangle

Bool_t TRestDetectorReadoutPixel::fTriangle = false
private

The type of the pixel : false is rectangular, true is triangle

Definition at line 45 of file TRestDetectorReadoutPixel.h.


The documentation for this class was generated from the following files: