Belle II Software development
SVDRecoHit.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#ifndef SVDRECOHIT_H_
10#define SVDRECOHIT_H_
11
12#include <vxd/dataobjects/VxdID.h>
13#include <svd/dataobjects/SVDTrueHit.h>
14#include <svd/dataobjects/SVDCluster.h>
15
16// ROOT includes
17#include <TMatrixD.h>
18
19// GenFit includes
20#include <genfit/PlanarMeasurement.h>
21#include <genfit/HMatrixU.h>
22#include <genfit/HMatrixV.h>
23#include <genfit/TrackCandHit.h>
24
25namespace Belle2 {
47 class SVDRecoHit: public genfit::PlanarMeasurement {
48 public:
50 SVDRecoHit();
51
63 SVDRecoHit(const SVDTrueHit* hit, bool uDirection, float sigma = -1);
64
71 explicit SVDRecoHit(const SVDCluster* hit, const genfit::TrackCandHit* trackCandHit = nullptr);
72
74 virtual ~SVDRecoHit() {}
75
79 genfit::AbsMeasurement* clone() const override;
80
82 VxdID getSensorID() const { return m_sensorID; }
83
85 const SVDTrueHit* getTrueHit() const { return m_trueHit; }
86
88 const SVDCluster* getCluster() const { return m_cluster; }
89
91 bool isU() const { return m_isU; }
92
94 float getPosition() const { return rawHitCoords_(0); }
95
97 float getPositionVariance() const { return rawHitCov_(0, 0); }
98
100 float getEnergyDep() const { return m_energyDep; }
101
103 float getRotation() const { return m_rotationPhi; }
104
106 //virtual genfit::SharedPlanePtr constructPlane(const genfit::StateOnPlane&) const;
107 virtual std::vector<genfit::MeasurementOnPlane*> constructMeasurementsOnPlane(const genfit::StateOnPlane& state) const override;
108
110 // TODO: use HMatrixPhi for wedge sensors instead of rotating the plane!
111 virtual const genfit::AbsHMatrix* constructHMatrix(const genfit::AbsTrackRep*) const override { if (m_isU) return new genfit::HMatrixU(); else return new genfit::HMatrixV(); }
112
113 private:
114
115 enum { HIT_DIMENSIONS = 1 };
116
117 unsigned short m_sensorID;
122 bool m_isU;
124 //float m_energyDepError; /**< error in dep. energy.*/
128 void setDetectorPlane();
129
131 TVectorD applyPlanarDeformation(TVectorD rawHit, std::vector<double> planarParameters, const genfit::StateOnPlane& state) const;
132
133 ClassDefOverride(SVDRecoHit, 7)
134 };
135
137} // namespace Belle2
138
139#endif /* SVDRECOHIT_H_ */
The SVD Cluster class This class stores all information about reconstructed SVD clusters.
Definition: SVDCluster.h:29
SVDRecoHit - an extended form of SVDHit containing geometry information.
Definition: SVDRecoHit.h:47
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
float getRotation() const
Get rotation angle.
Definition: SVDRecoHit.h:103
virtual std::vector< genfit::MeasurementOnPlane * > constructMeasurementsOnPlane(const genfit::StateOnPlane &state) const override
Methods that actually interface to Genfit.
Definition: SVDRecoHit.cc:179
bool isU() const
Is the coordinate u or v?
Definition: SVDRecoHit.h:91
const SVDTrueHit * m_trueHit
Pointer to the Truehit used to generate this hit.
Definition: SVDRecoHit.h:119
TVectorD applyPlanarDeformation(TVectorD rawHit, std::vector< double > planarParameters, const genfit::StateOnPlane &state) const
Apply planar deformation of sensors.
Definition: SVDRecoHit.cc:115
float m_energyDep
deposited energy.
Definition: SVDRecoHit.h:123
bool m_isU
transient member (not written out during streaming)
Definition: SVDRecoHit.h:122
virtual ~SVDRecoHit()
Destructor.
Definition: SVDRecoHit.h:74
float getEnergyDep() const
Get deposited energy.
Definition: SVDRecoHit.h:100
unsigned short m_sensorID
Unique sensor identifier.
Definition: SVDRecoHit.h:117
float getPositionVariance() const
Get coordinate variance.
Definition: SVDRecoHit.h:97
const SVDTrueHit * getTrueHit() const
Get pointer to the TrueHit used when creating this RecoHit, can be nullptr if created from something ...
Definition: SVDRecoHit.h:85
@ HIT_DIMENSIONS
sensitive Dimensions of the Hit
Definition: SVDRecoHit.h:115
float getPosition() const
Get coordinate.
Definition: SVDRecoHit.h:94
void setDetectorPlane()
Set up Detector plane information.
Definition: SVDRecoHit.cc:89
float m_rotationPhi
angle of the plane rotation, for u in wedge sensors.
Definition: SVDRecoHit.h:125
VxdID getSensorID() const
Get the compact ID.
Definition: SVDRecoHit.h:82
genfit::AbsMeasurement * clone() const override
Creating a deep copy of this hit.
Definition: SVDRecoHit.cc:110
virtual const genfit::AbsHMatrix * constructHMatrix(const genfit::AbsTrackRep *) const override
Methods that actually interface to Genfit.
Definition: SVDRecoHit.h:111
const SVDCluster * m_cluster
transient member (not written out during streaming)
Definition: SVDRecoHit.h:121
SVDRecoHit()
Default constructor for ROOT IO.
Definition: SVDRecoHit.cc:23
Class SVDTrueHit - Records of tracks that either enter or leave the sensitive volume.
Definition: SVDTrueHit.h:33
Class to uniquely identify a any structure of the PXD and SVD.
Definition: VxdID.h:33
Abstract base class for different kinds of events.