public class VertexFitter extends Object
Modifier and Type | Field and Description |
---|---|
private int |
_maxIterations |
private double |
_tol |
private VertexFit |
_vfit |
private double |
_xref |
Constructor and Description |
---|
VertexFitter(double xref)
Instantiate the vertex fitting class for the Heavy Photon Search simulation.
|
Modifier and Type | Method and Description |
---|---|
private Matrix |
ApproximateIntersection(StraightLineTrack slt1,
StraightLineTrack slt2)
Find a first approximation to the unmeasured variables by finding the track intersections in the x-y and x-z
planes.
|
private Matrix |
CalculateAA(int ntrks,
Matrix BB,
Matrix BStar,
Matrix GInv,
Matrix GStar)
Calculate the matrix AA that provides the coefficients for the system of linear equations to be solved
|
private Matrix |
CalculateBB(int ntrks,
Matrix xstar)
Calculate derivative of constraints with respect to the measured variables.
|
private Matrix |
CalculateBStar(int ntrks,
Matrix xx)
Calculate derivative of constraints with respect to the unmeasured variables.
|
private Matrix |
CalculateFF(int ntrks,
Matrix xx,
Matrix xstar)
Evaluate the residual values for the constraint equations (the fitter will try to force this vector to 0).
|
private boolean |
Converged(Matrix FF)
Check to see if all the constraints are satisfied within the tolerance that has been set.
|
private Matrix |
FillCovariance(List<StraightLineTrack> sltlist)
Extract the covariance matrix.
|
private Matrix |
FillMeasured(List<StraightLineTrack> sltlist)
Extract the measured variables from the list of straight line tracks.
|
VertexFit |
getFit()
Retrieve the VertexFit class containing the results of the fit
|
void |
setMaxIterations(int maxIterations)
Set the maximum number of iterations to try before the fit fails for lack of convergence (default is 100).
|
void |
setTolerance(double tol)
Set the convergence criteria for the fit (default is 1E-9).
|
boolean |
VertexFit(List<StraightLineTrack> sltlist)
Perform a vertex fit of the specified StraightLineTracks.
|
private double _xref
private double _tol
private int _maxIterations
private VertexFit _vfit
public VertexFitter(double xref)
xref
- x coordinate of the magnetic field boundarypublic boolean VertexFit(List<StraightLineTrack> sltlist)
sltlist
- list of StraightLineTracks to be fitpublic VertexFit getFit()
public void setTolerance(double tol)
tol
- convergence criteriapublic void setMaxIterations(int maxIterations)
maxIterations
- maximum number of fit iterationsprivate Matrix FillMeasured(List<StraightLineTrack> sltlist)
sltlist
- list of StraightLineTracksprivate Matrix FillCovariance(List<StraightLineTrack> sltlist)
sltlist
- list of StraightLineTracksprivate Matrix ApproximateIntersection(StraightLineTrack slt1, StraightLineTrack slt2)
slt1
- first StraightLineTrack to useslt2
- second StraightLineTrack to useprivate Matrix CalculateBB(int ntrks, Matrix xstar)
ntrks
- number of tracksxstar
- current estimate of the vertex positionprivate Matrix CalculateBStar(int ntrks, Matrix xx)
ntrks
- number of tracksxx
- current estimate of the measured variablesprivate Matrix CalculateAA(int ntrks, Matrix BB, Matrix BStar, Matrix GInv, Matrix GStar)
ntrks
- number of tracksBB
- constraint derivatives for the measured variablesBStar
- constraint derivatives for the unmeasured variablesGInv
- inverse of the covariance matrix for the measured variablesGStar
- inverse of the covariance matrix for the unmeasured variablesprivate Matrix CalculateFF(int ntrks, Matrix xx, Matrix xstar)
ntrks
- number of tracksxx
- measured variablesxstar
- unmeasured variables (vertex position)private boolean Converged(Matrix FF)
FF
- constraint residualsCopyright © 2019. All rights reserved.