Main Page   Namespace List   Class Hierarchy   Compound List   File List   Namespace Members   Compound Members   File Members  

TrLinearExtrapolator Class Reference

#include "TrLinearExtrapolator.h"

Inheritance diagram for TrLinearExtrapolator:

ITrExtrapolator List of all members.

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...


Detailed Description

A TrLinearExtrapolator is a ITrExtrapolator which does a 'linear' (i.e. straight line) extrapolation of a TrState. It doesn't take into account MS.

Author:
Eduardo Rodrigues (changes and new features for new tracking event model)
Date:
06/10/2004
Author:
Rutger van der Eijk
Date:
07-04-1999

Definition at line 24 of file TrLinearExtrapolator.h.


Constructor & Destructor Documentation

TrLinearExtrapolator::TrLinearExtrapolator const std::string &    type,
const std::string &    name,
const IInterface *    parent
 

constructor.

Definition at line 30 of file TrLinearExtrapolator.cpp.

References m_F.

00032                                                                     :
00033   GaudiTool(type, name, parent),
00034   m_F()
00035 {
00036   declareInterface<ITrExtrapolator>( this );
00037 
00038   // create transport matrix
00039   m_F = HepMatrix(5, 5, 1);
00040 
00041 }

TrLinearExtrapolator::~TrLinearExtrapolator   [virtual]
 

destructor.

Definition at line 46 of file TrLinearExtrapolator.cpp.

00047 {
00048 }


Member Function Documentation

void TrLinearExtrapolator::extrapolate TrState   state const [private]
 

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 }

StatusCode TrLinearExtrapolator::propagate TrState   state,
double    zNew,
ParticleID    partId = ParticleID(211)
[virtual]
 

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 }

StatusCode TrLinearExtrapolator::propagate TrState   state,
HepPlane3D    plane,
ParticleID    partId = ParticleID(211)
[virtual]
 

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.

StatusCode TrLinearExtrapolator::propagate TrState   state,
ParticleID    partId = ParticleID(211)
[virtual]
 

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 }

virtual const HepMatrix& TrLinearExtrapolator::transportMatrix   const [virtual]
 

retrieve transport matrix.

Implements ITrExtrapolator.

Referenced by propagate.


Member Data Documentation

HepMatrix TrLinearExtrapolator::m_F [private]
 

transport matrix.

Definition at line 56 of file TrLinearExtrapolator.h.

Referenced by extrapolate, propagate, and TrLinearExtrapolator.


The documentation for this class was generated from the following files:
Generated on Mon Nov 1 17:29:46 2004 for New Track Event Model by doxygen 1.2.14 written by Dimitri van Heesch, © 1997-2002