CMS 3D CMS Logo

List of all members | Public Member Functions | Public Attributes
LocalTrackFit Struct Reference

Local (linear) track description (or a fit result). Uses global reference system. More...

#include <LocalTrackFit.h>

Public Member Functions

double chiSqPerNdf () const
 
void eval (double z, double &x, double &y)
 
 LocalTrackFit (double _z0=0., double _ax=0., double _ay=0., double _bx=0., double _by=0., unsigned int _ndf=0, double _chi_sq=0.)
 
double pValue () const
 

Public Attributes

double ax
 slopes in rad More...
 
double ay
 
double bx
 intercepts in mm More...
 
double by
 
double chi_sq
 the residual sum of squares More...
 
signed int ndf
 the number of degrees of freedom More...
 
double z0
 the point where intercepts are measured, in mm More...
 

Detailed Description

Local (linear) track description (or a fit result). Uses global reference system.

Definition at line 15 of file LocalTrackFit.h.

Constructor & Destructor Documentation

◆ LocalTrackFit()

LocalTrackFit::LocalTrackFit ( double  _z0 = 0.,
double  _ax = 0.,
double  _ay = 0.,
double  _bx = 0.,
double  _by = 0.,
unsigned int  _ndf = 0,
double  _chi_sq = 0. 
)
inline

Definition at line 31 of file LocalTrackFit.h.

38  : z0(_z0), ax(_ax), ay(_ay), bx(_bx), by(_by), ndf(_ndf), chi_sq(_chi_sq) {}
double z0
the point where intercepts are measured, in mm
Definition: LocalTrackFit.h:17
signed int ndf
the number of degrees of freedom
Definition: LocalTrackFit.h:26
double chi_sq
the residual sum of squares
Definition: LocalTrackFit.h:29
double bx
intercepts in mm
Definition: LocalTrackFit.h:23
double ax
slopes in rad
Definition: LocalTrackFit.h:20

Member Function Documentation

◆ chiSqPerNdf()

double LocalTrackFit::chiSqPerNdf ( ) const
inline

Definition at line 42 of file LocalTrackFit.h.

References chi_sq, and ndf.

Referenced by StraightTrackAlignment::processEvent(), and StraightTrackAlignment::updateDiagnosticHistograms().

42 { return (ndf > 0) ? chi_sq / ndf : 0.; }
signed int ndf
the number of degrees of freedom
Definition: LocalTrackFit.h:26
double chi_sq
the residual sum of squares
Definition: LocalTrackFit.h:29

◆ eval()

void LocalTrackFit::eval ( double  z,
double &  x,
double &  y 
)
inline

Definition at line 44 of file LocalTrackFit.h.

References ax, ay, bx, by, x, y, z, and z0.

44  {
45  double ze = z - z0;
46  x = ax * ze + bx;
47  y = ay * ze + by;
48  }
double z0
the point where intercepts are measured, in mm
Definition: LocalTrackFit.h:17
double bx
intercepts in mm
Definition: LocalTrackFit.h:23
double ax
slopes in rad
Definition: LocalTrackFit.h:20

◆ pValue()

double LocalTrackFit::pValue ( ) const
inline

Definition at line 40 of file LocalTrackFit.h.

References chi_sq, and ndf.

Referenced by StraightTrackAlignment::updateDiagnosticHistograms().

40 { return TMath::Prob(chi_sq, ndf); }
signed int ndf
the number of degrees of freedom
Definition: LocalTrackFit.h:26
double chi_sq
the residual sum of squares
Definition: LocalTrackFit.h:29

Member Data Documentation

◆ ax

double LocalTrackFit::ax

◆ ay

double LocalTrackFit::ay

◆ bx

double LocalTrackFit::bx

◆ by

double LocalTrackFit::by

◆ chi_sq

double LocalTrackFit::chi_sq

the residual sum of squares

Definition at line 29 of file LocalTrackFit.h.

Referenced by chiSqPerNdf(), LocalTrackFitter::fitAndRemoveOutliers(), and pValue().

◆ ndf

signed int LocalTrackFit::ndf

the number of degrees of freedom

Definition at line 26 of file LocalTrackFit.h.

Referenced by chiSqPerNdf(), LocalTrackFitter::fitAndRemoveOutliers(), pValue(), and StraightTrackAlignment::updateDiagnosticHistograms().

◆ z0

double LocalTrackFit::z0

the point where intercepts are measured, in mm

Definition at line 17 of file LocalTrackFit.h.

Referenced by eval(), JanAlignmentAlgorithm::feed(), and LocalTrackFitter::fitAndRemoveOutliers().