Belle II Software development
PXDRecoHit.h
1/**************************************************************************
2 * basf2 (Belle II Analysis Software Framework) *
3 * Author: The Belle II Collaboration *
4 * *
5 * See git log for contributors and copyright holders. *
6 * This file is licensed under LGPL-3.0, see LICENSE.md. *
7 **************************************************************************/
8
9#pragma once
10
11#include <vxd/dataobjects/VxdID.h>
12#include <pxd/dataobjects/PXDTrueHit.h>
13#include <pxd/dataobjects/PXDCluster.h>
14
15// ROOT includes
16#include <TMatrixD.h>
17
18// GenFit includes
19#include <genfit/PlanarMeasurement.h>
20#include <genfit/HMatrixUV.h>
21#include <genfit/TrackCandHit.h>
22
23namespace Belle2 {
49 class PXDRecoHit: public genfit::PlanarMeasurement {
50 public:
51
53 PXDRecoHit();
54
68 explicit PXDRecoHit(const PXDTrueHit* hit, const genfit::TrackCandHit* trackCandHit = NULL, float sigmaU = -1, float sigmaV = -1);
69
78 explicit PXDRecoHit(const PXDCluster* hit, float sigmaU, float sigmaV, float covUV);
79
91 explicit PXDRecoHit(const PXDCluster* hit, const genfit::TrackCandHit* trackCandHit = NULL);
92
94 genfit::AbsMeasurement* clone() const override;
95
97 /* This method allows to provide hit position dependent on track direction. */
98 virtual std::vector<genfit::MeasurementOnPlane*> constructMeasurementsOnPlane(const genfit::StateOnPlane& state) const override;
99
101 VxdID getSensorID() const { return m_sensorID; }
102
104 const PXDTrueHit* getTrueHit() const { return m_trueHit; }
106 const PXDCluster* getCluster() const { return m_cluster; }
107
109 float getU() const { return rawHitCoords_(0); }
111 float getV() const { return rawHitCoords_(1); }
112
114 float getUVariance() const { return rawHitCov_(0, 0); }
116 float getVVariance() const { return rawHitCov_(1, 1); }
118 float getUVCov() const { return rawHitCov_(0, 1); }
119
121 float getEnergyDep() const { return m_energyDep; }
122
124 //float getEnergyDepError() const { return m_energyDepError; }
125
127 float getShapeLikelyhood(const genfit::StateOnPlane& state) const;
128
130 virtual const genfit::AbsHMatrix* constructHMatrix(const genfit::AbsTrackRep*) const override { return new genfit::HMatrixUV(); };
131
132 private:
133
134 enum { HIT_DIMENSIONS = 2 };
135
136 unsigned short m_sensorID;
142 //float m_energyDepError; /**< error in dep. energy.*/
143
145 void setDetectorPlane();
146
148 TVectorD applyPlanarDeformation(TVectorD hitCoords, std::vector<double> planarParameters, const genfit::StateOnPlane& state) const;
149
150 ClassDefOverride(PXDRecoHit, 8)
151 };
152
154} // namespace Belle2
The PXD Cluster class This class stores all information about reconstructed PXD clusters The position...
Definition: PXDCluster.h:30
PXDRecoHit - an extended form of PXDCluster containing geometry information.
Definition: PXDRecoHit.h:49
float getShapeLikelyhood(const genfit::StateOnPlane &state) const
Get deposited energy error.
Definition: PXDRecoHit.cc:136
@ HIT_DIMENSIONS
sensitive Dimensions of the Hit
Definition: PXDRecoHit.h:134
virtual std::vector< genfit::MeasurementOnPlane * > constructMeasurementsOnPlane(const genfit::StateOnPlane &state) const override
Methods that actually interface to Genfit.
Definition: PXDRecoHit.cc:191
float getV() const
Get v coordinate.
Definition: PXDRecoHit.h:111
float m_energyDep
transient member (not written out during streaming)
Definition: PXDRecoHit.h:141
float getUVariance() const
Get u coordinate variance.
Definition: PXDRecoHit.h:114
float getEnergyDep() const
Get deposited energy.
Definition: PXDRecoHit.h:121
unsigned short m_sensorID
Unique sensor identifier.
Definition: PXDRecoHit.h:136
const PXDTrueHit * getTrueHit() const
Get pointer to the TrueHit used when creating this RecoHit, can be NULL if created from something els...
Definition: PXDRecoHit.h:104
float getVVariance() const
Get v coordinate variance.
Definition: PXDRecoHit.h:116
const PXDTrueHit * m_trueHit
Pointer to the TrueHit used when creating this object.
Definition: PXDRecoHit.h:138
PXDRecoHit()
Default constructor for ROOT IO.
Definition: PXDRecoHit.cc:26
const PXDCluster * m_cluster
transient member (not written out during streaming)
Definition: PXDRecoHit.h:140
TVectorD applyPlanarDeformation(TVectorD hitCoords, std::vector< double > planarParameters, const genfit::StateOnPlane &state) const
Apply planar deformation of sensors.
Definition: PXDRecoHit.cc:148
void setDetectorPlane()
Set up Detector plane information.
Definition: PXDRecoHit.cc:116
float getUVCov() const
Get u-v error covariance.
Definition: PXDRecoHit.h:118
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
genfit::AbsMeasurement * clone() const override
Creating a deep copy of this hit.
Definition: PXDRecoHit.cc:110
virtual const genfit::AbsHMatrix * constructHMatrix(const genfit::AbsTrackRep *) const override
Construct the hessian matrix.
Definition: PXDRecoHit.h:130
float getU() const
Get u coordinate.
Definition: PXDRecoHit.h:109
Class PXDTrueHit - Records of tracks that either enter or leave the sensitive volume.
Definition: PXDTrueHit.h:31
Class to uniquely identify a any structure of the PXD and SVD.
Definition: VxdID.h:33
Abstract base class for different kinds of events.