Belle II Software development
CDCDedxHit.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#pragma once
10
11#include <framework/datastore/RelationsObject.h>
12#include <cdc/dataobjects/WireID.h>
13#include <Math/Vector3D.h>
14#include <cmath>
15
16namespace Belle2 {
26 class CDCDedxHit : public RelationsObject {
27
28 public:
29
34 {}
35
49 CDCDedxHit(WireID wireID, short TDC, unsigned short ADC,
50 const ROOT::Math::XYZVector& pocaMomentum,
51 const ROOT::Math::XYZVector& pocaOnTrack,
52 const ROOT::Math::XYZVector& pocaOnWire,
53 int foundByTrackFinder, double weightPionHypo, double weightKaonHypo, double weightProtHypo):
54 m_wireID(wireID), m_tdcCount(TDC), m_adcCount(ADC),
55 m_px(pocaMomentum.X()), m_py(pocaMomentum.Y()), m_pz(pocaMomentum.Z()),
56 m_x(pocaOnTrack.X()), m_y(pocaOnTrack.Y()), m_z(pocaOnTrack.Z()),
57 m_dx(pocaOnWire.X() - pocaOnTrack.X()), m_dy(pocaOnWire.Y() - pocaOnTrack.Y()), m_dz(pocaOnWire.Z() - pocaOnTrack.Z()),
58 m_foundByTrackFinder(foundByTrackFinder),
59 m_weightPionHypo(weightPionHypo), m_weightKaonHypo(weightKaonHypo), m_weightProtHypo(weightProtHypo)
60 {}
61
66 const WireID& getWireID() const {return m_wireID;}
67
72 short getTDCCount() const {return m_tdcCount;}
73
78 unsigned short getADCCount() const {return m_adcCount;}
79
84 ROOT::Math::XYZVector getPOCAMomentum() const {return ROOT::Math::XYZVector(m_px, m_py, m_pz);}
85
90 ROOT::Math::XYZVector getPOCAOnTrack() const {return ROOT::Math::XYZVector(m_x, m_y, m_z);}
91
96 ROOT::Math::XYZVector getPOCAOnWire() const {return ROOT::Math::XYZVector(m_x + m_dx, m_y + m_dy, m_z + m_dz);}
97
102 ROOT::Math::XYZVector getDOCAVector() const {return ROOT::Math::XYZVector(m_dx, m_dy, m_dz);}
103
108 double getDOCA() const {return std::sqrt(m_dx * m_dx + m_dy * m_dy + m_dz * m_dz);}
109
110
116 double getSignedDOCAXY() const;
117
123 double getEntranceAngle() const;
124
130
135 double getWeightPionHypo() const {return m_weightPionHypo;}
136
141 double getWeightKaonHypo() const {return m_weightKaonHypo;}
142
147 double getWeightProtonHypo() const {return m_weightProtHypo;}
148
149 private:
150
152 short m_tdcCount = 0;
153 unsigned short m_adcCount = 0;
154 float m_px = 0;
155 float m_py = 0;
156 float m_pz = 0;
157 float m_x = 0;
158 float m_y = 0;
159 float m_z = 0;
160 float m_dx = 0;
161 float m_dy = 0;
162 float m_dz = 0;
170 };
171
173} // end namespace Belle2
Class to store CDC hit information needed for dedx.
Definition: CDCDedxHit.h:26
short m_tdcCount
TDC count from CDCHit.
Definition: CDCDedxHit.h:152
double getWeightKaonHypo() const
Returns Kalman fitter weight for kaon hypothesis.
Definition: CDCDedxHit.h:141
CDCDedxHit()
default constructor
Definition: CDCDedxHit.h:33
ROOT::Math::XYZVector getPOCAMomentum() const
Returns momentum at point-of-closest-approach of track to wire.
Definition: CDCDedxHit.h:84
float m_weightPionHypo
Kalman fitter weight for pion hypothesis.
Definition: CDCDedxHit.h:164
const WireID & getWireID() const
Returns wire identifier.
Definition: CDCDedxHit.h:66
float m_dy
DOCA, y coordinate.
Definition: CDCDedxHit.h:161
ClassDef(CDCDedxHit, 1)
ClassDef.
double getWeightPionHypo() const
Returns Kalman fitter weight for pion hypothesis.
Definition: CDCDedxHit.h:135
float m_dx
DOCA, x coordinate.
Definition: CDCDedxHit.h:160
ROOT::Math::XYZVector getDOCAVector() const
Returns distance-of-closest-approach vector (pointing from track to wire)
Definition: CDCDedxHit.h:102
int getFoundByTrackFinder() const
Returns ID of track finder which added this hit.
Definition: CDCDedxHit.h:129
unsigned short m_adcCount
ADC count from CDCHit.
Definition: CDCDedxHit.h:153
float m_py
POCA momentum, y coordinate.
Definition: CDCDedxHit.h:155
short getTDCCount() const
Returns TDC count.
Definition: CDCDedxHit.h:72
ROOT::Math::XYZVector getPOCAOnTrack() const
Returns point-of-closest-approach on track.
Definition: CDCDedxHit.h:90
CDCDedxHit(WireID wireID, short TDC, unsigned short ADC, const ROOT::Math::XYZVector &pocaMomentum, const ROOT::Math::XYZVector &pocaOnTrack, const ROOT::Math::XYZVector &pocaOnWire, int foundByTrackFinder, double weightPionHypo, double weightKaonHypo, double weightProtHypo)
full constructor
Definition: CDCDedxHit.h:49
double getDOCA() const
Returns distance-of-closest-approach.
Definition: CDCDedxHit.h:108
float m_pz
POCA momentum, z coordinate.
Definition: CDCDedxHit.h:156
ROOT::Math::XYZVector getPOCAOnWire() const
Returns point-of-closest-approach on wire.
Definition: CDCDedxHit.h:96
WireID m_wireID
wire identifier
Definition: CDCDedxHit.h:151
float m_px
POCA momentum, x coordinate.
Definition: CDCDedxHit.h:154
double getWeightProtonHypo() const
Returns Kalman fitter weight for proton hypothesis.
Definition: CDCDedxHit.h:147
float m_weightKaonHypo
Kalman fitter weight for kaon hypothesis.
Definition: CDCDedxHit.h:165
float m_y
POCA on track, y coordinate.
Definition: CDCDedxHit.h:158
float m_dz
DOCA, z coordinate.
Definition: CDCDedxHit.h:162
unsigned short getADCCount() const
Returns ADC count.
Definition: CDCDedxHit.h:78
float m_weightProtHypo
Kalman fitter weight for proton hypothesis.
Definition: CDCDedxHit.h:166
int m_foundByTrackFinder
track finder ID (see enum Belle2::RecoHitInformation::OriginTrackFinder)
Definition: CDCDedxHit.h:163
float m_z
POCA on track, z coordinate.
Definition: CDCDedxHit.h:159
float m_x
POCA on track, x coordinate.
Definition: CDCDedxHit.h:157
Defines interface for accessing relations of objects in StoreArray.
Class to identify a wire inside the CDC.
Definition: WireID.h:34
double getSignedDOCAXY() const
Returns signed distance-of-closest-approach in XY projection.
Definition: CDCDedxHit.cc:16
double getEntranceAngle() const
Returns entrance angle to the cell in XY projection.
Definition: CDCDedxHit.cc:25
Abstract base class for different kinds of events.