Belle II Software  release-05-01-25
SensorInfo.cc
1 /*
2  * SensorInfo.cc
3  *
4  * Created on: Dec 21, 2013
5  * Author: kvasnicka
6  */
7 
8 #include <svd/geometry/SensorInfo.h>
9 #include <framework/gearbox/Unit.h>
10 #include <framework/geometry/BFieldManager.h>
11 
12 #include <TVector3.h>
13 #include <math.h>
14 
15 using namespace std;
16 using namespace Belle2;
17 using namespace Belle2::SVD;
18 
19 
20 double SensorInfo::getElectronMobility(double E) const
21 {
22  // Electron parameters - maximum velocity, critical intensity, beta factor
23  static double vmElec = 1.53 * pow(m_temperature, -0.87) * 1.E9 * Unit::cm
24  / Unit::s;
25  static double EcElec = 1.01 * pow(m_temperature, +1.55) * Unit::V
26  / Unit::cm;
27  static double betaElec = 2.57 * pow(m_temperature, +0.66) * 1.E-2;
28 
29  return (vmElec / EcElec * 1.
30  / (pow(1. + pow((fabs(E) / EcElec), betaElec), (1. / betaElec))));
31 }
32 
33 double SensorInfo::getHoleMobility(double E) const
34 {
35  // Hole parameters - maximum velocity, critical intensity, beta factor
36  static double vmHole = 1.62 * pow(m_temperature, -0.52) * 1.E8 * Unit::cm
37  / Unit::s;
38  static double EcHole = 1.24 * pow(m_temperature, +1.68) * Unit::V
39  / Unit::cm;
40  static double betaHole = 0.46 * pow(m_temperature, +0.17);
41 
42  return (vmHole / EcHole * 1.
43  / (pow(1. + pow((fabs(E) / EcHole), betaHole), (1. / betaHole))));
44 }
45 
46 const TVector3 SensorInfo::getEField(const TVector3& point) const
47 {
48 
49  TVector3 E(0, 0,
50  + 2.0 * m_depletionVoltage / m_thickness
51  * ((+point.Z() - 0.5 * m_thickness) / m_thickness)
52  - (m_biasVoltage - m_depletionVoltage) / m_thickness);
53 
54  return E;
55 }
56 
57 const TVector3& SensorInfo::getBField(const TVector3& point) const
58 {
59  // useful just for testing:
60  // static TVector3 noBfield(0,0,0);
61  // return noBfield;
62 
63  static TVector3 oldPoint(0, 0, 1000 * Unit::cm);
64  static TVector3 oldField(0, 0, 0);
65  static double bRadius = 0.5 * Unit::cm;
66  if (TVector3(point - oldPoint).Mag() > bRadius) { // renew if far point
67  TVector3 pointGlobal = pointToGlobal(point, true);
68  TVector3 bGlobal = BFieldManager::getField(pointGlobal);
69  TVector3 bLocal = vectorToLocal(bGlobal, true);
70  oldPoint = point;
71  oldField = bLocal;
72  }
73  return oldField;
74 }
75 
76 const TVector3 SensorInfo::getVelocity(CarrierType carrier,
77  const TVector3& point) const
78 {
79  TVector3 E = getEField(point);
80  // This is what makes the digitizer slow.
81  TVector3 B = getBField(point);
82  // Set mobility parameters
83  double mobility = 0;
84  double hallFactor = getHallFactor(carrier);
85 
86  if (carrier == electron) {
87  mobility = -getElectronMobility(E.Mag());
88  } else {
89  mobility = getHoleMobility(E.Mag());
90  }
91 
92  double mobilityH = hallFactor * fabs(mobility);
93 
94  // Calculate products
95  TVector3 EcrossB = E.Cross(B);
96  TVector3 BEdotB = E.Dot(B) * B;
97  TVector3 velocity = mobility * E + mobility * mobilityH * EcrossB
98  + mobility * mobilityH * mobilityH * BEdotB;
99  velocity *= 1.0 / (1.0 + mobilityH * mobilityH * B.Mag2());
100  return velocity;
101 }
102 
103 const TVector3& SensorInfo::getLorentzShift(double uCoord, double vCoord) const
104 {
105  static TVector3 result;
106  double distanceToFrontPlane = 0.5 * m_thickness;
107  double distanceToBackPlane = 0.5 * m_thickness;
108 
109  // Approximation: calculate drift velocity at the point halfway towards
110  // the respective sensor surface.
111  TVector3 v_e = getVelocity(electron, TVector3(uCoord, vCoord, +0.5 * distanceToFrontPlane));
112  TVector3 v_h = getVelocity(hole, TVector3(uCoord, vCoord, -0.5 * distanceToBackPlane));
113 
114  // Calculate drift directions
115  TVector3 center_e = fabs(distanceToFrontPlane / v_e.Z()) * v_e;
116  TVector3 center_h = fabs(distanceToBackPlane / v_h.Z()) * v_h;
117  result.SetXYZ(center_h.X(), center_e.Y(), 0.0);
118  return result;
119 }
120 
121 double SensorInfo::getLorentzShift(bool isUCoordinate, double position) const
122 {
123  if (isUCoordinate)
124  return getLorentzShift(position, 0.0).X();
125  else
126  return getLorentzShift(0.0, position).Y();
127 }
128 
Belle2
Abstract base class for different kinds of events.
Definition: MillepedeAlgorithm.h:19
Belle2::SVD
Namespace to encapsulate code needed for simulation and reconstrucion of the SVD.
Definition: GeoSVDCreator.h:35
Belle2::SVD::SensorInfo::CarrierType
CarrierType
Enum to flag charge carriers.
Definition: SensorInfo.h:48