BOSS 8.0.0
BESIII Offline Software System
Loading...
Searching...
No Matches
TrkCircleTraj Class Reference

#include <TrkCircleTraj.h>

Inheritance diagram for TrkCircleTraj:

Public Member Functions

 TrkCircleTraj (const HepVector &, const HepSymMatrix &, double lowlim=-99999., double hilim=99999., const HepPoint3D &refpoint=_theOrigin)
 TrkCircleTraj (const TrkExchangePar &, double lowlim=-99999., double hilim=99999., const HepPoint3D &refpoint=_theOrigin)
 TrkCircleTraj (const TrkCircleTraj &)
TrkCircleTrajclone () const
 ~TrkCircleTraj ()
TrkCircleTrajoperator= (const TrkCircleTraj &)
virtual HepPoint3D position (double fltLen) const
virtual Hep3Vector direction (double fltLen) const
virtual Hep3Vector delDirect (double) const
virtual void getInfo (double fltLen, HepPoint3D &pos, Hep3Vector &dir) const
virtual void getInfo (double fltLen, HepPoint3D &, Hep3Vector &dir, Hep3Vector &delDir) const
virtual void getDFInfo (double fltLen, DifPoint &, DifVector &dir, DifVector &delDir) const
virtual void getDFInfo2 (double fltLen, DifPoint &pos, DifVector &dir) const
virtual double curvature (double fltLen) const
virtual double distTo1stError (double flt, double tol, int pathDir) const
virtual double distTo2ndError (double flt, double tol, int pathDir) const
HepMatrix derivDeflect (double fltlen, deflectDirection) const
HepMatrix derivDisplace (double fltlen, deflectDirection) const
HepMatrix derivPFract (double fltlen) const
TranslateParams paramFunction () const
void invertParams (TrkParams *params, std::vector< bool > &flags) const
int nPar () const
virtual void visitAccept (TrkVisitor *vis) const
double d0 () const
double phi0 () const
double omega () const
 TrkCircleTraj (const HepVector &, const HepSymMatrix &, double lowlim=-99999., double hilim=99999., const HepPoint3D &refpoint=_theOrigin)
 TrkCircleTraj (const TrkExchangePar &, double lowlim=-99999., double hilim=99999., const HepPoint3D &refpoint=_theOrigin)
 TrkCircleTraj (const TrkCircleTraj &)
TrkCircleTrajclone () const
 ~TrkCircleTraj ()
TrkCircleTrajoperator= (const TrkCircleTraj &)
virtual HepPoint3D position (double fltLen) const
virtual Hep3Vector direction (double fltLen) const
virtual Hep3Vector delDirect (double) const
virtual void getInfo (double fltLen, HepPoint3D &pos, Hep3Vector &dir) const
virtual void getInfo (double fltLen, HepPoint3D &, Hep3Vector &dir, Hep3Vector &delDir) const
virtual void getDFInfo (double fltLen, DifPoint &, DifVector &dir, DifVector &delDir) const
virtual void getDFInfo2 (double fltLen, DifPoint &pos, DifVector &dir) const
virtual double curvature (double fltLen) const
virtual double distTo1stError (double flt, double tol, int pathDir) const
virtual double distTo2ndError (double flt, double tol, int pathDir) const
HepMatrix derivDeflect (double fltlen, deflectDirection) const
HepMatrix derivDisplace (double fltlen, deflectDirection) const
HepMatrix derivPFract (double fltlen) const
TranslateParams paramFunction () const
void invertParams (TrkParams *params, std::vector< bool > &flags) const
int nPar () const
virtual void visitAccept (TrkVisitor *vis) const
double d0 () const
double phi0 () const
double omega () const
 TrkCircleTraj (const HepVector &, const HepSymMatrix &, double lowlim=-99999., double hilim=99999., const HepPoint3D &refpoint=_theOrigin)
 TrkCircleTraj (const TrkExchangePar &, double lowlim=-99999., double hilim=99999., const HepPoint3D &refpoint=_theOrigin)
 TrkCircleTraj (const TrkCircleTraj &)
TrkCircleTrajclone () const
 ~TrkCircleTraj ()
TrkCircleTrajoperator= (const TrkCircleTraj &)
virtual HepPoint3D position (double fltLen) const
virtual Hep3Vector direction (double fltLen) const
virtual Hep3Vector delDirect (double) const
virtual void getInfo (double fltLen, HepPoint3D &pos, Hep3Vector &dir) const
virtual void getInfo (double fltLen, HepPoint3D &, Hep3Vector &dir, Hep3Vector &delDir) const
virtual void getDFInfo (double fltLen, DifPoint &, DifVector &dir, DifVector &delDir) const
virtual void getDFInfo2 (double fltLen, DifPoint &pos, DifVector &dir) const
virtual double curvature (double fltLen) const
virtual double distTo1stError (double flt, double tol, int pathDir) const
virtual double distTo2ndError (double flt, double tol, int pathDir) const
HepMatrix derivDeflect (double fltlen, deflectDirection) const
HepMatrix derivDisplace (double fltlen, deflectDirection) const
HepMatrix derivPFract (double fltlen) const
TranslateParams paramFunction () const
void invertParams (TrkParams *params, std::vector< bool > &flags) const
int nPar () const
virtual void visitAccept (TrkVisitor *vis) const
double d0 () const
double phi0 () const
double omega () const
Public Member Functions inherited from TrkSimpTraj
 TrkSimpTraj (const HepVector &params, const HepSymMatrix &cov, const double startRange=-99999., const double endRange=99999., const HepPoint3D &refpoint=_theOrigin)
 TrkSimpTraj (const TrkParams &params, const double startRange=-99999., const double endRange=99999., const HepPoint3D &refpoint=_theOrigin)
virtual ~TrkSimpTraj ()
TrkParamsparameters ()
const TrkParamsparameters () const
virtual const TrkSimpTrajlocalTrajectory (double fltLen, double &localFlt) const
const HepPoint3DreferencePoint () const
virtual void print (std::ostream &os) const
virtual void printAll (std::ostream &os) const
void changePoint (const HepPoint3D &newpoint, double &fltlen)
void setPoint (const HepPoint3D &newpoint)
TrkSimpTrajinvert ()
bool operator== (const TrkSimpTraj &) const
 TrkSimpTraj (const HepVector &params, const HepSymMatrix &cov, const double startRange=-99999., const double endRange=99999., const HepPoint3D &refpoint=_theOrigin)
 TrkSimpTraj (const TrkParams &params, const double startRange=-99999., const double endRange=99999., const HepPoint3D &refpoint=_theOrigin)
virtual ~TrkSimpTraj ()
TrkParamsparameters ()
const TrkParamsparameters () const
virtual const TrkSimpTrajlocalTrajectory (double fltLen, double &localFlt) const
const HepPoint3DreferencePoint () const
virtual void print (std::ostream &os) const
virtual void printAll (std::ostream &os) const
void changePoint (const HepPoint3D &newpoint, double &fltlen)
void setPoint (const HepPoint3D &newpoint)
TrkSimpTrajinvert ()
bool operator== (const TrkSimpTraj &) const
 TrkSimpTraj (const HepVector &params, const HepSymMatrix &cov, const double startRange=-99999., const double endRange=99999., const HepPoint3D &refpoint=_theOrigin)
 TrkSimpTraj (const TrkParams &params, const double startRange=-99999., const double endRange=99999., const HepPoint3D &refpoint=_theOrigin)
virtual ~TrkSimpTraj ()
TrkParamsparameters ()
const TrkParamsparameters () const
virtual const TrkSimpTrajlocalTrajectory (double fltLen, double &localFlt) const
const HepPoint3DreferencePoint () const
virtual void print (std::ostream &os) const
virtual void printAll (std::ostream &os) const
void changePoint (const HepPoint3D &newpoint, double &fltlen)
void setPoint (const HepPoint3D &newpoint)
TrkSimpTrajinvert ()
bool operator== (const TrkSimpTraj &) const
Public Member Functions inherited from TrkDifTraj
 TrkDifTraj (const double lowlim=-99999., const double hilim=99999.)
virtual ~TrkDifTraj ()
 TrkDifTraj (const double lowlim=-99999., const double hilim=99999.)
virtual ~TrkDifTraj ()
 TrkDifTraj (const double lowlim=-99999., const double hilim=99999.)
virtual ~TrkDifTraj ()
Public Member Functions inherited from Trajectory
 Trajectory (double lowlim, double hilim)
virtual ~Trajectory ()
double distTo0thError (double s, double tol, int pathDir) const
bool validFlightDistance (double f, double tolerance=0.0) const
virtual void setFlightRange (double newrange[2])
double lowRange () const
double hiRange () const
double range () const
 Trajectory (double lowlim, double hilim)
virtual ~Trajectory ()
double distTo0thError (double s, double tol, int pathDir) const
bool validFlightDistance (double f, double tolerance=0.0) const
virtual void setFlightRange (double newrange[2])
double lowRange () const
double hiRange () const
double range () const
 Trajectory (double lowlim, double hilim)
virtual ~Trajectory ()
double distTo0thError (double s, double tol, int pathDir) const
bool validFlightDistance (double f, double tolerance=0.0) const
virtual void setFlightRange (double newrange[2])
double lowRange () const
double hiRange () const
double range () const

Static Public Member Functions

static int d0Index ()
static int phi0Index ()
static int omegaIndex ()
static int nCirPrm ()
static int d0Index ()
static int phi0Index ()
static int omegaIndex ()
static int nCirPrm ()
static int d0Index ()
static int phi0Index ()
static int omegaIndex ()
static int nCirPrm ()

Additional Inherited Members

Static Public Attributes inherited from TrkSimpTraj
static HepPoint3D _theOrigin
Protected Member Functions inherited from Trajectory
Trajectoryoperator= (const Trajectory &)
Trajectoryoperator= (const Trajectory &)
Trajectoryoperator= (const Trajectory &)
Protected Attributes inherited from TrkSimpTraj
TrkParams _dtparams
HepPoint3D _refpoint
Protected Attributes inherited from Trajectory
double flightrange [2]

Detailed Description

Constructor & Destructor Documentation

◆ TrkCircleTraj() [1/9]

TrkCircleTraj::TrkCircleTraj ( const HepVector & pvec,
const HepSymMatrix & pcov,
double lowlim = -99999.,
double hilim = 99999.,
const HepPoint3D & refpoint = _theOrigin )

Definition at line 32 of file TrkCircleTraj.cxx.

34 : TrkSimpTraj( pvec, pcov, lowlim, hilim, refpoint )
35//-----------------------------------------------------------------
36{
37 // Make sure the dimensions of the input matrix and vector are correct
38 if ( pvec.num_row() != nCirPrm() || pcov.num_row() != nCirPrm() )
39 {
40 std::cout << "ErrMsg(fatal)"
41 << "CircleTraj: incorrect constructor vector/matrix dimension" << std::endl;
42 }
43
44 if ( omega() == 0.0 ) parameters()->parameter()[omegaIndex()] = 1.e-9;
45}
TrkSimpTraj(const HepVector &params, const HepSymMatrix &cov, const double startRange=-99999., const double endRange=99999., const HepPoint3D &refpoint=_theOrigin)

Referenced by clone(), operator=(), and TrkCircleTraj().

◆ TrkCircleTraj() [2/9]

TrkCircleTraj::TrkCircleTraj ( const TrkExchangePar & inpar,
double lowlim = -99999.,
double hilim = 99999.,
const HepPoint3D & refpoint = _theOrigin )

Definition at line 48 of file TrkCircleTraj.cxx.

50 : TrkSimpTraj( inpar.params(), inpar.covariance(), lowlim, hilim, refpoint ) {
51 //-----------------------------------------------------------------
52
53 if ( omega() == 0.0 ) parameters()->parameter()[omegaIndex()] = 1.e-9;
54}

◆ TrkCircleTraj() [3/9]

◆ ~TrkCircleTraj() [1/3]

TrkCircleTraj::~TrkCircleTraj ( )

Definition at line 72 of file TrkCircleTraj.cxx.

72{}

◆ TrkCircleTraj() [4/9]

TrkCircleTraj::TrkCircleTraj ( const HepVector & ,
const HepSymMatrix & ,
double lowlim = -99999.,
double hilim = 99999.,
const HepPoint3D & refpoint = _theOrigin )

◆ TrkCircleTraj() [5/9]

TrkCircleTraj::TrkCircleTraj ( const TrkExchangePar & ,
double lowlim = -99999.,
double hilim = 99999.,
const HepPoint3D & refpoint = _theOrigin )

◆ TrkCircleTraj() [6/9]

TrkCircleTraj::TrkCircleTraj ( const TrkCircleTraj & )

◆ ~TrkCircleTraj() [2/3]

TrkCircleTraj::~TrkCircleTraj ( )

◆ TrkCircleTraj() [7/9]

TrkCircleTraj::TrkCircleTraj ( const HepVector & ,
const HepSymMatrix & ,
double lowlim = -99999.,
double hilim = 99999.,
const HepPoint3D & refpoint = _theOrigin )

◆ TrkCircleTraj() [8/9]

TrkCircleTraj::TrkCircleTraj ( const TrkExchangePar & ,
double lowlim = -99999.,
double hilim = 99999.,
const HepPoint3D & refpoint = _theOrigin )

◆ TrkCircleTraj() [9/9]

TrkCircleTraj::TrkCircleTraj ( const TrkCircleTraj & )

◆ ~TrkCircleTraj() [3/3]

TrkCircleTraj::~TrkCircleTraj ( )

Member Function Documentation

◆ clone() [1/3]

TrkCircleTraj * TrkCircleTraj::clone ( ) const
virtual

Implements TrkSimpTraj.

Definition at line 60 of file TrkCircleTraj.cxx.

60{ return new TrkCircleTraj( *this ); }
TrkCircleTraj(const HepVector &, const HepSymMatrix &, double lowlim=-99999., double hilim=99999., const HepPoint3D &refpoint=_theOrigin)

◆ clone() [2/3]

TrkCircleTraj * TrkCircleTraj::clone ( ) const
virtual

Implements TrkSimpTraj.

◆ clone() [3/3]

TrkCircleTraj * TrkCircleTraj::clone ( ) const
virtual

Implements TrkSimpTraj.

◆ curvature() [1/3]

double TrkCircleTraj::curvature ( double fltLen) const
virtual

Implements Trajectory.

Definition at line 376 of file TrkCircleTraj.cxx.

376 {
377 // Compute the curvature as the magnitude of the 2nd derrivative
378 // of the position function with respect to the 3-d flight distance
379
380 return fabs( omega() );
381}

◆ curvature() [2/3]

virtual double TrkCircleTraj::curvature ( double fltLen) const
virtual

Implements Trajectory.

◆ curvature() [3/3]

virtual double TrkCircleTraj::curvature ( double fltLen) const
virtual

Implements Trajectory.

◆ d0() [1/3]

◆ d0() [2/3]

double TrkCircleTraj::d0 ( ) const
inline

◆ d0() [3/3]

double TrkCircleTraj::d0 ( ) const
inline

◆ d0Index() [1/3]

int TrkCircleTraj::d0Index ( )
inlinestatic

◆ d0Index() [2/3]

int TrkCircleTraj::d0Index ( )
inlinestatic

Definition at line 78 of file InstallArea/x86_64-el9-gcc13-opt/include/TrkFitter/TrkCircleTraj.h.

78{ return d0Ind; }

◆ d0Index() [3/3]

int TrkCircleTraj::d0Index ( )
inlinestatic

Definition at line 78 of file Reconstruction/MdcPatRec/TrkFitter/include/TrkFitter/TrkCircleTraj.h.

78{ return d0Ind; }

◆ delDirect() [1/3]

Hep3Vector TrkCircleTraj::delDirect ( double fltLen) const
virtual

Implements Trajectory.

Definition at line 101 of file TrkCircleTraj.cxx.

101 {
102 double delX = -omega() * sin( angle( fltLen ) );
103 double delY = omega() * cos( angle( fltLen ) );
104 return Hep3Vector( delX, delY, 0.0 );
105}

◆ delDirect() [2/3]

virtual Hep3Vector TrkCircleTraj::delDirect ( double ) const
virtual

Implements Trajectory.

◆ delDirect() [3/3]

virtual Hep3Vector TrkCircleTraj::delDirect ( double ) const
virtual

Implements Trajectory.

◆ derivDeflect() [1/3]

HepMatrix TrkCircleTraj::derivDeflect ( double fltlen,
deflectDirection idirect ) const
virtual

Implements TrkKalDeriv.

Definition at line 285 of file TrkCircleTraj.cxx.

285 {
286 // This function computes the column matrix of derivatives for the change
287 // in parameters for a change in the direction of a track at a point along
288 // its flight, holding the momentum and position constant. The effects for
289 // changes in 2 perpendicular directions (theta1 = dip and
290 // theta2 = phi*cos(dip)) can sometimes be added, as scattering in these
291 // are uncorrelated.
292
293 HepMatrix ddflct( nCirPrm(), 1, 0 ); // initialize with zeros
294
295 // Compute some common things
296
297 double omeg = omega();
298 double arcl = arc( fltlen );
299 double dx = cos( arcl );
300 double dy = sin( arcl );
301 double darc = omeg * d0();
302
303 // Go through the parameters
304
305 switch ( idirect )
306 {
307 case theta1: break;
308 case theta2:
309 ddflct[d0Index()][0] = -dy / ( omeg );
310 ddflct[phi0Index()][0] = dx / ( 1 + darc );
311 }
312
313 return ddflct;
314}

◆ derivDeflect() [2/3]

HepMatrix TrkCircleTraj::derivDeflect ( double fltlen,
deflectDirection  ) const
virtual

Implements TrkKalDeriv.

◆ derivDeflect() [3/3]

HepMatrix TrkCircleTraj::derivDeflect ( double fltlen,
deflectDirection  ) const
virtual

Implements TrkKalDeriv.

◆ derivDisplace() [1/3]

HepMatrix TrkCircleTraj::derivDisplace ( double fltlen,
deflectDirection idirect ) const
virtual

Implements TrkKalDeriv.

Definition at line 316 of file TrkCircleTraj.cxx.

316 {
317 // This function computes the column matrix of derivatives for the change
318 // in parameters for a change in the position of a track at a point along
319 // its flight, holding the momentum and direction constant. The effects for
320 // changes in 2 perpendicular directions (theta1 = dip and
321 // theta2 = phi*cos(dip)) can sometimes be added, as scattering in these
322 // are uncorrelated.
323
324 HepMatrix ddflct( nCirPrm(), 1, 0 ); // initialize with zeros
325
326 // Compute some common things
327
328 double omeg = omega();
329 double arcl = arc( fltlen );
330 double dx = cos( arcl );
331 double dy = sin( arcl );
332 double darc = omeg * d0();
333
334 // Go through the parameters
335
336 switch ( idirect )
337 {
338 case theta1: break;
339 case theta2: ddflct[d0Index()][0] = dx; ddflct[phi0Index()][0] = dy * omeg / ( 1 + darc );
340 }
341
342 return ddflct;
343}

◆ derivDisplace() [2/3]

HepMatrix TrkCircleTraj::derivDisplace ( double fltlen,
deflectDirection  ) const
virtual

Implements TrkKalDeriv.

◆ derivDisplace() [3/3]

HepMatrix TrkCircleTraj::derivDisplace ( double fltlen,
deflectDirection  ) const
virtual

Implements TrkKalDeriv.

◆ derivPFract() [1/3]

HepMatrix TrkCircleTraj::derivPFract ( double fltlen) const
virtual

Implements TrkKalDeriv.

Definition at line 345 of file TrkCircleTraj.cxx.

345 {
346 //
347 // This function computes the column matrix of derrivatives for the change
348 // in parameters from a (fractional) change in the track momentum,
349 // holding the direction and position constant. The momentum change can
350 // come from energy loss or bfield inhomogeneities.
351 //
352 // For a helix, dp/P = -domega/omega,
353 // dParam/d(domega/omega) = omega*dParam/ddomega
354
355 HepMatrix dmomfrac( nCirPrm(), 1 );
356
357 // Compute some common things
358
359 double omeg = omega();
360 double arcl = arc( fltlen );
361 double dx = cos( arcl );
362 double dy = sin( arcl );
363 double darc = omeg * d0();
364
365 // Go through the parameters
366 // omega
367 dmomfrac[omegaIndex()][0] = -omeg;
368 // d0
369 dmomfrac[d0Index()][0] = -( 1 - dx ) / omeg;
370 // phi0
371 dmomfrac[phi0Index()][0] = dy / ( 1 + darc );
372
373 return dmomfrac;
374}

◆ derivPFract() [2/3]

HepMatrix TrkCircleTraj::derivPFract ( double fltlen) const
virtual

Implements TrkKalDeriv.

◆ derivPFract() [3/3]

HepMatrix TrkCircleTraj::derivPFract ( double fltlen) const
virtual

Implements TrkKalDeriv.

◆ direction() [1/3]

Hep3Vector TrkCircleTraj::direction ( double fltLen) const
virtual

Implements Trajectory.

Definition at line 93 of file TrkCircleTraj.cxx.

93 {
94 // Angle formed by tangent vector after
95 // being rotated 'arclength' around orbit.
96 double alpha = angle( f );
97 // Construct 3-D tangent vector of unit magnitude.
98 return Hep3Vector( cos( alpha ), sin( alpha ), 0.0 );
99}
TFile f("ana_bhabha660a_dqa_mcPat_zy_old.root")
double alpha

◆ direction() [2/3]

virtual Hep3Vector TrkCircleTraj::direction ( double fltLen) const
virtual

Implements Trajectory.

◆ direction() [3/3]

virtual Hep3Vector TrkCircleTraj::direction ( double fltLen) const
virtual

Implements Trajectory.

◆ distTo1stError() [1/3]

double TrkCircleTraj::distTo1stError ( double flt,
double tol,
int pathDir ) const
virtual

Implements Trajectory.

Definition at line 107 of file TrkCircleTraj.cxx.

107 {
108 double arg = 2. * tol / fabs( omega() );
109 assert( arg >= 0. );
110 return sqrt( arg );
111}
double arg(const EvtComplex &c)

◆ distTo1stError() [2/3]

virtual double TrkCircleTraj::distTo1stError ( double flt,
double tol,
int pathDir ) const
virtual

Implements Trajectory.

◆ distTo1stError() [3/3]

virtual double TrkCircleTraj::distTo1stError ( double flt,
double tol,
int pathDir ) const
virtual

Implements Trajectory.

◆ distTo2ndError() [1/3]

double TrkCircleTraj::distTo2ndError ( double flt,
double tol,
int pathDir ) const
virtual

Implements Trajectory.

Definition at line 113 of file TrkCircleTraj.cxx.

113 {
114 // return pow(6.*tol / sqr(omega()), 0.33333333);//yzhang changed sqr
115 return pow( 6. * tol / ( omega() * omega() ), 0.33333333 );
116}

◆ distTo2ndError() [2/3]

virtual double TrkCircleTraj::distTo2ndError ( double flt,
double tol,
int pathDir ) const
virtual

Implements Trajectory.

◆ distTo2ndError() [3/3]

virtual double TrkCircleTraj::distTo2ndError ( double flt,
double tol,
int pathDir ) const
virtual

Implements Trajectory.

◆ getDFInfo() [1/3]

void TrkCircleTraj::getDFInfo ( double fltLen,
DifPoint & pos,
DifVector & dir,
DifVector & delDir ) const
virtual

Implements TrkDifTraj.

Definition at line 218 of file TrkCircleTraj.cxx.

219 {
220 // Provides difNum version of information for calculation of derivatives.
221
222 // Create difNumber versions of parameters
223 DifNumber phi0Df( phi0(), phi0Index() + 1, nCirPrm() );
224 DifNumber d0Df( d0(), d0Index() + 1, nCirPrm() );
225 DifNumber omegaDf( omega(), omegaIndex() + 1, nCirPrm() );
226 phi0Df.setIndepPar( parameters() );
227 d0Df.setIndepPar( parameters() );
228 omegaDf.setIndepPar( parameters() );
229
230 DifNumber sinPhi0, cosPhi0;
231 phi0Df.cosAndSin( cosPhi0, sinPhi0 );
232
233 DifNumber alphaDf = omegaDf;
234 alphaDf *= flt;
235 alphaDf += phi0Df;
236
237 // This is not the prettiest line imaginable for this operation:
238 alphaDf.mod( -Constants::pi, Constants::pi );
239 DifNumber sinAlpha, cosAlpha;
240 alphaDf.cosAndSin( cosAlpha, sinAlpha );
241
242 // DifNumber x = (sinAlpha - sinPhi0) / omegaDf - d0Df * sinPhi0 + px;
243 // DifNumber y = -(cosAlpha - cosPhi0) / omegaDf + d0Df * cosPhi0 + py;
244
245 DifNumber x = sinAlpha;
246 x -= sinPhi0;
247 x /= omegaDf;
248 x -= ( d0Df * sinPhi0 );
249
250 DifNumber y = -cosAlpha;
251 y += cosPhi0;
252 y /= omegaDf;
253 y += ( d0Df * cosPhi0 );
254
255 static DifNumber zNull( 0. );
256
257 pos.x = x;
258 pos.y = y;
259 pos.z = zNull;
260
261 bool lref = ( referencePoint().x() != 0. || referencePoint().y() != 0. ||
262 referencePoint().z() != 0. );
263 if ( lref )
264 {
265 DifNumber px( referencePoint().x() );
266 DifNumber py( referencePoint().y() );
267 DifNumber pz( referencePoint().z() );
268 pos.x += px;
269 pos.y += py;
270 pos.z += pz;
271 }
272
273 dir.x = cosAlpha;
274 dir.y = sinAlpha;
275 dir.z = 0.;
276
277 delDir.x = -omegaDf;
278 delDir.x *= sinAlpha;
279
280 delDir.y = omegaDf;
281 delDir.y *= cosAlpha;
282
283 delDir.z = 0.;
284}
Double_t x[10]
DifNumber & mod(double lo, double hi)
void cosAndSin(DifNumber &c, DifNumber &s) const
double phi0() const

◆ getDFInfo() [2/3]

virtual void TrkCircleTraj::getDFInfo ( double fltLen,
DifPoint & ,
DifVector & dir,
DifVector & delDir ) const
virtual

Implements TrkDifTraj.

◆ getDFInfo() [3/3]

virtual void TrkCircleTraj::getDFInfo ( double fltLen,
DifPoint & ,
DifVector & dir,
DifVector & delDir ) const
virtual

Implements TrkDifTraj.

◆ getDFInfo2() [1/3]

void TrkCircleTraj::getDFInfo2 ( double fltLen,
DifPoint & pos,
DifVector & dir ) const
virtual

Reimplemented from TrkDifTraj.

Definition at line 159 of file TrkCircleTraj.cxx.

159 {
160 // Provides difNum version of information for calculation of derivatives.
161
162 // Create difNumber versions of parameters
163 DifNumber phi0Df( phi0(), phi0Index() + 1, nCirPrm() );
164 DifNumber d0Df( d0(), d0Index() + 1, nCirPrm() );
165 DifNumber omegaDf( omega(), omegaIndex() + 1, nCirPrm() );
166 phi0Df.setIndepPar( parameters() );
167 d0Df.setIndepPar( parameters() );
168 omegaDf.setIndepPar( parameters() );
169
170 DifNumber sinPhi0, cosPhi0;
171 phi0Df.cosAndSin( cosPhi0, sinPhi0 );
172
173 DifNumber alphaDf = omegaDf;
174 alphaDf *= fltLen;
175 alphaDf += phi0Df;
176
177 // This is not the prettiest line imaginable for this operation:
178 alphaDf.mod( -Constants::pi, Constants::pi );
179 DifNumber sinAlpha, cosAlpha;
180 alphaDf.cosAndSin( cosAlpha, sinAlpha );
181
182 // DifNumber x = (sinAlpha - sinPhi0) / omegaDf - d0Df * sinPhi0 + px;
183 // DifNumber y = -(cosAlpha - cosPhi0) / omegaDf + d0Df * cosPhi0 + py;
184
185 DifNumber x = sinAlpha;
186 x -= sinPhi0;
187 x /= omegaDf;
188 x -= ( d0Df * sinPhi0 );
189
190 DifNumber y = -cosAlpha;
191 y += cosPhi0;
192 y /= omegaDf;
193 y += ( d0Df * cosPhi0 );
194
195 static DifNumber zNull( 0. );
196
197 pos.x = x;
198 pos.y = y;
199 pos.z = zNull;
200
201 bool lref = ( referencePoint().x() != 0. || referencePoint().y() != 0. ||
202 referencePoint().z() != 0. );
203 if ( lref )
204 {
205 DifNumber px( referencePoint().x() );
206 DifNumber py( referencePoint().y() );
207 DifNumber pz( referencePoint().z() );
208 pos.x += px;
209 pos.y += py;
210 pos.z += pz;
211 }
212
213 dir.x = cosAlpha;
214 dir.y = sinAlpha;
215 dir.z = 0.;
216}

◆ getDFInfo2() [2/3]

virtual void TrkCircleTraj::getDFInfo2 ( double fltLen,
DifPoint & pos,
DifVector & dir ) const
virtual

Reimplemented from TrkDifTraj.

◆ getDFInfo2() [3/3]

virtual void TrkCircleTraj::getDFInfo2 ( double fltLen,
DifPoint & pos,
DifVector & dir ) const
virtual

Reimplemented from TrkDifTraj.

◆ getInfo() [1/6]

void TrkCircleTraj::getInfo ( double fltLen,
HepPoint3D & pos,
Hep3Vector & dir,
Hep3Vector & delDir ) const
virtual

Implements Trajectory.

Definition at line 118 of file TrkCircleTraj.cxx.

119 {
120 double sphi0 = sin( phi0() );
121 double cphi0 = cos( phi0() );
122 double ang = angle( flt );
123 double cang = cos( ang );
124 double sang = sin( ang );
125 double xt = ( sang - sphi0 ) / omega() - d0() * sphi0 + referencePoint().x();
126 double yt = -( cang - cphi0 ) / omega() + d0() * cphi0 + referencePoint().y();
127
128 pos.setX( xt );
129 pos.setY( yt );
130 pos.setZ( referencePoint().z() );
131
132 dir.setX( cang );
133 dir.setY( sang );
134 dir.setZ( 0.0 );
135
136 delDir.setX( -omega() * sang );
137 delDir.setY( omega() * cang );
138 delDir.setZ( 0. );
139}

◆ getInfo() [2/6]

virtual void TrkCircleTraj::getInfo ( double fltLen,
HepPoint3D & ,
Hep3Vector & dir,
Hep3Vector & delDir ) const
virtual

Implements Trajectory.

◆ getInfo() [3/6]

virtual void TrkCircleTraj::getInfo ( double fltLen,
HepPoint3D & ,
Hep3Vector & dir,
Hep3Vector & delDir ) const
virtual

Implements Trajectory.

◆ getInfo() [4/6]

void TrkCircleTraj::getInfo ( double fltLen,
HepPoint3D & pos,
Hep3Vector & dir ) const
virtual

Implements Trajectory.

Definition at line 141 of file TrkCircleTraj.cxx.

141 {
142 double sphi0 = sin( phi0() );
143 double cphi0 = cos( phi0() );
144 double ang = angle( fltLen );
145 double cang = cos( ang );
146 double sang = sin( ang );
147 double xt = ( sang - sphi0 ) / omega() - d0() * sphi0 + referencePoint().x();
148 double yt = -( cang - cphi0 ) / omega() + d0() * cphi0 + referencePoint().y();
149
150 pos.setX( xt );
151 pos.setY( yt );
152 pos.setZ( referencePoint().z() );
153
154 dir.setX( cang );
155 dir.setY( sang );
156 dir.setZ( 0.0 );
157}

◆ getInfo() [5/6]

virtual void TrkCircleTraj::getInfo ( double fltLen,
HepPoint3D & pos,
Hep3Vector & dir ) const
virtual

Implements Trajectory.

◆ getInfo() [6/6]

virtual void TrkCircleTraj::getInfo ( double fltLen,
HepPoint3D & pos,
Hep3Vector & dir ) const
virtual

Implements Trajectory.

◆ invertParams() [1/3]

void TrkCircleTraj::invertParams ( TrkParams * params,
std::vector< bool > & flags ) const
virtual

Implements TrkSimpTraj.

Definition at line 440 of file TrkCircleTraj.cxx.

440 {
441 // Inverts parameters and returns true if the parameter inversion
442 // requires a change in sign of elements in the covariance matrix
443
444 for ( unsigned iparam = 0; iparam < NCIRPAR; iparam++ )
445 {
446 switch ( iparam )
447 {
448 case d0Ind: // changes sign
449 case omegaInd: // changes sign
450 params->parameter()[iparam] *= -1.0;
451 flags[iparam] = true;
452 break;
453 case phi0Ind: // changes by pi, but covariance matrix shouldn't change
454 params->parameter()[iparam] = BesAngle( params->parameter()[iparam] + Constants::pi );
455 flags[iparam] = false;
456 }
457 }
458}

◆ invertParams() [2/3]

void TrkCircleTraj::invertParams ( TrkParams * params,
std::vector< bool > & flags ) const
virtual

Implements TrkSimpTraj.

◆ invertParams() [3/3]

void TrkCircleTraj::invertParams ( TrkParams * params,
std::vector< bool > & flags ) const
virtual

Implements TrkSimpTraj.

◆ nCirPrm() [1/3]

int TrkCircleTraj::nCirPrm ( )
inlinestatic

◆ nCirPrm() [2/3]

int TrkCircleTraj::nCirPrm ( )
inlinestatic

Definition at line 81 of file InstallArea/x86_64-el9-gcc13-opt/include/TrkFitter/TrkCircleTraj.h.

81{ return NCIRPAR; }

◆ nCirPrm() [3/3]

int TrkCircleTraj::nCirPrm ( )
inlinestatic

Definition at line 81 of file Reconstruction/MdcPatRec/TrkFitter/include/TrkFitter/TrkCircleTraj.h.

81{ return NCIRPAR; }

◆ nPar() [1/3]

int TrkCircleTraj::nPar ( ) const
inlinevirtual

Reimplemented from TrkSimpTraj.

Definition at line 64 of file InstallArea/x86_64-el9-gcc13-dbg/include/TrkFitter/TrkCircleTraj.h.

64{ return NCIRPAR; }

◆ nPar() [2/3]

int TrkCircleTraj::nPar ( ) const
inlinevirtual

Reimplemented from TrkSimpTraj.

Definition at line 64 of file InstallArea/x86_64-el9-gcc13-opt/include/TrkFitter/TrkCircleTraj.h.

64{ return NCIRPAR; }

◆ nPar() [3/3]

int TrkCircleTraj::nPar ( ) const
inlinevirtual

Reimplemented from TrkSimpTraj.

Definition at line 64 of file Reconstruction/MdcPatRec/TrkFitter/include/TrkFitter/TrkCircleTraj.h.

64{ return NCIRPAR; }

◆ omega() [1/3]

◆ omega() [2/3]

double TrkCircleTraj::omega ( ) const
inline

◆ omega() [3/3]

double TrkCircleTraj::omega ( ) const
inline

◆ omegaIndex() [1/3]

int TrkCircleTraj::omegaIndex ( )
inlinestatic

◆ omegaIndex() [2/3]

int TrkCircleTraj::omegaIndex ( )
inlinestatic

Definition at line 80 of file InstallArea/x86_64-el9-gcc13-opt/include/TrkFitter/TrkCircleTraj.h.

80{ return omegaInd; }

◆ omegaIndex() [3/3]

int TrkCircleTraj::omegaIndex ( )
inlinestatic

Definition at line 80 of file Reconstruction/MdcPatRec/TrkFitter/include/TrkFitter/TrkCircleTraj.h.

80{ return omegaInd; }

◆ operator=() [1/3]

TrkCircleTraj & TrkCircleTraj::operator= ( const TrkCircleTraj & h)

Definition at line 62 of file TrkCircleTraj.cxx.

62 {
63 if ( &h != this )
64 {
66 _dtparams = *( h.parameters() );
68 }
69 return *this;
70}
Trajectory & operator=(const Trajectory &)

◆ operator=() [2/3]

TrkCircleTraj & TrkCircleTraj::operator= ( const TrkCircleTraj & )

◆ operator=() [3/3]

TrkCircleTraj & TrkCircleTraj::operator= ( const TrkCircleTraj & )

◆ paramFunction() [1/3]

TranslateParams TrkCircleTraj::paramFunction ( ) const
inlinevirtual

Implements TrkSimpTraj.

Definition at line 59 of file InstallArea/x86_64-el9-gcc13-dbg/include/TrkFitter/TrkCircleTraj.h.

59{ return TrkCircleTraj::paramFunc; }

◆ paramFunction() [2/3]

TranslateParams TrkCircleTraj::paramFunction ( ) const
inlinevirtual

Implements TrkSimpTraj.

Definition at line 59 of file InstallArea/x86_64-el9-gcc13-opt/include/TrkFitter/TrkCircleTraj.h.

59{ return TrkCircleTraj::paramFunc; }

◆ paramFunction() [3/3]

TranslateParams TrkCircleTraj::paramFunction ( ) const
inlinevirtual

Implements TrkSimpTraj.

Definition at line 59 of file Reconstruction/MdcPatRec/TrkFitter/include/TrkFitter/TrkCircleTraj.h.

59{ return TrkCircleTraj::paramFunc; }

◆ phi0() [1/3]

double TrkCircleTraj::phi0 ( ) const

Definition at line 383 of file TrkCircleTraj.cxx.

383 {
384 return BesAngle( parameters()->parameter()[phi0Index()] ).rad();
385}

Referenced by getDFInfo(), getDFInfo2(), getInfo(), getInfo(), and position().

◆ phi0() [2/3]

double TrkCircleTraj::phi0 ( ) const

◆ phi0() [3/3]

double TrkCircleTraj::phi0 ( ) const

◆ phi0Index() [1/3]

int TrkCircleTraj::phi0Index ( )
inlinestatic

◆ phi0Index() [2/3]

int TrkCircleTraj::phi0Index ( )
inlinestatic

Definition at line 79 of file InstallArea/x86_64-el9-gcc13-opt/include/TrkFitter/TrkCircleTraj.h.

79{ return phi0Ind; }

◆ phi0Index() [3/3]

int TrkCircleTraj::phi0Index ( )
inlinestatic

Definition at line 79 of file Reconstruction/MdcPatRec/TrkFitter/include/TrkFitter/TrkCircleTraj.h.

79{ return phi0Ind; }

◆ position() [1/3]

HepPoint3D TrkCircleTraj::position ( double fltLen) const
virtual

Implements Trajectory.

Definition at line 84 of file TrkCircleTraj.cxx.

84 {
85 double sphi0 = sin( phi0() );
86 double cphi0 = cos( phi0() );
87 double ang = angle( f );
88 double xt = ( sin( ang ) - sphi0 ) / omega() - d0() * sphi0 + referencePoint().x();
89 double yt = -( cos( ang ) - cphi0 ) / omega() + d0() * cphi0 + referencePoint().y();
90 return HepPoint3D( xt, yt, referencePoint().z() );
91}

◆ position() [2/3]

virtual HepPoint3D TrkCircleTraj::position ( double fltLen) const
virtual

Implements Trajectory.

◆ position() [3/3]

virtual HepPoint3D TrkCircleTraj::position ( double fltLen) const
virtual

Implements Trajectory.

◆ visitAccept() [1/3]

void TrkCircleTraj::visitAccept ( TrkVisitor * vis) const
virtual

Implements TrkSimpTraj.

Definition at line 466 of file TrkCircleTraj.cxx.

466 {
467 // Visitor access--just use the TrkVisitor class member function
468 vis->trkVisitCircleTraj( this );
469}
virtual void trkVisitCircleTraj(const TrkCircleTraj *)=0

◆ visitAccept() [2/3]

virtual void TrkCircleTraj::visitAccept ( TrkVisitor * vis) const
virtual

Implements TrkSimpTraj.

◆ visitAccept() [3/3]

virtual void TrkCircleTraj::visitAccept ( TrkVisitor * vis) const
virtual

Implements TrkSimpTraj.


The documentation for this class was generated from the following files: