#include <FPGATrackSimKeyLayerTool.h>
|
| | FPGATrackSimKeyLayerTool (double r1, double r2) |
| | FPGATrackSimKeyLayerTool () |
| std::pair< double, double > | getXY (double r, double phi) const |
| std::pair< double, double > | getRotationAngles (const std::pair< double, double > &xy1, const std::pair< double, double > &xy2) const |
| std::pair< double, double > | rotateXY (const std::pair< double, double > &xy, const std::pair< double, double > &ang) const |
| rotatedConfig | getRotatedConfig (const KeyLyrPars &keypars) const |
| std::pair< double, double > | getRotatedHit (const std::pair< double, double > &rotang, double rHit, double phiHit) const |
| KeyLyrPars | trackParsToKeyPars (const FPGATrackSimTrackPars &pars) const |
| FPGATrackSimTrackPars | keyParsToTrackPars (const KeyLyrPars &keypars) const |
| double | zExpected (const KeyLyrPars &keypars, double r) const |
| double | xExpected (const KeyLyrPars &keypars, double rHit, double phiHit) const |
| double | xmForHit (const KeyLyrPars &keypars, double rHit, double phiHit) const |
| double | deltaX (const KeyLyrPars &keypars, double rHit, double phiHit) const |
| double | R1 () const |
| double | R2 () const |
| void | setR1 (const double r1) |
| void | setR2 (const double r2) |
Definition at line 41 of file FPGATrackSimKeyLayerTool.h.
◆ FPGATrackSimKeyLayerTool() [1/2]
| FPGATrackSimKeyLayerTool::FPGATrackSimKeyLayerTool |
( |
double | r1, |
|
|
double | r2 ) |
|
inline |
◆ FPGATrackSimKeyLayerTool() [2/2]
| FPGATrackSimKeyLayerTool::FPGATrackSimKeyLayerTool |
( |
| ) |
|
|
inline |
◆ deltaX()
| double FPGATrackSimKeyLayerTool::deltaX |
( |
const KeyLyrPars & | keypars, |
|
|
double | rHit, |
|
|
double | phiHit ) const |
Definition at line 157 of file FPGATrackSimKeyLayerTool.cxx.
158{
160
161 auto rotang = rotated_coords.rotang;
162
164
165 double xh = xyhp.first-rotated_coords.xy1p.first;
166
167 return xh -
xExpected(keypars,rHit, phiHit);
168}
◆ getRotatedConfig()
◆ getRotatedHit()
| std::pair< double, double > FPGATrackSimKeyLayerTool::getRotatedHit |
( |
const std::pair< double, double > & | rotang, |
|
|
double | rHit, |
|
|
double | phiHit ) const |
◆ getRotationAngles()
| std::pair< double, double > FPGATrackSimKeyLayerTool::getRotationAngles |
( |
const std::pair< double, double > & | xy1, |
|
|
const std::pair< double, double > & | xy2 ) const |
Definition at line 16 of file FPGATrackSimKeyLayerTool.cxx.
17{
18 double dr12x = xy2.first - xy1.first;
19 double dr12y = xy2.second - xy1.second;
20 double dr12mag = std::hypot(dr12x, dr12y);
21 double cos_rot = dr12y / dr12mag;
22 double sin_rot = -dr12x / dr12mag;
23 return std::pair<double, double>(cos_rot, sin_rot);
24}
◆ getXY()
| std::pair< double, double > FPGATrackSimKeyLayerTool::getXY |
( |
double | r, |
|
|
double | phi ) const |
◆ keyParsToTrackPars()
Definition at line 79 of file FPGATrackSimKeyLayerTool.cxx.
80{
81
82 FPGATrackSimTrackPars
pars;
85
86
87
88
89 double xm = keypars.xm;
90
92 auto xy1p = rotated_coords.xy1p;
93 auto rotang = rotated_coords.rotang;
94 auto y = rotated_coords.y;
95
96
97 auto revang = rotang;
98 revang.second = -rotang.second;
99
100 if (xm != 0)
101 {
102 double Rinv = 2 * xm / (xm * xm + (
y / 2) * (
y / 2));
103 double d = (
y *
y / 4.0 - xm * xm) / (2.0 * xm);
104 double sign = (xm > 0) - (xm < 0);
105
107
108
109 std::pair<double, double> xycp(-d + xy1p.first,
y / 2.0 + xy1p.second);
110
112
114
116 }
117 else
118 {
122 }
123
125}
static constexpr double CurvatureConstant
static double EtaFromTheta(double theta)
◆ R1()
| double FPGATrackSimKeyLayerTool::R1 |
( |
| ) |
const |
|
inline |
◆ R2()
| double FPGATrackSimKeyLayerTool::R2 |
( |
| ) |
const |
|
inline |
◆ rotateXY()
| std::pair< double, double > FPGATrackSimKeyLayerTool::rotateXY |
( |
const std::pair< double, double > & | xy, |
|
|
const std::pair< double, double > & | ang ) const |
Definition at line 26 of file FPGATrackSimKeyLayerTool.cxx.
27{
28 return std::pair<double, double>(xy.first * ang.first + xy.second * ang.second,
29 -xy.first * ang.second + xy.second * ang.first);
30}
◆ setR1()
| void FPGATrackSimKeyLayerTool::setR1 |
( |
const double | r1 | ) |
|
|
inline |
◆ setR2()
| void FPGATrackSimKeyLayerTool::setR2 |
( |
const double | r2 | ) |
|
|
inline |
◆ trackParsToKeyPars()
Definition at line 53 of file FPGATrackSimKeyLayerTool.cxx.
54{
60
62 if (Rinv != 0)
63 {
67 double ysqr = (xy2.first - xy1.first) * (xy2.first - xy1.first) + (xy2.second - xy1.second) * (xy2.second - xy1.second);
68 double sign = (
R > 0) - (R < 0);
69 retv.xm = -1 *
sign * (std::abs(R) - sqrt(R * R - ysqr / 4.0));
70 }
71 else
72 {
73 retv.xm = 0;
74 }
75
76 return retv;
77}
static double phiFromPars(double r, const FPGATrackSimTrackPars &pars)
static double zFromPars(double r, const FPGATrackSimTrackPars &pars)
double R(const INavigable4Momentum *p1, const double v_eta, const double v_phi)
◆ xExpected()
| double FPGATrackSimKeyLayerTool::xExpected |
( |
const KeyLyrPars & | keypars, |
|
|
double | rHit, |
|
|
double | phiHit ) const |
Definition at line 171 of file FPGATrackSimKeyLayerTool.cxx.
172{
174
175 auto rotang = rotated_coords.rotang;
176 auto y = rotated_coords.y;
177
179
180 double yh = xyhp.second-rotated_coords.xy1p.second;
181
182 return keypars.xm * (keypars.xm * keypars.xm + yh * (
y - yh)) / (keypars.xm * keypars.xm + (
y / 2) * (
y / 2));
183}
◆ xmForHit()
| double FPGATrackSimKeyLayerTool::xmForHit |
( |
const KeyLyrPars & | keypars, |
|
|
double | rHit, |
|
|
double | phiHit ) const |
Definition at line 133 of file FPGATrackSimKeyLayerTool.cxx.
134{
136 auto xy1p = rotated_coords.xy1p;
137 auto rotang = rotated_coords.rotang;
138 auto y = rotated_coords.y;
139
141 double xh = xyhp.first - xy1p.first;
142 double yh = xyhp.second - xy1p.second;
143
144
145 double sign = ((yh > 0) && (yh <
y)) ? 1 : -1;
146 if ((std::abs(yh) < std::abs(xh)) || (std::abs(
y - yh) < std::abs(xh)))
147 {
148 return ((xh > 0) ? 1 : -1) * 100000;
149 }
150
151 double xm_taylor =
sign *
y *
y / (
y *
y - 4 * xh * xh - 4 * (yh -
y / 2.0) * (yh -
y / 2.0)) * xh;
152
153 return xm_taylor;
154}
◆ zExpected()
| double FPGATrackSimKeyLayerTool::zExpected |
( |
const KeyLyrPars & | keypars, |
|
|
double | r ) const |
◆ m_R1
| double FPGATrackSimKeyLayerTool::m_R1 {} |
|
private |
◆ m_R2
| double FPGATrackSimKeyLayerTool::m_R2 {} |
|
private |
The documentation for this class was generated from the following files: