59 :
TrkGeomTraj(0.0,start.distance(stop)), _sag(sag), _start(start), _stop(stop)
62 _direction = ((CLHEP::Hep3Vector) stop) - ((CLHEP::Hep3Vector) start);
63 _length = _direction.mag();
64 assert( _length != 0 );
66 _direction.setMag(1.0);
67 _a = _sag*4./(_length*_length);
73 :
TrkGeomTraj(0.0,other._start.distance(other._stop)),
74 _sag(other._sag), _a(other._a), _b(other._b), _length(other._length),
75 _start(other._start), _stop(other._stop),
76 _direction(other._direction)
97 for(
int iend=0;iend<2;iend++)
99 _start = other._start;
104 _length = other._length;
105 _direction = other._direction;
111MdcSagTraj::deviation(
double flightlen )
const
117 return Hep3Vector(0., (_a*flightlen+_b)*flightlen, 0.);
127 tmppos.setY(tmppos.y()+(_a*flightlen+_b)*flightlen);
133 if ( flightlen <= 0. )
return _direction;
135 static Hep3Vector tmpdir;
136 tmpdir = _direction*flightlen;
139 tmpdir.setY(tmpdir.y() + 2.*_a*flightlen+_b);
148 return Hep3Vector(0., 2.*_a, 0.);
161 if ( flightlen > 0. ) {
162 pos.setY(pos.y() +
deltaY(flightlen));
163 dir.setY(dir.y() + 2.*_a*flightlen+_b);
170 Hep3Vector& delDir )
const
178 pos.setY( pos.y() + (_a*flightlen+_b)*flightlen) ;
181 dir.setY( dir.y() + 2*_a*flightlen+_b) ;
198 double dtmp = pathDir*2.*_a*flightlen+_b;
200 return dtmp==0. ? 9999.e4 : fabs(tol/dtmp);
214 std::cout<<
"ErrMsg(error)"<<
"accept visitor NOT implemented yet"<<std::endl;
HepGeom::Point3D< double > HepPoint3D
HepPoint3D position(double) const
double curvature(double f=0.) const
MdcSagTraj & operator=(const MdcSagTraj &)
MdcSagTraj * clone() const
Hep3Vector delDirect(double) const
void getInfo(double fltLen, HepPoint3D &, Hep3Vector &direction) const
virtual double distTo2ndError(double s, double tol, int pathDir) const
virtual double distTo1stError(double s, double tol, int pathDir) const
MdcSagTraj(const double sag, const HepPoint3D &point1, const HepPoint3D &point2)
double deltaY(double fltLen) const
Hep3Vector direction(double) const
void accept(TrkGeomTrajVisitor &visitor) const