28using CLHEP::Hep3Vector;
29using CLHEP::HepSymMatrix;
33 double lowlim,
double hilim,
const HepPoint3D& refpoint) :
38 if( pvec.num_row() !=
nCirPrm() ||
40 std::cout<<
"ErrMsg(fatal)" <<
41 "CircleTraj: incorrect constructor vector/matrix dimension" << std::endl;
50 double lowlim,
double hilim,
const HepPoint3D& refpoint) :
51 TrkSimpTraj(inpar.params(), inpar.covariance(), lowlim,hilim,refpoint) {
59 h.lowRange(),h.hiRange(),h.referencePoint())
86TrkCircleTraj::x(
const double& f )
const
93TrkCircleTraj::y(
const double& f )
const
104 double ang = angle(f);
115 double alpha = angle( f );
125 double delX = -
omega() *
sin(angle(fltLen));
126 double delY =
omega() *
cos(angle(fltLen));
127 return Hep3Vector(delX, delY, 0.0);
133 double arg = 2. * tol / fabs(
omega());
142 return pow(6.*tol / (
omega()*
omega()), 0.33333333);
147 Hep3Vector& delDir)
const
151 double ang = angle(flt);
152 double cang =
cos(ang);
153 double sang =
sin(ang);
165 delDir.setX(-
omega()*sang);
166 delDir.setY(
omega()*cang);
175 double ang = angle(fltLen);
176 double cang =
cos(ang);
177 double sang =
sin(ang);
222 x -= (d0Df * sinPhi0);
227 y += (d0Df * cosPhi0);
284 x -= (d0Df * sinPhi0);
289 y += (d0Df * cosPhi0);
314 delDir.
x *= sinAlpha;
317 delDir.
y *= cosAlpha;
331 HepMatrix ddflct(
nCirPrm(),1,0);
335 double omeg =
omega();
336 double arcl = arc(fltlen);
337 double dx =
cos(arcl);
338 double dy =
sin(arcl);
339 double darc = omeg*
d0();
347 ddflct[
d0Index()][0] = -dy/(omeg);
364 HepMatrix ddflct(
nCirPrm(),1,0);
368 double omeg =
omega();
369 double arcl = arc(fltlen);
370 double dx =
cos(arcl);
371 double dy =
sin(arcl);
372 double darc = omeg*
d0();
381 ddflct[
phi0Index()][0] = dy*omeg/(1+darc);
399 HepMatrix dmomfrac(
nCirPrm(),1);
403 double omeg =
omega();
404 double arcl = arc(fltlen);
405 double dx =
cos(arcl);
406 double dy =
sin(arcl);
407 double darc = omeg*
d0();
413 dmomfrac[
d0Index()][0] = -(1-dx)/omeg;
426 return fabs(
omega());
437 const HepVector& oldvec,
const HepSymMatrix& oldcov,
438 HepVector& newvec,HepSymMatrix& newcov,
442 HepVector parvec(oldvec);
446 double delx = newpoint.x()-oldpoint.x();
447 double dely = newpoint.y()-oldpoint.y();
454 double perp = delx*sin0-dely*cos0;
455 double para = delx*cos0+dely*sin0;
458 double newdelta2 = delta*delta + delx*delx + dely*dely +
461 double newdelta = delta>0 ? sqrt(newdelta2) : -sqrt(newdelta2);
462 double invdelta = 1.0/newdelta;
463 double invdelta2 = 1.0/newdelta2;
467 double newphi = atan2(sin0+delx/delta,cos0-dely/delta);
468 while(fabs(newphi - oldphi)>
M_PI)
490 newcov = oldcov.similarity(covrot);
500 for (
unsigned iparam = 0; iparam < NCIRPAR; iparam++) {
505 flags[iparam] =
true;
510 flags[iparam] =
false;
529TrkCircleTraj::angle(
const double& f)
const
double sin(const BesAngle a)
double cos(const BesAngle a)
double arg(const EvtComplex &c)
************Class m_ypar INTEGER m_KeyWgt INTEGER m_nphot INTEGER m_KeyGPS INTEGER m_IsBeamPolarized INTEGER m_EvtGenInterface DOUBLE PRECISION m_Emin DOUBLE PRECISION m_sphot DOUBLE PRECISION m_Xenph DOUBLE PRECISION m_q2 DOUBLE PRECISION m_PolBeam2 DOUBLE PRECISION m_xErrPb *COMMON c_KK2f $ !CMS energy average $ !Spin Polarization vector first beam $ !Spin Polarization vector second beam $ !Beam energy spread[GeV] $ !minimum hadronization energy[GeV] $ !input parameters
HepGeom::Point3D< double > HepPoint3D
void setIndepPar(const DifIndepPar *par)
DifNumber & mod(double lo, double hi)
void cosAndSin(DifNumber &c, DifNumber &s) const
Trajectory & operator=(const Trajectory &)
virtual Hep3Vector direction(double fltLen) const
HepMatrix derivDeflect(double fltlen, deflectDirection) const
virtual void getDFInfo2(double fltLen, DifPoint &pos, DifVector &dir) const
virtual double distTo2ndError(double flt, double tol, int pathDir) const
virtual double distTo1stError(double flt, double tol, int pathDir) const
TrkCircleTraj * clone() const
virtual double curvature(double fltLen) const
TrkCircleTraj(const HepVector &, const HepSymMatrix &, double lowlim=-99999., double hilim=99999., const HepPoint3D &refpoint=_theOrigin)
HepMatrix derivDisplace(double fltlen, deflectDirection) const
virtual void visitAccept(TrkVisitor *vis) const
void invertParams(TrkParams *params, std::vector< bool > &flags) const
virtual HepPoint3D position(double fltLen) const
virtual void getDFInfo(double fltLen, DifPoint &, DifVector &dir, DifVector &delDir) const
virtual Hep3Vector delDirect(double) const
HepMatrix derivPFract(double fltlen) const
virtual void getInfo(double fltLen, HepPoint3D &pos, Hep3Vector &dir) const
TrkCircleTraj & operator=(const TrkCircleTraj &)
const HepPoint3D & referencePoint() const
virtual void trkVisitCircleTraj(const TrkCircleTraj *)=0