qupid 0.2
Quasi-Signal Generation Model for Pixelized Detector
Loading...
Searching...
No Matches
QPMath::GeometryCalc Namespace Reference

Ellipse radii and plane angles used by the Woods-Saxon profiles. More...

Functions

double EllipseUniAxis (double x, double y, double lx, double ly)
 EllipseRotAxis with $ \theta = 0 $: radius of the axis-aligned ellipse with semi-axes $ l_x, l_y $ in the direction of (x, y).
 
double EllipseRotAxis (double x, double y, double lx, double ly, double theta)
 Radius of the ellipse with semi-axes $ l_x, l_y $ rotated by $ \theta $, evaluated in the direction of (x, y): $ \sqrt{l_x^2\cos^2\phi + l_y^2\sin^2\phi} $ with $ \phi = \mathrm{Angle}(x,y) - \theta $.
 
double Angle (double x, double y, double centx=0., double centy=0.)
 Quadrant-aware angle of the point (x, y) about (centx, centy).
 

Detailed Description

Ellipse radii and plane angles used by the Woods-Saxon profiles.

Function Documentation

◆ EllipseUniAxis()

double QPMath::GeometryCalc::EllipseUniAxis ( double  x,
double  y,
double  lx,
double  ly 
)

EllipseRotAxis with $ \theta = 0 $: radius of the axis-aligned ellipse with semi-axes $ l_x, l_y $ in the direction of (x, y).

Parameters
xdirection component x
ydirection component y
lxsemi-axis along x
lysemi-axis along y
Returns
$ \sqrt{l_x^2\cos^2\phi + l_y^2\sin^2\phi} $ with $ \phi = \mathrm{Angle}(x,y) $

Definition at line 172 of file QPMath.cpp.

References EllipseRotAxis().

Referenced by QPMath::WoodSaxon::UniAxis2D().

◆ EllipseRotAxis()

double QPMath::GeometryCalc::EllipseRotAxis ( double  x,
double  y,
double  lx,
double  ly,
double  theta 
)

Radius of the ellipse with semi-axes $ l_x, l_y $ rotated by $ \theta $, evaluated in the direction of (x, y): $ \sqrt{l_x^2\cos^2\phi + l_y^2\sin^2\phi} $ with $ \phi = \mathrm{Angle}(x,y) - \theta $.

Parameters
xdirection component x
ydirection component y
lxsemi-axis along the rotated x axis
lysemi-axis along the rotated y axis
thetaellipse rotation, radians
Returns
ellipse radius in that direction

Definition at line 176 of file QPMath.cpp.

References Angle(), QPMath::Cos(), QPMath::Power(), QPMath::Sin(), and QPMath::Sqrt().

Referenced by EllipseUniAxis(), QPMath::WoodSaxon::RotAxis2D(), and QPMath::WoodSaxon::RotAxis2DUnsync().

◆ Angle()

double QPMath::GeometryCalc::Angle ( double  x,
double  y,
double  centx = 0.,
double  centy = 0. 
)

Quadrant-aware angle of the point (x, y) about (centx, centy).

Warning
Through ATan2's swapped forwarding this evaluates std::atan2(x-centx, y-centy): the angle is measured from the +y axis, not from the +x axis as in the usual polar convention.
Parameters
xpoint x
ypoint y
centxcenter x
centycenter y
Returns
angle in radians, measured from the +y axis

Definition at line 184 of file QPMath.cpp.

References QPMath::ATan2().

Referenced by EllipseRotAxis().