#include "TrLinearExtrapolator.h"
Inheritance diagram for TrLinearExtrapolator:
Public Methods | |
TrLinearExtrapolator (const std::string &type, const std::string &name, const IInterface *parent) | |
constructor. More... | |
virtual | ~TrLinearExtrapolator () |
destructor. More... | |
virtual StatusCode | propagate (TrState *state, ParticleID partId=ParticleID(211)) |
Propagate a TrState closest to the beam-line. More... | |
virtual StatusCode | propagate (TrState *state, HepPlane3D plane, ParticleID partId=ParticleID(211)) |
Propagate a TrState to the intersection point with a given plane. More... | |
virtual StatusCode | propagate (TrState *state, double zNew, ParticleID partId=ParticleID(211)) |
Propagate a TrState to a given z-position. More... | |
virtual const HepMatrix & | transportMatrix () const |
retrieve transport matrix. More... | |
Private Methods | |
void | extrapolate (TrState *state) const |
extrapolate. More... | |
Private Attributes | |
HepMatrix | m_F |
transport matrix. More... |
Definition at line 24 of file TrLinearExtrapolator.h.
|
constructor.
Definition at line 30 of file TrLinearExtrapolator.cpp. References m_F.
|
|
destructor.
Definition at line 46 of file TrLinearExtrapolator.cpp.
00047 { 00048 } |
|
extrapolate.
Definition at line 54 of file TrLinearExtrapolator.cpp. References m_F. Referenced by propagate.
00054 { 00055 // get reference to the TrState vector and covariance 00056 HepVector& tX = state -> state(); 00057 HepSymMatrix& tC = state -> covariance(); 00058 00059 // calculate new state 00060 tX = m_F * tX; // X*F (can this be done more efficient?) 00061 tC = tC.similarity(m_F); // F*C*F.T() 00062 } |
|
Propagate a TrState to a given z-position.
Implements ITrExtrapolator. Definition at line 92 of file TrLinearExtrapolator.cpp. References extrapolate, and m_F.
00094 { 00095 00096 // check for state 00097 if ( !state ) { 00098 return Error( "propagate() should be called with a pointer to a TrState !", 00099 StatusCode::FAILURE); 00100 } 00101 00102 // create transport matrix 00103 m_F = HepMatrix(5, 5, 1); 00104 00105 // check current z-position 00106 double dz = zNew - state -> z(); 00107 if ( fabs(dz) > TrGeneral::hiTolerance ) { 00108 m_F[0][2] = dz; // tx*dz 00109 m_F[1][3] = dz; // ty*dz 00110 // extrapolate 00111 extrapolate(state); 00112 state -> setZ( zNew ); 00113 } 00114 00115 return StatusCode::SUCCESS; 00116 } |
|
Propagate a TrState to the intersection point with a given plane.
Implements ITrExtrapolator. Definition at line 121 of file TrLinearExtrapolator.cpp. References m_F, propagate, and transportMatrix. |
|
Propagate a TrState closest to the beam-line.
Implements ITrExtrapolator. Definition at line 67 of file TrLinearExtrapolator.cpp. Referenced by propagate.
00068 { 00069 00070 // check for state 00071 if ( !state ) { 00072 return Error( "propagate() should be called with a pointer to a TrState !", 00073 StatusCode::FAILURE); 00074 } 00075 00076 // to a linear approximation the z-position of the closest approach 00077 // to the beam line is given by: 00078 // zNew = state -> z() - ( x*tx + y*ty ) / ( tx*tx + ty*ty ); 00079 HepVector stateVec = state -> state(); 00080 double zNew = state -> z(); 00081 // the zNew is unchanged if the track is parallel to the beam-line! 00082 if ( (stateVec[2] != 0) || (stateVec[3] != 0) ) { 00083 zNew -= ( stateVec[0]*stateVec[2] + stateVec[1]*stateVec[3] ) 00084 / ( stateVec[2]*stateVec[2] + stateVec[3]*stateVec[3] ); 00085 } 00086 return propagate( state, zNew, partId ); 00087 } |
|
retrieve transport matrix.
Implements ITrExtrapolator. Referenced by propagate. |
|
transport matrix.
Definition at line 56 of file TrLinearExtrapolator.h. Referenced by extrapolate, propagate, and TrLinearExtrapolator. |