public class Helix extends Object implements Trajectory
For more info on swimming see this paper by Paul Avery.
Modifier and Type | Field and Description |
---|---|
private double |
abs_r |
protected double |
cosLambda |
protected double |
cosPhi |
private double |
eps |
(package private) Hep3Vector |
origin |
protected double |
phi |
private double |
px |
private double |
py |
private double |
pz |
protected double |
radius |
private double |
rho |
protected double |
sinLambda |
protected double |
sinPhi |
(package private) double |
xCenter |
(package private) double |
yCenter |
Constructor and Description |
---|
Helix(Hep3Vector org,
double r,
double p,
double lambda)
Creates a new instance of Helix.
|
Modifier and Type | Method and Description |
---|---|
Hep3Vector |
getCenterXY() |
double |
getDistanceToInfiniteCylinder(double r)
Calculates the distance along the Helix until it hits a cylinder centered
along z
|
double |
getDistanceToPoint(Hep3Vector point)
Obtain the point of closest approach (POCA)
of the trajectory to a point.
|
double |
getDistanceToPolyhedra(double r,
int nsides) |
double |
getDistanceToXYPosition(Hep3Vector point)
Swims the helix along its trajectory to the point of closest approach to
the given SpacePoint.
|
double |
getDistanceToZPlane(double z)
Calculate the distance along the trajectory to reach a given Z plane.
|
SpacePoint |
getPointAtDistance(double alpha)
returns a point on the Helix at a distance alpha from the origin along
the trajectory.
|
double |
getRadius() |
double |
getSecondDistanceToInfiniteCylinder(double r) |
double |
getSignedClosestDifferenceToPoint(Hep3Vector point)
Calculates the signed distance in mm between the Helix and an
arbitrary point in Space
|
Hep3Vector |
getTangentAtDistance(double alpha) |
SpaceVector |
getUnitTangentAtLength(double alpha)
Returns the momentum at a given distance from the origin
|
double |
getZPeriod() |
private Hep3Vector |
propagateDirection(Hep3Vector u,
double s)
Propagates the direction unit vector a distance s along the helix
|
private Hep3Vector |
propagatePosition(Hep3Vector pos,
Hep3Vector u,
double s)
Propagate a point on the helix by a specified distance
|
void |
setExtrapToPointPrecision(double prec) |
private void |
setSpatialParameters()
Sets the parameterization in terms of "momentum" and charge
|
Hep3Vector origin
double xCenter
double yCenter
protected double radius
protected double sinLambda
protected double cosLambda
protected double sinPhi
protected double cosPhi
protected double phi
private double px
private double py
private double pz
private double abs_r
private double rho
private double eps
public Helix(Hep3Vector org, double r, double p, double lambda)
origin
- A point on the helixradius
- The signed radius of curvature of the helix.
The conventions is such that for positive
radii, the direction is clockwise.phi
- The polar angle of the helix momentum in x-y
plane w/rt positive x-axis at the originlambda
- The dip angle w/rt positive part of the x-y planepublic SpacePoint getPointAtDistance(double alpha)
getPointAtDistance
in interface Trajectory
public double getRadius()
public Hep3Vector getCenterXY()
public double getDistanceToZPlane(double z)
Trajectory
getDistanceToZPlane
in interface Trajectory
public double getDistanceToInfiniteCylinder(double r)
getDistanceToInfiniteCylinder
in interface Trajectory
r
- the radius of the cylinderpublic double getDistanceToPolyhedra(double r, int nsides)
public double getDistanceToPoint(Hep3Vector point)
Trajectory
getDistanceToPoint
in interface Trajectory
point
- Point in space to swim topublic double getDistanceToXYPosition(Hep3Vector point)
point
- Point in Space to swim to.public double getSignedClosestDifferenceToPoint(Hep3Vector point)
point
- the point in space to calculate the distance topublic Hep3Vector getTangentAtDistance(double alpha)
public double getSecondDistanceToInfiniteCylinder(double r)
public double getZPeriod()
private void setSpatialParameters()
private Hep3Vector propagateDirection(Hep3Vector u, double s)
u
- initial direction unit vectors
- distance to propagateprivate Hep3Vector propagatePosition(Hep3Vector pos, Hep3Vector u, double s)
pos
- starting positionu
- starting direction unit vectors
- distance to propagatepublic SpaceVector getUnitTangentAtLength(double alpha)
Trajectory
getUnitTangentAtLength
in interface Trajectory
alpha
- The distance along the trajectory in the x-y planepublic void setExtrapToPointPrecision(double prec)
Copyright © 2016 Linear Collider Detector (LCD). All rights reserved.