Belle II Software development
SensorInfo.h
1/**************************************************************************
2 * basf2 (Belle II Analysis Software Framework) *
3 * Author: The Belle II Collaboration *
4 * *
5 * See git log for contributors and copyright holders. *
6 * This file is licensed under LGPL-3.0, see LICENSE.md. *
7 **************************************************************************/
8
9#pragma once
10
11#include <vxd/geometry/SensorInfoBase.h>
12
13#include <Math/Vector3D.h>
14
15namespace Belle2 {
21 namespace PXD {
24 public:
26 SensorInfo(VxdID id = 0, float width = 0, float length = 0, float thickness = 0, int uCells = 0, int vCells = 0,
27 float splitLength = 0, int vCells2 = 0):
28 VXD::SensorInfoBase(SensorInfo::PXD, id, width, length, thickness, uCells, vCells, 0, splitLength, vCells2), m_temperature(300),
32 {
33 m_hallFactor = (1.13 + 0.0008 * (m_temperature - 273));
34 cook();
35 }
36
37 void setID(VxdID id) { m_id = id; }
38
53
55 void setDEPFETParams(double bulkDoping, double backVoltage, double topVoltage,
56 double sourceBorderSmallPitch, double clearBorderSmallPitch, double drainBorderSmallPitch,
57 double sourceBorderLargePitch, double clearBorderLargePitch, double drainBorderLargePitch,
58 double gateDepth, bool doublePixel, double chargeThreshold, double noiseFraction)
59 {
60 m_bulkDoping = bulkDoping;
61 m_backVoltage = backVoltage;
62 m_topVoltage = topVoltage;
63 m_sourceBorderSmallPitch = sourceBorderSmallPitch;
64 m_clearBorderSmallPitch = clearBorderSmallPitch;
65 m_drainBorderSmallPitch = drainBorderSmallPitch;
66 m_sourceBorderLargePitch = sourceBorderLargePitch;
67 m_clearBorderLargePitch = clearBorderLargePitch;
68 m_drainBorderLargePitch = drainBorderLargePitch;
69 m_gateDepth = gateDepth;
70 m_doublePixel = doublePixel;
71 m_chargeThreshold = chargeThreshold;
72 m_noiseFraction = noiseFraction;
73 cook();
74 }
75
77 void cook();
78
85 int getTrappedID(double x, double y) const;
86
88 void setIntegrationWindow(double start, double end)
89 {
90 m_integrationStart = start;
91 m_integrationEnd = end;
92 }
93
95 double getTemperature() const {return m_temperature;}
97 double getBulkDoping() const { return m_bulkDoping; }
99 double getBackVoltage() const { return m_backVoltage; }
101 double getTopVoltage() const { return m_topVoltage; }
105 double getSourceBorder(double v) const
106 {
107 if (v / m_length + 0.5 >= m_splitLength) return m_sourceBorderSmallPitch;
109 }
110
111 double getClearBorder(double v) const
112 {
113 if (v / m_length + 0.5 >= m_splitLength) return m_clearBorderSmallPitch;
115 }
116
117 double getDrainBorder(double v) const
118 {
119 if (v / m_length + 0.5 >= m_splitLength) return m_drainBorderSmallPitch;
121 }
122
123 double getGateDepth() const { return m_gateDepth; }
125 bool getDoublePixel() const { return m_doublePixel; }
127 double getChargeThreshold() const { return m_chargeThreshold; }
129 double getNoiseFraction() const { return m_noiseFraction; }
131 double getIntegrationStart() const { return m_integrationStart; }
133 double getIntegrationEnd() const { return m_integrationEnd; }
135 double getHallFactor() const { return m_hallFactor; }
141 double getElectronMobility(double E) const;
146 const ROOT::Math::XYZVector getEField(const ROOT::Math::XYZVector& point) const;
151 const ROOT::Math::XYZVector getBField(const ROOT::Math::XYZVector& point) const;
157 const ROOT::Math::XYZVector getLorentzShift(double u, double v) const;
163 const ROOT::Math::XYZVector getDriftVelocity(const ROOT::Math::XYZVector& E, const ROOT::Math::XYZVector& B) const;
169 int getPixelKind(const VxdID sensorID, double v) const;
175 int getPixelKindNew(const VxdID& sensorID, int vID) const;
176
177 protected:
182
213
218
219 double m_up;
220 double m_iup;
221
222 double m_vsplit;
223
224 double m_vp;
225 double m_ivp;
226
227 double m_vp2;
228 double m_ivp2;
229
230 double m_hxIG;
231 double m_mIGL;
232 double m_sIGL;
233 double m_mIGS;
234 double m_sIGS;
235 };
236
237 }
239} //Belle2 namespace
R E
internal precision of FFTW codelets
bool m_doublePixel
True if the Sensor is a double pixel structure: every other pixel is mirrored along v.
Definition SensorInfo.h:208
double getTopVoltage() const
Return the voltage at the top of the sensor.
Definition SensorInfo.h:101
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_vp2
small pixel pitch in v direction
Definition SensorInfo.h:227
void flipVSegmentation()
Flip the Pitch segmentation along v.
Definition SensorInfo.h:43
double getChargeThreshold() const
Get the charge threshold in ADU for the sensor.
Definition SensorInfo.h:127
double m_iup
the reciprocal of the pixel pitch in u direction
Definition SensorInfo.h:220
double getGateDepth() const
Return the gate depth for the sensor.
Definition SensorInfo.h:123
double m_hallFactor
The bulk doping of the Silicon sensor.
Definition SensorInfo.h:186
double m_ivp2
the reciprocal of the small pixel pitch in v direction
Definition SensorInfo.h:228
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.
Definition SensorInfo.h:105
double m_bulkDoping
Doping concentration of the silicon bulk.
Definition SensorInfo.h:188
double m_up
pixel pitch in u direction
Definition SensorInfo.h:219
double m_ivp
the reciprocal of the large pixel pitch in v direction
Definition SensorInfo.h:225
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.
Definition SensorInfo.h:117
void setID(VxdID id)
Change the SensorID, useful to copy the SensorInfo from one sensor and use it for another.
Definition SensorInfo.h:37
void setLorentzFactor()
Calculate Lorentz shift factor.
void setIntegrationWindow(double start, double end)
Set the time window in which the sensor is active.
Definition SensorInfo.h:88
double m_sIGS
size in v direction of the internal gate trapping region for small pixels
Definition SensorInfo.h:234
double m_vsplit
v coordinate which splits small and large pixel regions
Definition SensorInfo.h:222
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 getElectronMobility(double E) const
Calculate electron mobility at a given electric field.
Definition SensorInfo.cc:20
double m_noiseFraction
Fixed noise fraction.
Definition SensorInfo.h:212
double m_topVoltage
The voltate at the top of the sensor.
Definition SensorInfo.h:192
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_vp
large pixel pitch in v direction
Definition SensorInfo.h:224
double getNoiseFraction() const
Get the noise fraction for the sensor.
Definition SensorInfo.h:129
double m_chargeThreshold
Charge threshold.
Definition SensorInfo.h:210
double getBulkDoping() const
Return the bulk doping of the Silicon sensor.
Definition SensorInfo.h:97
bool getDoublePixel() const
Return true if the Sensor is a double pixel structure: every other pixel is mirrored along v.
Definition SensorInfo.h:125
double m_mIGS
middle of the internal gate trapping region for small pixels
Definition SensorInfo.h:233
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_hxIG
size in u direction of the internal gate trapping region
Definition SensorInfo.h:230
double m_mIGL
middle of the internal gate trapping region for large pixels
Definition SensorInfo.h:231
double m_integrationEnd
The end of the integration window, the timeframe the PXD is sensitive.
Definition SensorInfo.h:217
double m_integrationStart
The start of the integration window, the timeframe the PXD is sensitive.
Definition SensorInfo.h:215
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
int getTrappedID(double x, double y) const
Get pixel number if the given coordinate is in the corresponding internal gate trapping region or -1 ...
double m_backVoltage
The voltage at the backside of the sensor.
Definition SensorInfo.h:190
double m_gateDepth
Return depth of the surface where the electrons will be collected.
Definition SensorInfo.h:206
const ROOT::Math::XYZVector getEField(const ROOT::Math::XYZVector &point) const
Model of the E field inside the sensor.
Definition SensorInfo.cc:33
double getIntegrationEnd() const
Return the end of the integration window, the timeframe the PXD is sensitive.
Definition SensorInfo.h:133
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
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.
Definition SensorInfo.h:26
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.
Definition SensorInfo.h:55
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.
Definition SensorInfo.h:111
const ROOT::Math::XYZVector getLorentzShift(double u, double v) const
Calculate Lorentz shift.
Definition SensorInfo.cc:99
int getPixelKindNew(const VxdID &sensorID, int vID) const
Return pixel kind ID.
Definition SensorInfo.cc:78
double getTemperature() const
Return the temperature of the sensor.
Definition SensorInfo.h:95
const ROOT::Math::XYZVector getBField(const ROOT::Math::XYZVector &point) const
Get B field value from the field map.
Definition SensorInfo.cc:45
void cook()
calculate constants in advance
int getPixelKind(const VxdID sensorID, double v) const
Return pixel kind ID.
Definition SensorInfo.cc:69
double getBackVoltage() const
Return the voltage at the backside of the sensor.
Definition SensorInfo.h:99
double getIntegrationStart() const
Return the start of the integration window, the timeframe the PXD is sensitive.
Definition SensorInfo.h:131
const ROOT::Math::XYZVector getDriftVelocity(const ROOT::Math::XYZVector &E, const ROOT::Math::XYZVector &B) const
Calculate drift velocity of an electron.
Definition SensorInfo.cc:54
double m_temperature
The temperature of the sensor.
Definition SensorInfo.h:184
double m_sIGL
size in v direction of the internal gate trapping region for large pixels
Definition SensorInfo.h:232
double getHallFactor() const
Return the Hall factor for electrons at sensor temperature.
Definition SensorInfo.h:135
Base class to provide Sensor Information for PXD and SVD.
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.
@ VXD
Any type of VXD Sensor.
int m_vCells
Number of strips/pixels in v direction (up to splitLength for two pixel sizes)
unsigned short m_id
ID of the Sensor.
double m_length
Length of the Sensor.
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.
Class to uniquely identify a any structure of the PXD and SVD.
Definition VxdID.h:33
Namespace to encapsulate code needed for simulation and reconstrucion of the PXD.
Abstract base class for different kinds of events.