The ZCylinder is the locus of a point equidistant from a fixed point.
More...
#include "pinspec/src/Surface.h"
The ZCylinder is the locus of a point equidistant from a fixed point.
The ZCylinder represents a set of points within a given distance from a point in the xy-plane called the cylinder's center.
ZCylinder::ZCylinder |
( |
const char * |
surface_name = (char*)"" | ) |
|
The ZCylinder constructor.
- Parameters
-
surface_name | the (optional) name of the surface |
Assigns default values for the center of the cylinder (x=0, y=0) and a radius of 0.
float ZCylinder::computeParametrizedDistance |
( |
neutron * |
neutron | ) |
|
|
virtual |
Computes the parametrized distance to the ZCylinder along a neutron's trajectory.
The distance returned is a parametrized distance along the unit vectory defining the neutron's trajectory, not a Cartesian distance. If the neutron is traveling away from the surface then the distance returned will be infinity. This method solves a quadratic equation for 0, 1, or 2 surface intersection points and selects the one nearest to the neutron.
- Parameters
-
neutron | a pointer to a neutron struct |
- Returns
- the parametrized distance to the surface along the neutron's trajectory
Implements Surface.
float ZCylinder::evaluate |
( |
neutron * |
neutron | ) |
|
|
virtual |
Returns the evaluation of a neutron's coordinates
with respect to the quadratic surface representing this cylinder:
.
- Parameters
-
neutron | the neutron of interest |
Implements Surface.
float ZCylinder::evaluate |
( |
float |
x, |
|
|
float |
y, |
|
|
float |
z |
|
) |
| |
|
virtual |
Returns the evaluation of a neutron's coordinates
with respect to the quadratic surface representing this cylinder:
.
- Parameters
-
x | the x-coordinate of interest |
y | the y-coordinate of interest |
z | the z-coordinate of interest |
Implements Surface.
float ZCylinder::getRadius |
( |
| ) |
|
Returns the radius of the cylinder.
- Returns
- the cylinder radius
float ZCylinder::getX0 |
( |
| ) |
|
Returns the x-coordinate of the cylinder's center.
- Returns
- the x-coordinate of the cylinder center
float ZCylinder::getY0 |
( |
| ) |
|
Returns the y-coordinate of the cylinder's center.
- Returns
- the y-coordinate of the cylinder center
bool ZCylinder::onSurface |
( |
neutron * |
neutron | ) |
|
|
virtual |
Checks whether a neutron is on the ZCylinder.
The threshold used to compute whether or not a neutron is on the on the neutron is 1E-6 for the difference between the distance between the neutron and the cylinder center and the radius of the cylinder.
- Parameters
-
neutron | the neutron of interest |
- Returns
- true if on the XPlane, otherwise false
Implements Surface.
void ZCylinder::reflectNeutron |
( |
neutron * |
neutron | ) |
|
|
virtual |
Perfectly reflects a neutron at a cylinder.
- Parameters
-
neutron | the neutron of interest |
Implements Surface.
void ZCylinder::setRadius |
( |
float |
r | ) |
|
Sets the radius of the cylinder's center.
- Parameters
-
void ZCylinder::setX0 |
( |
float |
x0 | ) |
|
Sets the x-coordinate of the cylinder's center.
- Parameters
-
x0 | the x-coordinate of the cylinder center |
void ZCylinder::setY0 |
( |
float |
y0 | ) |
|
Sets the y-coordinate of the cylinder's center.
- Parameters
-
y0 | the y-coordinate of the cylinder center |
float ZCylinder::_r_squared |
|
protected |
The square of the cylinder's radius
The x-coordinate of the cylinder's center
The y-coordinate of the cylinder's center
The documentation for this class was generated from the following files:
- pinspec/src/Surface.h
- pinspec/src/Surface.cpp