Belle II Software development
CDCDedxHit.cc
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#include <cdc/dataobjects/CDCDedxHit.h>
9
10namespace Belle2 {
17 {
18 double doca = std::sqrt(m_dx * m_dx + m_dy * m_dy);
19 double z = m_dx * m_y - m_dy * m_x;
20 if (z < 0) doca = -doca;
21
22 return doca;
23 }
24
26 {
27 double px = m_px;
28 double py = m_py;
29 double wx = m_x + m_dx;
30 double wy = m_y + m_dy;
31 double cross = wx * py - wy * px;
32 double dot = wx * px + wy * py;
33
34 return std::atan2(cross, dot);
35 }
36
38} // end namespace Belle2
39
float m_dy
DOCA, y coordinate.
Definition: CDCDedxHit.h:161
float m_dx
DOCA, x coordinate.
Definition: CDCDedxHit.h:160
float m_py
POCA momentum, y coordinate.
Definition: CDCDedxHit.h:155
float m_px
POCA momentum, x coordinate.
Definition: CDCDedxHit.h:154
float m_y
POCA on track, y coordinate.
Definition: CDCDedxHit.h:158
float m_x
POCA on track, x coordinate.
Definition: CDCDedxHit.h:157
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
T dot(GeneralVector< T > a, GeneralVector< T > b)
dot product of two general vectors
Definition: beamHelpers.h:163
Abstract base class for different kinds of events.