Main Page | Namespace List | Class Hierarchy | Class List | Directories | File List | Namespace Members | Class Members | File Members

TrLinearExtrapolator Class Reference

#include <TrExtrapolators/TrLinearExtrapolator.h>

Inheritance diagram for TrLinearExtrapolator:

TrExtrapolator List of all members.

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

Detailed Description

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

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

Definition at line 27 of file TrLinearExtrapolator.h.


Constructor & Destructor Documentation

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

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 }

TrLinearExtrapolator::~TrLinearExtrapolator  )  [virtual]
 

destructor

Definition at line 125 of file TrLinearExtrapolator.cpp.

00125 {};


Member Function Documentation

StatusCode TrLinearExtrapolator::propagate State state,
HepPlane3D &  plane,
ParticleID  pid = ParticleID(211)
 

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 }

StatusCode TrLinearExtrapolator::propagate State state,
double  z,
ParticleID  pid = ParticleID(211)
[virtual]
 

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 }


Member Data Documentation

HepMatrix TrLinearExtrapolator::m_F [private]
 

transport matrix

Reimplemented from TrExtrapolator.

Definition at line 51 of file TrLinearExtrapolator.h.

Referenced by propagate(), and TrLinearExtrapolator().


The documentation for this class was generated from the following files:
Generated on Thu Apr 7 22:43:32 2005 for New Track Event Model by doxygen 1.4.1