ATLAS Offline Software
Loading...
Searching...
No Matches
SCT_ForwardFrameTransformation.cxx
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
3*/
4
6// SCT_ForwardFrameTransformation.cxx
7// Implementation file for class SCT_ForwardFrameTransformation
9// (c) ATLAS Detector software
11// Version 1.4 09/7/2001 Alessandro Fornaini
13
17#include <cmath>
18
19using std::abs;
20using std::cos;
21using std::sin;
22
23namespace InDetDD {
24
25// Copy constructor:
27
28= default;
29
30// Constructor with parameters:
35{
36 //check if parameters are consistent
37 if (m_radius<0) m_radius=0;
38}
39
40
41// Assignment operator:
43{
44 if (this!=&frame) {
47 m_radius=frame.m_radius;
48 } else {}
49 return *this;
50}
51
52
53// create a SCT_ForwardPolarPosition from a SiLocalPosition
55{
56 const double deltaPhi = cartesian.xPhi()-m_phiCenter;
57 const double deltaEta = cartesian.xEta()-m_etaCenter+m_radius;
58 const double r = sqrt(deltaPhi*deltaPhi+deltaEta*deltaEta);
59 if (r<=0) return {};
60 const double theta = asin((cartesian.xPhi()-m_phiCenter)/r);
62}
63
64// create a SiLocalPosition from a SCT_ForwardPolarPosition
66{
67 const double phi = m_phiCenter + polar.r()*sin(polar.theta());
68 const double eta = m_etaCenter + polar.r()*cos(polar.theta()) - m_radius;
69 return SiLocalPosition(eta, phi);
70}
71
72} // namespace InDetDD
Scalar eta() const
pseudorapidity method
Scalar deltaPhi(const MatrixBase< Derived > &vec) const
Scalar phi() const
phi method
Scalar theta() const
theta method
Class that connect cartesian and pokar coordinates.
double etaCenter() const
eta coordinate of module center:
double m_etaCenter
eta coordinate of module center
SCT_ForwardFrameTransformation & operator=(const SCT_ForwardFrameTransformation &frame)
Assignment operator:
SCT_ForwardFrameTransformation(const SCT_ForwardFrameTransformation &frame)
Copy constructor:
double phiCenter() const
phi coordinate of modulecenter:
double radius() const
r from module center to beam:
double m_phiCenter
phi coordinate of module center
SiLocalPosition cartesianFromPolar(const SCT_ForwardPolarPosition &polar) const
create a SiLocalPosition from a SCT_ForwardPolarPosition
SCT_ForwardPolarPosition polarFromCartesian(const SiLocalPosition &cartesian) const
create a SCT_ForwardPolarPosition from a SiLocalPosition
2D position in polar coordinates for the polar frame in the SCT endcaps.
double theta() const
theta coordinate of point:
double r() const
r coordinate of point:
Class to represent a position in the natural frame of a silicon sensor, for Pixel and SCT For Pixel: ...
double xPhi() const
position along phi direction:
double xEta() const
position along eta direction:
int r
Definition globals.cxx:22
Message Stream Member.