ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
Tracking
TrkUtilityPackages
TrkDriftCircleMath
TrkDriftCircleMath
RotPhi.h
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
3
*/
4
5
#ifndef DCMATH_ROTPHI_H
6
#define DCMATH_ROTPHI_H
7
8
#include <cmath>
9
10
#include "
TrkDriftCircleMath/LocVec2D.h
"
11
12
namespace
TrkDriftCircleMath
{
13
14
class
RotPhi
{
15
public
:
16
RotPhi
(
double
phi
) :
m_phi
{
phi
},
m_cosphi
{
std
::cos(
phi
)},
m_sinphi
{
std
::sin(
phi
)} {}
17
18
RotPhi
(
const
RotPhi
&) =
default
;
19
RotPhi
(
RotPhi
&&) =
default
;
20
21
RotPhi
&
operator=
(
RotPhi
&&) =
default
;
22
RotPhi
&
operator=
(
const
RotPhi
&) =
default
;
23
24
double
phi
()
const
{
return
m_phi
; }
25
double
cosphi
()
const
{
return
m_cosphi
; }
26
double
sinphi
()
const
{
return
m_sinphi
; }
27
28
double
xval
(
const
LocVec2D
& lv)
const
{
return
cosphi
() * lv.
x
() +
sinphi
() * lv.
y
(); }
29
double
yval
(
const
LocVec2D
& lv)
const
{
return
-
sinphi
() * lv.
x
() +
cosphi
() * lv.
y
(); }
30
LocVec2D
operator*
(
const
LocVec2D
& lv)
const
{
return
LocVec2D
{
xval
(lv),
yval
(lv)}; }
31
32
RotPhi
inverse
()
const
{
return
RotPhi
(-
phi
()); }
33
34
void
set
(
double
phi
) {
35
m_phi
=
phi
;
36
m_cosphi
= std::cos(
phi
);
37
m_sinphi
= std::sin(
phi
);
38
}
39
40
private
:
41
double
m_phi
{0};
42
double
m_cosphi
{0};
43
double
m_sinphi
{0};
44
};
45
46
}
// namespace TrkDriftCircleMath
47
#endif
LocVec2D.h
TrkDriftCircleMath::LocVec2D
Implementation of 2 dimensional vector class.
Definition
LocVec2D.h:16
TrkDriftCircleMath::LocVec2D::y
double y() const
Returns the y coordinate of the vector.
Definition
LocVec2D.h:29
TrkDriftCircleMath::LocVec2D::x
double x() const
Returns the x coordinate of the vector.
Definition
LocVec2D.h:27
TrkDriftCircleMath::RotPhi::operator*
LocVec2D operator*(const LocVec2D &lv) const
Definition
RotPhi.h:30
TrkDriftCircleMath::RotPhi::inverse
RotPhi inverse() const
Definition
RotPhi.h:32
TrkDriftCircleMath::RotPhi::operator=
RotPhi & operator=(RotPhi &&)=default
TrkDriftCircleMath::RotPhi::m_cosphi
double m_cosphi
Definition
RotPhi.h:42
TrkDriftCircleMath::RotPhi::phi
double phi() const
Definition
RotPhi.h:24
TrkDriftCircleMath::RotPhi::xval
double xval(const LocVec2D &lv) const
Definition
RotPhi.h:28
TrkDriftCircleMath::RotPhi::cosphi
double cosphi() const
Definition
RotPhi.h:25
TrkDriftCircleMath::RotPhi::yval
double yval(const LocVec2D &lv) const
Definition
RotPhi.h:29
TrkDriftCircleMath::RotPhi::m_sinphi
double m_sinphi
Definition
RotPhi.h:43
TrkDriftCircleMath::RotPhi::operator=
RotPhi & operator=(const RotPhi &)=default
TrkDriftCircleMath::RotPhi::RotPhi
RotPhi(const RotPhi &)=default
TrkDriftCircleMath::RotPhi::set
void set(double phi)
Definition
RotPhi.h:34
TrkDriftCircleMath::RotPhi::RotPhi
RotPhi(double phi)
Definition
RotPhi.h:16
TrkDriftCircleMath::RotPhi::sinphi
double sinphi() const
Definition
RotPhi.h:26
TrkDriftCircleMath::RotPhi::m_phi
double m_phi
Definition
RotPhi.h:41
TrkDriftCircleMath::RotPhi::RotPhi
RotPhi(RotPhi &&)=default
TrkDriftCircleMath
Function object to check whether two Segments are sub/super sets or different.
Definition
IMdtSegmentFinder.h:13
std
STL namespace.
Generated on
for ATLAS Offline Software by
1.17.0