Belle II Software development
|
Base class to provide Sensor Information for PXD and SVD. More...
#include <SensorInfoBase.h>
Public Types | |
enum | SensorType { PXD = 0 , SVD = 1 , TEL = 2 , VXD = -1 } |
Enum specifing the type of sensor the SensorInfo represents. More... | |
Public Member Functions | |
SensorInfoBase (SensorType type, VxdID id, double width, double length, double thickness, int uCells, int vCells, double width2=-1, double splitLength=-1, int vCells2=0) | |
Constructor for a SensorInfo instance. | |
virtual | ~SensorInfoBase () |
Default constructor to make class polymorph. | |
SensorType | getType () const |
Return the Type of the Sensor. | |
VxdID | getID () const |
Return the ID of the Sensor. | |
double | getWidth (double v=0) const |
Return the width of the sensor. | |
double | getBackwardWidth () const |
Convinience Wrapper to return width at backward side. | |
double | getForwardWidth () const |
Convinience Wrapper to return width at forward side. | |
double | getLength () const |
Return the length of the sensor. | |
double | getThickness () const |
Return the thickness of the sensor. | |
double | getUSize (double v=0) const |
Return the width of the sensor. | |
double | getVSize () const |
Return the length of the sensor. | |
double | getWSize () const |
Return the thickness of the sensor. | |
double | getUPitch (double v=0) const |
Return the pitch of the sensor. | |
double | getVPitch (double v=0) const |
Return the pitch of the sensor. | |
int | getVPitchID (double v=0) const |
Return the pitch ID of the sensor. | |
double | getUCellPosition (int uID, int vID=-1) const |
Return the position of a specific strip/pixel in u direction. | |
double | getVCellPosition (int vID) const |
Return the position of a specific strip/pixel in v direction. | |
int | getUCellID (double u, double v=0, bool clamp=false) const |
Return the corresponding pixel/strip ID of a given u coordinate. | |
int | getVCellID (double v, bool clamp=false) const |
Return the corresponding pixel/strip ID of a given v coordinate. | |
int | getUCells () const |
Return number of pixel/strips in u direction. | |
int | getVCells () const |
Return number of pixel/strips in v direction. | |
int | getVCells2 () const |
Return number of pixel/strips in v direction up to change pitch. | |
bool | inside (double u, double v, double uTolerance=DBL_EPSILON, double vTolerance=DBL_EPSILON) const |
Check wether a given point is inside the active area. | |
bool | inside (const ROOT::Math::XYZVector &local, double uTolerance=DBL_EPSILON, double vTolerance=DBL_EPSILON, double wTolerance=DBL_EPSILON) const |
Check wether a given point is inside the active area. | |
void | forceInside (double &u, double &v) const |
Force a position to be inside the active area. | |
void | forceInside (ROOT::Math::XYZVector &local) const |
Force a given point inside the active area. | |
ROOT::Math::XYZVector | pointToGlobal (const ROOT::Math::XYZVector &local, bool reco=false) const |
Convert a point from local to global coordinates. | |
ROOT::Math::XYZVector | vectorToGlobal (const ROOT::Math::XYZVector &local, bool reco=false) const |
Convert a vector from local to global coordinates. | |
ROOT::Math::XYZVector | pointToLocal (const ROOT::Math::XYZVector &global, bool reco=false) const |
Convert a point from global to local coordinates. | |
ROOT::Math::XYZVector | vectorToLocal (const ROOT::Math::XYZVector &global, bool reco=false) const |
Convert a vector from global to local coordinates. | |
void | setTransformation (const TGeoHMatrix &transform, bool reco=false) |
Set the transformation matrix of the Sensor. | |
const TGeoHMatrix & | getTransformation (bool reco=false) const |
Return the transformation matrix of the Sensor. | |
void | setSurfaceParameters (const std::vector< double > &planarParameters) |
Fill parameters of planar deformation to vector. | |
const std::vector< double > & | getSurfaceParameters () const |
Return parameters of planar deformation. | |
Protected Attributes | |
SensorType | m_type |
Type of the Sensor. | |
unsigned short | m_id |
ID of the Sensor. | |
double | m_width |
Width of the sensor. | |
double | m_length |
Length of the Sensor. | |
double | m_thickness |
Thickness of the Sensor. | |
double | m_deltaWidth |
Difference between backward and forward width, 0 for rectangular sensors. | |
double | m_splitLength |
Relative length at which second pixel size starts, 0 for only one pixel size. | |
int | m_uCells |
Number of strips/pixels in u direction. | |
int | m_vCells |
Number of strips/pixels in v direction (up to splitLength for two pixel sizes) | |
int | m_vCells2 |
Number of strips/pixels in v direction after splitLength, 0 for only one pixel size. | |
TGeoHMatrix | m_transform |
Nominal transformation matrix of the Sensor. | |
TGeoHMatrix | m_recoTransform |
Alignment-corrected transformation matrix of the Sensor for use in reconstruction. | |
std::vector< double > | m_surfaceDeformationParameters = std::vector<double>(12, 0.0) |
Vector contains all parameter needed for description planar deformation of sensors. | |
Base class to provide Sensor Information for PXD and SVD.
This class is meant to provide the basic services like length/thickness parameters, pixel/stip ID and position calculation and coordinate transformation.
Definition at line 29 of file SensorInfoBase.h.
enum SensorType |
|
inline |
Constructor for a SensorInfo instance.
this class holds all the information to calculate pixel/strip positions and ids. it can accomodate rectangular and trapezoidal shapes and also has the possibility to segment the strip/pixelsize once in v, thus having two different pixel sizes in one sensor: vcells pixels from start to splitlength and vcells2 pixels from splitlength to length.
type | Type of the Sensor, one of PXD or SVD |
id | VxdID of the Sensor |
width | Width of the Sensor in default units |
length | Length of the Sensor in default units |
thickness | Thickness of the Sensor in default units |
uCells | Number of Pixels/Strips in u direction (local x) |
vCells | Number of Pixels/Strips in v direction (local y) |
width2 | Width of trapezoidal sensor on positive side, <=0 means rectangular |
splitLength | Length at which the pixel size changes, starting at 0. <=0 means only one pixel/strip size in v |
vCells2 | Number of pixels in v direction after split length. |
Definition at line 60 of file SensorInfoBase.h.
|
inlinevirtual |
|
inline |
Force a position to be inside the active area.
u | u coordinate to be forced inside |
v | v coordinate to be forced inside |
Definition at line 255 of file SensorInfoBase.h.
|
inline |
Force a given point inside the active area.
local | point in local coordinates, will be modified to lie inside or at the border of the sensor |
Definition at line 358 of file SensorInfoBase.h.
|
inline |
Convinience Wrapper to return width at backward side.
Definition at line 89 of file SensorInfoBase.h.
|
inline |
Convinience Wrapper to return width at forward side.
Definition at line 97 of file SensorInfoBase.h.
|
inline |
|
inline |
Return the length of the sensor.
Definition at line 105 of file SensorInfoBase.h.
|
inline |
Return parameters of planar deformation.
Definition at line 324 of file SensorInfoBase.h.
|
inline |
Return the thickness of the sensor.
Definition at line 110 of file SensorInfoBase.h.
|
inline |
Return the transformation matrix of the Sensor.
reco | Get transformation for reconstruction (true) or nominal (false) |
Definition at line 311 of file SensorInfoBase.h.
|
inline |
|
inline |
Return the corresponding pixel/strip ID of a given u coordinate.
u | u coordinate of the pixel/strip |
v | v coordinate of the pixel/strip, ignored for rectangular sensors |
clamp | flag for clamp |
Definition at line 193 of file SensorInfoBase.h.
|
inline |
Return the position of a specific strip/pixel in u direction.
uID | id of the strip/pixel in u coordinates |
vID | id of the strip/pixel in v coordinates, ignored for rectangular sensors |
Definition at line 168 of file SensorInfoBase.h.
|
inline |
|
inline |
Return the pitch of the sensor.
v | v-coordinate where to determine the pitch, ignored for rectangular sensors |
Definition at line 132 of file SensorInfoBase.h.
|
inline |
Return the width of the sensor.
v | v-coordinate where to determine the width, ignored for recangular sensors |
Definition at line 116 of file SensorInfoBase.h.
|
inline |
Return the corresponding pixel/strip ID of a given v coordinate.
v | v coordinate of the pixel/strip |
clamp | flag for clamp |
Definition at line 204 of file SensorInfoBase.h.
|
inline |
Return the position of a specific strip/pixel in v direction.
vID | id of the strip/pixel in v coordinates |
Definition at line 180 of file SensorInfoBase.h.
|
inline |
Return number of pixel/strips in v direction.
Definition at line 216 of file SensorInfoBase.h.
|
inline |
Return number of pixel/strips in v direction up to change pitch.
Definition at line 218 of file SensorInfoBase.h.
|
inline |
Return the pitch of the sensor.
v | v-coordinate where to determine the pitch, only used for sensors with two different pixel sizes along v |
Definition at line 139 of file SensorInfoBase.h.
|
inline |
Return the pitch ID of the sensor.
v | v-coordinate where to determine the pitchID only used for PXD sensors with two different pixel sizes along v |
Definition at line 156 of file SensorInfoBase.h.
|
inline |
Return the length of the sensor.
Definition at line 121 of file SensorInfoBase.h.
|
inline |
Return the width of the sensor.
v | v-coordinate where to determine the width, ignored for recangular sensors |
Definition at line 80 of file SensorInfoBase.h.
|
inline |
Return the thickness of the sensor.
Definition at line 126 of file SensorInfoBase.h.
|
inline |
Check wether a given point is inside the active area.
local | point in local coordinates |
uTolerance | tolerance to be added on each side of the sensor in u direction |
vTolerance | tolerance to be added on each side of the sensor in v direction |
wTolerance | tolerance to be added on each side of the sensor in w direction |
Definition at line 243 of file SensorInfoBase.h.
|
inline |
Check wether a given point is inside the active area.
Optionally, one can specify a tolerance which should be added to the sensor edges to still be considered inside
u | u coordinate to check, supply 0 if not interested |
v | v coordinate to check, supply 0 if not interested |
uTolerance | tolerance to be added on each side of the sensor in u direction |
vTolerance | tolerance to be added on each side of the sensor in v direction |
Definition at line 229 of file SensorInfoBase.h.
|
inline |
Convert a point from local to global coordinates.
local | point in local coordinates |
reco | Use sensor position in reconstruction (true) or in nominal geometry (false) |
Definition at line 369 of file SensorInfoBase.h.
|
inline |
Convert a point from global to local coordinates.
global | point in global coordinates |
reco | Use sensor position in reconstruction (true) or in nominal geometry (false) |
Definition at line 389 of file SensorInfoBase.h.
|
inline |
Fill parameters of planar deformation to vector.
Definition at line 318 of file SensorInfoBase.h.
|
inline |
Set the transformation matrix of the Sensor.
transform | Transformation matrix of the Sensor |
reco | Set transformation for reconstruction (true) or nominal (false) |
Definition at line 301 of file SensorInfoBase.h.
|
inline |
Convert a vector from local to global coordinates.
local | vector in local coordinates |
reco | Use sensor position in reconstruction (true) or in nominal geometry (false) |
Definition at line 379 of file SensorInfoBase.h.
|
inline |
Convert a vector from global to local coordinates.
global | vector in global coordinates |
reco | Use sensor position in reconstruction (true) or in nominal geometry (false) |
Definition at line 399 of file SensorInfoBase.h.
|
protected |
Difference between backward and forward width, 0 for rectangular sensors.
Definition at line 341 of file SensorInfoBase.h.
|
protected |
ID of the Sensor.
Definition at line 333 of file SensorInfoBase.h.
|
protected |
Length of the Sensor.
Definition at line 337 of file SensorInfoBase.h.
|
protected |
Alignment-corrected transformation matrix of the Sensor for use in reconstruction.
Definition at line 353 of file SensorInfoBase.h.
|
protected |
Relative length at which second pixel size starts, 0 for only one pixel size.
Definition at line 343 of file SensorInfoBase.h.
|
protected |
Vector contains all parameter needed for description planar deformation of sensors.
Definition at line 355 of file SensorInfoBase.h.
|
protected |
Thickness of the Sensor.
Definition at line 339 of file SensorInfoBase.h.
|
protected |
Nominal transformation matrix of the Sensor.
Definition at line 351 of file SensorInfoBase.h.
|
protected |
Type of the Sensor.
Definition at line 331 of file SensorInfoBase.h.
|
protected |
Number of strips/pixels in u direction.
Definition at line 345 of file SensorInfoBase.h.
|
protected |
Number of strips/pixels in v direction (up to splitLength for two pixel sizes)
Definition at line 347 of file SensorInfoBase.h.
|
protected |
Number of strips/pixels in v direction after splitLength, 0 for only one pixel size.
Definition at line 349 of file SensorInfoBase.h.
|
protected |
Width of the sensor.
Definition at line 335 of file SensorInfoBase.h.