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. More...
 
TVector2 GetOrigin () const
 Returns a TVector2 with the pixel origin. More...
 
Double_t GetOriginX () const
 Returns the x-coordinate pixel origin. More...
 
Double_t GetOriginY () const
 Returns the y-coordinate pixel origin. More...
 
Double_t GetRotation () const
 Returns the rotation angle in degrees. More...
 
TVector2 GetSize ()
 Returns a TVector2 with the pixel size. More...
 
Double_t GetSizeX () const
 Returns the pixel size in X. More...
 
Double_t GetSizeY () const
 Returns the pixel size in Y. More...
 
Bool_t GetTriangle () const
 Returns true if the pixel is a triangle. More...
 
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. More...
 
void Print () const
 Prints on screen the pixel details, origin, size, rotation. More...
 
void SetOrigin (const TVector2 &origin)
 Sets the origin of the pixel using a TVector2. More...
 
void SetRotation (Double_t rot)
 Sets the rotation angle of the pixel in degrees. More...
 
void SetSize (const TVector2 &size)
 Sets the size of the pixel using a TVector2. More...
 
void SetTolerance (Double_t tol)
 Sets the value of the tolerance in mm. Used in IsInside method. More...
 
void SetTriangle (Bool_t type)
 Sets the type of the pixel. More...
 
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. More...
 
 TRestDetectorReadoutPixel ()
 TRestDetectorReadoutPixel default constructor. More...
 
virtual ~TRestDetectorReadoutPixel ()
 TRestDetectorReadoutPixel default destructor. More...
 

Private Member Functions

void Initialize ()
 Initializes the pixel members. More...
 

Private Attributes

Double_t fPixelOriginX = 0
 The pixel x-origin position, left-bottom corner. More...
 
Double_t fPixelOriginY = 0
 The pixel y-origin position, left-bottom corner. More...
 
Double_t fPixelSizeX = 0
 The pixel x size. More...
 
Double_t fPixelSizeY = 0
 The pixel y size. More...
 
Double_t fRotation = 0
 
Double_t fTolerance = 1.e-6
 It will be initialized with the module parameter "pixelTolerance". More...
 
Bool_t fTriangle = false
 

Constructor & Destructor Documentation

◆ TRestDetectorReadoutPixel()

TRestDetectorReadoutPixel::TRestDetectorReadoutPixel ( )

TRestDetectorReadoutPixel default constructor.

Definition at line 54 of file TRestDetectorReadoutPixel.cxx.

◆ ~TRestDetectorReadoutPixel()

TRestDetectorReadoutPixel::~TRestDetectorReadoutPixel ( )
virtual

TRestDetectorReadoutPixel default destructor.

Definition at line 59 of file TRestDetectorReadoutPixel.cxx.

Member Function Documentation

◆ GetCenter()

TVector2 TRestDetectorReadoutPixel::GetCenter ( ) const

Returns the center TVector2 position of the pixel.

Definition at line 69 of file TRestDetectorReadoutPixel.cxx.

◆ GetOrigin()

TVector2 TRestDetectorReadoutPixel::GetOrigin ( ) const
inline

Returns a TVector2 with the pixel origin.

Definition at line 62 of file TRestDetectorReadoutPixel.h.

◆ GetOriginX()

Double_t TRestDetectorReadoutPixel::GetOriginX ( ) const
inline

Returns the x-coordinate pixel origin.

Definition at line 56 of file TRestDetectorReadoutPixel.h.

◆ GetOriginY()

Double_t TRestDetectorReadoutPixel::GetOriginY ( ) const
inline

Returns the y-coordinate pixel origin.

Definition at line 59 of file TRestDetectorReadoutPixel.h.

◆ GetRotation()

Double_t TRestDetectorReadoutPixel::GetRotation ( ) const
inline

Returns the rotation angle in degrees.

Definition at line 65 of file TRestDetectorReadoutPixel.h.

◆ GetSize()

TVector2 TRestDetectorReadoutPixel::GetSize ( )
inline

Returns a TVector2 with the pixel size.

Definition at line 74 of file TRestDetectorReadoutPixel.h.

◆ GetSizeX()

Double_t TRestDetectorReadoutPixel::GetSizeX ( ) const
inline

Returns the pixel size in X.

Definition at line 68 of file TRestDetectorReadoutPixel.h.

◆ GetSizeY()

Double_t TRestDetectorReadoutPixel::GetSizeY ( ) const
inline

Returns the pixel size in Y.

Definition at line 71 of file TRestDetectorReadoutPixel.h.

◆ GetTriangle()

Bool_t TRestDetectorReadoutPixel::GetTriangle ( ) const
inline

Returns true if the pixel is a triangle.

Definition at line 77 of file TRestDetectorReadoutPixel.h.

◆ 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.

◆ Initialize()

void TRestDetectorReadoutPixel::Initialize ( )
private

Initializes the pixel members.

Definition at line 64 of file TRestDetectorReadoutPixel.cxx.

◆ IsInside()

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.

◆ Print()

void TRestDetectorReadoutPixel::Print ( ) const

Prints on screen the pixel details, origin, size, rotation.

Definition at line 147 of file TRestDetectorReadoutPixel.cxx.

◆ SetOrigin()

void TRestDetectorReadoutPixel::SetOrigin ( const TVector2 &  origin)
inline

Sets the origin of the pixel using a TVector2.

Definition at line 84 of file TRestDetectorReadoutPixel.h.

◆ SetRotation()

void TRestDetectorReadoutPixel::SetRotation ( Double_t  rot)
inline

Sets the rotation angle of the pixel in degrees.

Definition at line 96 of file TRestDetectorReadoutPixel.h.

◆ SetSize()

void TRestDetectorReadoutPixel::SetSize ( const TVector2 &  size)
inline

Sets the size of the pixel using a TVector2.

Definition at line 90 of file TRestDetectorReadoutPixel.h.

◆ SetTolerance()

void TRestDetectorReadoutPixel::SetTolerance ( Double_t  tol)
inline

Sets the value of the tolerance in mm. Used in IsInside method.

Definition at line 102 of file TRestDetectorReadoutPixel.h.

◆ SetTriangle()

void TRestDetectorReadoutPixel::SetTriangle ( Bool_t  type)
inline

Sets the type of the pixel.

Definition at line 99 of file TRestDetectorReadoutPixel.h.

◆ TransformToPixelCoordinates()

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.

Field Documentation

◆ fPixelOriginX

Double_t TRestDetectorReadoutPixel::fPixelOriginX = 0
private

The pixel x-origin position, left-bottom corner.

Definition at line 36 of file TRestDetectorReadoutPixel.h.

◆ fPixelOriginY

Double_t TRestDetectorReadoutPixel::fPixelOriginY = 0
private

The pixel y-origin position, left-bottom corner.

Definition at line 37 of file TRestDetectorReadoutPixel.h.

◆ fPixelSizeX

Double_t TRestDetectorReadoutPixel::fPixelSizeX = 0
private

The pixel x size.

Definition at line 39 of file TRestDetectorReadoutPixel.h.

◆ fPixelSizeY

Double_t TRestDetectorReadoutPixel::fPixelSizeY = 0
private

The pixel y size.

Definition at line 40 of file TRestDetectorReadoutPixel.h.

◆ 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.

◆ fTolerance

Double_t TRestDetectorReadoutPixel::fTolerance = 1.e-6
private

It will be initialized with the module parameter "pixelTolerance".

Definition at line 49 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: