#include <MdcSagTraj.h>
Inheritance diagram for MdcSagTraj:
Public Member Functions | |
void | accept (TrkGeomTrajVisitor &visitor) const |
void | accept (TrkGeomTrajVisitor &visitor) const |
MdcSagTraj * | clone () const |
MdcSagTraj * | clone () const |
double | curvature (double f=0.) const |
double | curvature (double f=0.) const |
Hep3Vector | delDirect (double) const |
Hep3Vector | delDirect (double) const |
double | deltaY (double fltLen) const |
double | deltaY (double fltLen) const |
Hep3Vector | direction (double) const |
Hep3Vector | direction (double) const |
double | distTo0thError (double s, double tol, int pathDir) const |
double | distTo0thError (double s, double tol, int pathDir) const |
virtual double | distTo1stError (double s, double tol, int pathDir) const |
virtual double | distTo1stError (double s, double tol, int pathDir) const |
virtual double | distTo2ndError (double s, double tol, int pathDir) const |
virtual double | distTo2ndError (double s, double tol, int pathDir) const |
void | getInfo (double fltLen, HepPoint3D &, Hep3Vector &direction, Hep3Vector &delDirect) const |
void | getInfo (double fltLen, HepPoint3D &, Hep3Vector &direction) const |
void | getInfo (double fltLen, HepPoint3D &, Hep3Vector &direction, Hep3Vector &delDirect) const |
void | getInfo (double fltLen, HepPoint3D &, Hep3Vector &direction) const |
double | hiRange () const |
double | hiRange () const |
double | lowRange () const |
double | lowRange () const |
MdcSagTraj (const MdcSagTraj &traj) | |
MdcSagTraj (const double sag, const HepPoint3D &point1, const HepPoint3D &point2) | |
MdcSagTraj (const MdcSagTraj &traj) | |
MdcSagTraj (const double sag, const HepPoint3D &point1, const HepPoint3D &point2) | |
MdcSagTraj & | operator= (const MdcSagTraj &) |
MdcSagTraj & | operator= (const MdcSagTraj &) |
HepPoint3D | position (double) const |
HepPoint3D | position (double) const |
virtual void | print (std::ostream &os) const |
virtual void | print (std::ostream &os) const |
virtual void | printAll (std::ostream &os) const |
virtual void | printAll (std::ostream &os) const |
double | range () const |
double | range () const |
const Hep3Vector & | rawDirection (void) const |
const Hep3Vector & | rawDirection (void) const |
double | sag (void) const |
double | sag (void) const |
virtual void | setFlightRange (double newrange[2]) |
virtual void | setFlightRange (double newrange[2]) |
bool | validFlightDistance (double f, double tolerance=0.0) const |
bool | validFlightDistance (double f, double tolerance=0.0) const |
virtual | ~MdcSagTraj () |
virtual | ~MdcSagTraj () |
Protected Attributes | |
double | flightrange [2] |
Private Member Functions | |
Hep3Vector | deviation (double) const |
Hep3Vector | deviation (double) const |
Private Attributes | |
double | _a |
double | _b |
Hep3Vector | _direction |
double | _length |
double | _sag |
HepPoint3D | _start |
HepPoint3D | _stop |
|
00059 : TrkGeomTraj(0.0,start.distance(stop)), _sag(sag), _start(start), _stop(stop) 00060 { 00061 //_direction = stop - start; 00062 _direction = ((CLHEP::Hep3Vector) stop) - ((CLHEP::Hep3Vector) start); 00063 _length = _direction.mag(); 00064 assert( _length != 0 ); 00065 00066 _direction.setMag(1.0); 00067 _a = _sag*4./(_length*_length); 00068 _b = -_a*_length; 00069 00070 }
|
|
00073 : TrkGeomTraj(0.0,other._start.distance(other._stop)), 00074 _sag(other._sag), _a(other._a), _b(other._b), _length(other._length), 00075 _start(other._start), _stop(other._stop), 00076 _direction(other._direction) 00077 {}
|
|
00079 {;}
|
|
|
|
|
|
|
|
Reimplemented from TrkGeomTraj. |
|
Reimplemented from TrkGeomTraj. 00213 { 00214 std::cout<<"ErrMsg(error)"<<"accept visitor NOT implemented yet"<<std::endl; 00215 }
|
|
Implements TrkGeomTraj. |
|
Implements TrkGeomTraj. 00085 { 00086 return new MdcSagTraj(*this); 00087 }
|
|
Implements Trajectory. |
|
Implements Trajectory. 00191 {
00192 return _sag;
00193 }
|
|
Implements Trajectory. |
|
Implements Trajectory. 00147 {
00148 return Hep3Vector(0., 2.*_a, 0.);
00149 }
|
|
00094 { return (_a*fltLen+_b)*fltLen; }
|
|
00094 { return (_a*fltLen+_b)*fltLen; }
|
|
|
|
00112 { 00113 // only correction in y 00114 // Hep3Vector deviation(0., (_a*flightlen+_b)*flightlen, 0.); 00115 // Hep3Vector deviaH(0.,cosh((flightlen-_length/2.)/_a_H)+_b_H,0.); 00116 // return deviation; 00117 return Hep3Vector(0., (_a*flightlen+_b)*flightlen, 0.); 00118 }
|
|
Implements Trajectory. |
|
Implements Trajectory. 00132 { 00133 if ( flightlen <= 0. ) return _direction; 00134 // Hep3Vector dir = _direction*flightlen + delDirect(flightlen); 00135 static Hep3Vector tmpdir; 00136 tmpdir = _direction*flightlen; 00137 // register double newy = tmpdir.y() + 2.*_a*flightlen+_b; 00138 // tmpdir.setY(newy); 00139 tmpdir.setY(tmpdir.y() + 2.*_a*flightlen+_b); 00140 // tmpdir += delDirect(flightlen); 00141 tmpdir.setMag(1.0); 00142 return tmpdir; 00143 }
|
|
|
|
00052 {
00053 return fabs(tolerance);
00054 }
|
|
Implements Trajectory. |
|
Implements Trajectory. 00197 { 00198 double dtmp = pathDir*2.*_a*flightlen+_b; 00199 00200 return dtmp==0. ? 9999.e4 : fabs(tol/dtmp); 00201 }
|
|
Implements Trajectory. |
|
Implements Trajectory. 00205 { 00206 return 999.e4 ; 00207 //return _a==0. ? 999.e4 : tol/(2.*_a); 00208 }
|
|
Implements Trajectory. |
|
Implements Trajectory. |
|
Implements Trajectory. 00171 { 00172 // std::cout<<"Dyz*"<<"MdcSagTraj011 "<<std::endl;//yzhang DEBUG 00173 00174 pos = _start; 00175 //CHANGE pos += _direction*flightlen ; 00176 pos += (HepPoint3D) _direction*flightlen ; 00177 00178 pos.setY( pos.y() + (_a*flightlen+_b)*flightlen) ; 00179 00180 dir = _direction; 00181 dir.setY( dir.y() + 2*_a*flightlen+_b) ; 00182 // Note: `dir' is on purpose not normalized (WDH, Jan 2003) 00183 00184 delDir.setX(0.); 00185 delDir.setY(2.*_a); 00186 delDir.setZ(0.); 00187 }
|
|
Implements Trajectory. 00153 { 00154 // std::cout<<"Dyz*"<<"MdcSagTraj01 "<<std::endl;//yzhang DEBUG 00155 // Written using +=, etc to avoid temporaries 00156 pos = _start; 00157 //CHANGE pos += _direction*flightlen; 00158 pos += (HepPoint3D) _direction*flightlen; 00159 00160 dir = _direction; 00161 if ( flightlen > 0. ) { 00162 pos.setY(pos.y() + deltaY(flightlen)); 00163 dir.setY(dir.y() + 2.*_a*flightlen+_b); 00164 dir.setMag(1.0); 00165 } 00166 }
|
|
|
|
00092 {return flightrange[1];}
|
|
|
|
00091 {return flightrange[0];}
|
|
|
|
00095 { 00096 if(&other != this){ 00097 for(int iend=0;iend<2;iend++) 00098 flightrange[iend] = other.flightrange[iend]; 00099 _start = other._start; 00100 _stop = other._stop; 00101 _sag = other._sag; 00102 _a = other._a; 00103 _b = other._b; 00104 _length = other._length; 00105 _direction = other._direction; 00106 } 00107 return *this; 00108 }
|
|
Implements Trajectory. |
|
Implements Trajectory. 00122 { 00123 static HepPoint3D tmppos; 00124 tmppos = _start; 00125 //CHANGE tmppos += _direction*flightlen; 00126 tmppos += (HepPoint3D) _direction*flightlen;//yzhang TEMP 00127 tmppos.setY(tmppos.y()+(_a*flightlen+_b)*flightlen); 00128 return tmppos; 00129 }
|
|
Reimplemented in HelixTraj, TrkDifPieceTraj, TrkSimpTraj, HelixTraj, TrkDifPieceTraj, and TrkSimpTraj. |
|
Reimplemented in HelixTraj, TrkDifPieceTraj, TrkSimpTraj, HelixTraj, TrkDifPieceTraj, and TrkSimpTraj. 00071 { 00072 os << "Trajectory range from " 00073 << flightrange[0] << " to " 00074 << flightrange[1] << endl; 00075 }
|
|
Reimplemented in HelixTraj, TrkDifPieceTraj, TrkSimpTraj, HelixTraj, TrkDifPieceTraj, and TrkSimpTraj. |
|
Reimplemented in HelixTraj, TrkDifPieceTraj, TrkSimpTraj, HelixTraj, TrkDifPieceTraj, and TrkSimpTraj. 00079 { 00080 os << "Trajectory range from " 00081 << flightrange[0] << " to " 00082 << flightrange[1] << endl; 00083 }
|
|
|
|
|
|
00087 { return _direction; }
|
|
00087 { return _direction; }
|
|
00080 { return _sag; }
|
|
00080 { return _sag; }
|
|
Reimplemented in TrkDifPieceTraj, and TrkDifPieceTraj. |
|
Reimplemented in TrkDifPieceTraj, and TrkDifPieceTraj. 00058 { 00059 if (newrange[1] >= newrange[0]) { 00060 flightrange[0] = newrange[0]; 00061 flightrange[1] = newrange[1]; 00062 } else { 00063 std::cout<<"ErrMsg(error) "<< "Invalid Trajectory range requested." << std::endl; 00064 flightrange[0] = newrange[1]; 00065 flightrange[1] = newrange[0]; 00066 } 00067 }
|
|
|
|
00088 { 00089 return f >= flightrange[0]-tol && f <= flightrange[1]+tol; 00090 }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|