|
REST-for-Physics
v2.3
Rare Event Searches ToolKit for Physics
|
A class to store the readout module definition used in TRestDetectorReadoutPlane. It allows to integrate any number of independent readout channels.
This class stores the readout module geometrical description, module position, orientation, and size. It contains a vector of TRestDetectorReadoutChannel with the definition of the readout channels existing in the readout module.
RESTsoft - Software for Rare Event Searches with TPCs
History of developments:
2015-aug: First concept. Javier Galan
Definition at line 36 of file TRestDetectorReadoutModule.h.
#include <TRestDetectorReadoutModule.h>
Public Member Functions | |
| void | AddChannel (TRestDetectorReadoutChannel &rChannel) |
| Adds a new channel to the module. More... | |
| Int_t | DaqToReadoutChannel (Int_t daqChannel) |
| Returns the physical readout channel index for a given daq id channel number. More... | |
| void | DisableWarnings () |
| Disables warning output. More... | |
| void | DoReadoutMapping (Int_t nodes=0) |
| Starts the readout mapping initialization. This process is computationally expensive but it greatly optimizes the FindChannel process later on. More... | |
| void | Draw () |
| Not implemented. More... | |
| void | EnableWarnings () |
| Enables warning output. More... | |
| Int_t | FindChannel (const TVector2 &position) |
| Returns the channel index corresponding to the absolute coordinates (absX, absY), but relative to the readout plane coordinate system. More... | |
| TRestDetectorReadoutChannel * | GetChannel (size_t n) |
| Returns a pointer to a readout channel by index. More... | |
| TVector2 | GetDistanceToModule (const TVector2 &position) |
| Creates a TVector2 with shortest norm going from the given position pos to the module. It can be seen as the vector to add to move from the position to the closest border of the module. More... | |
| TRestDetectorReadoutMapping * | GetMapping () |
| Returns a pointer to the readout mapping. More... | |
| Int_t | GetMaxDaqID () const |
| Returns the maximum daq id number. More... | |
| Int_t | GetMinDaqID () const |
| Returns the minimum daq id number. More... | |
| TVector2 | GetModuleCoordinates (const TVector2 &p) const |
| Int_t | GetModuleID () const |
| Returns the module id. More... | |
| const char * | GetName () const |
| Returns the module name. More... | |
| size_t | GetNumberOfChannels () const |
| Returns the total number of channels defined inside the module. More... | |
| TVector2 | GetOrigin () const |
| Returns the module origin position. More... | |
| TVector2 | GetPixelCenter (Int_t channel, Int_t pixel) |
| Returns the center pixel position for a given channel and pixel indexes. More... | |
| TVector2 | GetPixelCenter (TRestDetectorReadoutPixel *pix) |
| TVector2 | GetPixelOrigin (Int_t channel, Int_t pixel) |
| Returns the pixel origin (left-bottom) position for a given channel and pixel indexes. More... | |
| TVector2 | GetPixelOrigin (TRestDetectorReadoutPixel *pix) |
| Bool_t | GetPixelTriangle (Int_t channel, Int_t pixel) |
| Returns the pixel type for a given channel and pixel indexes. More... | |
| Bool_t | GetPixelTriangle (TRestDetectorReadoutPixel *pix) |
| TVector2 | GetPixelVertex (Int_t channel, Int_t pixel, Int_t vertex) |
| Returns any of the pixel vertex position for a given channel and pixel indexes. More... | |
| TVector2 | GetPixelVertex (TRestDetectorReadoutPixel *pix, Int_t vertex) |
| TVector2 | GetPlaneCoordinates (const TVector2 &p) |
| Double_t | GetRotation () const |
| Returns the module rotation in degrees. More... | |
| TVector2 | GetSize () const |
| Returns the module size (x, y) in mm. More... | |
| Double_t | GetTolerance () const |
| Gets the tolerance for independent pixel overlaps. More... | |
| TVector2 | GetVertex (int n) const |
| Returns the coordinates of the specified vertex index n. The physical coordinates relative to the readout plane are returned, including rotation. More... | |
| Bool_t | isDaqIDInside (Int_t daqID) |
| Determines if a given daqID number is in the range of the module. More... | |
| Bool_t | isInside (const TVector2 &position) |
| Determines if the position TVector2 pos relative to the readout plane are inside this readout module. More... | |
| Bool_t | isInside (Double_t x, Double_t y) |
| Determines if the position x,y relative to the readout plane are inside this readout module. More... | |
| Bool_t | isInsideChannel (Int_t channel, const TVector2 &position) |
| Determines if the position TVector2 pos is found in any of the pixels of the readout channel index given. More... | |
| Bool_t | isInsideChannel (Int_t channel, Double_t x, Double_t y) |
| Determines if the position x,y is found in any of the pixels of the readout channel index given. More... | |
| Bool_t | isInsidePixel (Int_t channel, Int_t pixel, const TVector2 &position) |
| Determines if the position TVector2 pos is found at a specific pixel id inside the readout channel given. More... | |
| TRestDetectorReadoutChannel & | operator[] (int n) |
| void | Print (Int_t DetailLevel=0) |
| Prints the module details and channels if fullDetail is enabled. More... | |
| void | SetMinMaxDaqIDs () |
| Initializes the max and min values for the daq channel number. More... | |
| void | SetModuleID (Int_t modID) |
| Sets the module by id definition. More... | |
| void | SetName (const std::string &name) |
| Sets the name of the readout module. More... | |
| void | SetOrigin (const TVector2 &origin) |
| Sets the module origin by definition using TVector2 input. More... | |
| void | SetRotation (Double_t rotation) |
| Sets the module rotation in degrees. More... | |
| void | SetSize (const TVector2 &size) |
| Sets the module size by definition using TVector2 input. More... | |
| void | SetTolerance (Double_t tolerance) |
| Sets the tolerance for independent pixel overlaps. More... | |
| TRestDetectorReadoutModule () | |
| Default TRestDetectorReadoutModule constructor. More... | |
| virtual | ~TRestDetectorReadoutModule () |
| Default TRestDetectorReadoutModule destructor. More... | |
Private Member Functions | |
| *default REST_Warning in TRestDetectorReadout will enable it *void | Initialize () |
| TRestDetectorReadoutModule initialization. More... | |
| TVector2 | TransformToModuleCoordinates (const TVector2 &xyPhysical) const |
| TVector2 | TransformToPlaneCoordinates (Double_t xMod, Double_t yMod) const |
Private Attributes | |
| std::pair< Int_t, Int_t > | fDaqIdRange |
| The minimum and maximum daq channel ids associated to the module. More... | |
| Int_t | fId = -1 |
| The module id given by the readout definition. More... | |
| TRestDetectorReadoutMapping | fMapping |
| The readout module uniform grid mapping. More... | |
| std::string | fName |
| The assigned module name. More... | |
| TVector2 | fOrigin = {0, 0} |
| The module (x, y) position relative to the readout plane position. More... | |
| std::vector< TRestDetectorReadoutChannel > | fReadoutChannel |
| Double_t | fRotation = 0 |
| The rotation of the module around the module origin (fModuleOriginX, fModuleOriginY) in radians. More... | |
| TVector2 | fSize = {0, 0} |
| The module (x, y) size. All pixels should be contained within this size. More... | |
| Double_t | fTolerance |
| Bool_t | showWarnings |
| TRestDetectorReadoutModule::TRestDetectorReadoutModule | ( | ) |
Default TRestDetectorReadoutModule constructor.
Definition at line 57 of file TRestDetectorReadoutModule.cxx.
|
virtual |
Default TRestDetectorReadoutModule destructor.
Definition at line 62 of file TRestDetectorReadoutModule.cxx.
| void TRestDetectorReadoutModule::AddChannel | ( | TRestDetectorReadoutChannel & | rChannel | ) |
Adds a new channel to the module.
Definition at line 499 of file TRestDetectorReadoutModule.cxx.
|
inline |
Returns the physical readout channel index for a given daq id channel number.
Definition at line 118 of file TRestDetectorReadoutModule.h.
|
inline |
Disables warning output.
Definition at line 170 of file TRestDetectorReadoutModule.h.
| void TRestDetectorReadoutModule::DoReadoutMapping | ( | Int_t | nodes = 0 | ) |
Starts the readout mapping initialization. This process is computationally expensive but it greatly optimizes the FindChannel process later on.
Definition at line 107 of file TRestDetectorReadoutModule.cxx.
| void TRestDetectorReadoutModule::Draw | ( | ) |
Not implemented.
Definition at line 526 of file TRestDetectorReadoutModule.cxx.
|
inline |
Enables warning output.
Definition at line 167 of file TRestDetectorReadoutModule.h.
| Int_t TRestDetectorReadoutModule::FindChannel | ( | const TVector2 & | position | ) |
Returns the channel index corresponding to the absolute coordinates (absX, absY), but relative to the readout plane coordinate system.
The readout mapping (see TRestDetectorReadoutMapping) is used to help finding the pixel where coordinates absX and absY fall in.
Definition at line 234 of file TRestDetectorReadoutModule.cxx.
|
inline |
Returns a pointer to a readout channel by index.
Definition at line 156 of file TRestDetectorReadoutModule.h.
| TVector2 TRestDetectorReadoutModule::GetDistanceToModule | ( | const TVector2 & | position | ) |
Creates a TVector2 with shortest norm going from the given position pos to the module. It can be seen as the vector to add to move from the position to the closest border of the module.
Definition at line 374 of file TRestDetectorReadoutModule.cxx.
|
inline |
Returns a pointer to the readout mapping.
Definition at line 151 of file TRestDetectorReadoutModule.h.
|
inline |
Returns the maximum daq id number.
Definition at line 115 of file TRestDetectorReadoutModule.h.
|
inline |
Returns the minimum daq id number.
Definition at line 112 of file TRestDetectorReadoutModule.h.
|
inline |
Converts the coordinates given by TVector2 in the readout plane reference system to the readout module reference system.
Definition at line 141 of file TRestDetectorReadoutModule.h.
|
inline |
Returns the module id.
Definition at line 128 of file TRestDetectorReadoutModule.h.
|
inline |
Returns the module name.
Definition at line 148 of file TRestDetectorReadoutModule.h.
|
inline |
Returns the total number of channels defined inside the module.
Definition at line 164 of file TRestDetectorReadoutModule.h.
|
inline |
Returns the module origin position.
Definition at line 131 of file TRestDetectorReadoutModule.h.
| TVector2 TRestDetectorReadoutModule::GetPixelCenter | ( | Int_t | channel, |
| Int_t | pixel | ||
| ) |
Returns the center pixel position for a given channel and pixel indexes.
| vertex | A value between 0-3 defining the vertex position to be returned |
Definition at line 421 of file TRestDetectorReadoutModule.cxx.
| TVector2 TRestDetectorReadoutModule::GetPixelCenter | ( | TRestDetectorReadoutPixel * | pix | ) |
Definition at line 453 of file TRestDetectorReadoutModule.cxx.
| TVector2 TRestDetectorReadoutModule::GetPixelOrigin | ( | Int_t | channel, |
| Int_t | pixel | ||
| ) |
Returns the pixel origin (left-bottom) position for a given channel and pixel indexes.
Definition at line 395 of file TRestDetectorReadoutModule.cxx.
| TVector2 TRestDetectorReadoutModule::GetPixelOrigin | ( | TRestDetectorReadoutPixel * | pix | ) |
Definition at line 442 of file TRestDetectorReadoutModule.cxx.
| Bool_t TRestDetectorReadoutModule::GetPixelTriangle | ( | Int_t | channel, |
| Int_t | pixel | ||
| ) |
Returns the pixel type for a given channel and pixel indexes.
| vertex | A boolean that is true if the pixel is triangular, false otherwise |
Definition at line 436 of file TRestDetectorReadoutModule.cxx.
| Bool_t TRestDetectorReadoutModule::GetPixelTriangle | ( | TRestDetectorReadoutPixel * | pix | ) |
Definition at line 460 of file TRestDetectorReadoutModule.cxx.
| TVector2 TRestDetectorReadoutModule::GetPixelVertex | ( | Int_t | channel, |
| Int_t | pixel, | ||
| Int_t | vertex | ||
| ) |
Returns any of the pixel vertex position for a given channel and pixel indexes.
| vertex | A value between 0-3 defining the vertex position to be returned |
Definition at line 406 of file TRestDetectorReadoutModule.cxx.
| TVector2 TRestDetectorReadoutModule::GetPixelVertex | ( | TRestDetectorReadoutPixel * | pix, |
| Int_t | vertex | ||
| ) |
Definition at line 446 of file TRestDetectorReadoutModule.cxx.
|
inline |
Converts the coordinates given by TVector2 in the readout module reference system to the readout plane reference system.
Definition at line 145 of file TRestDetectorReadoutModule.h.
|
inline |
Returns the module rotation in degrees.
Definition at line 137 of file TRestDetectorReadoutModule.h.
|
inline |
Returns the module size (x, y) in mm.
Definition at line 134 of file TRestDetectorReadoutModule.h.
|
inline |
Gets the tolerance for independent pixel overlaps.
Definition at line 109 of file TRestDetectorReadoutModule.h.
| TVector2 TRestDetectorReadoutModule::GetVertex | ( | int | n | ) | const |
Returns the coordinates of the specified vertex index n. The physical coordinates relative to the readout plane are returned, including rotation.
| n | A value between 0-3 defining the vertex position to be returned |
Definition at line 471 of file TRestDetectorReadoutModule.cxx.
|
private |
TRestDetectorReadoutModule initialization.
Definition at line 67 of file TRestDetectorReadoutModule.cxx.
| Bool_t TRestDetectorReadoutModule::isDaqIDInside | ( | Int_t | daqID | ) |
Determines if a given daqID number is in the range of the module.
Definition at line 220 of file TRestDetectorReadoutModule.cxx.
| Bool_t TRestDetectorReadoutModule::isInside | ( | const TVector2 & | position | ) |
Determines if the position TVector2 pos relative to the readout plane are inside this readout module.
Definition at line 327 of file TRestDetectorReadoutModule.cxx.
|
inline |
Determines if the position x,y relative to the readout plane are inside this readout module.
Definition at line 180 of file TRestDetectorReadoutModule.h.
| Bool_t TRestDetectorReadoutModule::isInsideChannel | ( | Int_t | channel, |
| const TVector2 & | position | ||
| ) |
Determines if the position TVector2 pos is found in any of the pixels of the readout channel index given.
Definition at line 349 of file TRestDetectorReadoutModule.cxx.
| Bool_t TRestDetectorReadoutModule::isInsideChannel | ( | Int_t | channel, |
| Double_t | x, | ||
| Double_t | y | ||
| ) |
Determines if the position x,y is found in any of the pixels of the readout channel index given.
Definition at line 341 of file TRestDetectorReadoutModule.cxx.
| Bool_t TRestDetectorReadoutModule::isInsidePixel | ( | Int_t | channel, |
| Int_t | pixel, | ||
| const TVector2 & | position | ||
| ) |
Determines if the position TVector2 pos is found at a specific pixel id inside the readout channel given.
Definition at line 360 of file TRestDetectorReadoutModule.cxx.
|
inline |
Definition at line 153 of file TRestDetectorReadoutModule.h.
| void TRestDetectorReadoutModule::Print | ( | Int_t | DetailLevel = 0 | ) |
Prints the module details and channels if fullDetail is enabled.
Definition at line 531 of file TRestDetectorReadoutModule.cxx.
| void TRestDetectorReadoutModule::SetMinMaxDaqIDs | ( | ) |
Initializes the max and min values for the daq channel number.
Definition at line 86 of file TRestDetectorReadoutModule.cxx.
|
inline |
Sets the module by id definition.
Definition at line 91 of file TRestDetectorReadoutModule.h.
|
inline |
Sets the name of the readout module.
Definition at line 103 of file TRestDetectorReadoutModule.h.
|
inline |
Sets the module origin by definition using TVector2 input.
Definition at line 97 of file TRestDetectorReadoutModule.h.
|
inline |
Sets the module rotation in degrees.
Definition at line 100 of file TRestDetectorReadoutModule.h.
|
inline |
Sets the module size by definition using TVector2 input.
Definition at line 94 of file TRestDetectorReadoutModule.h.
|
inline |
Sets the tolerance for independent pixel overlaps.
Definition at line 106 of file TRestDetectorReadoutModule.h.
|
inlineprivate |
Converts the coordinates (xPhys,yPhys) in the readout plane reference system to the readout module reference system.
Definition at line 68 of file TRestDetectorReadoutModule.h.
|
inlineprivate |
Converts the coordinates (xMod,yMod) in the readout module reference system to the readout plane reference system.
Definition at line 77 of file TRestDetectorReadoutModule.h.
|
private |
The minimum and maximum daq channel ids associated to the module.
Definition at line 49 of file TRestDetectorReadoutModule.h.
|
private |
The module id given by the readout definition.
Definition at line 38 of file TRestDetectorReadoutModule.h.
|
private |
The readout module uniform grid mapping.
Definition at line 56 of file TRestDetectorReadoutModule.h.
|
private |
The assigned module name.
Definition at line 40 of file TRestDetectorReadoutModule.h.
|
private |
The module (x, y) position relative to the readout plane position.
Definition at line 42 of file TRestDetectorReadoutModule.h.
|
private |
A std::vector of the instances of TRestDetectorReadoutChannel contained in the readout module.
Definition at line 53 of file TRestDetectorReadoutModule.h.
|
private |
The rotation of the module around the module origin (fModuleOriginX, fModuleOriginY) in radians.
Definition at line 47 of file TRestDetectorReadoutModule.h.
|
private |
The module (x, y) size. All pixels should be contained within this size.
Definition at line 44 of file TRestDetectorReadoutModule.h.
|
private |
Tolerance allowed in overlaps at the pixel boundaries in mm.
Definition at line 58 of file TRestDetectorReadoutModule.h.
|
private |
Definition at line 61 of file TRestDetectorReadoutModule.h.