#include <TrExtrapolators/TrLinearExtrapolator.h>
Inheritance diagram for TrLinearExtrapolator:
Public Member Functions | |
TrLinearExtrapolator (const std::string &type, const std::string &name, const IInterface *parent) | |
constructor | |
virtual | ~TrLinearExtrapolator () |
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. | |
Private Attributes | |
HepMatrix | m_F |
transport matrix |
Definition at line 27 of file TrLinearExtrapolator.h.
|
constructor
Definition at line 110 of file TrLinearExtrapolator.cpp. References m_F. 00113 : TrExtrapolator ( type, name, parent ) 00114 , m_F() 00115 { 00116 //declareInterface<ITrExtrapolator>( this ); 00117 00118 // create transport matrix 00119 m_F = HepMatrix(5, 5, 1); 00120 }
|
|
destructor
Definition at line 125 of file TrLinearExtrapolator.cpp. 00125 {};
|
|
Propagate a State to the intersection point with a given plane.
Definition at line 74 of file TrLinearExtrapolator.cpp. References propagate(). 00077 { 00078 // calculation of the z-position by linear extrapolation to the plane 00079 // ------------------------------------------------------------------ 00080 // given the plane defined by (a,b,c,d) and the input state of 00081 // position (x0,y0,z0) and slopes (Tx,Ty), 00082 // the (x,y,z) of the intersection point verify the set of equations 00083 // a*x + b*y + c*z + d = 0 00084 // x = x0 + (z-z0)*Tx 00085 // x = y0 + (z-z0)*Ty 00086 HepNormal3D nVec = plane.normal(); 00087 HepPoint3D posVec = state.position(); 00088 HepVector3D slpVec = state.slopes(); 00089 00090 double den = nVec.dot( slpVec ); 00091 00092 if ( den < TrGeneral::looseTolerance ) return StatusCode::FAILURE; 00093 00094 slpVec *= ( state.z() ); 00095 posVec -= slpVec; 00096 00097 double nom = - ( nVec.dot( posVec ) + plane.d() ); 00098 00099 double zNew = nom / den; 00100 00101 debug() << " z propagation " << zNew 00102 << " of particle pid " << pid.pid() << endreq; 00103 00104 return propagate( state, zNew, pid ); 00105 }
|
|
Propagate a State to a given z-position.
Reimplemented from TrExtrapolator. Definition at line 45 of file TrLinearExtrapolator.cpp. References m_F, and TrExtrapolator::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) > TrGeneral::hiTolerance ) { 00057 m_F[0][2] = dz; // tx*dz 00058 m_F[1][3] = dz; // ty*dz 00059 // extrapolate 00060 //extrapolate(state); 00061 //state -> setZ( zNew ); 00062 updateState( state, zNew ); 00063 } 00064 00065 debug() << " z propagation " << zNew 00066 << " of particle pid " << pid.pid() << endreq; 00067 00068 return StatusCode::SUCCESS; 00069 }
|
|
transport matrix
Reimplemented from TrExtrapolator. Definition at line 51 of file TrLinearExtrapolator.h. Referenced by propagate(), and TrLinearExtrapolator(). |