Belle II Software development
OffOrigin.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#pragma once
9
10#include <tracking/trackFindingCDC/geometry/Vector2D.h>
11#include <tracking/trackFindingCDC/topology/ILayer.h>
12
13namespace Belle2 {
18 namespace TrackFindingCDC {
19
23 template<class T>
24 class OffOrigin : public T {
25
26 public:
28 using Super = T;
29
31 using T::T;
32
33 public:
35 using HoughBox = typename T::HoughBox;
36
37 public:
41 float x,
42 float y,
43 float signedDriftLength,
44 float dxdz = 0,
45 float dydz = 0,
46 ILayer /*iCLayer*/ = -1) const
47 {
48 return Super::getDistanceSign(houghBox,
51 signedDriftLength,
52 dxdz,
53 dydz,
54 -1);
55 }
56
57 public:
61
63 void setLocalOrigin(const Vector2D& localOrigin)
64 {
65 m_localOriginX = localOrigin.x();
66 m_localOriginY = localOrigin.y();
67 }
68 private:
70 float m_localOriginX = 0.0;
71
73 float m_localOriginY = 0.0;
74
75 };
76 }
78}
Takes a basic object and passivelly moves it to any origin All subordinary coordinates have to be int...
Definition: OffOrigin.h:24
typename T::HoughBox HoughBox
The houghBox to which this object correspondes.
Definition: OffOrigin.h:35
T Super
Type of the base class.
Definition: OffOrigin.h:28
void setLocalOrigin(const Vector2D &localOrigin)
Setter for the local origin relative to which the parameters of the hough space are understood.
Definition: OffOrigin.h:63
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:40
Vector2D getLocalOrigin() const
Getter for the local origin relative to which the parameters of the hough space are understood.
Definition: OffOrigin.h:59
float m_localOriginX
The local origin x to which the original plane is displaced.
Definition: OffOrigin.h:70
float m_localOriginY
The local origin y to which the original plane is displaced.
Definition: OffOrigin.h:73
A two dimensional vector which is equipped with functions for correct handeling of orientation relat...
Definition: Vector2D.h:32
double x() const
Getter for the x coordinate.
Definition: Vector2D.h:595
double y() const
Getter for the y coordinate.
Definition: Vector2D.h:605
ESign
Enumeration for the distinct sign values of floating point variables.
Definition: ESign.h:27
Abstract base class for different kinds of events.