Belle II Software development
AlignableSVDRecoHit2D Class Reference

This class is used to transfer SVD information to the track fit. More...

#include <AlignableSVDRecoHit2D.h>

Inheritance diagram for AlignableSVDRecoHit2D:
SVDRecoHit2D

Public Member Functions

virtual ~AlignableSVDRecoHit2D ()
 Destructor.
 
genfit::AbsMeasurement * clone () const override
 Creating a deep copy of this hit.
 
virtual std::pair< std::vector< int >, TMatrixD > globalDerivatives (const genfit::StateOnPlane *sop) override
 Labels and derivatives of residuals (local measurement coordinates) w.r.t.
 
 SVDRecoHit2D ()
 Inherit constructors.
 
 SVDRecoHit2D (const SVDTrueHit *hit, const genfit::TrackCandHit *trackCandHit=nullptr, float sigmaU=-1, float sigmaV=-1)
 Inherit constructors.
 
 SVDRecoHit2D (VxdID::baseType vxdid, const double u, const double v, double sigmaU=-1, double sigmaV=-1)
 Inherit constructors.
 
 SVDRecoHit2D (const SVDCluster &uHit, const SVDCluster &vHit)
 Inherit constructors.
 
 SVDRecoHit2D (const SVDRecoHit &uRecoHit, const SVDRecoHit &vRecoHit)
 Inherit constructors.
 
VxdID getSensorID () const
 Get the compact ID.
 
const SVDTrueHitgetTrueHit () const
 Get pointer to the TrueHit used when creating this RecoHit, can be nullptr if created from something else.
 
const SVDClustergetUCluster () const
 Get pointer to the u cluster used to create this RecoHit.
 
const SVDClustergetVCluster () const
 Get pointer to the u cluster used to create this RecoHit.
 
float getU () const
 Get u coordinate.
 
float getV () const
 Get v coordinate.
 
float getUVariance () const
 Get u coordinate variance.
 
float getVVariance () const
 Get v coordinate variance.
 
float getUVCov () const
 Get u-v error covariance.
 
float getEnergyDep () const
 Get deposited energy.
 
virtual std::vector< genfit::MeasurementOnPlane * > constructMeasurementsOnPlane (const genfit::StateOnPlane &state) const override
 Get deposited energy error.
 

Static Public Attributes

static bool s_enableLorentzGlobalDerivatives = false
 Static enabling(true) or disabling(false) addition of global derivatives for Lorentz shift.
 

Private Types

enum  { HIT_DIMENSIONS = 2 }
 

Private Member Functions

 ClassDefOverride (AlignableSVDRecoHit2D, 4)
 ROOT Macro.
 
void setDetectorPlane ()
 Set up Detector plane information.
 
TVectorD applyPlanarDeformation (TVectorD rawHit, std::vector< double > planarParameters, const genfit::StateOnPlane &state) const
 Apply planar deformation of sensors.
 

Private Attributes

unsigned short m_sensorID
 Unique sensor identifier.
 
const SVDTrueHitm_trueHit
 Pointer to the Truehit used to generate this hit.
 
const SVDClusterm_uCluster
 Pointer to mother uCluster.
 
const SVDClusterm_vCluster
 Pointer to mother vCluster.
 
float m_energyDep
 deposited energy.
 

Friends

class SVDRecoHit2D
 

Detailed Description

This class is used to transfer SVD information to the track fit.

Definition at line 28 of file AlignableSVDRecoHit2D.h.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
privateinherited
Enumerator
HIT_DIMENSIONS 

sensitive Dimensions of the Hit

Definition at line 133 of file SVDRecoHit2D.h.

133{ HIT_DIMENSIONS = 2 };
@ HIT_DIMENSIONS
sensitive Dimensions of the Hit
Definition: SVDRecoHit2D.h:133

Constructor & Destructor Documentation

◆ ~AlignableSVDRecoHit2D()

virtual ~AlignableSVDRecoHit2D ( )
inlinevirtual

Destructor.

Definition at line 38 of file AlignableSVDRecoHit2D.h.

38{}

Member Function Documentation

◆ applyPlanarDeformation()

TVectorD applyPlanarDeformation ( TVectorD  rawHit,
std::vector< double >  planarParameters,
const genfit::StateOnPlane &  state 
) const
privateinherited

Apply planar deformation of sensors.

Definition at line 173 of file SVDRecoHit2D.cc.

175{
176 // Legendre parametrization of deformation
177 auto L1 = [](double x) {return x;};
178 auto L2 = [](double x) {return (3 * x * x - 1) / 2;};
179 auto L3 = [](double x) {return (5 * x * x * x - 3 * x) / 2;};
180 auto L4 = [](double x) {return (35 * x * x * x * x - 30 * x * x + 3) / 8;};
181
182 const SVD::SensorInfo& geometry = dynamic_cast<const SVD::SensorInfo&>(VXD::GeoCache::getInstance().getSensorInfo(m_sensorID));
183
184 double u = rawHit[0]; // U coordinate of hit
185 double v = rawHit[1]; // V coordinate of hit
186 double width = geometry.getWidth(v); // Width of sensor (U side)
187 double length = geometry.getLength(); // Length of sensor (V side)
188 u = u * 2 / width; // Legendre parametrization required U in (-1, 1)
189 v = v * 2 / length; // Legendre parametrization required V in (-1, 1)
190
191 /* Planar deformation using Legendre parametrization
192 w(u, v) = L_{31} * L2(u) + L_{32} * L1(u) * L1(v) + L_{33} * L2(v) +
193 L_{41} * L3(u) + L_{42} * L2(u) * L1(v) + L_{43} * L1(u) * L2(v) + L_{44} * L3(v) +
194 L_{51} * L4(u) + L_{52} * L3(u) * L1(v) + L_{53} * L2(u) * L2(v) + L_{54} * L1(u) * L3(v) + L_{55} * L4(v); */
195 double dw =
196 planarParameters[0] * L2(u) + planarParameters[1] * L1(u) * L1(v) + planarParameters[2] * L2(v) +
197 planarParameters[3] * L3(u) + planarParameters[4] * L2(u) * L1(v) + planarParameters[5] * L1(u) * L2(v) + planarParameters[6] * L3(
198 v) +
199 planarParameters[7] * L4(u) + planarParameters[8] * L3(u) * L1(v) + planarParameters[9] * L2(u) * L2(v) + planarParameters[10] * L1(
200 u) * L3(v) + planarParameters[11] * L4(v);
201
202 double du_dw = state.getState()[1]; // slope in U direction
203 double dv_dw = state.getState()[2]; // slope in V direction
204
205 u = u * width / 2; // from Legendre to Local parametrization
206 v = v * length / 2; // from Legendre to Local parametrization
207
208 TVectorD pos(2);
209
210 pos[0] = u + dw * du_dw;
211 pos[1] = v + dw * dv_dw;
212
213 return pos;
214}
unsigned short m_sensorID
Unique sensor identifier.
Definition: SVDRecoHit2D.h:135
Specific implementation of SensorInfo for SVD Sensors which provides additional sensor specific infor...
Definition: SensorInfo.h:25
const SensorInfoBase & getSensorInfo(Belle2::VxdID id) const
Return a referecne to the SensorInfo of a given SensorID.
Definition: GeoCache.cc:67
static GeoCache & getInstance()
Return a reference to the singleton instance.
Definition: GeoCache.cc:214

◆ clone()

genfit::AbsMeasurement * clone ( ) const
inlineoverride

Creating a deep copy of this hit.

Definition at line 41 of file AlignableSVDRecoHit2D.h.

42 {
43 return new AlignableSVDRecoHit2D(*this);
44 }

◆ constructMeasurementsOnPlane()

std::vector< genfit::MeasurementOnPlane * > constructMeasurementsOnPlane ( const genfit::StateOnPlane &  state) const
overridevirtualinherited

Get deposited energy error.

Methods that actually interface to Genfit.

Definition at line 216 of file SVDRecoHit2D.cc.

217{
218 // Apply planar deformation
219 TVectorD pos = applyPlanarDeformation(rawHitCoords_, VXD::GeoCache::getInstance().getSensorInfo(m_sensorID).getSurfaceParameters(),
220 state);
221
222 return std::vector<genfit::MeasurementOnPlane*>(1, new genfit::MeasurementOnPlane(pos, rawHitCov_, state.getPlane(),
223 state.getRep(), this->constructHMatrix(state.getRep())));
224}
TVectorD applyPlanarDeformation(TVectorD rawHit, std::vector< double > planarParameters, const genfit::StateOnPlane &state) const
Apply planar deformation of sensors.

◆ getEnergyDep()

float getEnergyDep ( ) const
inlineinherited

Get deposited energy.

Definition at line 122 of file SVDRecoHit2D.h.

122{ return m_energyDep; }
float m_energyDep
deposited energy.
Definition: SVDRecoHit2D.h:140

◆ getSensorID()

VxdID getSensorID ( ) const
inlineinherited

Get the compact ID.

Definition at line 100 of file SVDRecoHit2D.h.

100{ return m_sensorID; }

◆ getTrueHit()

const SVDTrueHit * getTrueHit ( ) const
inlineinherited

Get pointer to the TrueHit used when creating this RecoHit, can be nullptr if created from something else.

Definition at line 103 of file SVDRecoHit2D.h.

103{ return m_trueHit; }
const SVDTrueHit * m_trueHit
Pointer to the Truehit used to generate this hit.
Definition: SVDRecoHit2D.h:136

◆ getU()

float getU ( ) const
inlineinherited

Get u coordinate.

Definition at line 110 of file SVDRecoHit2D.h.

110{ return rawHitCoords_(0); }

◆ getUCluster()

const SVDCluster * getUCluster ( ) const
inlineinherited

Get pointer to the u cluster used to create this RecoHit.

Definition at line 105 of file SVDRecoHit2D.h.

105{return m_uCluster; }
const SVDCluster * m_uCluster
Pointer to mother uCluster.
Definition: SVDRecoHit2D.h:137

◆ getUVariance()

float getUVariance ( ) const
inlineinherited

Get u coordinate variance.

Definition at line 115 of file SVDRecoHit2D.h.

115{ return rawHitCov_(0, 0); }

◆ getUVCov()

float getUVCov ( ) const
inlineinherited

Get u-v error covariance.

Definition at line 119 of file SVDRecoHit2D.h.

119{ return rawHitCov_(0, 1); }

◆ getV()

float getV ( ) const
inlineinherited

Get v coordinate.

Definition at line 112 of file SVDRecoHit2D.h.

112{ return rawHitCoords_(1); }

◆ getVCluster()

const SVDCluster * getVCluster ( ) const
inlineinherited

Get pointer to the u cluster used to create this RecoHit.

Definition at line 107 of file SVDRecoHit2D.h.

107{return m_vCluster; }
const SVDCluster * m_vCluster
Pointer to mother vCluster.
Definition: SVDRecoHit2D.h:138

◆ getVVariance()

float getVVariance ( ) const
inlineinherited

Get v coordinate variance.

Definition at line 117 of file SVDRecoHit2D.h.

117{ return rawHitCov_(1, 1); }

◆ globalDerivatives()

std::pair< std::vector< int >, TMatrixD > globalDerivatives ( const genfit::StateOnPlane *  sop)
overridevirtual

Labels and derivatives of residuals (local measurement coordinates) w.r.t.

alignment/calibration parameters Matrix "G" of derivatives valid for given prediction of track state:

G(i, j) = d_residual_i/d_parameter_j

For 2D measurement (u,v):

G = ( du/da du/db du/dc ... ) ( dv/da dv/db dv/dc ... )

for calibration parameters a, b, c.

For 1D measurement:

G = ( 0 0 0 ... ) ( dv/da dv/db dv/dc ... ) for V-strip,

G = ( du/da du/db du/dc ... ) ( 0 0 0 ... ) for U-strip,

Measurements with more dimesions (slopes, curvature) should provide full 4-5Dx(n params) matrix (state as (q/p, u', v', u, v) or (u', v', u, v))

Parameters
sopPredicted state of the track as linearization point around which derivatives of alignment/calibration parameters shall be computed
Returns
pair<vector<int>, TMatrixD> With matrix with number of rows = dimension of residual, number of columns = number of parameters. number of columns must match vector<int>.size().

