Belle II Software  release-08-01-10
SensorInfo Class Reference

Specific implementation of SensorInfo for PXD Sensors which provides additional pixel specific information. More...

#include <SensorInfo.h>

Inheritance diagram for SensorInfo:
Collaboration diagram for SensorInfo:

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

 SensorInfo (VxdID id=0, float width=0, float length=0, float thickness=0, int uCells=0, int vCells=0, float splitLength=0, int vCells2=0)
 Constructor which automatically sets the SensorType.
 
void setID (VxdID id)
 Change the SensorID, useful to copy the SensorInfo from one sensor and use it for another.
 
void flipVSegmentation ()
 Flip the Pitch segmentation along v. More...
 
void setDEPFETParams (double bulkDoping, double backVoltage, double topVoltage, double sourceBorderSmallPitch, double clearBorderSmallPitch, double drainBorderSmallPitch, double sourceBorderLargePitch, double clearBorderLargePitch, double drainBorderLargePitch, double gateDepth, bool doublePixel, double chargeThreshold, double noiseFraction)
 Set operation parameters like voltages.
 
void cook ()
 calculate constants in advance
 
int getTrappedID (double x, double y) const
 Get pixel number if the given coordinate is in the correspondin internal gate trapping region or -1 otherwise. More...
 
void setIntegrationWindow (double start, double end)
 Set the time window in which the sensor is active.
 
double getTemperature () const
 Return the temperature of the sensor.
 
double getBulkDoping () const
 Return the bulk doping of the Silicon sensor.
 
double getBackVoltage () const
 Return the voltage at the backside of the sensor.
 
double getTopVoltage () const
 Return the voltage at the top of the sensor.
 
double getSourceBorder (double v) const
 Return the distance between the source side of the pixel and the start of the Gate for a pixel at v. More...
 
double getClearBorder (double v) const
 Return the distance between the clear side of the pixel and the start of the Gate for a pixel at v.
 
double getDrainBorder (double v) const
 Return the distance between the drain side of the pixel and the start of the Gate for a pixel at v.
 
double getGateDepth () const
 Return the gate depth for the sensor.
 
bool getDoublePixel () const
 Return true if the Sensor is a double pixel structure: every other pixel is mirrored along v.
 
double getChargeThreshold () const
 Get the charge threshold in ADU for the sensor.
 
double getNoiseFraction () const
 Get the noise fraction for the sensor.
 
double getIntegrationStart () const
 Return the start of the integration window, the timeframe the PXD is sensitive.
 
double getIntegrationEnd () const
 Return the end of the integration window, the timeframe the PXD is sensitive.
 
double getHallFactor () const
 Return the Hall factor for electrons at sensor temperature.
 
double getElectronMobility (double E) const
 Calculate electron mobility at a given electric field. More...
 
const ROOT::Math::XYZVector getEField (const ROOT::Math::XYZVector &point) const
 Model of the E field inside the sensor. More...
 
const ROOT::Math::XYZVector getBField (const ROOT::Math::XYZVector &point) const
 Get B field value from the field map. More...
 
const ROOT::Math::XYZVector getLorentzShift (double u, double v) const
 Calculate Lorentz shift. More...
 
const ROOT::Math::XYZVector getDriftVelocity (const ROOT::Math::XYZVector &E, const ROOT::Math::XYZVector &B) const
 Calculate drift velocity of an electron. More...
 
int getPixelKind (const VxdID sensorID, double v) const
 Return pixel kind ID. More...
 
int getPixelKindNew (const VxdID &sensorID, int vID) const
 Return pixel kind ID. More...
 
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. More...
 
double getBackwardWidth () const
 Convinience Wrapper to return width at backward side. More...
 
double getForwardWidth () const
 Convinience Wrapper to return width at forward side. More...
 
double getLength () const
 Return the length of the sensor. More...
 
double getThickness () const
 Return the thickness of the sensor. More...
 
double getUSize (double v=0) const
 Return the width of the sensor. More...
 
double getVSize () const
 Return the length of the sensor. More...
 
double getWSize () const
 Return the thickness of the sensor. More...
 
double getUPitch (double v=0) const
 Return the pitch of the sensor. More...
 
double getVPitch (double v=0) const
 Return the pitch of the sensor. More...
 
int getVPitchID (double v=0) const
 Return the pitch ID of the sensor. More...
 
double getUCellPosition (int uID, int vID=-1) const
 Return the position of a specific strip/pixel in u direction. More...
 
double getVCellPosition (int vID) const
 Return the position of a specific strip/pixel in v direction. More...
 
