Belle II Software  release-05-02-19
SVDRecoHit.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 SVDRECOHIT_H_
12 #define SVDRECOHIT_H_
13 
14 #include <vxd/dataobjects/VxdID.h>
15 #include <svd/dataobjects/SVDTrueHit.h>
16 #include <svd/dataobjects/SVDCluster.h>
17 
18 // ROOT includes
19 #include <TMatrixD.h>
20 
21 // GenFit includes
22 #include <genfit/PlanarMeasurement.h>
23 #include <genfit/HMatrixU.h>
24 #include <genfit/HMatrixV.h>
25 #include <genfit/TrackCandHit.h>
26 
27 namespace Belle2 {
49  class SVDRecoHit: public genfit::PlanarMeasurement {
50  public:
52  SVDRecoHit();
53 
65  SVDRecoHit(const SVDTrueHit* hit, bool uDirection, float sigma = -1);
66 
72  explicit SVDRecoHit(const SVDCluster* hit, const genfit::TrackCandHit* trackCandHit = nullptr);
73 
75  virtual ~SVDRecoHit() {}
76 
80  genfit::AbsMeasurement* clone() const override;
81 
83  VxdID getSensorID() const { return m_sensorID; }
84 
86  const SVDTrueHit* getTrueHit() const { return m_trueHit; }
87 
89  const SVDCluster* getCluster() const { return m_cluster; }
90 
92  bool isU() const { return m_isU; }
93 
95  float getPosition() const { return rawHitCoords_(0); }
96 
98  float getPositionVariance() const { return rawHitCov_(0, 0); }
99 
101  float getEnergyDep() const { return m_energyDep; }
102 
104  float getRotation() const { return m_rotationPhi; }
105 
107  //virtual genfit::SharedPlanePtr constructPlane(const genfit::StateOnPlane&) const;
108  virtual std::vector<genfit::MeasurementOnPlane*> constructMeasurementsOnPlane(const genfit::StateOnPlane& state) const override;
109 
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;
120 
121  const SVDCluster* m_cluster;
122  bool m_isU;
123  float m_energyDep;
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_ */
Belle2::SVDRecoHit
SVDRecoHit - an extended form of SVDHit containing geometry information.
Definition: SVDRecoHit.h:57
Belle2::SVDRecoHit::HIT_DIMENSIONS
@ HIT_DIMENSIONS
sensitive Dimensions of the Hit
Definition: SVDRecoHit.h:123
Belle2::VxdID
Class to uniquely identify a any structure of the PXD and SVD.
Definition: VxdID.h:43
Belle2::SVDRecoHit::applyPlanarDeformation
TVectorD applyPlanarDeformation(TVectorD rawHit, std::vector< double > planarParameters, const genfit::StateOnPlane &state) const
Apply planar deformation of sensors.
Definition: SVDRecoHit.cc:116
Belle2::SVDRecoHit::constructMeasurementsOnPlane
virtual std::vector< genfit::MeasurementOnPlane * > constructMeasurementsOnPlane(const genfit::StateOnPlane &state) const override
Methods that actually interface to Genfit.
Definition: SVDRecoHit.cc:180
Belle2::SVDRecoHit::m_cluster
const SVDCluster * m_cluster
transient member (not written out during streaming)
Definition: SVDRecoHit.h:129
Belle2::SVDRecoHit::getTrueHit
const SVDTrueHit * getTrueHit() const
Get pointer to the TrueHit used when creating this RecoHit, can be NULL if created from something els...
Definition: SVDRecoHit.h:94
Belle2::SVDRecoHit::m_energyDep
float m_energyDep
deposited energy.
Definition: SVDRecoHit.h:131
genfit::StateOnPlane
A state with arbitrary dimension defined in a DetPlane.
Definition: StateOnPlane.h:47
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
genfit::AbsTrackRep
Abstract base class for a track representation.
Definition: AbsTrackRep.h:66
Belle2::SVDRecoHit::m_sensorID
unsigned short m_sensorID
Unique sensor identifier.
Definition: SVDRecoHit.h:125
genfit::PlanarMeasurement
Measurement class implementing a planar hit geometry (1 or 2D).
Definition: PlanarMeasurement.h:44
Belle2::SVDRecoHit::getEnergyDep
float getEnergyDep() const
Get deposited energy.
Definition: SVDRecoHit.h:109
genfit::HMatrixV
AbsHMatrix implementation for one-dimensional MeasurementOnPlane and RKTrackRep parameterization.
Definition: HMatrixV.h:37
Belle2::SVDRecoHit::m_rotationPhi
float m_rotationPhi
angle of the plane rotation, for u in wedge sensors.
Definition: SVDRecoHit.h:133
genfit::AbsMeasurement
Contains the measurement and covariance in raw detector coordinates.
Definition: AbsMeasurement.h:42
Belle2::SVDRecoHit::m_isU
bool m_isU
transient member (not written out during streaming)
Definition: SVDRecoHit.h:130
Belle2
Abstract base class for different kinds of events.
Definition: MillepedeAlgorithm.h:19
Belle2::SVDRecoHit::isU
bool isU() const
Is the coordinate u or v?
Definition: SVDRecoHit.h:100
Belle2::SVDRecoHit::m_trueHit
const SVDTrueHit * m_trueHit
Pointer to the Truehit used to generate this hit.
Definition: SVDRecoHit.h:127
genfit::HMatrixU
AbsHMatrix implementation for one-dimensional MeasurementOnPlane and RKTrackRep parameterization.
Definition: HMatrixU.h:37
Belle2::SVDRecoHit::~SVDRecoHit
virtual ~SVDRecoHit()
Destructor.
Definition: SVDRecoHit.h:83
Belle2::SVDCluster
The SVD Cluster class This class stores all information about reconstructed SVD clusters.
Definition: SVDCluster.h:38
Belle2::SVDRecoHit::constructHMatrix
virtual const genfit::AbsHMatrix * constructHMatrix(const genfit::AbsTrackRep *) const override
Returns a new AbsHMatrix object.
Definition: SVDRecoHit.h:119
genfit::AbsHMatrix
HMatrix for projecting from AbsTrackRep parameters to measured parameters in a DetPlane.
Definition: AbsHMatrix.h:37
Belle2::SVDRecoHit::getRotation
float getRotation() const
Get rotation angle.
Definition: SVDRecoHit.h:112
Belle2::SVDRecoHit::SVDRecoHit
SVDRecoHit()
Default constructor for ROOT IO.
Definition: SVDRecoHit.cc:25
Belle2::SVDRecoHit::setDetectorPlane
void setDetectorPlane()
Set up Detector plane information.
Definition: SVDRecoHit.cc:91
Belle2::SVDRecoHit::getPosition
float getPosition() const
Get coordinate.
Definition: SVDRecoHit.h:103
Belle2::SVDRecoHit::getPositionVariance
float getPositionVariance() const
Get coordinate variance.
Definition: SVDRecoHit.h:106
Belle2::SVDRecoHit::getSensorID
VxdID getSensorID() const
Get the compact ID.
Definition: SVDRecoHit.h:91
Belle2::SVDRecoHit::getCluster
const SVDCluster * getCluster() const
Get pointer to the Cluster used when creating this RecoHit, can be NULL if created from something els...
Definition: SVDRecoHit.h:97
Belle2::SVDRecoHit::clone
genfit::AbsMeasurement * clone() const override
Creating a deep copy of this hit.
Definition: SVDRecoHit.cc:111