Definition at line 25 of file AlignableSVDRecoHit2D.cc.

26{
27 auto alignment = GlobalCalibrationManager::getInstance().getAlignmentHierarchy().getGlobalDerivatives<VXDAlignment>(getPlaneId(),
28 sop);
29
30 auto globals = GlobalDerivatives(alignment);
31
33 auto lorentz = GlobalCalibrationManager::getInstance().getLorentzShiftHierarchy().getGlobalDerivatives<VXDAlignment>(getPlaneId(),
34 sop, BFieldManager::getInstance().getField(ROOT::Math::XYZVector(sop->getPos())));
35 globals.add(lorentz);
36 }
37
38 const SVD::SensorInfo& geometry = dynamic_cast<const SVD::SensorInfo&>(VXD::GeoCache::getInstance().getSensorInfo(getSensorID()));
39
40 // Legendre parametrization of deformation
41 auto L1 = [](double x) {return x;};
42 auto L2 = [](double x) {return (3 * x * x - 1) / 2;};
43 auto L3 = [](double x) {return (5 * x * x * x - 3 * x) / 2;};
44 auto L4 = [](double x) {return (35 * x * x * x * x - 30 * x * x + 3) / 8;};
45
46 double du_dw = sop->getState()[1]; // slope in U direction
47 double dv_dw = sop->getState()[2]; // slope in V direction
48 double u = getU(); // U coordinate of hit
49 double v = getV(); // V coordinate of hit
50 double width = geometry.getWidth(v); // Width of sensor (U side)
51 double length = geometry.getLength(); // Length of sensor (V side)
52 u = u * 2 / width; // Legendre parametrization required U in (-1, 1)
53 v = v * 2 / length; // Legendre parametrization required V in (-1, 1)
54
55 // Add parameters of surface deformation to alignment
56 // Numbering of VXD alignment parameters:
57 // -> 0-6: Rigid body alignment
58 // -> 31-33: First level of surface deformation
59 // -> 41-44: Second level of surface deformation
60 // -> 51-55: Third level of surface deformation
61 globals.add(GlobalLabel::construct<VXDAlignment>(getSensorID(), 31), std::vector<double> {L2(u)*du_dw, L2(u)*dv_dw});
62 globals.add(GlobalLabel::construct<VXDAlignment>(getSensorID(), 32), std::vector<double> {L1(u)*L1(v)*du_dw, L1(u)*L1(v)*dv_dw});
63 globals.add(GlobalLabel::construct<VXDAlignment>(getSensorID(), 33), std::vector<double> {L2(v)*du_dw, L2(v)*dv_dw});
64
65 globals.add(GlobalLabel::construct<VXDAlignment>(getSensorID(), 41), std::vector<double> {L3(u)*du_dw, L3(u)*dv_dw});
66 globals.add(GlobalLabel::construct<VXDAlignment>(getSensorID(), 42), std::vector<double> {L2(u)*L1(v)*du_dw, L2(u)*L1(v)*dv_dw});
67 globals.add(GlobalLabel::construct<VXDAlignment>(getSensorID(), 43), std::vector<double> {L1(u)*L2(v)*du_dw, L1(u)*L2(v)*dv_dw});
68 globals.add(GlobalLabel::construct<VXDAlignment>(getSensorID(), 44), std::vector<double> {L3(v)*du_dw, L3(v)*dv_dw});
69
70 globals.add(GlobalLabel::construct<VXDAlignment>(getSensorID(), 51), std::vector<double> {L4(u)*du_dw, L4(u)*dv_dw});
71 globals.add(GlobalLabel::construct<VXDAlignment>(getSensorID(), 52), std::vector<double> {L3(u)*L1(v)*du_dw, L3(u)*L1(v)*dv_dw});
72 globals.add(GlobalLabel::construct<VXDAlignment>(getSensorID(), 53), std::vector<double> {L2(u)*L2(v)*du_dw, L2(u)*L2(v)*dv_dw});
73 globals.add(GlobalLabel::construct<VXDAlignment>(getSensorID(), 54), std::vector<double> {L1(u)*L3(v)*du_dw, L1(u)*L3(v)*dv_dw});
74 globals.add(GlobalLabel::construct<VXDAlignment>(getSensorID(), 55), std::vector<double> {L4(v)*du_dw, L4(v)*dv_dw});
75
76 return globals;
77}
static bool s_enableLorentzGlobalDerivatives
Static enabling(true) or disabling(false) addition of global derivatives for Lorentz shift.
static BFieldManager & getInstance()
Return the instance of the magnetic field manager.
virtual double add(baseType id, baseType param, double value, bool subtractInsteadOfAdd=false)
Add correction to already stored (or to 0. if not set yet) constant value (optionaly with minus sign)
float getV() const
Get v coordinate.
Definition: SVDRecoHit2D.h:112
VxdID getSensorID() const
Get the compact ID.
Definition: SVDRecoHit2D.h:100
float getU() const
Get u coordinate.
Definition: SVDRecoHit2D.h:110
VXD alignment (and maybe some calibration) parameters.
Definition: VXDAlignment.h:19
static void getField(const double *pos, double *field)
return the magnetic field at a given position.
Definition: BFieldManager.h:91

