Belle II Software  release-08-01-10
SVDRecoHit2D.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 SVDRECOHIT2D_H_
10 #define SVDRECOHIT2D_H_
11 
12 #include <vxd/dataobjects/VxdID.h>
13 #include <svd/dataobjects/SVDTrueHit.h>
14 #include <svd/dataobjects/SVDCluster.h>
15 #include <svd/reconstruction/SVDRecoHit.h>
16 
17 // ROOT includes
18 #include <TMatrixD.h>
19 
20 // GenFit includes
21 #include <genfit/PlanarMeasurement.h>
22 #include <genfit/TrackCandHit.h>
23 
24 namespace Belle2 {
47  public:
49  SVDRecoHit2D();
50 
64  explicit SVDRecoHit2D(const SVDTrueHit* hit, const genfit::TrackCandHit* trackCandHit = nullptr, float sigmaU = -1,
65  float sigmaV = -1);
66 
67 
77  SVDRecoHit2D(VxdID::baseType vxdid, const double u, const double v, double sigmaU = -1, double sigmaV = -1);
78 
83  SVDRecoHit2D(const SVDCluster& uHit, const SVDCluster& vHit);
84 
89  SVDRecoHit2D(const SVDRecoHit& uRecoHit, const SVDRecoHit& vRecoHit);
90 
92  virtual ~SVDRecoHit2D() {}
93 
97  genfit::AbsMeasurement* clone() const override;
98 
100  VxdID getSensorID() const { return m_sensorID; }
101 
103  const SVDTrueHit* getTrueHit() const { return m_trueHit; }
105  const SVDCluster* getUCluster() const {return m_uCluster; }
107  const SVDCluster* getVCluster() const {return m_vCluster; }
108 
110  float getU() const { return rawHitCoords_(0); }
112  float getV() const { return rawHitCoords_(1); }
113 
115  float getUVariance() const { return rawHitCov_(0, 0); }
117  float getVVariance() const { return rawHitCov_(1, 1); }
119  float getUVCov() const { return rawHitCov_(0, 1); }
120 
122  float getEnergyDep() const { return m_energyDep; }
123 
125  //float getEnergyDepError() const { return m_energyDepError; }
126 
128  //virtual genfit::SharedPlanePtr constructPlane(const genfit::StateOnPlane&) const;
129  virtual std::vector<genfit::MeasurementOnPlane*> constructMeasurementsOnPlane(const genfit::StateOnPlane& state) const override;
130 
131  private:
132 
133  enum { HIT_DIMENSIONS = 2 };
134 
135  unsigned short m_sensorID;
140  float m_energyDep;
141  //float m_energyDepError; /**< error in dep. energy.*/
142 
144  void setDetectorPlane();
145 
147  TVectorD applyPlanarDeformation(TVectorD rawHit, std::vector<double> planarParameters, const genfit::StateOnPlane& state) const;
148 
149  ClassDefOverride(SVDRecoHit2D, 7)
150  };
151 
153 } // namespace Belle2
154 
155 #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: SVDRecoHit2D.h:46
virtual std::vector< genfit::MeasurementOnPlane * > constructMeasurementsOnPlane(const genfit::StateOnPlane &state) const override
Get deposited energy error.
float getV() const
Get v coordinate.
Definition: SVDRecoHit2D.h:112
const SVDTrueHit * m_trueHit
Pointer to the Truehit used to generate this hit.
Definition: SVDRecoHit2D.h:136
TVectorD applyPlanarDeformation(TVectorD rawHit, std::vector< double > planarParameters, const genfit::StateOnPlane &state) const
Apply planar deformation of sensors.
float m_energyDep
deposited energy.
Definition: SVDRecoHit2D.h:140
float getUVariance() const
Get u coordinate variance.
Definition: SVDRecoHit2D.h:115
float getEnergyDep() const
Get deposited energy.
Definition: SVDRecoHit2D.h:122
unsigned short m_sensorID
Unique sensor identifier.
Definition: SVDRecoHit2D.h:135
const SVDCluster * getUCluster() const
Get pointer to the u cluster used to create this RecoHit.
Definition: SVDRecoHit2D.h:105
@ HIT_DIMENSIONS
sensitive Dimensions of the Hit
Definition: SVDRecoHit2D.h:133
const SVDCluster * m_uCluster
Pointer to mother uCluster.
Definition: SVDRecoHit2D.h:137
const SVDCluster * getVCluster() const
Get pointer to the u cluster used to create this RecoHit.
Definition: SVDRecoHit2D.h:107
virtual ~SVDRecoHit2D()
Destructor.
Definition: SVDRecoHit2D.h:92
const SVDTrueHit * getTrueHit() const
Get pointer to the TrueHit used when creating this RecoHit, can be nullptr if created from something ...
Definition: SVDRecoHit2D.h:103
float getVVariance() const
Get v coordinate variance.
Definition: SVDRecoHit2D.h:117
void setDetectorPlane()
Set up Detector plane information.
float getUVCov() const
Get u-v error covariance.
Definition: SVDRecoHit2D.h:119
VxdID getSensorID() const
Get the compact ID.
Definition: SVDRecoHit2D.h:100
genfit::AbsMeasurement * clone() const override
Creating a deep copy of this hit.
float getU() const
Get u coordinate.
Definition: SVDRecoHit2D.h:110
SVDRecoHit2D()
Default constructor for ROOT IO.
Definition: SVDRecoHit2D.cc:24
const SVDCluster * m_vCluster
Pointer to mother vCluster.
Definition: SVDRecoHit2D.h:138
SVDRecoHit - an extended form of SVDHit containing geometry information.
Definition: SVDRecoHit.h:47
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
unsigned short baseType
The base integer type for VxdID.
Definition: VxdID.h:36
Contains the measurement and covariance in raw detector coordinates.
Measurement class implementing a planar hit geometry (1 or 2D).
A state with arbitrary dimension defined in a DetPlane.
Definition: StateOnPlane.h:47
Hit object for use in TrackCand.
Definition: TrackCandHit.h:34
Abstract base class for different kinds of events.