int getUCellID (double u, double v=0, bool clamp=false) const
 Return the corresponding pixel/strip ID of a given u coordinate. More...
 
int getVCellID (double v, bool clamp=false) const
 Return the corresponding pixel/strip ID of a given v coordinate. More...
 
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. More...
 
bool inside (const ROOT::Math::XYZVector &local) const
 Check wether a given point is inside the active area. More...
 
void forceInside (double &u, double &v) const
 Force a position to be inside the active area. More...
 
void forceInside (ROOT::Math::XYZVector &local) const
 Force a given point inside the active area. More...
 
ROOT::Math::XYZVector pointToGlobal (const ROOT::Math::XYZVector &local, bool reco=false) const
 Convert a point from local to global coordinates. More...
 
ROOT::Math::XYZVector vectorToGlobal (const ROOT::Math::XYZVector &local, bool reco=false) const
 Convert a vector from local to global coordinates. More...
 
ROOT::Math::XYZVector pointToLocal (const ROOT::Math::XYZVector &global, bool reco=false) const
 Convert a point from global to local coordinates. More...
 
ROOT::Math::XYZVector vectorToLocal (const ROOT::Math::XYZVector &global, bool reco=false) const
 Convert a vector from global to local coordinates. More...
 
void setTransformation (const TGeoHMatrix &transform, bool reco=false)
 Set the transformation matrix of the Sensor. More...
 
const TGeoHMatrix & getTransformation (bool reco=false) const
 Return the transformation matrix of the Sensor. More...
 
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 Member Functions

void setLorentzFactor ()
 Calculate Lorentz shift factor. More...
 

Protected Attributes

double m_temperature
 The temperature of the sensor.
 
double m_hallFactor
 The bulk doping of the Silicon sensor.
 
double m_bulkDoping
 Doping concentration of the silicon bulk.
 
double m_backVoltage
 The voltage at the backside of the sensor.
 
double m_topVoltage
 The voltate at the top of the sensor.
 
double m_sourceBorderSmallPitch
 The distance between the source side of the pixel and the start of the Gate, small pitch area.
 
double m_clearBorderSmallPitch
 The distance between the clear side of the pixel and the start of the Gate, small pitch area

 
double m_drainBorderSmallPitch
 The distance between the drain side of the pixel and the start of the Gate, small pitch area

 
double m_sourceBorderLargePitch
 The distance between the source side of the pixel and the start of the Gate, large pitch area.
 
double m_clearBorderLargePitch
 The distance between the clear side of the pixel and the start of the Gate, large pitch area

 
double m_drainBorderLargePitch
 The distance between the drain side of the pixel and the start of the Gate, large pitch area

 
double m_gateDepth
 Return depth of the surface where the electrons will be collected.
 
bool m_doublePixel
 True if the Sensor is a double pixel structure: every other pixel is mirrored along v.
 
double m_chargeThreshold
 Charge threshold.
 
double m_noiseFraction
 Fixed noise fraction.
 
double m_integrationStart
 The start of the integration window, the timeframe the PXD is sensitive.
 
double m_integrationEnd
 The end of the integration window, the timeframe the PXD is sensitive.
 
double m_up
 pixel pitch in u direction
 
double m_iup
 the reciprocal of the pixel pitch in u direction
 
double m_vsplit
 v coordinate which splits small and large pixel regions
 
double m_vp
 large pixel pitch in v direction
 
double m_ivp
 the reciprocal of the large pixel pitch in v direction
 
double m_vp2
 small pixel pitch in v direction
 
double m_ivp2
 the reciprocal of the small pixel pitch in v direction
 
double m_hxIG
 size in u direction of the internal gate trapping region
 
double m_mIGL
 middle of the internal gate trapping region for large pixels
 
double m_sIGL
 size in v direction of the internal gate trapping region for large pixels
 
double m_mIGS
 middle of the internal gate trapping region for small pixels
 
double m_sIGS
 size in v direction of the internal gate trapping region for small pixels
 
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.
 

Detailed Description

Specific implementation of SensorInfo for PXD Sensors which provides additional pixel specific information.

Definition at line 23 of file SensorInfo.h.

Member Enumeration Documentation

◆ SensorType

enum SensorType
inherited

Enum specifing the type of sensor the SensorInfo represents.

Enumerator
PXD 

PXD Sensor.

SVD 

SVD Sensor.

TEL 

Testbeam telescope sensor.

VXD 

Any type of VXD Sensor.

Definition at line 32 of file SensorInfoBase.h.

32  {
33  PXD = 0,
34  SVD = 1,
35  TEL = 2,
36  VXD = -1,
37  };
@ VXD
Any type of VXD Sensor.
@ TEL
Testbeam telescope sensor.

