Belle II Software development
WireLine.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 <tracking/trackFindingCDC/topology/WireLine.h>
9
10#include <framework/logging/Logger.h>
11
12using namespace Belle2;
13using namespace TrackFindingCDC;
14
16 const Vector3D& backward,
17 double sagCoeff)
18 : m_refPos3D{(backward * forward.z() - forward * backward.z()) / (forward.z() - backward.z()) }
19 , m_nominalMovePerZ{(forward.xy() - backward.xy()) / (forward.z() - backward.z())}
20 , m_forwardZ{forward.z()}
21 , m_backwardZ{backward.z()}
22 , m_sagCoeff(sagCoeff)
23{
24 B2ASSERT("Wire reference position is not at 0", m_refPos3D.z() == 0);
25}
26
28{
29 WireLine moved = *this;
30 moved.m_refPos3D += offset.xy() + nominalMovePerZ() * offset.z();
31 moved.m_forwardZ += offset.z();
32 moved.m_backwardZ += offset.z();
33 return moved;
34}
35
37{
38 WireLine moved = *this;
39 moved.m_refPos3D += offset;
40 return moved;
41}
A two dimensional vector which is equipped with functions for correct handeling of orientation relat...
Definition: Vector2D.h:32
A three dimensional vector.
Definition: Vector3D.h:33
const Vector2D & xy() const
Getter for the xy projected vector ( reference ! )
Definition: Vector3D.h:508
double z() const
Getter for the z coordinate.
Definition: Vector3D.h:496
A three dimensional limited line represented by its closest approach to the z-axes (reference positio...
Definition: WireLine.h:31
const Vector2D & nominalMovePerZ() const
Gives the positional move in the xy projection per unit z.
Definition: WireLine.h:71
double m_backwardZ
Memory for the backward end z coordinate.
Definition: WireLine.h:245
WireLine()
Default constructor initialising to all members to zero.
Definition: WireLine.h:35
double m_forwardZ
Memory for the forward end z coordinate.
Definition: WireLine.h:242
WireLine movedBy(const Vector3D &offset) const
Returns a copy of the wire line moved by a three dimensional offset.
Definition: WireLine.cc:27
Vector3D m_refPos3D
Memory for the reference postion.
Definition: WireLine.h:236
Abstract base class for different kinds of events.