11 #include <framework/logging/Logger.h>
12 #include <svd/reconstruction/SVDRecoHit.h>
13 #include <svd/geometry/SensorInfo.h>
14 #include <vxd/geometry/SensorPlane.h>
15 #include <vxd/geometry/GeoCache.h>
17 #include <genfit/DetPlane.h>
25 SVDRecoHit::SVDRecoHit():
26 genfit::PlanarMeasurement(HIT_DIMENSIONS), m_sensorID(0), m_trueHit(0),
27 m_cluster(0), m_isU(0), m_energyDep(0), m_rotationPhi(0)
33 genfit::PlanarMeasurement(HIT_DIMENSIONS), m_sensorID(0), m_trueHit(hit),
34 m_cluster(0), m_isU(uDirection), m_energyDep(0), m_rotationPhi(0)
39 if (!gRandom) B2FATAL(
"gRandom not initialized, please set up gRandom first");
47 sigma = (
m_isU) ? geometry.getUPitch(hit->getV()) / sqrt(12) : geometry.getVPitch() / sqrt(12);
51 rawHitCoords_(0) = (
m_isU) ? gRandom->Gaus(hit->getU(), sigma) : gRandom->Gaus(hit->getV(), sigma);
53 rawHitCov_(0, 0) = sigma * sigma;
61 genfit::PlanarMeasurement(HIT_DIMENSIONS), m_sensorID(0), m_trueHit(0),
62 m_cluster(hit), m_energyDep(0), m_rotationPhi(0)
66 m_isU = hit->isUCluster();
73 bool isWedgeU =
m_isU && (geometry.getBackwardWidth() > geometry.getForwardWidth());
76 rawHitCoords_(0) = hit->getPosition();
80 m_rotationPhi = atan2((geometry.getBackwardWidth() - geometry.getForwardWidth()) / geometry.getWidth(0) * hit->getPosition(),
81 geometry.getLength());
84 rawHitCov_(0, 0) = hit->getPositionSigma() * hit->getPositionSigma();
95 bool isWedgeU =
m_isU && (geometry.getBackwardWidth() > geometry.getForwardWidth());
98 TVector3 uLocal(1, 0, 0);
99 TVector3 vLocal(0, 1, 0);
100 TVector3 origin = geometry.pointToGlobal(TVector3(0, 0, 0),
true);
101 TVector3 uGlobal = geometry.vectorToGlobal(uLocal,
true);
102 TVector3 vGlobal = geometry.vectorToGlobal(vLocal,
true);
120 auto L1 = [](
double x) {
return x;};
121 auto L2 = [](
double x) {
return (3 * x * x - 1) / 2;};
122 auto L3 = [](
double x) {
return (5 * x * x * x - 3 * x) / 2;};
123 auto L4 = [](
double x) {
return (35 * x * x * x * x - 30 * x * x + 3) / 8;};
134 v = state.getState()(4);
135 width = geometry.getWidth(v);
136 length = geometry.getLength();
143 u = state.getState()(3);
144 length = geometry.getLength();
145 width = geometry.getWidth(v);
157 planarParameters[0] * L2(u) + planarParameters[1] * L1(u) * L1(v) + planarParameters[2] * L2(v) +
158 planarParameters[3] * L3(u) + planarParameters[4] * L2(u) * L1(v) + planarParameters[5] * L1(u) * L2(v) + planarParameters[6] * L3(
160 planarParameters[7] * L4(u) + planarParameters[8] * L3(u) * L1(v) + planarParameters[9] * L2(u) * L2(v) + planarParameters[10] * L1(
161 u) * L3(v) + planarParameters[11] * L4(v);
163 double du_dw = state.getState()[1];
164 double dv_dw = state.getState()[2];
172 pos[0] = u + dw * du_dw;
174 pos[0] = v + dw * dv_dw;
188 state.getRep(), this->constructHMatrix(state.getRep())));
193 double u = rawHitCoords_(0);
194 double v = state.getState()(4);
196 double scale = uPrime / u;
204 TMatrixDSym cov(scale * scale * rawHitCov_);
207 this->constructHMatrix(state.getRep())));