Member Function Documentation

◆ flipVSegmentation()

void flipVSegmentation ( )
inline

Flip the Pitch segmentation along v.

If there are two different pixel sizes than mirror the segmentation along v.

Definition at line 43 of file SensorInfo.h.

44  {
45  if (m_splitLength <= 0) return;
46  std::swap(m_vCells, m_vCells2);
51  cook();
52  }
double m_clearBorderLargePitch
The distance between the clear side of the pixel and the start of the Gate, large pitch area
Definition: SensorInfo.h:202
double m_clearBorderSmallPitch
The distance between the clear side of the pixel and the start of the Gate, small pitch area
Definition: SensorInfo.h:196
double m_sourceBorderLargePitch
The distance between the source side of the pixel and the start of the Gate, large pitch area.
Definition: SensorInfo.h:200
double m_drainBorderLargePitch
The distance between the drain side of the pixel and the start of the Gate, large pitch area
Definition: SensorInfo.h:204
double m_sourceBorderSmallPitch
The distance between the source side of the pixel and the start of the Gate, small pitch area.
Definition: SensorInfo.h:194
double m_drainBorderSmallPitch
The distance between the drain side of the pixel and the start of the Gate, small pitch area
Definition: SensorInfo.h:198
void cook()
calculate constants in advance
Definition: SensorInfo.cc:130
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.
double m_splitLength
Relative length at which second pixel size starts, 0 for only one pixel size.

◆ forceInside() [1/2]

void forceInside ( double &  u,
double &  v 
) const
inlineinherited

Force a position to be inside the active area.

Parameters
uu coordinate to be forced inside
vv coordinate to be forced inside

Definition at line 250 of file SensorInfoBase.h.

◆ forceInside() [2/2]

void forceInside ( ROOT::Math::XYZVector &  local) const
inlineinherited

Force a given point inside the active area.

Parameters
localpoint in local coordinates, will be modified to lie inside or at the border of the sensor

Definition at line 353 of file SensorInfoBase.h.

◆ getBackwardWidth()

double getBackwardWidth ( ) const
inlineinherited

Convinience Wrapper to return width at backward side.

Returns
width of the sensor at the backward side

Definition at line 89 of file SensorInfoBase.h.

◆ getBField()

const ROOT::Math::XYZVector getBField ( const ROOT::Math::XYZVector &  point) const

Get B field value from the field map.

Parameters
pointDesired position in local coordinates.
Returns
The B field vector in local coordinates.

Definition at line 45 of file SensorInfo.cc.

46 {
47  ROOT::Math::XYZVector pointGlobal = pointToGlobal(point, true);
48  ROOT::Math::XYZVector bGlobal = BFieldManager::getField(pointGlobal);
49  ROOT::Math::XYZVector bLocal = vectorToLocal(bGlobal, true);
50  return bLocal;
51 }
ROOT::Math::XYZVector pointToGlobal(const ROOT::Math::XYZVector &local, bool reco=false) const
Convert a point from local to global coordinates.
ROOT::Math::XYZVector vectorToLocal(const ROOT::Math::XYZVector &global, bool reco=false) const
Convert a vector from global to local coordinates.
static void getField(const double *pos, double *field)
return the magnetic field at a given position.
Definition: BFieldManager.h:91

◆ getDriftVelocity()

const ROOT::Math::XYZVector getDriftVelocity ( const ROOT::Math::XYZVector &  E,
const ROOT::Math::XYZVector &  B 
) const

Calculate drift velocity of an electron.

Parameters
EElectric field vector
BMagnetic field vector
Returns
drift velocity of an electron in the E+B field.

Definition at line 54 of file SensorInfo.cc.

◆ getEField()

const ROOT::Math::XYZVector getEField ( const ROOT::Math::XYZVector &  point) const

Model of the E field inside the sensor.

Parameters
pointDesired position in local coordinates.
Returns
The E field vector in local coordinates.

Definition at line 33 of file SensorInfo.cc.

◆ getElectronMobility()

double getElectronMobility ( double  E) const

Calculate electron mobility at a given electric field.

Based on C. Canali et al., IEEE, ED-22, (1975) 1045

Parameters
EElectric field, V/cm
Returns
electron mobility, cm*2/V.ns

Definition at line 20 of file SensorInfo.cc.

◆ getForwardWidth()

double getForwardWidth ( ) const
inlineinherited

Convinience Wrapper to return width at forward side.

Returns
width of the sensor at the forward side

Definition at line 97 of file SensorInfoBase.h.

