13#include "TrkReco/T3DLine.h"
14#include "TrkReco/T3DLineFitter.h"
15#include "TrkReco/TMDCWire.h"
16#include "TrkReco/TTrack.h"
36 fitter( &T3DLine::_fitter );
53 _cos_phi0 =
cos( _phi0 );
54 _sin_phi0 =
sin( _phi0 );
57 fitter( &T3DLine::_fitter );
76 _cos_phi0 =
cos( _phi0 );
77 _sin_phi0 =
sin( _phi0 );
80 fitter( &T3DLine::_fitter );
118 Helix _helix( _pivot,
a );
129 std::cout <<
"error at T3DLine::reducedchi2 ndf=0" << std::endl;
132 return ( _chi2 / _ndf );
136 double tx = _pivot.x() + _dr * _cos_phi0 -
t * _sin_phi0;
137 double ty = _pivot.y() + _dr * _sin_phi0 +
t * _cos_phi0;
138 double tz = _pivot.z() + _dz +
t * _tanl;
144 double tx = _pivot.x() + _dr * _cos_phi0;
145 double ty = _pivot.y() + _dr * _sin_phi0;
146 double tz = _pivot.z() + _dz;
156 double dr = ( _pivot.x() - newpivot.x() ) * _cos_phi0 +
157 ( _pivot.y() - newpivot.y() ) * _sin_phi0 + _dr;
158 double dz = _pivot.z() - newpivot.z() + _dz +
159 _tanl * ( ( _pivot.x() - newpivot.x() ) * _sin_phi0 +
160 ( newpivot.y() - _pivot.y() ) * _cos_phi0 );
175 _cos_phi0 =
cos( _phi0 );
176 _sin_phi0 =
sin( _phi0 );
184 _cos_phi0 =
cos( _phi0 );
185 _sin_phi0 =
sin( _phi0 );
198 HepPoint3D wireBackwardPosition =
w.backwardPosition();
203 if (
approach_line( wireBackwardPosition,
v, onWire, onTrack ) < 0 )
return ( -1 );
207 if ( !doSagCorrection )
215 double onWire_y = onWire.y();
216 double onWire_z = onWire.z();
219 while ( nTrial < 100 )
221 w.wirePosition( onWire_z, xw, wireBackwardPosition, (
HepVector3D&)
v );
222 if (
approach_line( wireBackwardPosition,
v, onWire, onTrack ) < 0 )
return ( -1 );
223 if ( fabs( onWire_y - onWire.y() ) < 0.0001 )
break;
224 onWire_y = onWire.y();
225 onWire_z = onWire.z();
242 const double v_k =
v.dot(
k );
243 const double v_2 =
v.mag2();
244 const double k_2 =
k.mag2();
245 const double tk = v_k * v_k - v_2 * k_2;
246 if ( tk == 0 )
return ( -1 );
250 const double t = dx.dot( v_2 *
k - v_k *
v ) / tk;
251 const double s = dx.dot( v_k *
k - k_2 *
v ) / tk;
254 onTrack =
x0 +
t *
k;
265 const double t = dx.dot(
k ) /
k.mag2();
267 onTrack =
x0 +
t *
k;
double sin(const BesAngle a)
double cos(const BesAngle a)
CLHEP::HepSymMatrix SymMatrix
const HepPoint3D ORIGIN
Constants.
**********Class see also m_nmax DOUBLE PRECISION m_amel DOUBLE PRECISION m_x2 DOUBLE PRECISION m_alfinv DOUBLE PRECISION m_Xenph INTEGER m_KeyWtm INTEGER m_idyfs DOUBLE PRECISION m_zini DOUBLE PRECISION m_q2 DOUBLE PRECISION m_Wt_KF DOUBLE PRECISION m_WtCut INTEGER m_KFfin *COMMON c_KarLud $ !Input CMS energy[GeV] $ !CMS energy after beam spread beam strahlung[GeV] $ !Beam energy spread[GeV] $ !z boost due to beam spread $ !electron beam mass *ff pair spectrum $ !minimum v
HepGeom::Point3D< double > HepPoint3D
HepGeom::Vector3D< double > HepVector3D
A class to fit a TTrackBase object to a 3D line.
void set(const HepPoint3D &, double t_dr, double t_phi0, double t_dz, double t_tanl)
set track parameters,pivot
double sinPhi0(void) const
HepPoint3D x(double) const
returns position on 3D line
double cosPhi0(void) const
double dr(void) const
Track parameters.
double reducedchi2(void) const
returns reduced-chi2
int approach_point(const HepPoint3D &, HepPoint3D &onTrack) const
caluculate closest point between a point and this track
HepPoint3D x0(void) const
returns 3D line component x(t)=x0 + t * k
Helix helix(void) const
approximated helix class
int approach(TMLink &, bool sagCorrection=true) const
double chi2(void) const
returns chi2.
int approach_line(const HepPoint3D &, const HepVector3D &, HepPoint3D &onLine, HepPoint3D &onTrack) const
caluculate closest points between a line and this track
HepVector3D k(void) const
const HepPoint3D & pivot(void) const
pivot position
const SymMatrix & Ea(void) const
returns error matrix
unsigned ndf(void) const
returns NDF
virtual ~T3DLine()
Destructor.
A class to represent a wire in MDC.
A class to relate TMDCWireHit and TTrack objects.
const HepPoint3D & positionOnWire(void) const
returns the closest point on wire to a track.
const HepPoint3D & positionOnTrack(void) const
returns the closest point on track to wire.
const TMDCWire *const wire(void) const
returns a pointer to a wire.
const TMFitter *const fitter(void) const
returns a pointer to a default fitter.
A class to represent a track in tracking.