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

TrackParabolicExtrapolator Class Reference

#include <TrackParabolicExtrapolator.h>

Inheritance diagram for TrackParabolicExtrapolator:

TrackExtrapolator ITrackExtrapolator TrackFastParabolicExtrapolator List of all members.

Public Member Functions

 TrackParabolicExtrapolator (const std::string &type, const std::string &name, const IInterface *parent)
 Constructor.
virtual ~TrackParabolicExtrapolator ()
 Destructor.
virtual StatusCode initialize ()
 initialize and finalize
virtual StatusCode propagate (State &state, double z, ParticleID pid=ParticleID(211))
 Propagate a state to a given z-position.

Protected Member Functions

virtual void updateTransportMatrix (const double dz, State &pState)
 update transport matrix

Protected Attributes

double m_ax
double m_ay
HepVector3D m_B
IMagneticFieldSvc * m_pIMF
 Pointer to the magnetic field service.

Detailed Description

A TrackParabolicExtrapolator is a ITrackExtrapolator that does a transport using a parabolic expansion of the trajectory. It doesn't take into account Multiple Scattering.

Author:
Jose A. Hernando (13-03-2005)

Matt Needham

Date:
22-04-2000

Definition at line 23 of file TrackParabolicExtrapolator.h.


Constructor & Destructor Documentation

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

Constructor.

Definition at line 39 of file TrackParabolicExtrapolator.cpp.

00039                                                                       :
00040   TrackExtrapolator(type,name,parent)
00041 {
00042   declareInterface<ITrackExtrapolator>( this );
00043 }

TrackParabolicExtrapolator::~TrackParabolicExtrapolator  )  [virtual]
 

Destructor.

Definition at line 46 of file TrackParabolicExtrapolator.cpp.

00047 {
00048 }


Member Function Documentation

StatusCode TrackParabolicExtrapolator::initialize  )  [virtual]
 

initialize and finalize

Definition at line 50 of file TrackParabolicExtrapolator.cpp.

References m_pIMF.

00051 {
00052 
00053   // initialize
00054   StatusCode sc = GaudiTool::initialize();
00055   if (sc.isFailure()){
00056     return Error("Failed to initialize", sc);
00057   }
00058 
00059   m_pIMF = svc<IMagneticFieldSvc>( "MagneticFieldSvc",true);
00060  
00061   return StatusCode::SUCCESS;
00062 }

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

Propagate a state to a given z-position.

Reimplemented from TrackExtrapolator.

Definition at line 65 of file TrackParabolicExtrapolator.cpp.

References m_ax, m_ay, m_B, m_pIMF, and updateTransportMatrix().

00068 {
00069   // Extrapolate the TrStateP 'state' to z=zNew
00070   size_t ndim = state.nParameters();
00071 
00072   // create transport matrix - initialized to I
00073   m_F = HepMatrix(ndim, ndim, 1);
00074   
00075   // check current z-position
00076   double dz = zNew - state.z();
00077   if (fabs(dz) < TrackParameters::hiTolerance) { 
00078     // already at required z position
00079     debug() <<"already at required z position"<<endreq;
00080     return StatusCode::SUCCESS; 
00081   }
00082 
00083   //get the B field  
00084   HepPoint3D P(state.x(),state.y(),state.z());
00085   m_pIMF->fieldVector( P, m_B );
00086 
00087   // to save some typing...
00088   double Tx = state.tx();
00089   double Ty = state.ty();
00090   double nTx = sqrt(1.0+gsl_pow_2(Tx));
00091   double nTy = sqrt(1.0+gsl_pow_2(Ty));
00092   double norm = sqrt(1.0+gsl_pow_2(Tx)+gsl_pow_2(Ty));
00093  
00094   // calculate the A factors 
00095   m_ax = norm*(Ty*(Tx*m_B.x()+m_B.z())-(gsl_pow_2(nTx)*m_B.y()));
00096   m_ay = norm*(-Tx*(Ty*m_B.y()+m_B.z())+(gsl_pow_2(nTy)*m_B.x()));
00097    
00098   // set non-zero diagonal elements
00099   updateTransportMatrix(dz,state); 
00100 
00101   // get reference to the TrState vector and cov
00102   HepVector& tState = state.state();
00103   HepSymMatrix& tStateCov = state.covariance();
00104 
00105   // Extrapolate state EXACT  
00106 
00107   tState[0] += dz*(Tx + 0.5*m_ax*tState[4]*eplus*c_light*dz);
00108   tState[1] += dz*(Ty + 0.5*m_ay*tState[4]*eplus*c_light*dz);
00109   tState[2] += m_ax*tState[4]*eplus*c_light*dz;
00110   tState[3] += m_ay*tState[4]*eplus*c_light*dz;
00111 
00112   //update covariance
00113   tStateCov = tStateCov.similarity(m_F); // F*C*F.T()
00114   state.setZ(zNew);
00115 
00116   return StatusCode::SUCCESS;
00117 }

void TrackParabolicExtrapolator::updateTransportMatrix const double  dz,
State pState
[protected, virtual]
 

update transport matrix

Reimplemented in TrackFastParabolicExtrapolator.

Definition at line 119 of file TrackParabolicExtrapolator.cpp.

References m_ax, m_ay, m_B, and TrackExtrapolator::m_F.

Referenced by propagate().

00120                                                                      {
00121 
00122   //create the transport matrix dX/dX_0 for ptState's
00123   //has to be separate to allow fast transport
00124   
00125   // to save some typing...
00126   double Tx = state.tx();
00127   double Ty = state.ty();
00128   double norm = sqrt(1.+gsl_pow_2(Tx)+gsl_pow_2(Ty));
00129   
00130   //calculate derivatives of Ax, Ay
00131   double dAx_dTx = (Tx*m_ax/gsl_pow_2(norm)) + norm*(Ty*m_B.x()-(2.*Tx*m_B.y())); 
00132   double dAx_dTy = (Ty*m_ax/gsl_pow_2(norm)) + norm*(Tx*m_B.x()+m_B.z());
00133   double dAy_dTx = (Tx*m_ay/gsl_pow_2(norm)) + norm*(-Ty*m_B.y()-m_B.z());
00134   double dAy_dTy = (Ty*m_ay/gsl_pow_2(norm)) + norm*(-Tx*m_B.y()+(2.*Ty*m_B.x()));
00135   
00136   // fill transport matrix 
00137   m_F(1,3) = dz + 0.5*dAx_dTx*state.qOverP() * eplus*c_light*gsl_pow_2(dz);
00138   m_F(1,4) = 0.5*dAx_dTy*state.qOverP()*eplus*c_light*gsl_pow_2(dz);
00139   m_F(1,5) = 0.5*m_ax*eplus*c_light*gsl_pow_2(dz);
00140   
00141   m_F(2,3) = 0.5*dAy_dTx*state.qOverP()*eplus*c_light*gsl_pow_2(dz);
00142   m_F(2,4) = dz + 0.5*dAy_dTy*state.qOverP()*eplus*c_light*gsl_pow_2(dz);
00143   m_F(2,5) = 0.5*m_ay*eplus*c_light*gsl_pow_2(dz);
00144   
00145   m_F(3,3) = 1.0+ dAx_dTx*state.qOverP()*eplus*c_light*dz;
00146   m_F(3,4) = dAx_dTy*state.qOverP()*eplus*c_light*dz;
00147   m_F(3,5) = m_ax*eplus*c_light*dz;
00148   
00149   m_F(4,3) = dAy_dTx*state.qOverP()*eplus*c_light*dz;
00150   m_F(4,4) = 1.0 + dAy_dTy*state.qOverP()*eplus*c_light*dz;
00151   m_F(4,5) = m_ay*eplus*c_light*dz;
00152   
00153 }


Member Data Documentation

double TrackParabolicExtrapolator::m_ax [protected]
 

Definition at line 50 of file TrackParabolicExtrapolator.h.

Referenced by propagate(), and updateTransportMatrix().

double TrackParabolicExtrapolator::m_ay [protected]
 

Definition at line 51 of file TrackParabolicExtrapolator.h.

Referenced by propagate(), and updateTransportMatrix().

HepVector3D TrackParabolicExtrapolator::m_B [protected]
 

Definition at line 52 of file TrackParabolicExtrapolator.h.

Referenced by propagate(), and updateTransportMatrix().

IMagneticFieldSvc* TrackParabolicExtrapolator::m_pIMF [protected]
 

Pointer to the magnetic field service.

Definition at line 53 of file TrackParabolicExtrapolator.h.

Referenced by initialize(), and propagate().


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