◆ getLength()

double getLength ( void  ) const
inlineinherited

Return the length of the sensor.

Returns
length of the sensor

Definition at line 105 of file SensorInfoBase.h.

◆ getLorentzShift()

const ROOT::Math::XYZVector getLorentzShift ( double  u,
double  v 
) const

Calculate Lorentz shift.

Parameters
uLocal u coordinate
vLocal v coordinate
Returns
3-vector (du, dv, 0) of Lorentz shifts.

Definition at line 99 of file SensorInfo.cc.

◆ getPixelKind()

int getPixelKind ( const VxdID  sensorID,
double  v 
) const

Return pixel kind ID.

Parameters
sensorIDthe sensor identification
vLocal v coordinate
Returns
pixel kind ID in range 0..7, 0-3 for Layer=1, 4-7 for Layer=2

Definition at line 69 of file SensorInfo.cc.

◆ getPixelKindNew()

int getPixelKindNew ( const VxdID sensorID,
int  vID 
) const

Return pixel kind ID.

Parameters
sensorIDthe sensor identification
vIDLocal vcell ID
Returns
pixel kind ID in range 0, 1, 2, 3 for z55, z60, z70, z85 pixels

Definition at line 78 of file SensorInfo.cc.

◆ getSourceBorder()

double getSourceBorder ( double  v) const
inline

Return the distance between the source side of the pixel and the start of the Gate for a pixel at v.

For these functions to work, the small pitch and large pitch values have to be correctly swapped with the flipVSegmentation method. FIXME: flip... is never called!

Definition at line 105 of file SensorInfo.h.

◆ getThickness()

double getThickness ( ) const
inlineinherited

Return the thickness of the sensor.

Returns
thickness of the sensor

Definition at line 110 of file SensorInfoBase.h.

◆ getTransformation()

const TGeoHMatrix& getTransformation ( bool  reco = false) const
inlineinherited

Return the transformation matrix of the Sensor.

Returns
Transformation matrix of the Sensor
Parameters
recoGet transformation for reconstruction (true) or nominal (false)

Definition at line 306 of file SensorInfoBase.h.

◆ getTrappedID()

int getTrappedID ( double  x,
double  y 
) const

Get pixel number if the given coordinate is in the correspondin internal gate trapping region or -1 otherwise.

Parameters
xu-coordinate in the local system
yv-coordinate in the local system
Returns
pixel number id = ix + 250*iy, or -1

Definition at line 150 of file SensorInfo.cc.

◆ getUCellID()

int getUCellID ( double  u,
double  v = 0,
bool  clamp = false 
) const
inlineinherited

Return the corresponding pixel/strip ID of a given u coordinate.

Parameters
uu coordinate of the pixel/strip
vv coordinate of the pixel/strip, ignored for rectangular sensors
clampflag for clamp
Returns
ID of the pixel/strip covering the given coordinate

Definition at line 193 of file SensorInfoBase.h.

◆ getUCellPosition()

double getUCellPosition ( int  uID,
int  vID = -1 
) const
inlineinherited

Return the position of a specific strip/pixel in u direction.

Parameters
uIDid of the strip/pixel in u coordinates
vIDid of the strip/pixel in v coordinates, ignored for rectangular sensors
Returns
Pixel/Strip position in u direction

Definition at line 168 of file SensorInfoBase.h.

◆ getUPitch()

double getUPitch ( double  v = 0) const
inlineinherited

Return the pitch of the sensor.

Parameters
vv-coordinate where to determine the pitch, ignored for rectangular sensors
Returns
Pixel/Strip size in u direction

Definition at line 132 of file SensorInfoBase.h.

◆ getUSize()

double getUSize ( double  v = 0) const
inlineinherited

Return the width of the sensor.

Parameters
vv-coordinate where to determine the width, ignored for recangular sensors
Returns
width of the Sensor

Definition at line 116 of file SensorInfoBase.h.

◆ getVCellID()

int getVCellID ( double  v,
bool  clamp = false 
) const
inlineinherited

Return the corresponding pixel/strip ID of a given v coordinate.

Parameters
vv coordinate of the pixel/strip
clampflag for clamp
Returns
ID of the pixel/strip covering the given coordinate

Definition at line 204 of file SensorInfoBase.h.

◆ getVCellPosition()

double getVCellPosition ( int  vID) const
inlineinherited

Return the position of a specific strip/pixel in v direction.

Parameters
vIDid of the strip/pixel in v coordinates
Returns
Pixel/Strip position in v direction

Definition at line 180 of file SensorInfoBase.h.

◆ getVPitch()

