#include <TrackExtrapolators/TrackLinearExtrapolator.h>
Inheritance diagram for TrackLinearExtrapolator:
Public Member Functions | |
TrackLinearExtrapolator (const std::string &type, const std::string &name, const IInterface *parent) | |
constructor | |
virtual | ~TrackLinearExtrapolator () |
destructor | |
StatusCode | propagate (State &state, double z, ParticleID pid=ParticleID(211)) |
Propagate a State to a given z-position. | |
StatusCode | propagate (State &state, HepPlane3D &plane, ParticleID pid=ParticleID(211)) |
Propagate a State to the intersection point with a given plane. |
Definition at line 27 of file TrackLinearExtrapolator.h.
|
constructor
Definition at line 114 of file TrackLinearExtrapolator.cpp. 00117 : TrackExtrapolator ( type, name, parent ) 00118 { 00119 //declareInterface<ITrackExtrapolator>( this ); 00120 }
|
|
destructor
Definition at line 125 of file TrackLinearExtrapolator.cpp. 00125 {};
|
|
Propagate a State to the intersection point with a given plane.
Definition at line 78 of file TrackLinearExtrapolator.cpp. References propagate(). 00081 { 00082 // calculation of the z-position by linear extrapolation to the plane 00083 // ------------------------------------------------------------------ 00084 // given the plane defined by (a,b,c,d) and the input state of 00085 // position (x0,y0,z0) and slopes (Tx,Ty), 00086 // the (x,y,z) of the intersection point verify the set of equations 00087 // a*x + b*y + c*z + d = 0 00088 // x = x0 + (z-z0)*Tx 00089 // x = y0 + (z-z0)*Ty 00090 HepNormal3D nVec = plane.normal(); 00091 HepPoint3D posVec = state.position(); 00092 HepVector3D slpVec = state.slopes(); 00093 00094 double den = nVec.dot( slpVec ); 00095 00096 if ( den < TrackParameters::looseTolerance ) return StatusCode::FAILURE; 00097 00098 slpVec *= ( state.z() ); 00099 posVec -= slpVec; 00100 00101 double nom = - ( nVec.dot( posVec ) + plane.d() ); 00102 00103 double zNew = nom / den; 00104 00105 debug() << " z propagation " << zNew 00106 << " of particle pid " << pid.pid() << endreq; 00107 00108 return propagate( state, zNew, pid ); 00109 }
|
|
Propagate a State to a given z-position.
Reimplemented from TrackExtrapolator. Definition at line 45 of file TrackLinearExtrapolator.cpp. References TrackExtrapolator::updateState(). Referenced by propagate(). 00048 { 00049 // create transport matrix 00050 unsigned int ndim = state.nParameters(); 00051 00052 m_F = HepMatrix(ndim, ndim, 1); 00053 00054 // check current z-position 00055 double dz = zNew - state.z(); 00056 // if ( fabs(dz) < TrackParameters::hiTolerance ) dz = 0.; 00057 m_F[0][2] = dz; // tx*dz 00058 m_F[1][3] = dz; // ty*dz 00059 00060 debug() << "Transport matrix F =" << m_F << endreq; 00061 00062 // extrapolate 00063 //extrapolate(state); 00064 //state -> setZ( zNew ); 00065 updateState( state, zNew ); 00066 00067 debug() << " z propagation " << zNew 00068 << " propagated state " << state.stateVector() 00069 << " propagated cov " << state.covariance() 00070 << " of particle pid " << pid.pid() << endreq; 00071 00072 return StatusCode::SUCCESS; 00073 }
|