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

State Class Reference

#include <State.h>

List of all members.

Public Types

enum  Type { HasMomentum = 1, StraightLine = 2 }
 enumeration for the state type More...
enum  Location {
  Unknown = 1, ClosestToBeam = 2, FirstMeasurement = 4, EndVelo = 8,
  AtTT = 16, AtT = 32, BegRich1 = 64, EndRich1 = 128,
  BegRich2 = 256, EndRich2 = 512, Calo = 1024, Muon = 2048
}
 enumeration for the location of the state More...

Public Member Functions

 State ()
 Default constructor. State defined to be of type State::HasMomentum.
virtual ~State ()
 Default Destructor.
virtual const CLID & clID () const
unsigned int nParameters () const
 Retrieve the number of state parameters.
void positionAndMomentum (HepPoint3D &pos, HepVector3D &mom, HepSymMatrix &cov6D) const
 Retrieve the position and momentum vectors and the corresponding 6D covariance matrix (pos:1->3,mom:4-6) of the state.
HepPoint3D position () const
 Retrieve the 3D-position vector of the state.
double x () const
 Retrieve the x-position of the state.
double y () const
 Retrieve the y-position of the state.
double z () const
 Retrieve the z-position of the state.
HepVector3D slopes () const
 Retrieve the slopes (Tx=dx/dz,Ty=dy/dz,1.) of the state.
double tx () const
 Retrieve the Tx=dx/dz slope of the state.
double ty () const
 Retrieve the Ty=dy/dz slope of the state.
virtual double qOverP () const
 Retrieve the charge-over-momentum Q/P of the state.
virtual double p () const
 Retrieve the momentum of the state.
virtual double pt () const
 Retrieve the transverse momentum of the state.
HepVector3D momentum () const
 Retrieve the momentum vector of the state.
double qOverPperp () const
 Retrieve the Q/Pperp (ratio of the charge to the component of the momentum transverse to the magnetic field) of the state.
virtual HepSymMatrix posMomCovariance () const
 Retrieve the 6D covariance matrix (x,y,z,px,py,pz) of the state.
HepSymMatrix errPosition () const
 Retrieve the errors on the 3D-position vector of the state.
double errX2 () const
 Retrieve the squared error on the x-position of the state.
double errY2 () const
 Retrieve the squared error on the y-position of the state.
HepSymMatrix errSlopes () const
 Retrieve the errors on the slopes of the state.
double errTx2 () const
 Retrieve the squared error on the x-slope Tx=dx/dz of the state.
double errTy2 () const
 Retrieve the squared error on the y-slope Ty=dy/dz of the state.
virtual double errQOverP2 () const
 Retrieve the squared error on the charge-over-momentum Q/P of the state.
virtual double errP2 () const
 Retrieve the squared error on the momentum of the state.
virtual HepSymMatrix errMomentum () const
 Retrieve the errors on the momentum vector of the stateRetrieve the errors on the momentum vector of the state.
virtual double errQOverPperp2 () const
 Retrieve the squared error on the Q/Pperp of the state.
virtual Stateclone () const
 Clone the state.
virtual void reset ()
 Clear the state before re-using it.
void setState (const HepVector &state)
 Update the state vector.
virtual void setState (double x, double y, double z, double tx, double ty, double qOverP)
 Update the state vector (presumably of type State::HasMomentum).
void setState (double x, double y, double z, double tx, double ty)
 Update the state vector (presumably of type State::StraightLine).
void setCovariance (const HepSymMatrix &value)
 Update the state covariance.
void setX (double value)
 Update the x-position of the state.
void setY (double value)
 Update the y-position of the state.
void setZ (double value)
 Update the z-position of the state.
void setTx (double value)
 Update the Tx slope of the state.
void setTy (double value)
 Update the Ty slope of the state.
virtual void setQOverP (double value)
 Update the Q/P value of the state.
unsigned int flags () const
 Retrieve const the variety of state flags.
bool checkType (const Type &value) const
 Check state type.
void setLocation (const Location &value)
 Update state location.
bool checkLocation (const Location &value) const
 Check state location.
const HepVector & state () const
 Retrieve const the state vector.
HepVector & state ()
 Retrieve the state vector.
const HepSymMatrix & covariance () const
 Retrieve const the state covariance matrix (indexes 1,...,5 for x, y, tx, ty, Q/p).
HepSymMatrix & covariance ()
 Retrieve the state covariance matrix (indexes 1,...,5 for x, y, tx, ty, Q/p).

Static Public Member Functions

static const CLID & classID ()

Protected Types

enum  flagsBits { typeBits = 0, locationBits = 2 }
 Offsets of bitfield flags. More...
enum  flagsMasks { typeMask = 0x3L, locationMask = 0xFFCL }
 Bitmasks for bitfield flags. More...

Protected Member Functions

void setType (const State::Type &value)
 Update the type of the state.

Protected Attributes

unsigned int m_flags
 the variety of state flags
HepVector m_state
 the state vector
HepSymMatrix m_covariance
 the state covariance matrix (indexes 1,...,5 for x, y, tx, ty, Q/p)
double m_z
 the z-position of the state


Detailed Description

State is the base class of offline and online track states.

Author:
Jose Hernando, Eduardo Rodrigues created Thu Mar 31 15:46:49 2005

Definition at line 46 of file State.h.


Member Enumeration Documentation

enum State::flagsBits [protected]
 

Offsets of bitfield flags.

Enumeration values:
typeBits 
locationBits 

Definition at line 229 of file State.h.

00229                 {typeBits     = 0,
00230                  locationBits = 2};

enum State::flagsMasks [protected]
 

Bitmasks for bitfield flags.

Enumeration values:
typeMask 
locationMask 

Definition at line 233 of file State.h.

00233                  {typeMask     = 0x3L,
00234                   locationMask = 0xFFCL};

enum State::Location
 

enumeration for the location of the state

Enumeration values:
Unknown 
ClosestToBeam 
FirstMeasurement 
EndVelo 
AtTT 
AtT 
BegRich1 
EndRich1 
BegRich2 
EndRich2 
Calo 
Muon 

Definition at line 54 of file State.h.

00054                { Unknown=1,
00055                  ClosestToBeam=2,
00056                  FirstMeasurement=4,
00057                  EndVelo=8,
00058                  AtTT=16,
00059                  AtT=32,
00060                  BegRich1=64,
00061                  EndRich1=128,
00062                  BegRich2=256,
00063                  EndRich2=512,
00064                  Calo=1024,
00065                  Muon=2048 };

enum State::Type
 

enumeration for the state type

Enumeration values:
HasMomentum 
StraightLine 

Definition at line 51 of file State.h.

00051            { HasMomentum=1,
00052              StraightLine=2 };


Constructor & Destructor Documentation

State::State  ) 
 

Default constructor. State defined to be of type State::HasMomentum.

Definition at line 17 of file State.cpp.

References HasMomentum, m_covariance, m_state, m_z, setLocation(), setType(), and Unknown.

Referenced by clone().

00017              {
00018   setType( State::HasMomentum );
00019   setLocation( State::Unknown );
00020   m_z          = 0.;
00021   m_state      = HepVector(5,0);
00022   m_covariance = HepSymMatrix(5,0);
00023 }

virtual State::~State  )  [inline, virtual]
 

Default Destructor.

Definition at line 71 of file State.h.

00071 {}


Member Function Documentation

bool State::checkLocation const Location value  )  const [inline]
 

Check state location.

Definition at line 280 of file State.h.

References locationBits, locationMask, and m_flags.

Referenced by Track::stateAt(), and FitTrack::stateAt().

00281 {
00282   unsigned int val = (unsigned int)value;
00283   return 0 != ( m_flags & locationMask & ( val << locationBits ));
00284 }

bool State::checkType const Type value  )  const [inline]
 

Check state type.

Definition at line 267 of file State.h.

References m_flags, typeBits, and typeMask.

Referenced by errMomentum(), Track2TrFitTrackCnv::execute(), and setState().

00268 {
00269   unsigned int val = (unsigned int)value;
00270   return 0 != ( m_flags & typeMask & ( val << typeBits ));
00271 }

const CLID & State::classID  )  [inline, static]
 

Definition at line 257 of file State.h.

References CLID_State.

Referenced by clID().

00258 {
00259   return CLID_State;
00260 }

const CLID & State::clID  )  const [inline, virtual]
 

Definition at line 252 of file State.h.

References classID().

00253 {
00254   return State::classID();
00255 }

State * State::clone  )  const [virtual]
 

Clone the state.

Definition at line 202 of file State.cpp.

References State().

Referenced by Node::setState().

00203 {
00204   return new State(*this);
00205 };

HepSymMatrix & State::covariance  )  [inline]
 

Retrieve the state covariance matrix (indexes 1,...,5 for x, y, tx, ty, Q/p).

Definition at line 301 of file State.h.

References m_covariance.

00302 {
00303   return m_covariance;
00304 }

const HepSymMatrix & State::covariance  )  const [inline]
 

Retrieve const the state covariance matrix (indexes 1,...,5 for x, y, tx, ty, Q/p).

Definition at line 296 of file State.h.

References m_covariance.

Referenced by Track2TrFitTrackCnv::execute(), posMomCovariance(), TrExtrapolator::updateState(), and TrackExtrapolator::updateState().

00297 {
00298   return m_covariance;
00299 }

HepSymMatrix State::errMomentum  )  const [virtual]
 

Retrieve the errors on the momentum vector of the stateRetrieve the errors on the momentum vector of the state.

Definition at line 159 of file State.cpp.

References checkType(), HasMomentum, and posMomCovariance().

Referenced by TrExtrapolator::momentum(), TrackExtrapolator::momentum(), and Track::momentum().

00160 {
00161   if ( checkType( State::HasMomentum ) ) {
00162     const HepSymMatrix temp = posMomCovariance(); // CLHEP 1.9, must be const
00163     return temp.sub(4,6);
00164   }
00165   else {
00166     return HepSymMatrix(3,0);
00167   }
00168 };

double State::errP2  )  const [virtual]
 

Retrieve the squared error on the momentum of the state.

Definition at line 150 of file State.cpp.

References errQOverP2(), and m_state.

00151 {
00152   if ( m_state[4] != 0. ) return errQOverP2() / pow( m_state[4], 4. );
00153   return 0.;
00154 };

HepSymMatrix State::errPosition  )  const [inline]
 

Retrieve the errors on the 3D-position vector of the state.

Definition at line 390 of file State.h.

References posMomCovariance().

Referenced by TrExtrapolator::position(), TrackExtrapolator::position(), and Track::position().

00391 {
00392 
00393   const HepSymMatrix temp = posMomCovariance();
00394   return temp.sub(1,3);
00395         
00396 }

double State::errQOverP2  )  const [virtual]
 

Retrieve the squared error on the charge-over-momentum Q/P of the state.

Definition at line 142 of file State.cpp.

References m_covariance.

Referenced by errP2().

00143 {
00144   return m_covariance.fast(5,5);
00145 };

double State::errQOverPperp2  )  const [virtual]
 

Retrieve the squared error on the Q/Pperp of the state.

Definition at line 173 of file State.cpp.

References m_covariance, qOverP(), tx(), and ty().

00174 {
00175   double tx2        = tx() * tx();
00176   double ty2        = ty() * ty();
00177   double qOverP2    = qOverP() * qOverP();
00178   double transSlope = 1. + tx2;
00179   double norm       = 1 + tx2 + ty2;
00180 
00181   double QOverPperpError = ( (norm/transSlope) * m_covariance[4][4] )
00182 
00183     + ( qOverP2 * tx2 * ty2*ty2 * m_covariance[2][2]/
00184        (pow(transSlope,3.)*norm))
00185 
00186     + ( qOverP2 * ty2 * m_covariance[3][3] / (norm*transSlope) )
00187 
00188     - ( 2. * qOverP() * tx() * ty2 * m_covariance[2][4]
00189         / ( transSlope*transSlope ) )
00190 
00191     + 2. * qOverP() * ty() * m_covariance[3][4] / transSlope
00192 
00193     - 2. * ( qOverP2 * tx() * ty() * ty2 * m_covariance[2][3]
00194          / ( norm* transSlope*transSlope ) );
00195 
00196   return QOverPperpError;
00197 };

HepSymMatrix State::errSlopes  )  const [inline]
 

Retrieve the errors on the slopes of the state.

Definition at line 412 of file State.h.

References m_covariance.

Referenced by TrExtrapolator::slopes(), TrackExtrapolator::slopes(), and Track::slopes().

00413 {
00414 
00415   const HepSymMatrix temp = m_covariance;
00416   HepSymMatrix err = temp.sub(3,5);
00417   err.fast(2,1) = 0.;
00418   err.fast(3,1) = 0.;
00419   err.fast(3,2) = 0.;
00420   err.fast(3,3) = 0.;
00421   return err;
00422         
00423 }

double State::errTx2  )  const [inline]
 

Retrieve the squared error on the x-slope Tx=dx/dz of the state.

Definition at line 425 of file State.h.

References m_covariance.

00426 {
00427 
00428   return m_covariance.fast(3,3);
00429         
00430 }

double State::errTy2  )  const [inline]
 

Retrieve the squared error on the y-slope Ty=dy/dz of the state.

Definition at line 432 of file State.h.

References m_covariance.

00433 {
00434 
00435   return m_covariance.fast(4,4);
00436         
00437 }

double State::errX2  )  const [inline]
 

Retrieve the squared error on the x-position of the state.

Definition at line 398 of file State.h.

References m_covariance.

00399 {
00400 
00401   return m_covariance.fast(1,1);
00402         
00403 }

double State::errY2  )  const [inline]
 

Retrieve the squared error on the y-position of the state.

Definition at line 405 of file State.h.

References m_covariance.

00406 {
00407 
00408   return m_covariance.fast(2,2);
00409         
00410 }

unsigned int State::flags  )  const [inline]
 

Retrieve const the variety of state flags.

Definition at line 262 of file State.h.

References m_flags.

00263 {
00264   return m_flags;
00265 }

HepVector3D State::momentum  )  const [inline]
 

Retrieve the momentum vector of the state.

Definition at line 373 of file State.h.

References p(), and slopes().

Referenced by TrExtrapolator::momentum(), TrackExtrapolator::momentum(), Track::momentum(), TrExtrapolator::positionAndMomentum(), TrackExtrapolator::positionAndMomentum(), and positionAndMomentum().

00374 {
00375 
00376   HepVector3D mom = slopes();
00377   mom *= ( p() / mom.mag() );
00378   return mom;
00379         
00380 }

unsigned int State::nParameters  )  const [inline]
 

Retrieve the number of state parameters.

Definition at line 306 of file State.h.

References m_state.

Referenced by setCovariance().

00307 {
00308 
00309   return (unsigned int) m_state.num_row();
00310         
00311 }

double State::p  )  const [virtual]
 

Retrieve the momentum of the state.

Definition at line 36 of file State.cpp.

References m_state.

Referenced by momentum(), TrExtrapolator::p(), TrackExtrapolator::p(), Track::p(), and posMomCovariance().

00037 {
00038   if ( m_state[4] != 0. ) return fabs( 1./m_state[4] );
00039   return 0.;
00040 };

HepPoint3D State::position  )  const [inline]
 

Retrieve the 3D-position vector of the state.

Definition at line 324 of file State.h.

References m_state, and m_z.

Referenced by Track::closestState(), FitTrack::closestState(), TrExtrapolator::position(), TrackExtrapolator::position(), Track::position(), TrExtrapolator::positionAndMomentum(), TrackExtrapolator::positionAndMomentum(), and positionAndMomentum().

00325 {
00326 
00327   return HepPoint3D( m_state[0], m_state[1], m_z );
00328         
00329 }

void State::positionAndMomentum HepPoint3D &  pos,
HepVector3D &  mom,
HepSymMatrix &  cov6D
const [inline]
 

Retrieve the position and momentum vectors and the corresponding 6D covariance matrix (pos:1->3,mom:4-6) of the state.

Definition at line 313 of file State.h.

References momentum(), position(), and posMomCovariance().

Referenced by TrExtrapolator::positionAndMomentum(), TrackExtrapolator::positionAndMomentum(), and Track::positionAndMomentum().

00316 {
00317 
00318   pos   = position();
00319   mom   = momentum();
00320   cov6D = posMomCovariance();
00321         
00322 }

HepSymMatrix State::posMomCovariance  )  const [virtual]
 

Retrieve the 6D covariance matrix (x,y,z,px,py,pz) of the state.

Definition at line 57 of file State.cpp.

References covariance(), p(), qOverP(), tx(), and ty().

Referenced by errMomentum(), errPosition(), positionAndMomentum(), and Track::posMomCovariance().

00058 {
00059   // Transformation done in 2 steps:
00060   // 1) "convert" first from (x,y,tx,ty,Q/p) to (x,y,z,tx,ty,Q/p)
00061   const HepSymMatrix cov5D = covariance();
00062   HepSymMatrix cov6Dtmp    = HepSymMatrix(6,0);
00063 
00064   std::vector<int> index;
00065   index.push_back( 1 );
00066   index.push_back( 3 );
00067   index.push_back( 4 );
00068   index.push_back( 5 );
00069 
00070   for ( int j=0 ; j<5 ; j++ ) {
00071     for ( int i=j ; i<5 ; i++ ) {
00072       cov6Dtmp.fast(index[i]+1,index[j]+1) = cov5D.fast(i+1,j+1);
00073     }
00074   }
00075   cov6Dtmp.fast(3,1) = 0.;
00076   cov6Dtmp.fast(3,2) = 0.;
00077   cov6Dtmp.fast(3,3) = 0.;
00078   cov6Dtmp.fast(4,3) = 0.;
00079   cov6Dtmp.fast(5,3) = 0.;
00080   cov6Dtmp.fast(6,3) = 0.;
00081 
00082   // 2) transformation from (x,y,z,tx,ty,Q/p) to (x,y,z,px,py,pz)
00083   // jacobian J = I 0
00084   //              0 j
00085   //  -> covariance matrix C = C_A  C_B.T()
00086   //                           C_B  C_D
00087   //     becomes C' = C_A   (j.C_B).T()  after similarity transformation
00088   //                  j.C_B j.C_D.(j.T())
00089   double Tx     = tx();
00090   double Ty     = ty();
00091   double QOverP = qOverP();
00092   double Q   = ( QOverP != 0. ? (fabs(QOverP)/QOverP) : 0. );
00093   double Tx2 = Tx * Tx;
00094   double Ty2 = Ty * Ty;
00095   double Qp  = Q * p();
00096   double N   = 1. / sqrt( 1 + Tx2 + Ty2 );
00097   double N2  = N*N;
00098 
00099   HepSymMatrix cov6D = HepSymMatrix(6,0);
00100   HepSymMatrix C_A = cov6Dtmp.sub(1,3);
00101   HepSymMatrix C_D = cov6Dtmp.sub(4,6);
00102   HepMatrix    C_B = HepMatrix(3,3,0);
00103   HepMatrix    j   = HepMatrix(3,3,0);
00104 
00105   j[0][0] = ( 1 + Ty2 ) * N2;
00106   j[0][1] = - Tx * Ty * N2;
00107   j[0][2] = - Qp * Tx;
00108   j[1][0] = - Tx * Ty * N2;
00109   j[1][1] = ( 1 + Tx2 ) * N2;
00110   j[1][2] = - Qp * Ty;
00111   j[2][0] = - Tx * N2;
00112   j[2][1] = - Ty * N2;
00113   j[2][2] = - Qp;
00114 
00115   C_B(1,1) = cov6Dtmp.fast(4,1);
00116   C_B(2,1) = cov6Dtmp.fast(5,1);
00117   C_B(2,2) = cov6Dtmp.fast(5,2);
00118   C_B(3,1) = cov6Dtmp.fast(6,1);
00119   C_B(3,2) = cov6Dtmp.fast(6,2);
00120   C_B(3,3) = cov6Dtmp.fast(6,3);
00121 
00122   C_B = j * C_B;
00123 
00124   cov6D.sub(1,C_A);
00125   cov6D.sub(4,C_D.similarity(j));
00126   cov6D.fast(4,1) = C_B(1,1);
00127   cov6D.fast(5,1) = C_B(2,1);
00128   cov6D.fast(6,1) = C_B(3,1);
00129   cov6D.fast(4,2) = C_B(1,2);
00130   cov6D.fast(5,2) = C_B(2,2);
00131   cov6D.fast(6,2) = C_B(3,2);
00132   cov6D.fast(4,3) = C_B(1,3);
00133   cov6D.fast(5,3) = C_B(2,3);
00134   cov6D.fast(6,3) = C_B(3,3);
00135 
00136   return cov6D;
00137 };

double State::pt  )  const [virtual]
 

Retrieve the transverse momentum of the state.

Definition at line 45 of file State.cpp.

References m_state.

Referenced by TrExtrapolator::pt(), TrackExtrapolator::pt(), and Track::pt().

00046 {
00047   if ( m_state[4] != 0. ) {
00048     double txy2 = m_state[2]*m_state[2] + m_state[3]*m_state[3];
00049     return sqrt( txy2/(1.+txy2) ) / fabs( m_state[4] );
00050   }
00051   return 0.;
00052 };

double State::qOverP  )  const [virtual]
 

Retrieve the charge-over-momentum Q/P of the state.

Definition at line 28 of file State.cpp.

References m_state.