double getVPitch ( double  v = 0) const
inlineinherited

Return the pitch of the sensor.

Parameters
vv-coordinate where to determine the pitch, only used for sensors with two different pixel sizes along v
Returns
Pixel/Strip size in v direction

Definition at line 139 of file SensorInfoBase.h.

◆ getVPitchID()

int getVPitchID ( double  v = 0) const
inlineinherited

Return the pitch ID of the sensor.

Parameters
vv-coordinate where to determine the pitchID only used for PXD sensors with two different pixel sizes along v
Returns
Pixel/Strip ID in v direction: 0 for pitch at smaller v, 1 for bigger v Attention: Pitch ID depend from sensor position For PXD it swap for sensor=1 vs. seensor=2 Sensor=1: bigger pitch = 0, smaller = 1 Sensor=2: smaller pitch = 0, bigger = 1

Definition at line 156 of file SensorInfoBase.h.

◆ getVSize()

double getVSize ( ) const
inlineinherited

Return the length of the sensor.

Returns
length of the sensor

Definition at line 121 of file SensorInfoBase.h.

◆ getWidth()

double getWidth ( double  v = 0) const
inlineinherited

Return the width of the sensor.

Parameters
vv-coordinate where to determine the width, ignored for recangular sensors
Returns
width of the Sensor

Definition at line 80 of file SensorInfoBase.h.

◆ getWSize()

double getWSize ( ) const
inlineinherited

Return the thickness of the sensor.

Returns
thickness of the sensor

Definition at line 126 of file SensorInfoBase.h.

◆ inside() [1/2]

bool inside ( const ROOT::Math::XYZVector &  local) const
inlineinherited

Check wether a given point is inside the active area.

Parameters
localpoint in local coordinates
Returns
true if inside active area, false otherwise

Definition at line 240 of file SensorInfoBase.h.

◆ inside() [2/2]

bool inside ( double  u,
double  v,
double  uTolerance = DBL_EPSILON,
double  vTolerance = DBL_EPSILON 
) const
inlineinherited

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

Parameters
uu coordinate to check, supply 0 if not interested
vv coordinate to check, supply 0 if not interested
uTolerancetolerance to be added on each side of the sensor in u direction
vTolerancetolerance to be added on each side of the sensor in u direction
Returns
true if inside active area, false otherwise

Definition at line 229 of file SensorInfoBase.h.

◆ pointToGlobal()

ROOT::Math::XYZVector pointToGlobal ( const ROOT::Math::XYZVector &  local,
bool  reco = false 
) const
inlineinherited

Convert a point from local to global coordinates.

Parameters
localpoint in local coordinates
recoUse sensor position in reconstruction (true) or in nominal geometry (false)
Returns
point in global coordinates

Definition at line 364 of file SensorInfoBase.h.

◆ pointToLocal()

ROOT::Math::XYZVector pointToLocal ( const ROOT::Math::XYZVector &  global,
bool  reco = false 
) const
inlineinherited

Convert a point from global to local coordinates.

Parameters
globalpoint in global coordinates
recoUse sensor position in reconstruction (true) or in nominal geometry (false)
Returns
point in local coordinates

Definition at line 384 of file SensorInfoBase.h.

◆ setLorentzFactor()

void setLorentzFactor ( )
protected

Calculate Lorentz shift factor.

This factor is constant for a sensor; the actual, position-dependent Lorentz shift is factor cross B.

◆ setTransformation()

void setTransformation ( const TGeoHMatrix &  transform,
bool  reco = false 
)
inlineinherited

Set the transformation matrix of the Sensor.

Parameters
transformTransformation matrix of the Sensor
recoSet transformation for reconstruction (true) or nominal (false)

Definition at line 296 of file SensorInfoBase.h.

◆ vectorToGlobal()

ROOT::Math::XYZVector vectorToGlobal ( const ROOT::Math::XYZVector &  local,
bool  reco = false 
) const
inlineinherited

Convert a vector from local to global coordinates.

Parameters
localvector in local coordinates
recoUse sensor position in reconstruction (true) or in nominal geometry (false)
Returns
vector in global coordinates

Definition at line 374 of file SensorInfoBase.h.

◆ vectorToLocal()

ROOT::Math::XYZVector vectorToLocal ( const ROOT::Math::XYZVector &  global,
bool  reco = false 
) const
inlineinherited

Convert a vector from global to local coordinates.

Parameters
globalvector in global coordinates
recoUse sensor position in reconstruction (true) or in nominal geometry (false)
Returns
vector in local coordinates

Definition at line 394 of file SensorInfoBase.h.


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