9 #include <framework/logging/Logger.h>
10 #include <svd/reconstruction/SVDRecoHit.h>
11 #include <svd/geometry/SensorInfo.h>
12 #include <vxd/geometry/SensorPlane.h>
13 #include <vxd/geometry/GeoCache.h>
15 #include <genfit/DetPlane.h>
23 SVDRecoHit::SVDRecoHit():
24 genfit::PlanarMeasurement(HIT_DIMENSIONS), m_sensorID(0), m_trueHit(0),
25 m_cluster(0), m_isU(0), m_energyDep(0), m_rotationPhi(0)
31 genfit::PlanarMeasurement(HIT_DIMENSIONS), m_sensorID(0), m_trueHit(hit),
32 m_cluster(0), m_isU(uDirection), m_energyDep(0), m_rotationPhi(0)
37 if (!gRandom) B2FATAL(
"gRandom not initialized, please set up gRandom first");
45 sigma = (
m_isU) ? geometry.getUPitch(hit->getV()) / sqrt(12) : geometry.getVPitch() / sqrt(12);
49 rawHitCoords_(0) = (
m_isU) ? gRandom->Gaus(hit->getU(), sigma) : gRandom->Gaus(hit->getV(), sigma);
51 rawHitCov_(0, 0) = sigma * sigma;
59 genfit::PlanarMeasurement(HIT_DIMENSIONS), m_sensorID(0), m_trueHit(0),
60 m_cluster(hit), m_energyDep(0), m_rotationPhi(0)
64 m_isU = hit->isUCluster();
71 bool isWedgeU =
m_isU && (geometry.getBackwardWidth() > geometry.getForwardWidth());
74 rawHitCoords_(0) = hit->getPosition();
78 m_rotationPhi = atan2((geometry.getBackwardWidth() - geometry.getForwardWidth()) / geometry.getWidth(0) * hit->getPosition(),
79 geometry.getLength());
82 rawHitCov_(0, 0) = hit->getPositionSigma() * hit->getPositionSigma();
93 bool isWedgeU =
m_isU && (geometry.getBackwardWidth() > geometry.getForwardWidth());
96 TVector3 uLocal(1, 0, 0);
97 TVector3 vLocal(0, 1, 0);
98 TVector3 origin = geometry.pointToGlobal(TVector3(0, 0, 0),
true);
99 TVector3 uGlobal = geometry.vectorToGlobal(uLocal,
true);
100 TVector3 vGlobal = geometry.vectorToGlobal(vLocal,
true);
118 auto L1 = [](
double x) {
return x;};
119 auto L2 = [](
double x) {
return (3 * x * x - 1) / 2;};
120 auto L3 = [](
double x) {
return (5 * x * x * x - 3 * x) / 2;};
121 auto L4 = [](
double x) {
return (35 * x * x * x * x - 30 * x * x + 3) / 8;};
132 v = state.getState()(4);
133 width = geometry.getWidth(v);
134 length = geometry.getLength();
141 u = state.getState()(3);
142 length = geometry.getLength();
143 width = geometry.getWidth(v);
155 planarParameters[0] * L2(u) + planarParameters[1] * L1(u) * L1(v) + planarParameters[2] * L2(v) +
156 planarParameters[3] * L3(u) + planarParameters[4] * L2(u) * L1(v) + planarParameters[5] * L1(u) * L2(v) + planarParameters[6] * L3(
158 planarParameters[7] * L4(u) + planarParameters[8] * L3(u) * L1(v) + planarParameters[9] * L2(u) * L2(v) + planarParameters[10] * L1(
159 u) * L3(v) + planarParameters[11] * L4(v);
161 double du_dw = state.getState()[1];
162 double dv_dw = state.getState()[2];
170 pos[0] = u + dw * du_dw;
172 pos[0] = v + dw * dv_dw;
186 state.getRep(), this->constructHMatrix(state.getRep())));
191 double u = rawHitCoords_(0);
192 double v = state.getState()(4);
194 double scale = uPrime / u;
202 TMatrixDSym cov(scale * scale * rawHitCov_);
205 this->constructHMatrix(state.getRep())));
The SVD Cluster class This class stores all information about reconstructed SVD clusters.
virtual std::vector< genfit::MeasurementOnPlane * > constructMeasurementsOnPlane(const genfit::StateOnPlane &state) const override
Methods that actually interface to Genfit.
TVectorD applyPlanarDeformation(TVectorD rawHit, std::vector< double > planarParameters, const genfit::StateOnPlane &state) const
Apply planar deformation of sensors.
float m_energyDep
deposited energy.
bool m_isU
transient member (not written out during streaming)
unsigned short m_sensorID
Unique sensor identifier.
void setDetectorPlane()
Set up Detector plane information.
float m_rotationPhi
angle of the plane rotation, for u in wedge sensors.
genfit::AbsMeasurement * clone() const override
Creating a deep copy of this hit.
SVDRecoHit()
Default constructor for ROOT IO.
Class SVDTrueHit - Records of tracks that either enter or leave the sensitive volume.
Specific implementation of SensorInfo for SVD Sensors which provides additional sensor specific infor...
static const SensorInfoBase & get(Belle2::VxdID id)
Return a reference to the SensorInfo of a given SensorID.
A Finite plane of one VXD Sensor.
void setRotation(double phi)
Set plane rotation angle.
Contains the measurement and covariance in raw detector coordinates.
Measured coordinates on a plane.
void setStripV(bool v=true)
Use if the coordinate for 1D hits measured in V direction.
A state with arbitrary dimension defined in a DetPlane.
Hit object for use in TrackCand.
Abstract base class for different kinds of events.
Defines for I/O streams used for error and debug printing.
std::shared_ptr< genfit::DetPlane > SharedPlanePtr
Shared Pointer to a DetPlane.