9#include <svd/geometry/SensorInfo.h>
10#include <framework/gearbox/Unit.h>
11#include <framework/geometry/BFieldManager.h>
13#include <Math/Vector3D.h>
28 static double betaElec = 2.57 * pow(
m_temperature, +0.66) * 1.E-2;
30 return (vmElec / EcElec * 1.
31 / (pow(1. + pow((fabs(
E) / EcElec), betaElec), (1. / betaElec))));
43 return (vmHole / EcHole * 1.
44 / (pow(1. + pow((fabs(
E) / EcHole), betaHole), (1. / betaHole))));
50 ROOT::Math::XYZVector
E(0, 0,
64 static ROOT::Math::XYZVector oldPoint(0, 0, 1000 *
Unit::cm);
65 static ROOT::Math::XYZVector oldField(0, 0, 0);
66 static double bRadius = 0.5 *
Unit::cm;
67 if ((point - oldPoint).
R() > bRadius) {
68 ROOT::Math::XYZVector pointGlobal =
pointToGlobal(point,
true);
77const ROOT::Math::XYZVector
82 ROOT::Math::XYZVector B =
getBField(point);
87 if (carrier == electron) {
93 double mobilityH = hallFactor * fabs(mobility);
96 ROOT::Math::XYZVector EcrossB =
E.Cross(B);
97 ROOT::Math::XYZVector BEdotB =
E.Dot(B) * B;
98 ROOT::Math::XYZVector velocity = mobility *
E + mobility * mobilityH * EcrossB
99 + mobility * mobilityH * mobilityH * BEdotB;
100 velocity *= 1.0 / (1.0 + mobilityH * mobilityH * B.Mag2());
106 static ROOT::Math::XYZVector result;
112 ROOT::Math::XYZVector v_e =
getVelocity(electron, ROOT::Math::XYZVector(uCoord, vCoord, +0.5 * distanceToFrontPlane));
113 ROOT::Math::XYZVector v_h =
getVelocity(
hole, ROOT::Math::XYZVector(uCoord, vCoord, -0.5 * distanceToBackPlane));
116 ROOT::Math::XYZVector center_e = fabs(distanceToFrontPlane / v_e.Z()) * v_e;
117 ROOT::Math::XYZVector center_h = fabs(distanceToBackPlane / v_h.Z()) * v_h;
118 result.SetXYZ(center_h.X(), center_e.Y(), 0.0);
CarrierType
Enum to flag charge carriers.
const ROOT::Math::XYZVector getVelocity(CarrierType carrier, const ROOT::Math::XYZVector &point) const
Get drift velocity for electrons or holes at a given point.
const ROOT::Math::XYZVector & getBField(const ROOT::Math::XYZVector &point) const
Get B field value from the field map.
double getElectronMobility(double E) const
Calculate electron mobility at a given electric field.
double m_biasVoltage
The bias voltage on the sensor.
const ROOT::Math::XYZVector getEField(const ROOT::Math::XYZVector &point) const
Model of the E field inside the sensor.
double getHallFactor(CarrierType carrier) const
Return Hall factor for the corresponding carrier type.
double m_depletionVoltage
The depletion voltage of the Silicon sensor.
double getHoleMobility(double E) const
Calculate hole mobility at a given electric field.
double m_temperature
Sensor temperature.
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.
static const double V
[voltage]
static const double cm
Standard units with the value = 1.
static const double s
[second]
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.
double m_thickness
Thickness of the Sensor.
static void getField(const double *pos, double *field)
return the magnetic field at a given position.
Namespace to encapsulate code needed for simulation and reconstrucion of the SVD.
Abstract base class for different kinds of events.