◆ setDetectorPlane()

void setDetectorPlane ( )
privateinherited

Set up Detector plane information.

Definition at line 157 of file SVDRecoHit2D.cc.

158{
159 // Construct a finite detector plane and set it.
160 const SVD::SensorInfo& geometry = dynamic_cast<const SVD::SensorInfo&>(VXD::GeoCache::getInstance().getSensorInfo(m_sensorID));
161
162 // Construct vectors o, u, v
163 ROOT::Math::XYZVector origin = geometry.pointToGlobal(ROOT::Math::XYZVector(0, 0, 0), true);
164 ROOT::Math::XYZVector uGlobal = geometry.vectorToGlobal(ROOT::Math::XYZVector(1, 0, 0), true);
165 ROOT::Math::XYZVector vGlobal = geometry.vectorToGlobal(ROOT::Math::XYZVector(0, 1, 0), true);
166
167 //Construct the detector plane
168 genfit::SharedPlanePtr detPlane(new genfit::DetPlane(XYZToTVector(origin), XYZToTVector(uGlobal), XYZToTVector(vGlobal),
169 new VXD::SensorPlane(m_sensorID, 20, 20)));
170 setPlane(detPlane, m_sensorID);
171}
A Finite plane of one VXD Sensor.
Definition: SensorPlane.h:34
static constexpr auto XYZToTVector
Helper function to convert XYZVector to TVector3.
Definition: VectorUtil.h:24

◆ SVDRecoHit2D() [1/5]

Inherit constructors.

Definition at line 49 of file SVDRecoHit2D.cc.

23 :
24 genfit::PlanarMeasurement(HIT_DIMENSIONS), m_sensorID(0), m_trueHit(0), m_uCluster(0), m_vCluster(0),
25 m_energyDep(0)//, m_energyDepError(0)
26{}

◆ SVDRecoHit2D() [2/5]

SVDRecoHit2D ( const SVDCluster uHit,
const SVDCluster vHit 
)

Inherit constructors.

Definition at line 83 of file SVDRecoHit2D.cc.

80 :
81 genfit::PlanarMeasurement(HIT_DIMENSIONS), m_trueHit(nullptr), m_uCluster(&uHit), m_vCluster(&vHit),
83{
84 if ((uHit.getRawSensorID() != vHit.getRawSensorID()) || !uHit.isUCluster() || vHit.isUCluster())
85 B2FATAL("Error in SVDRecoHit2D: Incorrect SVDCluster instances on input!");
86
88
89 // Now that we have a v coordinate, we can rescale u.
90 const SVD::SensorInfo& info =
92
93 double DeltaU =
94 (info.getForwardWidth() - info.getBackwardWidth()) / info.getLength() / info.getWidth(0);
95 double scaleFactorU = 1 + DeltaU * vHit.getPosition();
96 double tan_phi = DeltaU * uHit.getPosition(); // need u at v=0!
97 double one_over_cos_phi_sqr = 1 + tan_phi * tan_phi;
98
99 rawHitCoords_[0] = uHit.getPosition() * scaleFactorU;
100 rawHitCoords_[1] = vHit.getPosition();
101
102 double sigmaU = uHit.getPositionSigma() * scaleFactorU;
103 double sigmaU_sq = sigmaU * sigmaU;
104 double sigmaV = vHit.getPositionSigma();
105 double sigmaV_sq = sigmaV * sigmaV;
106
107 m_energyDep = 0.5 * (uHit.getCharge() + vHit.getCharge());
108
109 rawHitCov_(0, 0) = sigmaV_sq * tan_phi * tan_phi + sigmaU_sq * one_over_cos_phi_sqr;
110 rawHitCov_(0, 1) = sigmaV_sq * tan_phi;
111 rawHitCov_(1, 0) = sigmaV_sq * tan_phi;
112 rawHitCov_(1, 1) = sigmaV_sq;
113 // Setup geometry information
115}
float getCharge() const
Get collected charge.
Definition: SVDCluster.h:144
bool isUCluster() const
Get the direction of strips.
Definition: SVDCluster.h:110
float getPosition(double v=0) const
Get the coordinate of reconstructed hit.
Definition: SVDCluster.h:117
float getPositionSigma() const
Get the error of the reconstructed hit coordinate.
Definition: SVDCluster.h:129
unsigned short getRawSensorID() const
Get raw sensor ID.
Definition: SVDCluster.h:105
void setDetectorPlane()
Set up Detector plane information.

◆ SVDRecoHit2D() [3/5]

SVDRecoHit2D ( const SVDRecoHit uRecoHit,
const SVDRecoHit vRecoHit 
)

Inherit constructors.

Definition at line 89 of file SVDRecoHit2D.cc.

117 :
118 genfit::PlanarMeasurement(HIT_DIMENSIONS), m_trueHit(nullptr), m_uCluster(0), m_vCluster(0), m_energyDep(0)
119{
120 const SVDCluster& uHit = *(uRecoHit.getCluster());
121 const SVDCluster& vHit = *(vRecoHit.getCluster());
122 if ((uHit.getRawSensorID() != vHit.getRawSensorID()) || !uHit.isUCluster() || vHit.isUCluster())
123 B2FATAL("Error in SVDRecoHit2D: Incorrect SVDCluster instances on input!");
124
125 m_sensorID = uHit.getRawSensorID();
126 m_uCluster = &uHit;
127 m_vCluster = &vHit;
128
129 // Now that we have a v coordinate, we can rescale u.
130 const SVD::SensorInfo& info =
132
133 double DeltaU =
134 (info.getForwardWidth() - info.getBackwardWidth()) / info.getLength() / info.getWidth(0);
135 double scaleFactorU = 1 + DeltaU * vHit.getPosition();
136 double tan_phi = DeltaU * uHit.getPosition(); // need u at v=0!
137 double one_over_cos_phi_sqr = 1 + tan_phi * tan_phi;
138
139 rawHitCoords_[0] = uHit.getPosition() * scaleFactorU;
140 rawHitCoords_[1] = vHit.getPosition();
141
142 double sigmaU = uHit.getPositionSigma() * scaleFactorU;
143 double sigmaU_sq = sigmaU * sigmaU;
144 double sigmaV = vHit.getPositionSigma();
145 double sigmaV_sq = sigmaV * sigmaV;
146
147 m_energyDep = 0.5 * (uHit.getCharge() + vHit.getCharge());
148
149 rawHitCov_(0, 0) = sigmaV_sq * tan_phi * tan_phi + sigmaU_sq * one_over_cos_phi_sqr;
150 rawHitCov_(0, 1) = sigmaV_sq * tan_phi;
151 rawHitCov_(1, 0) = sigmaV_sq * tan_phi;
152 rawHitCov_(1, 1) = sigmaV_sq;
153 // Setup geometry information
155}
The SVD Cluster class This class stores all information about reconstructed SVD clusters.
Definition: SVDCluster.h:29
const SVDCluster * getCluster() const
Get pointer to the Cluster used when creating this RecoHit, can be nullptr if created from something ...
Definition: SVDRecoHit.h:88

◆ SVDRecoHit2D() [4/5]

SVDRecoHit2D ( const SVDTrueHit hit,
const genfit::TrackCandHit *  trackCandHit = nullptr,
float  sigmaU = -1,
float  sigmaV = -1 
)
explicit

