public final class GarfieldHelix extends Object
parametrization is redundant. A helix is defined by
- a point on the helix (base)
- direction vector at this point (dir)
- curvature (kappa)
dir is normalized such that the projection of dir into xy plane has length one.
GarfieldTrackFinder
Modifier and Type | Field and Description |
---|---|
private double[] |
base |
private int |
debugLevel |
private double[] |
dir |
private static double |
k_cm |
private double |
kappa |
private double[] |
pointOnHelix |
private double |
sSave |
Constructor and Description |
---|
GarfieldHelix()
empty constructor
|
GarfieldHelix(double[] b,
double[] d,
double ka) |
Modifier and Type | Method and Description |
---|---|
double[] |
base() |
double |
base(int i) |
private double |
cosfrac(double x,
double ka)
cosfrac(x, ka) = (cos(x*ka)-1) / ka
|
double[] |
dir() |
double |
dir(int i) |
double |
dirAtPoint(int i) |
double |
distanceBaseToPoint(double[] p) |
double |
distanceBaseToPoint(GarfieldHit h)
added for convenience and to avoid creating more double vectors
|
double |
distanceToHit2D(GarfieldHit h) |
double |
distanceToHit3D(double[] pos) |
private double |
distanceToInterval(double a,
double b,
double c)
returns distance to that interval a,b (0 or the distance to the edge)
allows for arbitrary ordering (ab)
|
double |
distanceToLine2D(GarfieldHit h,
double px,
double py) |
double |
getCenter(int i) |
double |
getPointOnHelix(int i) |
double |
kappa() |
private static double |
myAbs(double ka)
absolute value of a double
|
void |
normalizeDir()
normalizes the direction vector.
|
int |
q() |
void |
setBase(double x,
double y,
double z) |
void |
setDebugLevel(int i)
controls amount of debug text output and test histograms, =0 not output, >0 debug output
|
void |
setDir(double x,
double y,
double z) |
void |
setKappa(double ka) |
void |
setPointOnHelix(double s) |
void |
setPointOnHelixWithXY(double x,
double y) |
void |
setPointOnHelixWithZ(double z) |
private double |
sinfrac(double x,
double ka)
sinfrac(x, ka) = sin(x*ka) / ka
|
double |
sqr(double x) |
double |
sSave() |
private static double k_cm
private double[] base
private double[] dir
private double kappa
private double[] pointOnHelix
private double sSave
private int debugLevel
public GarfieldHelix()
public GarfieldHelix(double[] b, double[] d, double ka)
b
- base (= point on helix)d
- dir (= helix direction vector at base point)ka
- curvaturepublic int q()
public double sSave()
public double dir(int i)
public double base(int i)
public double[] dir()
public double[] base()
public double kappa()
public final double getPointOnHelix(int i)
public void setDebugLevel(int i)
public void setKappa(double ka)
public void setBase(double x, double y, double z)
public void setDir(double x, double y, double z)
public double sqr(double x)
public void normalizeDir()
public final double distanceToHit3D(double[] pos)
public final double distanceBaseToPoint(double[] p)
public final double distanceBaseToPoint(GarfieldHit h)
private static final double myAbs(double ka)
private final double sinfrac(double x, double ka)
private final double cosfrac(double x, double ka)
private final double distanceToInterval(double a, double b, double c)
public final double getCenter(int i)
public void setPointOnHelix(double s)
public void setPointOnHelixWithXY(double x, double y)
public void setPointOnHelixWithZ(double z)
public double dirAtPoint(int i)
public double distanceToLine2D(GarfieldHit h, double px, double py)
public double distanceToHit2D(GarfieldHit h)
Copyright © 2016 Linear Collider Detector (LCD). All rights reserved.