ATLAS Offline Software
Loading...
Searching...
No Matches
InnerDetector
InDetDetDescr
SCT_ReadoutGeometry
src
SCT_ForwardPolarPosition.cxx
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
3
*/
4
6
// SCT_ForwardPolarPosition.cxx
7
// Implementation file for class SCT_ForwardPolarPosition
9
// (c) ATLAS Detector software
11
// Version 1.0a 1/6/2001 Class creator tool
13
14
#include "
SCT_ReadoutGeometry/SCT_ForwardPolarPosition.h
"
15
#include <sstream>
16
17
namespace
InDetDD
{
18
19
// Implicit constructor:
20
SCT_ForwardPolarPosition::SCT_ForwardPolarPosition
() :
21
m_r
(0),
22
m_theta
(0)
23
{}
24
25
// Copy constructor:
26
SCT_ForwardPolarPosition::SCT_ForwardPolarPosition
(
const
SCT_ForwardPolarPosition
&polar)
27
28
=
default
;
29
30
// Constructor with parameters:
31
SCT_ForwardPolarPosition::SCT_ForwardPolarPosition
(
const
double
r
,
const
double
theta
) :
32
m_r
(
r
),
33
m_theta
(
theta
)
34
{
35
//check if parameters are consistent
36
if
(
m_r
<0)
m_r
=0;
37
}
38
39
// Assignment operator:
40
SCT_ForwardPolarPosition
&
SCT_ForwardPolarPosition::operator=
(
const
SCT_ForwardPolarPosition
&polar)
41
{
42
if
(
this
!=&polar) {
43
m_r
=polar.
m_r
;
44
m_theta
=polar.
m_theta
;
45
}
else
{}
46
return
*
this
;
47
}
48
49
//Comparison operator
50
bool
SCT_ForwardPolarPosition::operator==
(
const
SCT_ForwardPolarPosition
&polar)
const
51
{
52
return
(
m_r
==polar.
m_r
&&
m_theta
==polar.
m_theta
);
53
}
54
55
//Print method:
56
std::string
SCT_ForwardPolarPosition::print
()
const
57
{
58
std::string result{
"r = "
};
59
result += std::to_string(
m_r
) +
" theta = "
+ std::to_string(
m_theta
);
60
return
result;
61
}
62
63
}
// namespace InDetDD
SCT_ForwardPolarPosition.h
InDetDD::SCT_ForwardPolarPosition
2D position in polar coordinates for the polar frame in the SCT endcaps.
Definition
SCT_ForwardPolarPosition.h:25
InDetDD::SCT_ForwardPolarPosition::theta
double theta() const
theta coordinate of point:
Definition
SCT_ForwardPolarPosition.h:79
InDetDD::SCT_ForwardPolarPosition::SCT_ForwardPolarPosition
SCT_ForwardPolarPosition()
Definition
SCT_ForwardPolarPosition.cxx:20
InDetDD::SCT_ForwardPolarPosition::operator==
virtual bool operator==(const SCT_ForwardPolarPosition &polar) const
Definition
SCT_ForwardPolarPosition.cxx:50
InDetDD::SCT_ForwardPolarPosition::r
double r() const
r coordinate of point:
Definition
SCT_ForwardPolarPosition.h:74
InDetDD::SCT_ForwardPolarPosition::m_theta
double m_theta
Definition
SCT_ForwardPolarPosition.h:67
InDetDD::SCT_ForwardPolarPosition::print
virtual std::string print() const
Definition
SCT_ForwardPolarPosition.cxx:56
InDetDD::SCT_ForwardPolarPosition::m_r
double m_r
Definition
SCT_ForwardPolarPosition.h:66
InDetDD::SCT_ForwardPolarPosition::operator=
SCT_ForwardPolarPosition & operator=(const SCT_ForwardPolarPosition &polar)
Definition
SCT_ForwardPolarPosition.cxx:40
InDetDD
Message Stream Member.
Definition
FakeTrackBuilder.h:8
Generated on
for ATLAS Offline Software by
1.14.0