![]() |
![]() |
#include <MagneticField/Interpolation/src/Trapezoid2RectangleMappingX.h>
Public Member Functions | |
void | rectangle (double xtrap, double ytrap, double &xrec, double &yrec) const |
void | trapezoid (double xrec, double yrec, double &xtrap, double &ytrap) const |
Trapezoid2RectangleMappingX (double x0, double y0, double k) | |
special parallelogram case, a == b. The meaning of k changes. | |
Trapezoid2RectangleMappingX (double x0, double y0, double bovera, double h) | |
normal trapezoid case, a != b | |
Trapezoid2RectangleMappingX () | |
Private Attributes | |
double | k_ |
bool | parallel_ |
double | x0_ |
double | y0_ |
It is assumed that x is the coordinate along the trapezoid bases while y is along the trapezoid height.
Definition at line 23 of file Trapezoid2RectangleMappingX.h.
Trapezoid2RectangleMappingX::Trapezoid2RectangleMappingX | ( | ) | [inline] |
Trapezoid2RectangleMappingX::Trapezoid2RectangleMappingX | ( | double | x0, | |
double | y0, | |||
double | bovera, | |||
double | h | |||
) | [inline] |
normal trapezoid case, a != b
Definition at line 29 of file Trapezoid2RectangleMappingX.h.
References GenMuonPlsPt100GeV_cfg::cout, lat::endl(), and k_.
00029 : 00030 x0_(x0), y0_(y0), parallel_(false) 00031 { 00032 k_ = 2/h * (bovera-1.) / (bovera+1.); 00033 00034 #ifdef DEBUG_GRID_TRM 00035 cout << "Trapezoid2RectangleMappingX constructed with x0,y0 " << x0 << " " << y0 00036 << " b/a= " << bovera << " h= " << h << endl; 00037 #endif 00038 }
Trapezoid2RectangleMappingX::Trapezoid2RectangleMappingX | ( | double | x0, | |
double | y0, | |||
double | k | |||
) | [inline] |
special parallelogram case, a == b. The meaning of k changes.
Definition at line 41 of file Trapezoid2RectangleMappingX.h.
References GenMuonPlsPt100GeV_cfg::cout, and lat::endl().
00041 : 00042 x0_(x0), y0_(y0), k_(k), parallel_(true) 00043 { 00044 #ifdef DEBUG_GRID_TRM 00045 cout << "Trapezoid2RectangleMappingX constructed with x0,y0 " << x0 << " " << y0 00046 << " k= " << k << endl; 00047 #endif 00048 }
void Trapezoid2RectangleMappingX::rectangle | ( | double | xtrap, | |
double | ytrap, | |||
double & | xrec, | |||
double & | yrec | |||
) | const [inline] |
Definition at line 50 of file Trapezoid2RectangleMappingX.h.
References GenMuonPlsPt100GeV_cfg::cout, lat::endl(), k_, parallel_, x0_, and y0_.
Referenced by TrapezoidalCartesianMFGrid::toGridFrame(), TrapezoidalCylindricalMFGrid::toGridFrame(), TrapezoidalCartesianMFGrid::TrapezoidalCartesianMFGrid(), TrapezoidalCylindricalMFGrid::TrapezoidalCylindricalMFGrid(), and TrapezoidalCartesianMFGrid::uncheckedValueInTesla().
00051 { 00052 00053 yrec = ytrap - y0_; 00054 if (!parallel_) xrec = (xtrap - x0_) / (1.+ yrec*k_); 00055 else xrec = xtrap - x0_ + k_*yrec; 00056 00057 #ifdef DEBUG_GRID 00058 cout << xtrap << " " << ytrap << " transformed to rectangle " << xrec << " " << yrec << endl; 00059 #endif 00060 }
void Trapezoid2RectangleMappingX::trapezoid | ( | double | xrec, | |
double | yrec, | |||
double & | xtrap, | |||
double & | ytrap | |||
) | const [inline] |
Definition at line 62 of file Trapezoid2RectangleMappingX.h.
References GenMuonPlsPt100GeV_cfg::cout, lat::endl(), k_, parallel_, x0_, and y0_.
Referenced by TrapezoidalCartesianMFGrid::fromGridFrame(), and TrapezoidalCylindricalMFGrid::fromGridFrame().
00063 { 00064 if (!parallel_) xtrap = x0_ + xrec * (1.+ yrec*k_); 00065 else xtrap = x0_ + xrec - k_*yrec; 00066 ytrap = y0_ + yrec; 00067 00068 #ifdef DEBUG_GRID 00069 cout << xrec << " " << yrec << " transformed to trapezoid " << xtrap << " " << ytrap << endl; 00070 #endif 00071 }
double Trapezoid2RectangleMappingX::k_ [private] |
Definition at line 76 of file Trapezoid2RectangleMappingX.h.
Referenced by rectangle(), trapezoid(), and Trapezoid2RectangleMappingX().
bool Trapezoid2RectangleMappingX::parallel_ [private] |
Definition at line 77 of file Trapezoid2RectangleMappingX.h.
Referenced by rectangle(), and trapezoid().
double Trapezoid2RectangleMappingX::x0_ [private] |
Definition at line 74 of file Trapezoid2RectangleMappingX.h.
Referenced by rectangle(), and trapezoid().
double Trapezoid2RectangleMappingX::y0_ [private] |
Definition at line 75 of file Trapezoid2RectangleMappingX.h.
Referenced by rectangle(), and trapezoid().