Belle II Software development
AlignablePXDRecoHit Class Reference

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

#include <AlignablePXDRecoHit.h>

Inheritance diagram for AlignablePXDRecoHit:
PXDRecoHit

Public Member Functions

virtual ~AlignablePXDRecoHit ()
 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.
 
 PXDRecoHit ()
 Inherit constructors.
 
 PXDRecoHit (const PXDTrueHit *hit, const genfit::TrackCandHit *trackCandHit=NULL, float sigmaU=-1, float sigmaV=-1)
 Inherit constructors.
 
 PXDRecoHit (const PXDCluster *hit, float sigmaU, float sigmaV, float covUV)
 Inherit constructors.
 
 PXDRecoHit (const PXDCluster *hit, const genfit::TrackCandHit *trackCandHit=NULL)
 Inherit constructors.
 
virtual std::vector< genfit::MeasurementOnPlane * > constructMeasurementsOnPlane (const genfit::StateOnPlane &state) const override
 Methods that actually interface to Genfit.
 
VxdID getSensorID () const
 Get the compact ID.
 
const PXDTrueHitgetTrueHit () const
 Get pointer to the TrueHit used when creating this RecoHit, can be NULL if created from something else.
 
const PXDClustergetCluster () const
 Get pointer to the Cluster used when creating this RecoHit, can be NULL if created from something else.
 
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.
 
float getShapeLikelyhood (const genfit::StateOnPlane &state) const
 Get deposited energy error.
 
virtual const genfit::AbsHMatrix * constructHMatrix (const genfit::AbsTrackRep *) const override
 Construct the hessian matrix.
 

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 (AlignablePXDRecoHit, 3)
 PXD RecoHit extended for alignment/calibration.
 
void setDetectorPlane ()
 Set up Detector plane information.
 
TVectorD applyPlanarDeformation (TVectorD hitCoords, std::vector< double > planarParameters, const genfit::StateOnPlane &state) const
 Apply planar deformation of sensors.
 

Private Attributes

unsigned short m_sensorID
 Unique sensor identifier.
 
const PXDTrueHitm_trueHit
 Pointer to the TrueHit used when creating this object.
 
const PXDClusterm_cluster
 transient member (not written out during streaming)
 
float m_energyDep
 transient member (not written out during streaming)
 

Friends

class PXDRecoHit
 

Detailed Description

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

Definition at line 28 of file AlignablePXDRecoHit.h.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
privateinherited
Enumerator
HIT_DIMENSIONS 

sensitive Dimensions of the Hit

Definition at line 134 of file PXDRecoHit.h.

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

Constructor & Destructor Documentation

◆ ~AlignablePXDRecoHit()

virtual ~AlignablePXDRecoHit ( )
inlinevirtual

Destructor.

Definition at line 38 of file AlignablePXDRecoHit.h.

38{}

Member Function Documentation

◆ applyPlanarDeformation()

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

Apply planar deformation of sensors.

Definition at line 148 of file PXDRecoHit.cc.

150{
151 // Legendre parametrization of deformation
152 auto L1 = [](double x) {return x;};
153 auto L2 = [](double x) {return (3 * x * x - 1) / 2;};
154 auto L3 = [](double x) {return (5 * x * x * x - 3 * x) / 2;};
155 auto L4 = [](double x) {return (35 * x * x * x * x - 30 * x * x + 3) / 8;};
156
157 const PXD::SensorInfo& geometry = dynamic_cast<const PXD::SensorInfo&>(VXD::GeoCache::getInstance().getSensorInfo(m_sensorID));
158
159 double u = hitCoords[0];
160 double v = hitCoords[1];
161 double width = geometry.getWidth(v); // Width of sensor (U side)
162 double length = geometry.getLength(); // Length of sensor (V side)
163 u = u * 2 / width; // Legendre parametrization required U in (-1, 1)
164 v = v * 2 / length; // Legendre parametrization required V in (-1, 1)
165
166 /* Planar deformation using Legendre parametrization
167 w(u, v) = L_{31} * L2(u) + L_{32} * L1(u) * L1(v) + L_{33} * L2(v) +
168 L_{41} * L3(u) + L_{42} * L2(u) * L1(v) + L_{43} * L1(u) * L2(v) + L_{44} * L3(v) +
169 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); */
170 double dw =
171 planarParameters[0] * L2(u) + planarParameters[1] * L1(u) * L1(v) + planarParameters[2] * L2(v) +
172 planarParameters[3] * L3(u) + planarParameters[4] * L2(u) * L1(v) + planarParameters[5] * L1(u) * L2(v) + planarParameters[6] * L3(
173 v) +
174 planarParameters[7] * L4(u) + planarParameters[8] * L3(u) * L1(v) + planarParameters[9] * L2(u) * L2(v) + planarParameters[10] * L1(
175 u) * L3(v) + planarParameters[11] * L4(v);
176
177 double du_dw = state.getState()[1]; // slope in U direction
178 double dv_dw = state.getState()[2]; // slope in V direction
179
180 u = u * width / 2; // from Legendre to Local parametrization
181 v = v * length / 2; // from Legendre to Local parametrization
182
183 TVectorD pos(2);
184
185 pos[0] = u + dw * du_dw;
186 pos[1] = v + dw * dv_dw;
187
188 return pos;
189}
unsigned short m_sensorID
Unique sensor identifier.
Definition: PXDRecoHit.h:136
Specific implementation of SensorInfo for PXD Sensors which provides additional pixel specific inform...
Definition: SensorInfo.h:23
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 AlignablePXDRecoHit.h.

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

◆ constructHMatrix()

virtual const genfit::AbsHMatrix * constructHMatrix ( const genfit::AbsTrackRep *  ) const
inlineoverridevirtualinherited

Construct the hessian matrix.

Definition at line 130 of file PXDRecoHit.h.

130{ return new genfit::HMatrixUV(); };

◆ constructMeasurementsOnPlane()

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

Methods that actually interface to Genfit.


Definition at line 191 of file PXDRecoHit.cc.

192{
193 // Track-based update only takes place when the RecoHit has an associated cluster
194 if (this->getCluster()) {
195 // Check if we can correct position coordinates based on track info
196 const TVectorD& state5 = state.getState();
197 auto offset = PXD::PXDClusterPositionEstimator::getInstance().getClusterOffset(*this->getCluster(), state5[1], state5[2]);
198
199 if (offset != nullptr) {
200 // Found a valid offset, lets apply it
201 const Belle2::VxdID& sensorID = (*this->getCluster()).getSensorID();
203 sensorID));
204 double posU = Info.getUCellPosition((*this->getCluster()).getUStart());
205 double posV = Info.getVCellPosition((*this->getCluster()).getVStart());
206
207 TVectorD hitCoords(2);
208 hitCoords(0) = posU + offset->getU();
209 hitCoords(1) = posV + offset->getV();
210 TMatrixDSym hitCov(2);
211 hitCov(0, 0) = offset->getUSigma2();
212 hitCov(0, 1) = offset->getUVCovariance();
213 hitCov(1, 0) = offset->getUVCovariance();
214 hitCov(1, 1) = offset->getVSigma2();
215
216 // Apply planar deformation
217 TVectorD pos = applyPlanarDeformation(hitCoords, VXD::GeoCache::getInstance().getSensorInfo(m_sensorID).getSurfaceParameters(),
218 state);
219
220 return std::vector<genfit::MeasurementOnPlane*>(1, new genfit::MeasurementOnPlane(
221 pos, hitCov, state.getPlane(), state.getRep(), this->constructHMatrix(state.getRep())
222 ));
223 }
224 }
225
226 // Apply planar deformation
227 TVectorD pos = applyPlanarDeformation(rawHitCoords_, VXD::GeoCache::getInstance().getSensorInfo(m_sensorID).getSurfaceParameters(),
228 state);
229
230 // If we reach here, we can do no better than what we have
231 return std::vector<genfit::MeasurementOnPlane*>(1, new genfit::MeasurementOnPlane(
232 pos, rawHitCov_, state.getPlane(), state.getRep(), this->constructHMatrix(state.getRep())
233 ));
234}
TVectorD applyPlanarDeformation(TVectorD hitCoords, std::vector< double > planarParameters, const genfit::StateOnPlane &state) const
Apply planar deformation of sensors.
Definition: PXDRecoHit.cc:148
const PXDCluster * getCluster() const
Get pointer to the Cluster used when creating this RecoHit, can be NULL if created from something els...
Definition: PXDRecoHit.h:106
VxdID getSensorID() const
Get the compact ID.
Definition: PXDRecoHit.h:101
static PXDClusterPositionEstimator & getInstance()
Main (and only) way to access the PXDClusterPositionEstimator.
const PXDClusterOffsetPar * getClusterOffset(const PXDCluster &cluster, double tu, double tv) const
Return pointer to cluster offsets, can be nullptr.
double getVCellPosition(int vID) const
Return the position of a specific strip/pixel in v direction.
double getUCellPosition(int uID, int vID=-1) const
Return the position of a specific strip/pixel in u direction.
Class to uniquely identify a any structure of the PXD and SVD.
Definition: VxdID.h:33

◆ getCluster()

const PXDCluster * getCluster ( ) const
inlineinherited

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

Definition at line 106 of file PXDRecoHit.h.

106{ return m_cluster; }
const PXDCluster * m_cluster
transient member (not written out during streaming)
Definition: PXDRecoHit.h:140

◆ getEnergyDep()

float getEnergyDep ( ) const
inlineinherited

Get deposited energy.

Definition at line 121 of file PXDRecoHit.h.

121{ return m_energyDep; }
float m_energyDep
transient member (not written out during streaming)
Definition: PXDRecoHit.h:141

◆ getSensorID()

VxdID getSensorID ( ) const
inlineinherited

Get the compact ID.

Definition at line 101 of file PXDRecoHit.h.

101{ return m_sensorID; }

◆ getShapeLikelyhood()

float getShapeLikelyhood ( const genfit::StateOnPlane &  state) const
inherited

Get deposited energy error.

Get the likelyhood that cluster shape is likely to be created from track state.

Definition at line 136 of file PXDRecoHit.cc.

137{
138 // We need an associated cluster
139 if (this->getCluster()) {
140 // Likelyhood depends on the fitted incidence angles into the sensor
141 const TVectorD& state5 = state.getState();
142 return PXD::PXDClusterPositionEstimator::getInstance().getShapeLikelyhood(*this->getCluster(), state5[1], state5[2]);
143 }
144 // If we reach here, we can do no better than return zero
145 return 0;
146}
float getShapeLikelyhood(const PXDCluster &cluster, double tu, double tv) const
Return cluster shape likelyhood.

◆ getTrueHit()

const PXDTrueHit * getTrueHit ( ) const
inlineinherited

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

Definition at line 104 of file PXDRecoHit.h.

104{ return m_trueHit; }
const PXDTrueHit * m_trueHit
Pointer to the TrueHit used when creating this object.
Definition: PXDRecoHit.h:138

◆ getU()

float getU ( ) const
inlineinherited

Get u coordinate.

Definition at line 109 of file PXDRecoHit.h.

109{ return rawHitCoords_(0); }

◆ getUVariance()

float getUVariance ( ) const
inlineinherited

Get u coordinate variance.

Definition at line 114 of file PXDRecoHit.h.

114{ return rawHitCov_(0, 0); }

◆ getUVCov()

float getUVCov ( ) const
inlineinherited

Get u-v error covariance.

Definition at line 118 of file PXDRecoHit.h.

118{ return rawHitCov_(0, 1); }

◆ getV()

float getV ( ) const
inlineinherited

Get v coordinate.

Definition at line 111 of file PXDRecoHit.h.

111{ return rawHitCoords_(1); }

◆ getVVariance()

float getVVariance ( ) const
inlineinherited

Get v coordinate variance.

Definition at line 116 of file PXDRecoHit.h.

116{ 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 AlignablePXDRecoHit.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 PXD::SensorInfo& geometry = dynamic_cast<const PXD::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 GlobalDerivatives(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 (optionally with minus sign...
float getV() const
Get v coordinate.
Definition: PXDRecoHit.h:111
float getU() const
Get u coordinate.
Definition: PXDRecoHit.h:109
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

◆ PXDRecoHit() [1/4]

Inherit constructors.

Definition at line 53 of file PXDRecoHit.cc.

26 :
27 genfit::PlanarMeasurement(HIT_DIMENSIONS), m_sensorID(0), m_trueHit(0), m_cluster(0),
28 m_energyDep(0)//, m_energyDepError(0)
29{}

◆ PXDRecoHit() [2/4]

PXDRecoHit ( const PXDCluster hit,
const genfit::TrackCandHit *  trackCandHit = NULL 
)
explicit

Inherit constructors.

Definition at line 91 of file PXDRecoHit.cc.

86 :
87 genfit::PlanarMeasurement(HIT_DIMENSIONS), m_sensorID(0), m_trueHit(0), m_cluster(hit),
88 m_energyDep(0)//, m_energyDepError(0)
89{
90 // Set the sensor UID
91 m_sensorID = hit->getSensorID();
92 // Set positions
93 rawHitCoords_(0) = hit->getU();
94 rawHitCoords_(1) = hit->getV();
95 // Set the error covariance matrix
96 rawHitCov_(0, 0) = hit->getUSigma() * hit->getUSigma();
97 rawHitCov_(0, 1) = hit->getRho() * hit->getUSigma() * hit->getVSigma();
98 rawHitCov_(1, 0) = hit->getRho() * hit->getUSigma() * hit->getVSigma();
99 rawHitCov_(1, 1) = hit->getVSigma() * hit->getVSigma();
100 // Set physical parameters
101 const PXD::SensorInfo& SensorInfo = dynamic_cast<const PXD::SensorInfo&>(VXD::GeoCache::getInstance().getSensorInfo(m_sensorID));
102 auto ADUToEnergy = PXD::PXDGainCalibrator::getInstance().getADUToEnergy(m_sensorID, SensorInfo.getUCellID(hit->getU()),
103 SensorInfo.getVCellID(hit->getV()));
104 m_energyDep = hit->getCharge() * ADUToEnergy;
105 //m_energyDepError = 0;
106 // Setup geometry information
108}
void setDetectorPlane()
Set up Detector plane information.
Definition: PXDRecoHit.cc:116
float getADUToEnergy(VxdID id, unsigned int uid, unsigned int vid) const
Get conversion factor from ADU to energy.
static PXDGainCalibrator & getInstance()
Main (and only) way to access the PXDGainCalibrator.
int getVCellID(double v, bool clamp=false) const
Return the corresponding pixel/strip ID of a given v coordinate.
int getUCellID(double u, double v=0, bool clamp=false) const
Return the corresponding pixel/strip ID of a given u coordinate.

◆ PXDRecoHit() [3/4]

PXDRecoHit ( const PXDCluster hit,
float  sigmaU,
float  sigmaV,
float  covUV 
)
explicit

Inherit constructors.

Definition at line 78 of file PXDRecoHit.cc.

61 :
62 genfit::PlanarMeasurement(HIT_DIMENSIONS), m_sensorID(0), m_trueHit(0), m_cluster(hit),
63 m_energyDep(0)//, m_energyDepError(0)
64{
65 // Set the sensor UID
66 m_sensorID = hit->getSensorID();
67 // Set positions
68 rawHitCoords_(0) = hit->getU();
69 rawHitCoords_(1) = hit->getV();
70 // Set the error covariance matrix
71 rawHitCov_(0, 0) = sigmaU * sigmaU;
72 rawHitCov_(0, 1) = covUV;
73 rawHitCov_(1, 0) = covUV;
74 rawHitCov_(1, 1) = sigmaV * sigmaV;
75 // Set physical parameters
76 const PXD::SensorInfo& SensorInfo = dynamic_cast<const PXD::SensorInfo&>(VXD::GeoCache::getInstance().getSensorInfo(m_sensorID));
77 auto ADUToEnergy = PXD::PXDGainCalibrator::getInstance().getADUToEnergy(m_sensorID, SensorInfo.getUCellID(hit->getU()),
78 SensorInfo.getVCellID(hit->getV()));
79 m_energyDep = hit->getCharge() * ADUToEnergy;
80 //m_energyDepError = 0;
81 // Setup geometry information
83}

◆ PXDRecoHit() [4/4]

PXDRecoHit ( const PXDTrueHit hit,
const genfit::TrackCandHit *  trackCandHit = NULL,
float  sigmaU = -1,
float  sigmaV = -1 
)
explicit

Inherit constructors.

Definition at line 68 of file PXDRecoHit.cc.

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

◆ setDetectorPlane()

void setDetectorPlane ( )
privateinherited

Set up Detector plane information.

Definition at line 116 of file PXDRecoHit.cc.

117{
118 // Construct a finite detector plane and set it.
119 const PXD::SensorInfo& geometry = dynamic_cast<const PXD::SensorInfo&>(VXD::GeoCache::getInstance().getSensorInfo(m_sensorID));
120
121 // Construct vectors o, u, v
122 ROOT::Math::XYZVector uLocal(1, 0, 0);
123 ROOT::Math::XYZVector vLocal(0, 1, 0);
124 ROOT::Math::XYZVector origin = geometry.pointToGlobal(ROOT::Math::XYZVector(0, 0, 0), true);
125 ROOT::Math::XYZVector uGlobal = geometry.vectorToGlobal(uLocal, true);
126 ROOT::Math::XYZVector vGlobal = geometry.vectorToGlobal(vLocal, true);
127
128 //Construct the detector plane
129 VXD::SensorPlane* finitePlane = new VXD::SensorPlane(m_sensorID, 20.0, 20.0);
130 genfit::SharedPlanePtr detPlane(new genfit::DetPlane(XYZToTVector(origin), XYZToTVector(uGlobal), XYZToTVector(vGlobal),
131 finitePlane));
132 setPlane(detPlane, m_sensorID);
133}
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

Friends And Related Function Documentation

◆ PXDRecoHit

friend class PXDRecoHit
friend

Definition at line 29 of file AlignablePXDRecoHit.h.

Member Data Documentation

◆ m_cluster

const PXDCluster* m_cluster
privateinherited

transient member (not written out during streaming)

Pointer to the Cluster used when creating this object

Definition at line 140 of file PXDRecoHit.h.

◆ m_energyDep

float m_energyDep
privateinherited

transient member (not written out during streaming)

deposited energy.

Definition at line 141 of file PXDRecoHit.h.

◆ m_sensorID

unsigned short m_sensorID
privateinherited

Unique sensor identifier.

Definition at line 136 of file PXDRecoHit.h.

◆ m_trueHit

const PXDTrueHit* m_trueHit
privateinherited

Pointer to the TrueHit used when creating this object.

Definition at line 138 of file PXDRecoHit.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 AlignablePXDRecoHit.h.


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