Belle II Software  release-05-02-19
OffOrigin.h
1 /**************************************************************************
2  * BASF2 (Belle Analysis Framework 2) *
3  * Copyright(C) 2015 - Belle II Collaboration *
4  * *
5  * Author: The Belle II Collaboration *
6  * Contributors: Oliver Frost *
7  * *
8  * This software is provided "as is" without any warranty. *
9  **************************************************************************/
10 #pragma once
11 
12 #include <tracking/trackFindingCDC/geometry/Vector2D.h>
13 #include <tracking/trackFindingCDC/topology/ILayer.h>
14 
15 namespace Belle2 {
20  namespace TrackFindingCDC {
21 
25  template<class T>
26  class OffOrigin : public T {
27 
28  public:
30  using Super = T;
31 
33  using T::T;
34 
35  public:
37  using HoughBox = typename T::HoughBox;
38 
39  public:
42  ESign getDistanceSign(const HoughBox& houghBox,
43  float x,
44  float y,
45  float signedDriftLength,
46  float dxdz = 0,
47  float dydz = 0,
48  ILayer /*iCLayer*/ = -1) const
49  {
50  return Super::getDistanceSign(houghBox,
51  x - m_localOriginX,
52  y - m_localOriginY,
53  signedDriftLength,
54  dxdz,
55  dydz,
56  -1);
57  }
58 
59  public:
61  Vector2D getLocalOrigin() const
63 
65  void setLocalOrigin(const Vector2D& localOrigin)
66  {
67  m_localOriginX = localOrigin.x();
68  m_localOriginY = localOrigin.y();
69  }
70  private:
72  float m_localOriginX = 0.0;
73 
75  float m_localOriginY = 0.0;
76 
77  };
78  }
80 }
Belle2::TrackFindingCDC::OffOrigin::getDistanceSign
ESign getDistanceSign(const HoughBox &houghBox, float x, float y, float signedDriftLength, float dxdz=0, float dydz=0, ILayer=-1) const
Function that gives the sign of the distance from an observed drift circle to the sweeped object.
Definition: OffOrigin.h:50
Belle2::TrackFindingCDC::Vector2D
A two dimensional vector which is equipped with functions for correct handeling of orientation relat...
Definition: Vector2D.h:37
Belle2::TrackFindingCDC::ESignUtil::ESign
ESign
Enumeration for the distinct sign values of floating point variables.
Definition: ESign.h:37
Belle2::TrackFindingCDC::OffOrigin::HoughBox
typename T::HoughBox HoughBox
The houghBox to which this object correspondes.
Definition: OffOrigin.h:45
Belle2::TrackFindingCDC::OffOrigin::m_localOriginY
float m_localOriginY
The local origin y to which the original plane is displaced.
Definition: OffOrigin.h:83
Belle2::TrackFindingCDC::OffOrigin::getLocalOrigin
Vector2D getLocalOrigin() const
Getter for the local origin relative to which the parameters of the hough space are understood.
Definition: OffOrigin.h:69
Belle2
Abstract base class for different kinds of events.
Definition: MillepedeAlgorithm.h:19
Belle2::TrackFindingCDC::OffOrigin::Super
T Super
Type of the base class.
Definition: OffOrigin.h:38
Belle2::TrackFindingCDC::OffOrigin::setLocalOrigin
void setLocalOrigin(const Vector2D &localOrigin)
Setter for the local origin relative to which the parameters of the hough space are understood.
Definition: OffOrigin.h:73
Belle2::TrackFindingCDC::OffOrigin::m_localOriginX
float m_localOriginX
The local origin x to which the original plane is displaced.
Definition: OffOrigin.h:80