Referenced by Track::charge(), TrueStateCreator::createState(), TrueStateCreator::createStateVertex(), errQOverPperp2(), Track2TrFitTrackCnv::execute(), posMomCovariance(), and qOverPperp().

00029 {
00030   return m_state[4];
00031 };

double State::qOverPperp  )  const [inline]
 

Retrieve the Q/Pperp (ratio of the charge to the component of the momentum transverse to the magnetic field) of the state.

Definition at line 382 of file State.h.

References qOverP(), tx(), and ty().

00383 {
00384 
00385   double tx2 = tx() * tx();
00386   return ( qOverP() * sqrt( (1.+ tx2 + ty()*ty()) / (1. + tx2 ) ) );
00387         
00388 }

void State::reset  )  [virtual]
 

Clear the state before re-using it.

Definition at line 210 of file State.cpp.

References m_covariance, m_state, and m_z.

Referenced by Track::reset().

00211 {
00212   m_z          = 0.;
00213   m_state      = HepVector(5,0);
00214   m_covariance = HepSymMatrix(5,0);
00215 };

void State::setCovariance const HepSymMatrix &  value  )  [inline]
 

Update the state covariance.

Definition at line 461 of file State.h.

References m_covariance, and nParameters().

Referenced by TrFitTrack2TrackCnv::execute().

00462 {
00463 
00464   if ( value.num_row() == (int) nParameters() ) {
00465     m_covariance = value;
00466   }
00467   else {
00468     std::cerr << "ERROR   The dimension of the covariance matrix does not match that of the state!"
00469               << "ERROR   Using the default covariance matrix." << std::endl;
00470     int dim = nParameters();
00471     m_covariance = HepSymMatrix(dim,0);
00472   }
00473         
00474 }

void State::setLocation const Location value  )  [inline]
 

Update state location.

Definition at line 273 of file State.h.

References locationBits, locationMask, and m_flags.

Referenced by State().

00274 {
00275   unsigned int val = (unsigned int)value;
00276   m_flags &= ~locationMask;
00277   m_flags |= ((((unsigned int)val) << locationBits) & locationMask);
00278 }

void State::setQOverP double  value  )  [virtual]
 

Update the Q/P value of the state.

Definition at line 242 of file State.cpp.

References m_state.

00243 {
00244   m_state[4] = value;
00245 };

void State::setState double  x,
double  y,
double  z,
double  tx,
double  ty
[inline]
 

Update the state vector (presumably of type State::StraightLine).

Definition at line 446 of file State.h.

References m_state, and m_z.

00451 {
00452 
00453   m_state[0] = x;
00454   m_state[1] = y;
00455   m_state[2] = tx;
00456   m_state[3] = ty;
00457   m_z        = z;
00458         
00459 }

void State::setState double  x,
double  y,
double  z,
double  tx,
double  ty,
double  qOverP
[virtual]
 

Update the state vector (presumably of type State::HasMomentum).

Definition at line 220 of file State.cpp.

References checkType(), m_state, m_z, and StraightLine.

00223 {
00224   m_state[0] = x;
00225   m_state[1] = y;
00226   m_state[2] = tx;
00227   m_state[3] = ty;
00228   m_z        = z;
00229   if ( checkType( State::StraightLine ) ) {
00230     std::cerr
00231       << "ERROR   You're trying to set the Q/P value for a state of type State::StraightLine!"
00232       << "ERROR   This value will be discarded." << std::endl;
00233   }
00234   else {
00235      m_state[4] = qOverP;
00236   }
00237 };

void State::setState const HepVector &  state  )  [inline]
 

Update the state vector.

Definition at line 439 of file State.h.

References m_state, and state().

Referenced by TrueStateCreator::createState(), TrueStateCreator::createStateVertex(), and TrFitTrack2TrackCnv::execute().

00440 {
00441 
00442   m_state = state;
00443         
00444 }

void State::setTx double  value  )  [inline]
 

Update the Tx slope of the state.

Definition at line 497 of file State.h.

References m_state.

00498 {
00499 
00500   m_state[2] = value;
00501         
00502 }

void State::setTy double  value  )  [inline]
 

Update the Ty slope of the state.

Definition at line 504 of file State.h.

References m_state.

00505 {
00506 
00507   m_state[3] = value;
00508         
00509 }

void State::setType const State::Type value  )  [protected]
 

Update the type of the state.

Definition at line 250 of file State.cpp.

References m_flags, typeBits, and typeMask.

Referenced by State().

