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

Detailed Description

This class defines a uniform 2-dimensional grid relating its nodes to the pixels of a readout.

This class defines a uniform coordinate grid with XY-nodes. Each node is associated to a channel and pixel from the readout module definition. It is TRestDetectorReadoutModule::DoReadoutMapping the responsible to establish the correspondence between nodes and the set (channel,pixel).

In complex readouts the pixel and channel can be hard to identify. This class will be used by TRestDetectorReadoutModule::FindChannel in order to try to guess the pixel and channel where a given coordinate is found.


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 TRestDetectorReadoutMapping.h.

#include <TRestDetectorReadoutMapping.h>

Public Member Functions

Bool_t AllNodesSet ()
 Checks if all the nodes in the net have been defined. More...
 
Int_t GetChannel (Double_t x, Double_t y)
 Gets the channel number corresponding to coordinates (x,y) More...
 
Int_t GetChannelByNode (Int_t i, Int_t j)
 Gets the channel id corresponding to a given node (i,j) More...
 
Int_t GetNodeX (Double_t x)
 Gets the nodeX index corresponding to the x coordinate. More...
 
Int_t GetNodeX_ForChannelAndPixel (Int_t ch, Int_t px)
 Finds the node index in X for a given channel and pixel ids. More...
 
Int_t GetNodeY (Double_t y)
 Gets the nodeY index corresponding to the y coordinate. More...
 
Int_t GetNodeY_ForChannelAndPixel (Int_t ch, Int_t px)
 Finds the node index in Y for a given channel and pixel ids. More...
 
Int_t GetNumberOfNodesNotSet ()
 Returns the number of nodes that have not been initialized. More...
 
Int_t GetNumberOfNodesX () const
 Returns the number of nodes in X. More...
 
Int_t GetNumberOfNodesY () const
 Returns the number of nodes in Y. More...
 
Int_t GetPixel (Double_t x, Double_t y)
 Gets the pixel number corresponding to coordinates (x,y) More...
 
Int_t GetPixelByNode (Int_t i, Int_t j)
 Gets the pixel id corresponding to a given node (i,j) More...
 
Double_t GetX (Int_t nodeX)
 Gets the X position of node (i,j) More...
 
Double_t GetY (Int_t nodeY)
 Gets the Y position of node (i,j) More...
 
void Initialize (Int_t nX, Int_t nY, Double_t sX, Double_t sY)
 Resets the matrix values and allocates memory for the given net size. More...
 
Bool_t isNodeSet (Int_t i, Int_t j)
 Checks if the node (i,j) is defined. More...
 
void SetNode (Int_t i, Int_t j, Int_t ch, Int_t pix)
 Sets the readout channel and pixel corresponding to a mapping node. More...
 
 TRestDetectorReadoutMapping ()
 TRestDetectorReadoutMapping constructor. More...
 
 ~TRestDetectorReadoutMapping ()
 TRestDetectorReadoutMapping destructor. More...
 

Private Attributes

TMatrixD fChannel
 
Double_t fNetSizeX
 The size of the net/grid in the x-axis. More...
 
Double_t fNetSizeY
 The size of the net/grid in the y-axis. More...
 
Int_t fNodesX
 The number of nodes in the x-axis. More...
 
Int_t fNodesY
 The number of nodes in the y-axis. More...
 
TMatrixD fPixel
 

Constructor & Destructor Documentation

◆ TRestDetectorReadoutMapping()

TRestDetectorReadoutMapping::TRestDetectorReadoutMapping ( )

TRestDetectorReadoutMapping constructor.

Definition at line 57 of file TRestDetectorReadoutMapping.cxx.

◆ ~TRestDetectorReadoutMapping()

TRestDetectorReadoutMapping::~TRestDetectorReadoutMapping ( )

TRestDetectorReadoutMapping destructor.

Definition at line 62 of file TRestDetectorReadoutMapping.cxx.

Member Function Documentation

◆ AllNodesSet()

Bool_t TRestDetectorReadoutMapping::AllNodesSet ( )

Checks if all the nodes in the net have been defined.

Definition at line 177 of file TRestDetectorReadoutMapping.cxx.

◆ GetChannel()

Int_t TRestDetectorReadoutMapping::GetChannel ( Double_t  x,
Double_t  y 
)

Gets the channel number corresponding to coordinates (x,y)

Definition at line 95 of file TRestDetectorReadoutMapping.cxx.

◆ GetChannelByNode()

Int_t TRestDetectorReadoutMapping::GetChannelByNode ( Int_t  i,
Int_t  j 
)
inline

Gets the channel id corresponding to a given node (i,j)

Definition at line 54 of file TRestDetectorReadoutMapping.h.

◆ GetNodeX()

Int_t TRestDetectorReadoutMapping::GetNodeX ( Double_t  x)

Gets the nodeX index corresponding to the x coordinate.

Definition at line 77 of file TRestDetectorReadoutMapping.cxx.

◆ GetNodeX_ForChannelAndPixel()

Int_t TRestDetectorReadoutMapping::GetNodeX_ForChannelAndPixel ( Int_t  ch,
Int_t  px 
)

Finds the node index in X for a given channel and pixel ids.

Definition at line 121 of file TRestDetectorReadoutMapping.cxx.

◆ GetNodeY()

Int_t TRestDetectorReadoutMapping::GetNodeY ( Double_t  y)

Gets the nodeY index corresponding to the y coordinate.

Definition at line 86 of file TRestDetectorReadoutMapping.cxx.

◆ GetNodeY_ForChannelAndPixel()

Int_t TRestDetectorReadoutMapping::GetNodeY_ForChannelAndPixel ( Int_t  ch,
Int_t  px 
)

Finds the node index in Y for a given channel and pixel ids.

Definition at line 132 of file TRestDetectorReadoutMapping.cxx.

◆ GetNumberOfNodesNotSet()

Int_t TRestDetectorReadoutMapping::GetNumberOfNodesNotSet ( )

Returns the number of nodes that have not been initialized.

Definition at line 109 of file TRestDetectorReadoutMapping.cxx.

◆ GetNumberOfNodesX()

Int_t TRestDetectorReadoutMapping::GetNumberOfNodesX ( ) const
inline

Returns the number of nodes in X.

Definition at line 48 of file TRestDetectorReadoutMapping.h.

◆ GetNumberOfNodesY()

Int_t TRestDetectorReadoutMapping::GetNumberOfNodesY ( ) const
inline

Returns the number of nodes in Y.

Definition at line 51 of file TRestDetectorReadoutMapping.h.

◆ GetPixel()

Int_t TRestDetectorReadoutMapping::GetPixel ( Double_t  x,
Double_t  y 
)

Gets the pixel number corresponding to coordinates (x,y)

Definition at line 102 of file TRestDetectorReadoutMapping.cxx.

◆ GetPixelByNode()

Int_t TRestDetectorReadoutMapping::GetPixelByNode ( Int_t  i,
Int_t  j 
)
inline

Gets the pixel id corresponding to a given node (i,j)

Definition at line 57 of file TRestDetectorReadoutMapping.h.

◆ GetX()

Double_t TRestDetectorReadoutMapping::GetX ( Int_t  nodeX)

Gets the X position of node (i,j)

Definition at line 67 of file TRestDetectorReadoutMapping.cxx.

◆ GetY()

Double_t TRestDetectorReadoutMapping::GetY ( Int_t  nodeY)

Gets the Y position of node (i,j)

Definition at line 72 of file TRestDetectorReadoutMapping.cxx.

◆ Initialize()

void TRestDetectorReadoutMapping::Initialize ( Int_t  nX,
Int_t  nY,
Double_t  sX,
Double_t  sY 
)

Resets the matrix values and allocates memory for the given net size.

Definition at line 143 of file TRestDetectorReadoutMapping.cxx.

◆ isNodeSet()

Bool_t TRestDetectorReadoutMapping::isNodeSet ( Int_t  i,
Int_t  j 
)

Checks if the node (i,j) is defined.

Definition at line 169 of file TRestDetectorReadoutMapping.cxx.

◆ SetNode()

void TRestDetectorReadoutMapping::SetNode ( Int_t  i,
Int_t  j,
Int_t  ch,
Int_t  pix 
)

Sets the readout channel and pixel corresponding to a mapping node.

Definition at line 161 of file TRestDetectorReadoutMapping.cxx.

Field Documentation

◆ fChannel

TMatrixD TRestDetectorReadoutMapping::fChannel
private

A matrix containing the channel id for the corresponding XY-node.

Definition at line 40 of file TRestDetectorReadoutMapping.h.

◆ fNetSizeX

Double_t TRestDetectorReadoutMapping::fNetSizeX
private

The size of the net/grid in the x-axis.

Definition at line 37 of file TRestDetectorReadoutMapping.h.

◆ fNetSizeY

Double_t TRestDetectorReadoutMapping::fNetSizeY
private

The size of the net/grid in the y-axis.

Definition at line 38 of file TRestDetectorReadoutMapping.h.

◆ fNodesX

Int_t TRestDetectorReadoutMapping::fNodesX
private

The number of nodes in the x-axis.

Definition at line 34 of file TRestDetectorReadoutMapping.h.

◆ fNodesY

Int_t TRestDetectorReadoutMapping::fNodesY
private

The number of nodes in the y-axis.

Definition at line 35 of file TRestDetectorReadoutMapping.h.

◆ fPixel

TMatrixD TRestDetectorReadoutMapping::fPixel
private

A matrix containing the pixel id of fChannel for the corresponding XY-node.

Definition at line 42 of file TRestDetectorReadoutMapping.h.


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