Belle II Software  release-05-02-19
SVDRecoHit2D.h
1 /**************************************************************************
2  * BASF2 (Belle Analysis Framework 2) *
3  * Copyright(C) 2010 - Belle II Collaboration *
4  * *
5  * Author: The Belle II Collaboration *
6  * Contributors: Peter Kvasnicka, Martin Ritter, Moritz Nadler *
7  * *
8  * This software is provided "as is" without any warranty. *
9  **************************************************************************/
10 
11 #ifndef SVDRECOHIT2D_H_
12 #define SVDRECOHIT2D_H_
13 
14 #include <vxd/dataobjects/VxdID.h>
15 #include <svd/dataobjects/SVDTrueHit.h>
16 #include <svd/dataobjects/SVDCluster.h>
17 #include <svd/reconstruction/SVDRecoHit.h>
18 
19 // ROOT includes
20 #include <TMatrixD.h>
21 
22 // GenFit includes
23 #include <genfit/PlanarMeasurement.h>
24 #include <genfit/TrackCandHit.h>
25 
26 namespace Belle2 {
48  class SVDRecoHit2D: public genfit::PlanarMeasurement {
49  public:
51  SVDRecoHit2D();
52 
65  explicit SVDRecoHit2D(const SVDTrueHit* hit, const genfit::TrackCandHit* trackCandHit = nullptr, float sigmaU = -1,
66  float sigmaV = -1);
67 
68 
78  SVDRecoHit2D(VxdID::baseType vxdid, const double u, const double v, double sigmaU = -1, double sigmaV = -1);
79 
84  SVDRecoHit2D(const SVDCluster& uHit, const SVDCluster& vHit);
85 
90  SVDRecoHit2D(const SVDRecoHit& uRecoHit, const SVDRecoHit& vRecoHit);
91 
93  virtual ~SVDRecoHit2D() {}
94 
98  genfit::AbsMeasurement* clone() const override;
99 
101  VxdID getSensorID() const { return m_sensorID; }
102 
104  const SVDTrueHit* getTrueHit() const { return m_trueHit; }
106  const SVDCluster* getUCluster() const {return m_uCluster; }
108  const SVDCluster* getVCluster() const {return m_vCluster; }
109 
111  float getU() const { return rawHitCoords_(0); }
113  float getV() const { return rawHitCoords_(1); }
114 
116  float getUVariance() const { return rawHitCov_(0, 0); }
118  float getVVariance() const { return rawHitCov_(1, 1); }
120  float getUVCov() const { return rawHitCov_(0, 1); }
121 
123  float getEnergyDep() const { return m_energyDep; }
124 
126  //float getEnergyDepError() const { return m_energyDepError; }
127 
129  //virtual genfit::SharedPlanePtr constructPlane(const genfit::StateOnPlane&) const;
130  virtual std::vector<genfit::MeasurementOnPlane*> constructMeasurementsOnPlane(const genfit::StateOnPlane& state) const override;
131 
132  private:
133 
134  enum { HIT_DIMENSIONS = 2 };
135 
136  unsigned short m_sensorID;
137  const SVDTrueHit* m_trueHit;
138  const SVDCluster* m_uCluster;
139  const SVDCluster* m_vCluster;
141  float m_energyDep;
142  //float m_energyDepError; /**< error in dep. energy.*/
143 
146 
148  TVectorD applyPlanarDeformation(TVectorD rawHit, std::vector<double> planarParameters, const genfit::StateOnPlane& state) const;
149 
150  ClassDefOverride(SVDRecoHit2D, 7)
151  };
152 
154 } // namespace Belle2
155 
156 #endif /* SVDRECOHIT_H_ */
Belle2::SVDRecoHit2D::constructMeasurementsOnPlane
virtual std::vector< genfit::MeasurementOnPlane * > constructMeasurementsOnPlane(const genfit::StateOnPlane &state) const override
Get deposited energy error.
Definition: SVDRecoHit2D.cc:217
Belle2::SVDRecoHit2D::m_vCluster
const SVDCluster * m_vCluster
Pointer to mother vCluster.
Definition: SVDRecoHit2D.h:147
Belle2::VxdID
Class to uniquely identify a any structure of the PXD and SVD.
Definition: VxdID.h:43
Belle2::SVDRecoHit2D::setDetectorPlane
void setDetectorPlane()
Set up Detector plane information.
Definition: SVDRecoHit2D.cc:159
Belle2::SVDRecoHit2D::getU
float getU() const
Get u coordinate.
Definition: SVDRecoHit2D.h:119
Belle2::SVDRecoHit2D::HIT_DIMENSIONS
@ HIT_DIMENSIONS
sensitive Dimensions of the Hit
Definition: SVDRecoHit2D.h:142
Belle2::SVDRecoHit2D::m_trueHit
const SVDTrueHit * m_trueHit
Pointer to the Truehit used to generate this hit.
Definition: SVDRecoHit2D.h:145
genfit::StateOnPlane
A state with arbitrary dimension defined in a DetPlane.
Definition: StateOnPlane.h:47
Belle2::SVDRecoHit2D::getTrueHit
const SVDTrueHit * getTrueHit() const
Get pointer to the TrueHit used when creating this RecoHit, can be NULL if created from something els...
Definition: SVDRecoHit2D.h:112
Belle2::SVDTrueHit
Class SVDTrueHit - Records of tracks that either enter or leave the sensitive volume.
Definition: SVDTrueHit.h:35
genfit::TrackCandHit
Hit object for use in TrackCand.
Definition: TrackCandHit.h:34
Belle2::SVDRecoHit2D::getUVariance
float getUVariance() const
Get u coordinate variance.
Definition: SVDRecoHit2D.h:124
Belle2::SVDRecoHit2D::getUVCov
float getUVCov() const
Get u-v error covariance.
Definition: SVDRecoHit2D.h:128
Belle2::SVDRecoHit2D::m_uCluster
const SVDCluster * m_uCluster
Pointer to mother uCluster.
Definition: SVDRecoHit2D.h:146
Belle2::SVDRecoHit2D::getUCluster
const SVDCluster * getUCluster() const
Get pointer to the u cluster used to create this RecoHit.
Definition: SVDRecoHit2D.h:114
genfit::PlanarMeasurement
Measurement class implementing a planar hit geometry (1 or 2D).
Definition: PlanarMeasurement.h:44
genfit::AbsMeasurement
Contains the measurement and covariance in raw detector coordinates.
Definition: AbsMeasurement.h:42
Belle2::VxdID::baseType
unsigned short baseType
The base integer type for VxdID.
Definition: VxdID.h:46
Belle2::SVDRecoHit2D::getVVariance
float getVVariance() const
Get v coordinate variance.
Definition: SVDRecoHit2D.h:126
Belle2::SVDRecoHit2D::getSensorID
VxdID getSensorID() const
Get the compact ID.
Definition: SVDRecoHit2D.h:109
Belle2
Abstract base class for different kinds of events.
Definition: MillepedeAlgorithm.h:19
Belle2::SVDRecoHit2D::getV
float getV() const
Get v coordinate.
Definition: SVDRecoHit2D.h:121
Belle2::SVDRecoHit2D::m_sensorID
unsigned short m_sensorID
Unique sensor identifier.
Definition: SVDRecoHit2D.h:144
Belle2::SVDRecoHit2D::m_energyDep
float m_energyDep
deposited energy.
Definition: SVDRecoHit2D.h:149
Belle2::SVDRecoHit2D::applyPlanarDeformation
TVectorD applyPlanarDeformation(TVectorD rawHit, std::vector< double > planarParameters, const genfit::StateOnPlane &state) const
Apply planar deformation of sensors.
Definition: SVDRecoHit2D.cc:174
Belle2::SVDRecoHit2D
SVDRecoHit - an extended form of SVDHit containing geometry information.
Definition: SVDRecoHit2D.h:56
Belle2::SVDCluster
The SVD Cluster class This class stores all information about reconstructed SVD clusters.
Definition: SVDCluster.h:38
Belle2::SVDRecoHit2D::~SVDRecoHit2D
virtual ~SVDRecoHit2D()
Destructor.
Definition: SVDRecoHit2D.h:101
Belle2::SVDRecoHit2D::getVCluster
const SVDCluster * getVCluster() const
Get pointer to the u cluster used to create this RecoHit.
Definition: SVDRecoHit2D.h:116
Belle2::SVDRecoHit2D::clone
genfit::AbsMeasurement * clone() const override
Creating a deep copy of this hit.
Definition: SVDRecoHit2D.cc:226
Belle2::SVDRecoHit2D::SVDRecoHit2D
SVDRecoHit2D()
Default constructor for ROOT IO.
Definition: SVDRecoHit2D.cc:25
Belle2::SVDRecoHit2D::getEnergyDep
float getEnergyDep() const
Get deposited energy.
Definition: SVDRecoHit2D.h:131