00251 {
00252   unsigned int val = (unsigned int)value;
00253   m_flags &= ~typeMask;
00254   m_flags |= ((((unsigned int)val) << typeBits) & typeMask);
00255 };

void State::setX double  value  )  [inline]
 

Update the x-position of the state.

Definition at line 476 of file State.h.

References m_state.

00477 {
00478 
00479   m_state[0] = value;
00480         
00481 }

void State::setY double  value  )  [inline]
 

Update the y-position of the state.

Definition at line 483 of file State.h.

References m_state.

00484 {
00485 
00486   m_state[1] = value;
00487         
00488 }

void State::setZ double  value  )  [inline]
 

Update the z-position of the state.

Definition at line 490 of file State.h.

References m_z.

Referenced by TrExtrapolator::updateState(), and TrackExtrapolator::updateState().

00491 {
00492 
00493   m_z = value;
00494         
00495 }

HepVector3D State::slopes  )  const [inline]
 

Retrieve the slopes (Tx=dx/dz,Ty=dy/dz,1.) of the state.

Definition at line 352 of file State.h.

References m_state.

Referenced by momentum(), TrExtrapolator::slopes(), TrackExtrapolator::slopes(), and Track::slopes().

00353 {
00354 
00355   return HepVector3D( m_state[2], m_state[3], 1.);
00356         
00357 }

HepVector & State::state  )  [inline]
 

Retrieve the state vector.

Definition at line 291 of file State.h.

References m_state.

00292 {
00293   return m_state;
00294 }

const HepVector & State::state  )  const [inline]
 

Retrieve const the state vector.

Definition at line 286 of file State.h.

References m_state.

Referenced by Track2TrFitTrackCnv::execute(), setState(), TrExtrapolator::updateState(), and TrackExtrapolator::updateState().

00287 {
00288   return m_state;
00289 }

double State::tx  )  const [inline]
 

Retrieve the Tx=dx/dz slope of the state.

Definition at line 359 of file State.h.

References m_state.

Referenced by errQOverPperp2(), Track2TrFitTrackCnv::execute(), posMomCovariance(), and qOverPperp().

00360 {
00361 
00362   return m_state[2];
00363         
00364 }

double State::ty  )  const [inline]
 

Retrieve the Ty=dy/dz slope of the state.

Definition at line 366 of file State.h.

References m_state.

Referenced by errQOverPperp2(), Track2TrFitTrackCnv::execute(), posMomCovariance(), and qOverPperp().

00367 {
00368 
00369   return m_state[3];
00370         
00371 }

double State::x  )  const [inline]
 

Retrieve the x-position of the state.

Definition at line 331 of file State.h.

References m_state.

Referenced by Track2TrFitTrackCnv::execute().

00332 {
00333 
00334   return m_state[0];
00335         
00336 }

double State::y  )  const [inline]
 

Retrieve the y-position of the state.

Definition at line 338 of file State.h.

References m_state.

Referenced by Track2TrFitTrackCnv::execute().

00339 {
00340 
00341   return m_state[1];
00342         
00343 }

double State::z  )  const [inline]
 

Retrieve the z-position of the state.

Definition at line 345 of file State.h.

References m_z.

Referenced by Track::closestState(), FitTrack::closestState(), and Track2TrFitTrackCnv::execute().

00346 {
00347 
00348   return m_z;
00349         
00350 }


Member Data Documentation

HepSymMatrix State::m_covariance [protected]
 

the state covariance matrix (indexes 1,...,5 for x, y, tx, ty, Q/p)

Definition at line 239 of file State.h.

Referenced by covariance(), errQOverP2(), errQOverPperp2(), errSlopes(), errTx2(), errTy2(), errX2(), errY2(), reset(), setCovariance(), and State().

unsigned int State::m_flags [protected]
 

the variety of state flags

Definition at line 237 of file State.h.

Referenced by checkLocation(), checkType(), flags(), setLocation(), and setType().

HepVector State::m_state [protected]
 

the state vector

Definition at line 238 of file State.h.

Referenced by errP2(), nParameters(), p(), position(), pt(), qOverP(), reset(), setQOverP(), setState(), setTx(), setTy(), setX(), setY(), slopes(), state(), State(), tx(), ty(), x(), and y().

double State::m_z [protected]
 

the z-position of the state

Definition at line 240 of file State.h.

Referenced by position(), reset(), setState(), setZ(), State(), and z().


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