Belle II Software  release-08-01-10
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 #ifndef SVD_SENSORINFO_H
10 #define SVD_SENSORINFO_H
11 
12 #include <vxd/geometry/SensorInfoBase.h>
13 #include <Math/Vector3D.h>
14 
15 namespace Belle2 {
21  namespace SVD {
26  public:
28  const double c_fanoFactorSi = 0.08;
29 
31  enum Coordinate {
32  u = 1,
33  v = 0
34  };
38  enum CarrierType {
39  electron = -1,
40  hole = +1
41  };
42 
52  SensorInfo(VxdID id = 0, float width = 0, float length = 0, float thickness = 0,
53  int uCells = 0, int vCells = 0, float width2 = 0):
54  VXD::SensorInfoBase(SensorInfo::SVD, id, width, length, thickness, uCells, vCells, width2, -1, 0),
64  m_isBackward(false)
65  {
66  setIsBackward(id);
67  }
68 
75  {
76  static const unsigned short layerSensors[] = {0, 0, 0, 2, 3, 4, 5};
77  m_isBackward =
78  (id.getLayerNumber() > 3)
79  && (id.getSensorNumber() == layerSensors[id.getLayerNumber()]);
80  }
81 
85  void setID(VxdID id)
86  {
87  m_id = id;
88  setIsBackward(id);
89  }
90 
111  void setSensorParams(double stripEdgeU, double stripEdgeV,
112  double depletionVoltage, double biasVoltage,
113  double backplaneCapacitanceU,
114  double interstripCapacitanceU,
115  double couplingCapacitanceU,
116  double backplaneCapacitanceV,
117  double interstripCapacitanceV,
118  double couplingCapacitanceV,
119  double AduEquivalentU,
120  double AduEquivalentV,
121  double electronicNoiseU,
122  double electronicNoiseV,
123  double AduEquivalentSbwU,
124  double AduEquivalentSbwV,
125  double electronicNoiseSbwU,
126  double electronicNoiseSbwV)
127  {
128  m_stripEdgeU = stripEdgeU,
129  m_stripEdgeV = stripEdgeV,
130  m_depletionVoltage = depletionVoltage;
131  m_biasVoltage = biasVoltage;
132  m_backplaneCapacitanceU = backplaneCapacitanceU;
133  m_interstripCapacitanceU = interstripCapacitanceU;
134  m_couplingCapacitanceU = couplingCapacitanceU;
135  m_backplaneCapacitanceV = backplaneCapacitanceV;
136  m_interstripCapacitanceV = interstripCapacitanceV;
137  m_couplingCapacitanceV = couplingCapacitanceV;
138  m_aduEquivalentU = AduEquivalentU;
139  m_aduEquivalentV = AduEquivalentV;
140  m_electronicNoiseU = electronicNoiseU;
141  m_electronicNoiseV = electronicNoiseV;
142  m_aduEquivalentSbwU = AduEquivalentSbwU;
143  m_aduEquivalentSbwV = AduEquivalentSbwV;
144  m_electronicNoiseSbwU = electronicNoiseSbwU;
145  m_electronicNoiseSbwV = electronicNoiseSbwV;
146  }
147 
149  double getTemperature() const {return m_temperature; }
154  double getStripLengthU(int uID = 0) const;
159  double getStripLengthV(int vID = 0) const;
161  double getDepletionVoltage() const { return m_depletionVoltage; }
163  double getBiasVoltage() const { return m_biasVoltage; }
165  double getBackplaneCapacitanceU(int uID = 0) const;
167  double getInterstripCapacitanceU(int uID = 0) const;
169  double getCouplingCapacitanceU(int uID = 0) const;
171  double getBackplaneCapacitanceV(int vID = 0) const;
173  double getInterstripCapacitanceV(int vID = 0) const;
175  double getCouplingCapacitanceV(int vID = 0) const;
177  double getAduEquivalentU() const;
179  double getAduEquivalentV() const;
181  double getElectronicNoiseU() const;
183  double getElectronicNoiseV() const;
189  double getElectronMobility(double E) const;
195  double getHoleMobility(double E) const;
196 
201  const ROOT::Math::XYZVector getEField(const ROOT::Math::XYZVector& point) const;
202 
207  const ROOT::Math::XYZVector& getBField(const ROOT::Math::XYZVector& point) const;
208 
213  double getHallFactor(CarrierType carrier) const
214  {
215  if (carrier == electron)
216  return (1.13 + 0.0008 * (m_temperature - 273));
217  else
218  return (0.72 - 0.0005 * (m_temperature - 273));
219  }
220 
226  const ROOT::Math::XYZVector getVelocity(CarrierType carrier, const ROOT::Math::XYZVector& point) const;
227 
235  const ROOT::Math::XYZVector& getLorentzShift(double uCoord, double vCoord) const;
236 
244  double getLorentzShift(bool isUCoordinate, double position) const;
245 
246  protected:
250  double m_stripEdgeU;
252  double m_stripEdgeV;
287  }; // Class SVD::SensorInfo
288 
289  inline double SensorInfo::getStripLengthU(int uID) const
290  {
291  // if this is a rectangular sensor, just return the default
292  if (m_deltaWidth == 0.0)
293  return (m_length - 2.0 * m_stripEdgeU);
294  else {
295  // calculate for a wedge sensor
296  double dw = (1.0 * uID / m_uCells - 0.5) * m_deltaWidth;
297  return (sqrt(dw * dw + m_length * m_length) - 2.0 * m_stripEdgeU);
298  }
299  }
300 
301  inline double SensorInfo::getStripLengthV(int vID) const
302  {
303  return (getWidth(getVCellPosition(vID)) - 2.0 * m_stripEdgeV);
304  }
305 
306  inline double SensorInfo::getBackplaneCapacitanceU(int uID) const
307  {
309  }
310 
311  inline double SensorInfo::getInterstripCapacitanceU(int uID) const
312  {
314  }
315 
316  inline double SensorInfo::getCouplingCapacitanceU(int uID) const
317  {
318  return (m_couplingCapacitanceU * getStripLengthU(uID));
319  }
320 
321  inline double SensorInfo::getBackplaneCapacitanceV(int vID) const
322  {
324  }
325 
326  inline double SensorInfo::getInterstripCapacitanceV(int vID) const
327  {
329  }
330 
331  inline double SensorInfo::getCouplingCapacitanceV(int vID) const
332  {
333  return (m_couplingCapacitanceV * getStripLengthV(vID));
334  }
335 
336  inline double SensorInfo::getAduEquivalentU() const
337  {
338  if (m_isBackward)
339  return m_aduEquivalentSbwU;
340  else
341  return m_aduEquivalentU;
342  }
343 
344  inline double SensorInfo::getAduEquivalentV() const
345  {
346  if (m_isBackward)
347  return m_aduEquivalentSbwU;
348  else
349  return m_aduEquivalentV;
350  }
351 
352  inline double SensorInfo::getElectronicNoiseU() const
353  {
354  if (m_isBackward)
355  return m_electronicNoiseSbwU;
356  else
357  return m_electronicNoiseU;
358  }
359 
360  inline double SensorInfo::getElectronicNoiseV() const
361  {
362  if (m_isBackward)
363  return m_electronicNoiseSbwV;
364  else
365  return m_electronicNoiseV;
366  }
367 
368 
369  } // SVD namespace
371 } //Belle2 namespace
372 #endif
R E
internal precision of FFTW codelets
Specific implementation of SensorInfo for SVD Sensors which provides additional sensor specific infor...
Definition: SensorInfo.h:25
CarrierType
Enum to flag charge carriers.
Definition: SensorInfo.h:38
double getBiasVoltage() const
Return the bias voltage on the sensor.
Definition: SensorInfo.h:163
double getBackplaneCapacitanceV(int vID=0) const
Return the backplane capacitanceV for the sensor's v strips (short).
Definition: SensorInfo.h:321
SensorInfo(VxdID id=0, float width=0, float length=0, float thickness=0, int uCells=0, int vCells=0, float width2=0)
Constructor which automatically sets the SensorType to SensorInfo::SVD.
Definition: SensorInfo.h:52
const ROOT::Math::XYZVector getVelocity(CarrierType carrier, const ROOT::Math::XYZVector &point) const
Get drift velocity for electrons or holes at a given point.
Definition: SensorInfo.cc:78
double m_electronicNoiseSbwU
The electronic noise for u strips in bw barrel (non-Origami) sensors.
Definition: SensorInfo.h:282
double m_backplaneCapacitanceV
The backplane capacitance/cm for the sensor's v strips.
Definition: SensorInfo.h:264
void setIsBackward(VxdID id)
Determine if this is a backward side barrel sensor.
Definition: SensorInfo.h:74
double m_stripEdgeV
The distance between end of strips and edge of active area.
Definition: SensorInfo.h:252
double m_electronicNoiseSbwV
The electronic noise for v strips in bw barrel (non-Origami) sensors.
Definition: SensorInfo.h:284
const ROOT::Math::XYZVector & getBField(const ROOT::Math::XYZVector &point) const
Get B field value from the field map.
Definition: SensorInfo.cc:58
double m_aduEquivalentSbwU
ADU equivalent (electrons/ADU) for u strips, Sbw barrel sensors.
Definition: SensorInfo.h:278
double getInterstripCapacitanceU(int uID=0) const
Return the interstrip capacitanceU for the sensor's u strips (long).
Definition: SensorInfo.h:311
bool m_isBackward
Is this a backward barrel sensor?
Definition: SensorInfo.h:286
double getAduEquivalentU() const
Return ADU equivalent for u strips.
Definition: SensorInfo.h:336
void setID(VxdID id)
Change the SensorID.
Definition: SensorInfo.h:85
double getElectronicNoiseV() const
Return electronic noise in e- for v (short) strips.
Definition: SensorInfo.h:360
double getCouplingCapacitanceV(int vID=0) const
Return the coupling capacitanceV of the sensor's v strips (short).
Definition: SensorInfo.h:331
double getStripLengthU(int uID=0) const
Return u-strip length.
Definition: SensorInfo.h:289
const double c_fanoFactorSi
The Fano factor for silicon.
Definition: SensorInfo.h:28
double m_electronicNoiseV
The electronic noise for v (short) strips.
Definition: SensorInfo.h:276
double m_stripEdgeU
The distance between end of strips and edge of active area.
Definition: SensorInfo.h:250
double getElectronMobility(double E) const
Calculate electron mobility at a given electric field.
Definition: SensorInfo.cc:21
double m_aduEquivalentSbwV
ADU equivalent (electrons/ADU) for v strips, Sbw barrel sensors.
Definition: SensorInfo.h:280
double m_biasVoltage
The bias voltage on the sensor.
Definition: SensorInfo.h:256
double m_interstripCapacitanceU
The interstrip capacitance/cm for the sensor's u strips.
Definition: SensorInfo.h:260
double m_aduEquivalentV
ADU equivalent (electrons/ADU) for v strips.
Definition: SensorInfo.h:272
double m_electronicNoiseU
The electronic noise for u (long) strips.
Definition: SensorInfo.h:274
double getBackplaneCapacitanceU(int uID=0) const
Return the backplane capacitanceU for the sensor's u strips (long).
Definition: SensorInfo.h:306
double m_couplingCapacitanceV
The coupling capacitance/cm for the sensor's v strips.
Definition: SensorInfo.h:268
double m_interstripCapacitanceV
The interstrip capacitance/cm for the sensor's v strips.
Definition: SensorInfo.h:266
double m_aduEquivalentU
ADU equivalent (electrons/ADU) for u strips.
Definition: SensorInfo.h:270
double getStripLengthV(int vID=0) const
Return v-strip length.
Definition: SensorInfo.h:301
const ROOT::Math::XYZVector getEField(const ROOT::Math::XYZVector &point) const
Model of the E field inside the sensor.
Definition: SensorInfo.cc:47
double getHallFactor(CarrierType carrier) const
Return Hall factor for the corresponding carrier type.
Definition: SensorInfo.h:213
double getElectronicNoiseU() const
Return electronic noise in e- for u (long) strips.
Definition: SensorInfo.h:352
double m_backplaneCapacitanceU
The backplane capacitance/cm for the sensor's u strips.
Definition: SensorInfo.h:258
double getCouplingCapacitanceU(int uID=0) const
Return the coupling capacitanceU of the sensor's u strips (long)
Definition: SensorInfo.h:316
double getInterstripCapacitanceV(int vID=0) const
Return the interstrip capacitanceV for the sensor's v strips (short).
Definition: SensorInfo.h:326
double m_depletionVoltage
The depletion voltage of the Silicon sensor.
Definition: SensorInfo.h:254
double getTemperature() const
Return the sensor temperature.
Definition: SensorInfo.h:149
double getAduEquivalentV() const
Return ADU equivalent for v strips.
Definition: SensorInfo.h:344
double getDepletionVoltage() const
Return the depletion voltage of the sensor.
Definition: SensorInfo.h:161
void setSensorParams(double stripEdgeU, double stripEdgeV, double depletionVoltage, double biasVoltage, double backplaneCapacitanceU, double interstripCapacitanceU, double couplingCapacitanceU, double backplaneCapacitanceV, double interstripCapacitanceV, double couplingCapacitanceV, double AduEquivalentU, double AduEquivalentV, double electronicNoiseU, double electronicNoiseV, double AduEquivalentSbwU, double AduEquivalentSbwV, double electronicNoiseSbwU, double electronicNoiseSbwV)
Set sensor operation parameters.
Definition: SensorInfo.h:111
double getHoleMobility(double E) const
Calculate hole mobility at a given electric field.
Definition: SensorInfo.cc:34
double m_couplingCapacitanceU
The coupling capacitance/cm for the sensor's u strips.
Definition: SensorInfo.h:262
double m_temperature
Sensor temperature.
Definition: SensorInfo.h:248
const ROOT::Math::XYZVector & getLorentzShift(double uCoord, double vCoord) const
Calculate Lorentz shift along a given coordinate in a magnetic field at a given position.
Definition: SensorInfo.cc:104
Coordinate
Enum for parametric access to sensor coordinates.
Definition: SensorInfo.h:31
Base class to provide Sensor Information for PXD and SVD.
double getVCellPosition(int vID) const
Return the position of a specific strip/pixel in v direction.
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.
double getWidth(double v=0) const
Return the width of the sensor.
unsigned short m_id
ID of the Sensor.
double m_deltaWidth
Difference between backward and forward width, 0 for rectangular sensors.
double m_length
Length of the Sensor.
int m_uCells
Number of strips/pixels in u direction.
Class to uniquely identify a any structure of the PXD and SVD.
Definition: VxdID.h:33
double sqrt(double a)
sqrt for double
Definition: beamHelpers.h:28
Abstract base class for different kinds of events.