Belle II Software  release-05-02-19
PXDRecoHit.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  * Benjamin Schwenker *
8  * *
9  * This software is provided "as is" without any warranty. *
10  **************************************************************************/
11 
12 #pragma once
13 
14 #include <vxd/dataobjects/VxdID.h>
15 #include <pxd/dataobjects/PXDTrueHit.h>
16 #include <pxd/dataobjects/PXDCluster.h>
17 
18 // ROOT includes
19 #include <TMatrixD.h>
20 
21 // GenFit includes
22 #include <genfit/PlanarMeasurement.h>
23 #include <genfit/HMatrixUV.h>
24 #include <genfit/TrackCandHit.h>
25 
26 namespace Belle2 {
52  class PXDRecoHit: public genfit::PlanarMeasurement {
53  public:
54 
56  PXDRecoHit();
57 
70  explicit PXDRecoHit(const PXDTrueHit* hit, const genfit::TrackCandHit* trackCandHit = NULL, float sigmaU = -1, float sigmaV = -1);
71 
80  explicit PXDRecoHit(const PXDCluster* hit, float sigmaU, float sigmaV, float covUV);
81 
92  explicit PXDRecoHit(const PXDCluster* hit, const genfit::TrackCandHit* trackCandHit = NULL);
93 
95  genfit::AbsMeasurement* clone() const override;
96 
98  /* This method allows to provide hit position dependent on track direction. */
99  virtual std::vector<genfit::MeasurementOnPlane*> constructMeasurementsOnPlane(const genfit::StateOnPlane& state) const override;
100 
102  VxdID getSensorID() const { return m_sensorID; }
103 
105  const PXDTrueHit* getTrueHit() const { return m_trueHit; }
107  const PXDCluster* getCluster() const { return m_cluster; }
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  float getShapeLikelyhood(const genfit::StateOnPlane& state) const;
129 
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;
138  const PXDTrueHit* m_trueHit;
139 
140  const PXDCluster* m_cluster;
141  float m_energyDep;
142  //float m_energyDepError; /**< error in dep. energy.*/
143 
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
Belle2::PXDTrueHit
Class PXDTrueHit - Records of tracks that either enter or leave the sensitive volume.
Definition: PXDTrueHit.h:35
Belle2::PXDRecoHit::getTrueHit
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:114
Belle2::PXDRecoHit::getVVariance
float getVVariance() const
Get v coordinate variance.
Definition: PXDRecoHit.h:126
genfit::StateOnPlane
A state with arbitrary dimension defined in a DetPlane.
Definition: StateOnPlane.h:47
genfit::HMatrixUV
AbsHMatrix implementation for two-dimensional MeasurementOnPlane and RKTrackRep parameterization.
Definition: HMatrixUV.h:39
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::PXDRecoHit::m_trueHit
const PXDTrueHit * m_trueHit
Pointer to the TrueHit used when creating this object.
Definition: PXDRecoHit.h:147
Belle2::PXDRecoHit
PXDRecoHit - an extended form of PXDCluster containing geometry information.
Definition: PXDRecoHit.h:61
genfit::PlanarMeasurement
Measurement class implementing a planar hit geometry (1 or 2D).
Definition: PlanarMeasurement.h:44
Belle2::PXDRecoHit::m_sensorID
unsigned short m_sensorID
Unique sensor identifier.
Definition: PXDRecoHit.h:145
Belle2::PXDRecoHit::clone
genfit::AbsMeasurement * clone() const override
Creating a deep copy of this hit.
Definition: PXDRecoHit.cc:113
genfit::AbsMeasurement
Contains the measurement and covariance in raw detector coordinates.
Definition: AbsMeasurement.h:42
Belle2::PXDRecoHit::m_cluster
const PXDCluster * m_cluster
transient member (not written out during streaming)
Definition: PXDRecoHit.h:149
Belle2::PXDRecoHit::PXDRecoHit
PXDRecoHit()
Default constructor for ROOT IO.
Definition: PXDRecoHit.cc:29
Belle2::PXDRecoHit::getUVCov
float getUVCov() const
Get u-v error covariance.
Definition: PXDRecoHit.h:128
Belle2
Abstract base class for different kinds of events.
Definition: MillepedeAlgorithm.h:19
Belle2::PXDRecoHit::HIT_DIMENSIONS
@ HIT_DIMENSIONS
sensitive Dimensions of the Hit
Definition: PXDRecoHit.h:143
Belle2::PXDRecoHit::setDetectorPlane
void setDetectorPlane()
Set up Detector plane information.
Definition: PXDRecoHit.cc:119
Belle2::PXDRecoHit::getUVariance
float getUVariance() const
Get u coordinate variance.
Definition: PXDRecoHit.h:124
Belle2::PXDRecoHit::constructHMatrix
virtual const genfit::AbsHMatrix * constructHMatrix(const genfit::AbsTrackRep *) const override
Returns a new AbsHMatrix object.
Definition: PXDRecoHit.h:139
Belle2::PXDRecoHit::getU
float getU() const
Get u coordinate.
Definition: PXDRecoHit.h:119
Belle2::PXDRecoHit::getSensorID
VxdID getSensorID() const
Get the compact ID.
Definition: PXDRecoHit.h:111
Belle2::PXDCluster
The PXD Cluster class This class stores all information about reconstructed PXD clusters The position...
Definition: PXDCluster.h:41
Belle2::PXDRecoHit::m_energyDep
float m_energyDep
transient member (not written out during streaming)
Definition: PXDRecoHit.h:150
Belle2::PXDRecoHit::getCluster
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:116
Belle2::PXDRecoHit::constructMeasurementsOnPlane
virtual std::vector< genfit::MeasurementOnPlane * > constructMeasurementsOnPlane(const genfit::StateOnPlane &state) const override
Methods that actually interface to Genfit.
Definition: PXDRecoHit.cc:193
Belle2::PXDRecoHit::getEnergyDep
float getEnergyDep() const
Get deposited energy.
Definition: PXDRecoHit.h:131
genfit::AbsHMatrix
HMatrix for projecting from AbsTrackRep parameters to measured parameters in a DetPlane.
Definition: AbsHMatrix.h:37
Belle2::PXDRecoHit::getV
float getV() const
Get v coordinate.
Definition: PXDRecoHit.h:121
Belle2::PXDRecoHit::getShapeLikelyhood
float getShapeLikelyhood(const genfit::StateOnPlane &state) const
Get deposited energy error.
Definition: PXDRecoHit.cc:138
Belle2::PXDRecoHit::applyPlanarDeformation
TVectorD applyPlanarDeformation(TVectorD hitCoords, std::vector< double > planarParameters, const genfit::StateOnPlane &state) const
Apply planar deformation of sensors.
Definition: PXDRecoHit.cc:150