#include <TrkDifLineTraj.h>
Inheritance diagram for TrkDifLineTraj:
Public Types | |
d0Ind = 0 | |
phi0Ind | |
z0Ind | |
tanDipInd | |
NLINPRM = 4 | |
enum | { d0Ind = 0, phi0Ind, z0Ind, tanDipInd } |
enum | { NLINPRM = 4 } |
Public Member Functions | |
TrkDifLineTraj (const HepVector &, const HepSymMatrix &, double lowlim=-99999., double hilim=99999., const HepPoint3D &refpoint=_theOrigin) | |
TrkDifLineTraj (const TrkExchangePar &, double lowlim=-99999., double hilim=99999., const HepPoint3D &refpoint=_theOrigin) | |
TrkDifLineTraj (const TrkDifLineTraj &) | |
TrkDifLineTraj * | clone () const |
~TrkDifLineTraj () | |
TrkDifLineTraj & | operator= (const TrkDifLineTraj &) |
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 double | curvature (double fltLen) const |
double | cosDip () const |
double | d0 () const |
double | z0 () const |
double | tanDip () const |
double | phi0 () const |
int | nPar () 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 |
virtual void | visitAccept (TrkVisitor *vis) const |
TrkParams * | parameters () |
const TrkParams * | parameters () const |
virtual const TrkSimpTraj * | localTrajectory (double fltLen, double &localFlt) const |
const HepPoint3D & | referencePoint () 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) |
TrkSimpTraj & | invert () |
bool | operator== (const TrkSimpTraj &) const |
virtual void | getDFInfo2 (double fltLen, DifPoint &pos, DifVector &direction) const |
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 Attributes | |
static HepPoint3D | _theOrigin |
Protected Attributes | |
TrkParams | _dtparams |
HepPoint3D | _refpoint |
double | flightrange [2] |
Private Member Functions | |
double | x (const double &) const |
double | y (const double &) const |
double | z (const double &) const |
int | d0Index () const |
int | phi0Index () const |
int | z0Index () const |
int | tanDipIndex () const |
int | nLinPrm () const |
Static Private Member Functions | |
static void | paramFunc (const HepPoint3D &oldpoint, const HepPoint3D &newpoint, const HepVector &oldpar, const HepSymMatrix &oldcov, HepVector &newpar, HepSymMatrix &newcov, double fltlen) |
Definition at line 25 of file TrkDifLineTraj.h.
anonymous enum |
anonymous enum |
TrkDifLineTraj::TrkDifLineTraj | ( | const HepVector & | , | |
const HepSymMatrix & | , | |||
double | lowlim = -99999. , |
|||
double | hilim = 99999. , |
|||
const HepPoint3D & | refpoint = _theOrigin | |||
) |
Definition at line 25 of file TrkDifLineTraj.cxx.
Referenced by clone().
00026 : 00027 TrkSimpTraj(pvec, pcov, lowlim,hilim,refpoint) 00028 { 00029 }
TrkDifLineTraj::TrkDifLineTraj | ( | const TrkExchangePar & | , | |
double | lowlim = -99999. , |
|||
double | hilim = 99999. , |
|||
const HepPoint3D & | refpoint = _theOrigin | |||
) |
Definition at line 31 of file TrkDifLineTraj.cxx.
References TrkExchangePar::covariance(), TrkExchangePar::d0(), d0Ind, TrkExchangePar::ex_d0, TrkExchangePar::ex_phi0, TrkExchangePar::ex_tanDip, TrkExchangePar::ex_z0, NLINPRM, TrkSimpTraj::parameters(), TrkExchangePar::phi0(), phi0Ind, TrkExchangePar::tanDip(), tanDipInd, TrkExchangePar::z0(), and z0Ind.
00032 : 00033 TrkSimpTraj(HepVector(NLINPRM,1),HepSymMatrix(NLINPRM,1), lowlim,hilim,refpoint) 00034 { 00035 // the above constructor actually screws up z0 and tandip. I can't fix it in 00036 // the initializer, so I'll just overwrite the track here. Ugly and inefficient 00037 HepVector subvect(NLINPRM,1); 00038 HepSymMatrix submat(NLINPRM,1); 00039 const HepSymMatrix covar = inpar.covariance(); 00040 subvect[d0Ind] = inpar.d0(); 00041 subvect[phi0Ind] = inpar.phi0(); 00042 subvect[z0Ind] = inpar.z0(); 00043 subvect[tanDipInd] = inpar.tanDip(); 00044 00045 submat.fast(d0Ind+1,d0Ind+1) = covar.fast(TrkExchangePar::ex_d0+1,TrkExchangePar::ex_d0+1); 00046 submat.fast(d0Ind+1,phi0Ind+1) = covar.fast(TrkExchangePar::ex_d0+1,TrkExchangePar::ex_phi0+1); 00047 submat.fast(d0Ind+1,z0Ind+1) = covar.fast(TrkExchangePar::ex_d0+1,TrkExchangePar::ex_z0+1); 00048 submat.fast(d0Ind+1,tanDipInd+1) = covar.fast(TrkExchangePar::ex_d0+1,TrkExchangePar::ex_tanDip+1); 00049 submat.fast(phi0Ind+1,phi0Ind+1) = covar.fast(TrkExchangePar::ex_phi0+1,TrkExchangePar::ex_phi0+1); 00050 submat.fast(phi0Ind+1,z0Ind+1) = covar.fast(TrkExchangePar::ex_phi0+1,TrkExchangePar::ex_z0+1); 00051 submat.fast(phi0Ind+1,tanDipInd+1) = covar.fast(TrkExchangePar::ex_phi0+1,TrkExchangePar::ex_tanDip+1); 00052 submat.fast(z0Ind+1,z0Ind+1) = covar.fast(TrkExchangePar::ex_z0+1,TrkExchangePar::ex_z0+1); 00053 submat.fast(z0Ind+1,tanDipInd+1) = covar.fast(TrkExchangePar::ex_z0+1,TrkExchangePar::ex_tanDip+1); 00054 submat.fast(tanDipInd+1,tanDipInd+1) = covar.fast(TrkExchangePar::ex_tanDip+1,TrkExchangePar::ex_tanDip+1); 00055 // reset the track 00056 (*parameters()) = TrkParams(subvect,submat); 00057 }
TrkDifLineTraj::TrkDifLineTraj | ( | const TrkDifLineTraj & | ) |
Definition at line 59 of file TrkDifLineTraj.cxx.
00060 : TrkSimpTraj(h.parameters()->parameter(), h.parameters()->covariance(), 00061 h.lowRange(),h.hiRange(),h.referencePoint()) 00062 { 00063 }
TrkDifLineTraj::~TrkDifLineTraj | ( | ) |
void TrkSimpTraj::changePoint | ( | const HepPoint3D & | newpoint, | |
double & | fltlen | |||
) | [inherited] |
Definition at line 70 of file TrkSimpTraj.cxx.
References TrkSimpTraj::_dtparams, TrkSimpTraj::_refpoint, TrkParams::covariance(), TrkErrCode::failure(), TrkPocaBase::flt1(), Trajectory::hiRange(), icol, Trajectory::lowRange(), DifIndepPar::parameter(), TrkSimpTraj::parameters(), TrkSimpTraj::paramFunction(), Trajectory::setFlightRange(), and TrkPocaBase::status().
00070 { 00071 //---------------------------------------------------------------------------- 00072 if(newpoint != _refpoint){ 00073 // find POCA to the new point 00074 TrkPocaXY endpoca(*this,fltlen,newpoint); 00075 if(endpoca.status().failure()){ 00076 std::cout<<"ErrMsg(error)" << "poca failure changing reference point" << std::endl; 00077 return; 00078 } else { 00079 // update flight length 00080 fltlen = endpoca.flt1(); 00081 // make a symmatrix from the covariance: temporary kludge 00082 int nrow = parameters()->covariance().num_row(); 00083 HepSymMatrix cov(nrow); 00084 for(int irow=0;irow<nrow;irow++) 00085 for(int icol=0;icol<=irow;icol++) 00086 cov.fast(irow+1,icol+1) = parameters()->covariance().fast(irow+1,icol+1); 00087 // Get the translation function 00088 TranslateParams pfunc = paramFunction(); 00089 // Use it on the SimpTraj parameters 00090 pfunc(_refpoint,newpoint, 00091 parameters()->parameter(),cov, 00092 _dtparams.parameter(),cov, 00093 fltlen); 00094 // put back the covariance 00095 _dtparams.covariance() = cov; 00096 _refpoint = newpoint; 00097 // update the flight range to correspond to the same range in space as before 00098 double newrange[2]; 00099 newrange[0] = lowRange() - fltlen; 00100 newrange[1] = hiRange() - fltlen; 00101 setFlightRange(newrange); 00102 } 00103 } 00104 return; 00105 }
TrkDifLineTraj * TrkDifLineTraj::clone | ( | ) | const [virtual] |
Implements TrkSimpTraj.
Definition at line 66 of file TrkDifLineTraj.cxx.
References TrkDifLineTraj().
00067 { 00068 return new TrkDifLineTraj(*this); 00069 }
double TrkDifLineTraj::cosDip | ( | ) | const [inline] |
Definition at line 54 of file TrkDifLineTraj.h.
References tanDip().
Referenced by derivDeflect(), derivDisplace(), direction(), position(), x(), y(), and z().
double TrkDifLineTraj::curvature | ( | double | fltLen | ) | const [virtual] |
double TrkDifLineTraj::d0 | ( | ) | const [inline] |
Definition at line 55 of file TrkDifLineTraj.h.
References d0Index(), DifIndepPar::parameter(), and TrkSimpTraj::parameters().
Referenced by derivDeflect(), getDFInfo(), TrkLineRep::helix(), position(), x(), and y().
00055 {return parameters()->parameter()[d0Index()];}
int TrkDifLineTraj::d0Index | ( | ) | const [inline, private] |
Definition at line 89 of file TrkDifLineTraj.h.
References d0Ind.
Referenced by d0(), derivDeflect(), derivDisplace(), and getDFInfo().
00089 {return d0Ind;}
Hep3Vector TrkDifLineTraj::delDirect | ( | double | ) | const [virtual] |
HepMatrix TrkDifLineTraj::derivDeflect | ( | double | fltlen, | |
deflectDirection | ||||
) | const [virtual] |
Implements TrkKalDeriv.
Definition at line 214 of file TrkDifLineTraj.cxx.
References cosDip(), d0(), d0Index(), nLinPrm(), phi0Index(), tanDip(), tanDipIndex(), theta1, theta2, and z0Index().
00215 { 00216 // This function computes the column matrix of derivatives for the change 00217 // in parameters for a change in the direction of a track at a point along 00218 // its flight, holding the momentum and position constant. The effects for 00219 // changes in 2 perpendicular directions (theta1 = dip and 00220 // theta2 = phi*cos(dip)) are uncorrelated. 00221 00222 HepMatrix ddflct(nLinPrm(),1); 00223 // Compute some common things 00224 double cosd = cosDip(); 00225 // Go through the parameters 00226 switch (idirect) { 00227 case theta1: 00228 ddflct[tanDipIndex()][0] = 1.0/(cosd*cosd); 00229 ddflct[d0Index()][0] = 0.0; 00230 ddflct[phi0Index()][0] = 0.0; 00231 ddflct[z0Index()][0] = -fltlen/cosd;; 00232 break; 00233 case theta2: 00234 ddflct[tanDipIndex()][0] = 0; 00235 ddflct[d0Index()][0] = -fltlen; 00236 ddflct[phi0Index()][0] = 1.0/cosd; 00237 ddflct[z0Index()][0] = -(tanDip()/cosd)*d0(); 00238 break; 00239 } 00240 return ddflct; 00241 }
HepMatrix TrkDifLineTraj::derivDisplace | ( | double | fltlen, | |
deflectDirection | ||||
) | const [virtual] |
Implements TrkKalDeriv.
Definition at line 244 of file TrkDifLineTraj.cxx.
References cosDip(), d0Index(), nLinPrm(), phi0Index(), tanDipIndex(), theta1, theta2, and z0Index().
00245 { 00246 // This function computes the column matrix of derivatives for the change 00247 // in parameters for a change in the position of a track at a point along 00248 // its flight, holding the momentum and direction constant. The effects for 00249 // changes in 2 perpendicular directions (theta1 = dip and 00250 // theta2 = phi*cos(dip)) are uncorrelated. 00251 00252 HepMatrix ddflct(nLinPrm(),1); 00253 // Compute some common things 00254 double cosd = cosDip(); 00255 // Go through the parameters 00256 switch (idirect) { 00257 case theta1: 00258 ddflct[tanDipIndex()][0] = 0.0; 00259 ddflct[d0Index()][0] = 0.0; 00260 ddflct[phi0Index()][0] = 0.0; 00261 ddflct[z0Index()][0] = 1.0/cosd; 00262 break; 00263 case theta2: 00264 ddflct[tanDipIndex()][0] = 0; 00265 ddflct[d0Index()][0] = 1.0; 00266 ddflct[phi0Index()][0] = 0.0; 00267 ddflct[z0Index()][0] = 0.0; 00268 break; 00269 } 00270 return ddflct; 00271 }
HepMatrix TrkDifLineTraj::derivPFract | ( | double | fltlen | ) | const [virtual] |
Implements TrkKalDeriv.
Definition at line 274 of file TrkDifLineTraj.cxx.
References nLinPrm().
00275 { 00276 // This function computes the column matrix of derrivatives for the change 00277 // in parameters from a (fractional) change in the track momentum, 00278 // holding the direction and position constant. The momentum change can 00279 // come from energy loss or bfield inhomogeneities. Line Trajs have no 00280 // geometric change from energy loss. 00281 00282 return HepMatrix(nLinPrm(),1, 0); 00283 }
Hep3Vector TrkDifLineTraj::direction | ( | double | fltLen | ) | const [virtual] |
double Trajectory::distTo0thError | ( | double | s, | |
double | tol, | |||
int | pathDir | |||
) | const [inherited] |
double TrkDifLineTraj::distTo1stError | ( | double | flt, | |
double | tol, | |||
int | pathDir | |||
) | const [virtual] |
double TrkDifLineTraj::distTo2ndError | ( | double | flt, | |
double | tol, | |||
int | pathDir | |||
) | const [virtual] |
void TrkDifLineTraj::getDFInfo | ( | double | fltLen, | |
DifPoint & | , | |||
DifVector & | dir, | |||
DifVector & | delDir | |||
) | const [virtual] |
Implements TrkDifTraj.
Definition at line 163 of file TrkDifLineTraj.cxx.
References DifNumber::cosAndSin(), d0(), d0Index(), nLinPrm(), TrkSimpTraj::parameters(), phi0(), phi0Index(), boss::pos, TrkSimpTraj::referencePoint(), DifNumber::setIndepPar(), tanDip(), tanDipIndex(), x(), y(), z(), z0(), z0Index(), and zero.
00165 { 00166 //Provides difNum version of information for calculation of derivatives. 00167 00168 // Create difNumber versions of parameters 00169 //enum index (phi0Index(), etc) is from TrkLineParams.hh 00170 DifNumber phi0Df(phi0(), phi0Index()+1, nLinPrm()); 00171 DifNumber d0Df(d0(), d0Index()+1, nLinPrm()); 00172 DifNumber z0Df(z0(), z0Index()+1, nLinPrm()); 00173 DifNumber tanDipDf(tanDip(), tanDipIndex()+1, nLinPrm()); 00174 DifNumber zero(0.0, nLinPrm()); 00175 phi0Df.setIndepPar( parameters() ); 00176 d0Df.setIndepPar( parameters() ); 00177 z0Df.setIndepPar( parameters() ); 00178 tanDipDf.setIndepPar( parameters() ); 00179 zero.setIndepPar( parameters() ); 00180 00181 DifNumber sphi0, cphi0; 00182 phi0Df.cosAndSin(cphi0, sphi0); 00183 00184 DifNumber px(referencePoint().x()); 00185 DifNumber py(referencePoint().y()); 00186 DifNumber pz(referencePoint().z()); 00187 00188 DifNumber cdip = 1. / sqrt(1. + tanDipDf*tanDipDf); 00189 DifNumber xx = -d0Df * sphi0 + flt * cphi0 * cdip + px; 00190 DifNumber yy = d0Df * cphi0 + flt * sphi0 * cdip + py; 00191 DifNumber zz = z0Df + flt * tanDipDf * cdip + pz; 00192 00193 pos = DifPoint(xx, yy, zz); 00194 dir = DifVector( cphi0 * cdip, 00195 sphi0 * cdip, 00196 tanDipDf * cdip); 00197 00198 delDir = DifVector(zero, zero, zero); 00199 }
void TrkDifTraj::getDFInfo2 | ( | double | fltLen, | |
DifPoint & | pos, | |||
DifVector & | direction | |||
) | const [virtual, inherited] |
Reimplemented in HelixTraj, TrkDifPieceTraj, and TrkCircleTraj.
Definition at line 25 of file TrkDifTraj.cxx.
References Trajectory::direction(), TrkDifTraj::getDFInfo(), and boss::pos.
Referenced by TrkDifPoca::calcDist(), TrkRep::directionErr(), TrkCompTrk::directionErr(), TrkDifPieceTraj::getDFInfo2(), TrkRep::positionErr(), and TrkCompTrk::positionErr().
00025 { 00026 // Slow default implementation. Override in subclasses where speed matters 00027 DifVector dummy; 00028 getDFInfo(fltLen, pos, direction, dummy); 00029 }
void TrkDifLineTraj::getInfo | ( | double | fltLen, | |
HepPoint3D & | , | |||
Hep3Vector & | dir, | |||
Hep3Vector & | delDir | |||
) | const [virtual] |
Implements Trajectory.
Definition at line 145 of file TrkDifLineTraj.cxx.
References delDirect(), direction(), and position().
00147 { 00148 // This could be made much more efficient!!!!!! 00149 pos = position(fltLen); 00150 dir = direction(fltLen); 00151 delDir = delDirect(fltLen); 00152 }
void TrkDifLineTraj::getInfo | ( | double | fltLen, | |
HepPoint3D & | pos, | |||
Hep3Vector & | dir | |||
) | const [virtual] |
Implements Trajectory.
Definition at line 155 of file TrkDifLineTraj.cxx.
References direction(), and position().
00156 { 00157 // This could be made much more efficient!!!!! 00158 pos = position(fltLen); 00159 dir = direction(fltLen); 00160 }
double Trajectory::hiRange | ( | ) | const [inline, inherited] |
Definition at line 92 of file Trajectory.h.
References Trajectory::flightrange.
Referenced by TrkDifPieceTraj::append(), TrkSimpTraj::changePoint(), MdcUtilitySvc::docaPatPar(), TrkRep::endValidRange(), TrkCompTrk::endValidRange(), TrkSimpTraj::invert(), TrkDifPieceTraj::invert(), TrkDifPieceTraj::locallyValid(), MdcHitOnTrack::MdcHitOnTrack(), TrkSimpTraj::operator==(), TrkDifPieceTraj::prepend(), and Trajectory::range().
00092 {return flightrange[1];}
TrkSimpTraj & TrkSimpTraj::invert | ( | ) | [inherited] |
Reimplemented in NeutTraj.
Definition at line 128 of file TrkSimpTraj.cxx.
References TrkParams::covariance(), Trajectory::hiRange(), TrkSimpTraj::invertParams(), Trajectory::lowRange(), DifIndepPar::nPar(), TrkSimpTraj::nPar(), TrkSimpTraj::parameters(), Trajectory::range(), and Trajectory::setFlightRange().
00129 { 00130 // Invert parameters 00131 std::vector<bool> flags(parameters()->nPar(),false); 00132 invertParams(parameters(), flags); 00133 // loop over parameters and invert covariance matrix 00134 for(int iparam=0;iparam<parameters()->nPar();iparam++){ 00135 bool iinvert = flags[iparam]; 00136 // do covariance cross-terms too 00137 for(int jparam=iparam+1;jparam<parameters()->nPar();jparam++){ 00138 bool jinvert = flags[jparam]; 00139 if( (iinvert && !jinvert) || (!iinvert && jinvert) ) { 00140 // cross-terms change sign 00141 parameters()->covariance()[iparam][jparam] *= -1.0; 00142 } 00143 } 00144 } 00145 // invert the flightlength 00146 double range[2]; 00147 range[0] = -hiRange(); 00148 range[1] = -lowRange(); 00149 setFlightRange(range); 00150 // done 00151 return *this; 00152 }
void TrkDifLineTraj::invertParams | ( | TrkParams * | params, | |
std::vector< bool > & | flags | |||
) | const [virtual] |
Implements TrkSimpTraj.
Definition at line 296 of file TrkDifLineTraj.cxx.
References d0Ind, NLINPRM, DifIndepPar::parameter(), phi0Ind, Constants::pi, tanDipInd, and z0Ind.
00297 { 00298 // Inverts parameters and returns true if the parameter inversion 00299 // requires a change in sign of elements in the covariance matrix 00300 for (unsigned iparam = 0; iparam < NLINPRM; iparam++) { 00301 switch ( iparam ) { 00302 case d0Ind: // changes sign 00303 case tanDipInd: // changes sign 00304 params->parameter()[iparam] *= -1.0; 00305 flags[iparam] = true; 00306 break; 00307 case phi0Ind: // changes by pi, but covariance matrix shouldn't change 00308 params->parameter()[iparam] = 00309 BesAngle(params->parameter()[iparam] + Constants::pi); 00310 flags[iparam] = false; 00311 break; 00312 case z0Ind: // no change 00313 flags[iparam] = false; 00314 } 00315 } 00316 return; 00317 }
const TrkSimpTraj * TrkSimpTraj::localTrajectory | ( | double | fltLen, | |
double & | localFlt | |||
) | const [virtual, inherited] |
Implements TrkDifTraj.
Definition at line 59 of file TrkSimpTraj.cxx.
00059 { 00060 //---------------------------------------------------------------------------- 00061 localFlt = fltLen; 00062 return this; 00063 }
double Trajectory::lowRange | ( | ) | const [inline, inherited] |
Definition at line 91 of file Trajectory.h.
References Trajectory::flightrange.
Referenced by TrkDifPieceTraj::append(), TrkSimpTraj::changePoint(), MdcUtilitySvc::docaPatPar(), TrkSimpTraj::invert(), TrkDifPieceTraj::invert(), TrkDifPieceTraj::locallyValid(), MdcHitOnTrack::MdcHitOnTrack(), TrkSimpTraj::operator==(), TrkDifPieceTraj::prepend(), Trajectory::range(), TrkRep::startValidRange(), TrkCompTrk::startValidRange(), TrkDifPieceTraj::trajIndex(), and TrkDifPieceTraj::TrkDifPieceTraj().
00091 {return flightrange[0];}
int TrkDifLineTraj::nLinPrm | ( | ) | const [inline, private] |
Definition at line 93 of file TrkDifLineTraj.h.
References NLINPRM.
Referenced by derivDeflect(), derivDisplace(), derivPFract(), and getDFInfo().
00093 {return NLINPRM;}
int TrkDifLineTraj::nPar | ( | ) | const [inline, virtual] |
Reimplemented from TrkSimpTraj.
Definition at line 60 of file TrkDifLineTraj.h.
References NLINPRM.
00060 {return NLINPRM;}
TrkDifLineTraj & TrkDifLineTraj::operator= | ( | const TrkDifLineTraj & | ) |
Definition at line 72 of file TrkDifLineTraj.cxx.
References TrkSimpTraj::_dtparams, TrkSimpTraj::_refpoint, and Trajectory::operator=().
00073 { 00074 if( &h != this ){ 00075 Trajectory::operator=(h); 00076 _dtparams = *h.parameters(); 00077 _refpoint = h._refpoint; 00078 } 00079 return *this; 00080 }
bool TrkSimpTraj::operator== | ( | const TrkSimpTraj & | ) | const [inherited] |
Definition at line 156 of file TrkSimpTraj.cxx.
References TrkSimpTraj::_dtparams, TrkSimpTraj::_refpoint, Trajectory::hiRange(), genRecEmupikp::i, Trajectory::lowRange(), mp, DifIndepPar::parameter(), and x.
00157 { 00158 if (lowRange()!=x.lowRange() || hiRange()!=x.hiRange()) return false; 00159 const HepVector &m=_dtparams.parameter(); 00160 unsigned int mp=m.num_row(); 00161 const HepVector &n=x._dtparams.parameter(); 00162 unsigned int np=n.num_row(); 00163 if (np!=mp) return false; 00164 for(unsigned i=0;i<np;++i){ 00165 if(m[i] != n[i]) return false; 00166 } 00167 return _refpoint==x._refpoint; 00168 }
const TrkParams* TrkSimpTraj::parameters | ( | ) | const [inline, inherited] |
Definition at line 81 of file TrkSimpTraj.h.
References TrkSimpTraj::_dtparams.
00081 {return &_dtparams;}
TrkParams* TrkSimpTraj::parameters | ( | ) | [inline, inherited] |
Definition at line 80 of file TrkSimpTraj.h.
References TrkSimpTraj::_dtparams.
Referenced by TrkMomCalculator::calcCurvAllCovs(), TrkMomCalculator::calcCurvAllWeights(), TrkMomCalculator::calcNeutAllCovs(), TrkMomCalculator::calcNeutAllWeights(), TrkMomCalculator::calcNeutErrMom(), TrkMomCalculator::calcNeutPosmomCov(), TrkSimpTraj::changePoint(), TrkMomCalculator::charge(), d0(), TrkCircleTraj::d0(), HelixTraj::d0(), TrkHelixFitter::fit(), getDFInfo(), TrkCircleTraj::getDFInfo(), NeutTraj::getDFInfo(), HelixTraj::getDFInfo(), TrkCircleTraj::getDFInfo2(), HelixTraj::getDFInfo2(), HelixTraj::getInfo(), TrkLineRep::helix(), TrkHelixRep::helix(), TrkCircleRep::helix(), HelixTraj::HelixTraj(), TrkSimpTraj::invert(), TrkSimpleRep::nDof(), TrkSimpTraj::nPar(), TrkCircleTraj::omega(), HelixTraj::omega(), phi0(), TrkCircleTraj::phi0(), HelixTraj::phi0(), HelixTraj::position(), TrkMomCalculator::ptMom(), TrkHelixRep::resid(), tanDip(), HelixTraj::tanDip(), TrkCircleTraj::TrkCircleTraj(), TrkDifLineTraj(), TrkHitOnTrk::TrkHitOnTrk(), TrkMomCalculator::vecMom(), z0(), and HelixTraj::z0().
00080 {return &_dtparams;}
void TrkDifLineTraj::paramFunc | ( | const HepPoint3D & | oldpoint, | |
const HepPoint3D & | newpoint, | |||
const HepVector & | oldpar, | |||
const HepSymMatrix & | oldcov, | |||
HepVector & | newpar, | |||
HepSymMatrix & | newcov, | |||
double | fltlen | |||
) | [static, private] |
Definition at line 286 of file TrkDifLineTraj.cxx.
Referenced by paramFunction().
00290 { 00291 // not yet implemented 00292 std::cout<<"ErrMsg(fatal)" << "TrkDifLineTraj::paramFunc() is not implemented!" << std::endl; 00293 }
TranslateParams TrkDifLineTraj::paramFunction | ( | ) | const [inline, virtual] |
Implements TrkSimpTraj.
Definition at line 72 of file TrkDifLineTraj.h.
References paramFunc().
00072 { return TrkDifLineTraj::paramFunc; }
double TrkDifLineTraj::phi0 | ( | ) | const |
Definition at line 208 of file TrkDifLineTraj.cxx.
References TrkSimpTraj::parameters(), and phi0Index().
Referenced by direction(), getDFInfo(), TrkLineRep::helix(), position(), x(), and y().
00209 { 00210 return BesAngle(parameters()->parameter()[phi0Index()]).rad(); 00211 }
int TrkDifLineTraj::phi0Index | ( | ) | const [inline, private] |
Definition at line 90 of file TrkDifLineTraj.h.
References phi0Ind.
Referenced by derivDeflect(), derivDisplace(), getDFInfo(), and phi0().
00090 {return phi0Ind;}
HepPoint3D TrkDifLineTraj::position | ( | double | fltLen | ) | const [virtual] |
Implements Trajectory.
Definition at line 107 of file TrkDifLineTraj.cxx.
References cos(), cosDip(), d0(), phi0(), TrkSimpTraj::referencePoint(), sin(), tanDip(), x(), y(), z(), and z0().
Referenced by getInfo().
00108 { 00109 double cosd = cosDip(); 00110 double cp = cos(phi0()); 00111 double sp = sin(phi0()); 00112 return HepPoint3D(-d0()*sp + f*cp*cosd + referencePoint().x(), 00113 d0()*cp + f*sp*cosd + referencePoint().y(), 00114 z0() + f*tanDip()*cosd + referencePoint().z()); 00115 }
virtual void TrkSimpTraj::print | ( | std::ostream & | os | ) | const [virtual, inherited] |
virtual void TrkSimpTraj::printAll | ( | std::ostream & | os | ) | const [virtual, inherited] |
double Trajectory::range | ( | ) | const [inline, inherited] |
Definition at line 93 of file Trajectory.h.
References Trajectory::hiRange(), and Trajectory::lowRange().
Referenced by TrkDifPieceTraj::append(), TrkSimpTraj::invert(), TrkDifPieceTraj::invert(), and TrkDifPieceTraj::prepend().
const HepPoint3D& TrkSimpTraj::referencePoint | ( | ) | const [inline, inherited] |
Definition at line 84 of file TrkSimpTraj.h.
References TrkSimpTraj::_refpoint.
Referenced by getDFInfo(), TrkCircleTraj::getDFInfo(), HelixTraj::getDFInfo(), TrkCircleTraj::getDFInfo2(), HelixTraj::getDFInfo2(), TrkCircleTraj::getInfo(), HelixTraj::getInfo(), position(), TrkCircleTraj::position(), HelixTraj::position(), x(), TrkCircleTraj::x(), y(), TrkCircleTraj::y(), z(), and HelixTraj::z().
00084 {return _refpoint;}
void Trajectory::setFlightRange | ( | double | newrange[2] | ) | [virtual, inherited] |
Reimplemented in TrkDifPieceTraj.
Definition at line 57 of file Trajectory.cxx.
References Trajectory::flightrange.
Referenced by TrkDifPieceTraj::append(), TrkSimpTraj::changePoint(), TrkSimpTraj::invert(), TrkDifPieceTraj::invert(), TrkDifPieceTraj::prepend(), and TrkDifPieceTraj::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 }
void TrkSimpTraj::setPoint | ( | const HepPoint3D & | newpoint | ) | [inline, inherited] |
Definition at line 96 of file TrkSimpTraj.h.
References TrkSimpTraj::_refpoint.
00096 {_refpoint = newpoint;}
double TrkDifLineTraj::tanDip | ( | ) | const [inline] |
Definition at line 57 of file TrkDifLineTraj.h.
References DifIndepPar::parameter(), TrkSimpTraj::parameters(), and tanDipIndex().
Referenced by cosDip(), derivDeflect(), direction(), getDFInfo(), TrkLineRep::helix(), position(), and z().
00057 {return parameters()->parameter()[tanDipIndex()];}
int TrkDifLineTraj::tanDipIndex | ( | ) | const [inline, private] |
Definition at line 92 of file TrkDifLineTraj.h.
References tanDipInd.
Referenced by derivDeflect(), derivDisplace(), getDFInfo(), and tanDip().
00092 {return tanDipInd;}
bool Trajectory::validFlightDistance | ( | double | f, | |
double | tolerance = 0.0 | |||
) | const [inline, inherited] |
Definition at line 88 of file Trajectory.h.
References Trajectory::flightrange.
Referenced by TrkDifPieceTraj::trajIndex().
00088 { 00089 return f >= flightrange[0]-tol && f <= flightrange[1]+tol; 00090 }
void TrkDifLineTraj::visitAccept | ( | TrkVisitor * | vis | ) | const [virtual] |
Implements TrkSimpTraj.
Definition at line 320 of file TrkDifLineTraj.cxx.
References TrkVisitor::trkVisitLineTraj().
00321 { 00322 // Visitor access--just use the TrkVisitor class member function 00323 vis->trkVisitLineTraj(this); 00324 }
double TrkDifLineTraj::x | ( | const double & | ) | const [private] |
Definition at line 87 of file TrkDifLineTraj.cxx.
References cos(), cosDip(), d0(), phi0(), TrkSimpTraj::referencePoint(), and sin().
Referenced by getDFInfo(), and position().
00088 { 00089 return -d0() * sin(phi0()) + f * cos(phi0()) * cosDip() + 00090 referencePoint().x(); 00091 }
double TrkDifLineTraj::y | ( | const double & | ) | const [private] |
Definition at line 94 of file TrkDifLineTraj.cxx.
References cos(), cosDip(), d0(), phi0(), TrkSimpTraj::referencePoint(), and sin().
Referenced by getDFInfo(), and position().
00095 { 00096 return d0() * cos(phi0()) + f * sin(phi0()) * cosDip() + 00097 referencePoint().y(); 00098 }
double TrkDifLineTraj::z | ( | const double & | ) | const [private] |
Definition at line 101 of file TrkDifLineTraj.cxx.
References cosDip(), TrkSimpTraj::referencePoint(), tanDip(), and z0().
Referenced by getDFInfo(), and position().
00102 { 00103 return z0() + f * tanDip() * cosDip() + referencePoint().z(); 00104 }
double TrkDifLineTraj::z0 | ( | ) | const [inline] |
Definition at line 56 of file TrkDifLineTraj.h.
References DifIndepPar::parameter(), TrkSimpTraj::parameters(), and z0Index().
Referenced by getDFInfo(), TrkLineRep::helix(), position(), and z().
00056 {return parameters()->parameter()[z0Index()];}
int TrkDifLineTraj::z0Index | ( | ) | const [inline, private] |
Definition at line 91 of file TrkDifLineTraj.h.
References z0Ind.
Referenced by derivDeflect(), derivDisplace(), getDFInfo(), and z0().
00091 {return z0Ind;}
TrkParams TrkSimpTraj::_dtparams [protected, inherited] |
Definition at line 117 of file TrkSimpTraj.h.
Referenced by NeutTraj::_np(), TrkSimpTraj::changePoint(), operator=(), TrkCircleTraj::operator=(), NeutTraj::operator=(), HelixTraj::operator=(), TrkSimpTraj::operator==(), and TrkSimpTraj::parameters().
HepPoint3D TrkSimpTraj::_refpoint [protected, inherited] |
Definition at line 118 of file TrkSimpTraj.h.
Referenced by TrkSimpTraj::changePoint(), operator=(), TrkCircleTraj::operator=(), HelixTraj::operator=(), TrkSimpTraj::operator==(), TrkSimpTraj::referencePoint(), and TrkSimpTraj::setPoint().
HepPoint3D TrkSimpTraj::_theOrigin [static, inherited] |
Definition at line 59 of file TrkSimpTraj.h.
double Trajectory::flightrange[2] [protected, inherited] |
Definition at line 83 of file Trajectory.h.
Referenced by TrkDifPieceTraj::append(), Trajectory::hiRange(), Trajectory::lowRange(), TrkDifPieceTraj::operator=(), NeutTraj::operator=(), Trajectory::operator=(), MdcSagTraj::operator=(), TrkDifPieceTraj::prepend(), TrkDifPieceTraj::resize(), TrkDifPieceTraj::setFlightRange(), Trajectory::setFlightRange(), Trajectory::Trajectory(), TrkDifPieceTraj::TrkDifPieceTraj(), and Trajectory::validFlightDistance().