Inherit constructors.

Definition at line 64 of file SVDRecoHit2D.cc.

28 :
29 genfit::PlanarMeasurement(HIT_DIMENSIONS), m_sensorID(0), m_trueHit(hit), m_uCluster(0), m_vCluster(0),
30 m_energyDep(0)//, m_energyDepError(0)
31{
32 if (!gRandom) B2FATAL("gRandom not initialized, please set up gRandom first");
33
34 // Set the sensor UID
35 m_sensorID = hit->getSensorID();
36
37 //If no error is given, estimate the error by dividing the pixel size by sqrt(12)
38 if (sigmaU < 0 || sigmaV < 0) {
40 sigmaU = geometry.getUPitch(hit->getV()) / sqrt(12);
41 sigmaV = geometry.getVPitch(hit->getV()) / sqrt(12);
42 }
43
44 // Set positions
45 rawHitCoords_(0) = gRandom->Gaus(hit->getU(), sigmaU);
46 rawHitCoords_(1) = gRandom->Gaus(hit->getV(), sigmaV);
47 // Set the error covariance matrix
48 rawHitCov_(0, 0) = sigmaU * sigmaU;
49 rawHitCov_(0, 1) = 0;
50 rawHitCov_(1, 0) = 0;
51 rawHitCov_(1, 1) = sigmaV * sigmaV;
52 // Set physical parameters
53 m_energyDep = hit->getEnergyDep();
54 // Setup geometry information
56}
double sqrt(double a)
sqrt for double
Definition: beamHelpers.h:28

◆ SVDRecoHit2D() [5/5]

SVDRecoHit2D ( VxdID::baseType  vxdid,
const double  u,
const double  v,
double  sigmaU = -1,
double  sigmaV = -1 
)

Inherit constructors.

Definition at line 77 of file SVDRecoHit2D.cc.

58 :
59 genfit::PlanarMeasurement(HIT_DIMENSIONS), m_sensorID(vxdid), m_trueHit(nullptr), m_uCluster(0), m_vCluster(0),
60 m_energyDep(0)//, m_energyDepError(0)
61{
62 //If no error is given, estimate the error by dividing the pixel size by sqrt(12)
63 if (sigmaU < 0 || sigmaV < 0) {
65 sigmaU = geometry.getUPitch(v) / sqrt(12);
66 sigmaV = geometry.getVPitch(v) / sqrt(12);
67 }
68 // Set positions
69 rawHitCoords_(0) = u;
70 rawHitCoords_(1) = v;
71 // Set the error covariance matrix
72 rawHitCov_(0, 0) = sigmaU * sigmaU;
73 rawHitCov_(0, 1) = 0;
74 rawHitCov_(1, 0) = 0;
75 rawHitCov_(1, 1) = sigmaV * sigmaV;
76 // Setup geometry information
78}

Friends And Related Function Documentation

◆ SVDRecoHit2D

friend class SVDRecoHit2D
friend

Definition at line 29 of file AlignableSVDRecoHit2D.h.

Member Data Documentation

◆ m_energyDep

float m_energyDep
privateinherited

deposited energy.

Definition at line 140 of file SVDRecoHit2D.h.

◆ m_sensorID

unsigned short m_sensorID
privateinherited

Unique sensor identifier.

Definition at line 135 of file SVDRecoHit2D.h.

◆ m_trueHit

const SVDTrueHit* m_trueHit
privateinherited

Pointer to the Truehit used to generate this hit.

Definition at line 136 of file SVDRecoHit2D.h.

◆ m_uCluster

const SVDCluster* m_uCluster
privateinherited

Pointer to mother uCluster.

Definition at line 137 of file SVDRecoHit2D.h.

◆ m_vCluster

const SVDCluster* m_vCluster
privateinherited

Pointer to mother vCluster.

Definition at line 138 of file SVDRecoHit2D.h.

◆ s_enableLorentzGlobalDerivatives

bool s_enableLorentzGlobalDerivatives = false
static

Static enabling(true) or disabling(false) addition of global derivatives for Lorentz shift.

Definition at line 32 of file AlignableSVDRecoHit2D.h.


The documentation for this class was generated from the following files: