Main Page   Namespace List   Compound List   File List   Compound Members   File Members  

TrState Class Reference

#include <TrState.h>

List of all members.

Public Types

enum  Type { HasMomentum, StraightLine }
enum  ReferenceLocation {
  NotDefined = 0, ClosestToBeam, AtFirstMeasurement, BeforeRICH1,
  AfterRICH1, BeforeRICH2, AfterRICH2
}

Public Methods

 TrState (const TrState &state)
 TrgState copy constructor. More...

 TrState ()
 Default Constructor. More...

virtual ~TrState ()
 Destructor. More...

virtual const CLID & clID () const
 Retrieve pointer to class definition structure. More...

virtual void positionAndMomentum (const HepPoint3D &pos, const HepVector3D &mom, const HepSymMatrix &cov6D) const
 Retrieve the position and momentum vectors and the corresponding 6D covariance matrix (pos:1->3,mom:4-6) of the state. More...

virtual HepPoint3D position () const
 Retrieve the 3D-position vector of the state. More...

virtual double x () const
 Retrieve the x-position of the state. More...

virtual double y () const
 Retrieve the y-position of the state. More...

virtual double z () const
 Retrieve the z-position of the state. More...

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

virtual double tx () const
 Retrieve the Tx=dx/dz slope of the state. More...

virtual double ty () const
 Retrieve the Ty=dy/dz slope of the state. More...

virtual double qOverP () const
 Retrieve the charge-over-momentum Q/P of the state. More...

virtual double p () const
 Retrieve the momentum of the state. More...

virtual double pt () const
 Retrieve the transverse momentum of the state. More...

virtual HepVector3D momentum () const
 Retrieve the momentum vector of the state. More...

virtual HepSymMatrix posMomCovariance () const
 Retrieve the 6D covariance matrix (x,y,z,px,py,pz) of the state. More...

virtual std::vector errPosition () const
 Retrieve the error on the 3D-position vector of the state. More...

virtual double errX2 () const
 Retrieve the squared error on the x-position of the state. More...

virtual double errY2 () const
 Retrieve the squared error on the y-position of the state. More...

virtual std::vector errSlopes () const
 Retrieve the errors on the slopes of the state. More...

virtual double errTx2 () const
 Retrieve the squared error on the x-slope Tx=dx/dz of the state. More...

virtual double errTy2 () const
 Retrieve the squared error on the y-slope Ty=dy/dz of the state. More...

virtual double errQOverP2 () const
 Retrieve the squared error on the charge-over-momentum Q/P of the state. More...

virtual double errP2 () const
 Retrieve the squared error on the momentum of the state. More...

virtual std::vector errMomentum () const
 Retrieve the errors on the momentum vector of the state. More...

virtual TrState * clone () const
 Clone the state. More...

virtual void setState (const HepVector &state)
 Update the state vector. More...

virtual void setState (double x, double y, double z, double tx, double ty, double qOverP)
 Update the state vector (taken automatically to be of type TrState::HasMomentum). More...

virtual void setState (double x, double y, double z, double tx, double ty)
 Update the state vector (taken automatically to be of type TrState::StraightLine). More...

virtual void setX (double value)
 Update the x-position of the state. More...

virtual void setY (double value)
 Update the y-position of the state. More...

virtual void setTx (double value)
 Update the Tx slope of the state. More...

virtual void setTy (double value)
 Update the Ty slope of the state. More...

virtual void setQOverP (double value)
 Update the Q/P value of the state. More...

virtual void setErrX2 (double value)
 set the squared error on the x-position of the state. More...

virtual void setErrY2 (double value)
 set the squared error on the y-position of the state. More...

virtual void setErrTx2 (double value)
 set the squared error on the Tx=dx/dz slope of the state. More...

virtual void setErrTy2 (double value)
 set the squared error on the Ty=dy/dz slope of the state. More...

virtual void setErrQOverP2 (double value)
 set the error^2 on the Q/P value of the state. More...

int type () const
 Retrieve the type of the state. More...

void setType (int value)
 Update the type of the state. More...

const HepVector & state () const
 Retrieve the state vector. More...

HepVector & state ()
 Retrieve the state vector (non-const). More...

const HepSymMatrix & stateCovariance () const
 Retrieve the state covariance matrix. More...

HepSymMatrix & stateCovariance ()
 Retrieve the state covariance matrix (non-const). More...

void setStateCovariance (const HepSymMatrix &value)
 Update the state covariance matrix. More...

double z () const
 Retrieve the z-position of the state. More...

void setZ (double value)
 Update the z-position of the state. More...

virtual StreamBuffer & serialize (StreamBuffer &s) const
 Serialize the object for writing. More...

virtual StreamBuffer & serialize (StreamBuffer &s)
 Serialize the object for reading. More...

virtual std::ostream & fillStream (std::ostream &s) const
 Fill the ASCII output stream. More...


Static Public Methods

const CLID & classID ()

Private Attributes

int m_type
 the type of the state. More...

HepVector m_state
 the state vector. More...

HepSymMatrix m_stateCovariance
 the state covariance matrix. More...

double m_z
 the z-position of the state. More...


Detailed Description

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

Author:
Jose Hernando, Eduardo Rodrigues created Tue Sep 28 17:55:56 2004


Member Enumeration Documentation

enum TrState::ReferenceLocation
 

Enumeration values:
NotDefined 
ClosestToBeam 
AtFirstMeasurement 
BeforeRICH1 
AfterRICH1 
BeforeRICH2 
AfterRICH2 

enum TrState::Type
 

Enumeration values:
HasMomentum 
StraightLine 


Constructor & Destructor Documentation

TrState::TrState const TrState &    state [inline]
 

TrgState copy constructor.

00059   {
00060 
00061    m_type            = state.type();
00062    m_state           = state.state();
00063    m_stateCovariance = state.stateCovariance();
00064    m_z               = state.z();
00065         
00066   }

TrState::TrState   [inline]
 

Default Constructor.

00070     : m_type(0),
00071     m_state(),
00072     m_stateCovariance(),
00073     m_z(0.0) {}

virtual TrState::~TrState   [inline, virtual]
 

Destructor.

00076 {}


Member Function Documentation

const CLID & TrState::classID   [inline, static]
 

00248 {
00249   return CLID_TrState;
00250 }

const CLID & TrState::clID   const [inline, virtual]
 

Retrieve pointer to class definition structure.

00243 {
00244   return TrState::classID();
00245 }

virtual TrState* TrState::clone   const [virtual]
 

Clone the state.

virtual std::vector TrState::errMomentum   const [virtual]
 

Retrieve the errors on the momentum vector of the state.

virtual double TrState::errP2   const [virtual]
 

Retrieve the squared error on the momentum of the state.

virtual std::vector TrState::errPosition   const [virtual]
 

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

virtual double TrState::errQOverP2   const [virtual]
 

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

virtual std::vector TrState::errSlopes   const [virtual]
 

Retrieve the errors on the slopes of the state.

double TrState::errTx2   const [inline, virtual]
 

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

00331 {
00332    
00333    return m_covariance.fast(3,3);
00334         
00335 }

double TrState::errTy2   const [inline, virtual]
 

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

00338 {
00339    
00340    return m_covariance.fast(4,4);
00341         
00342 }

double TrState::errX2   const [inline, virtual]
 

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

00317 {
00318    
00319    return m_covariance.fast(1,1);
00320         
00321 }

double TrState::errY2   const [inline, virtual]
 

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

00324 {
00325    
00326    return m_covariance.fast(2,2);
00327         
00328 }

std::ostream & TrState::fillStream std::ostream &    s const [inline, virtual]
 

Fill the ASCII output stream.

00505 {
00506   s << "{ "
00507     << " type:\t" << m_type << std::endl
00508     << "   state:\t" << m_state << std::endl
00509     << "   stateCovariance:\t" << m_stateCovariance << std::endl
00510     << "   z:\t" << (float)m_z << " } ";
00511   return s;
00512 }

virtual HepVector3D TrState::momentum   const [virtual]
 

Retrieve the momentum vector of the state.

double TrState::p   const [inline, virtual]
 

Retrieve the momentum of the state.

00309 {
00310    
00311    if ( m_state.type() == TrState::StraightLine ) return 0.;
00312    return fabs( 1./m_state[4] );
00313         
00314 }

HepPoint3D TrState::position   const [inline, virtual]
 

Retrieve the 3D-position vector of the state.

00260 {
00261    
00262    return HepPoint3D( m_state[0], m_state[1], m_z );
00263         
00264 }

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

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

00253 {
00254    
00255    HepPoint3D pos = state.position();
00256           
00257 }

virtual HepSymMatrix TrState::posMomCovariance   const [virtual]
 

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

virtual double TrState::pt   const [virtual]
 

Retrieve the transverse momentum of the state.

double TrState::qOverP   const [inline, virtual]
 

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

00302 {
00303    
00304    return m_state[4];
00305         
00306 }

StreamBuffer & TrState::serialize StreamBuffer &    s [inline, virtual]
 

Serialize the object for reading.

00493 {
00494   float l_z;
00495   KeyedObject<int>::serialize(s);
00496   s >> m_type
00497     >> m_state
00498     >> m_stateCovariance
00499     >> l_z;
00500   m_z = l_z;
00501   return s;
00502 }

StreamBuffer & TrState::serialize StreamBuffer &    s const [inline, virtual]
 

Serialize the object for writing.

00483 {
00484   KeyedObject<int>::serialize(s);
00485   s << m_type
00486     << m_state
00487     << m_stateCovariance
00488     << (float)m_z;
00489   return s;
00490 }

void TrState::setErrQOverP2 double    value [inline, virtual]
 

set the error^2 on the Q/P value of the state.

00431 {
00432    
00433    if ( m_state.type() == TrState::HasMomentum ) m_covariance(5,5) = value;
00434         
00435 }

void TrState::setErrTx2 double    value [inline, virtual]
 

set the squared error on the Tx=dx/dz slope of the state.

00417 {
00418    
00419    m_covariance(3,3) = value;
00420         
00421 }

void TrState::setErrTy2 double    value [inline, virtual]
 

set the squared error on the Ty=dy/dz slope of the state.

00424 {
00425    
00426    m_covariance(4,4) = value;
00427         
00428 }

void TrState::setErrX2 double    value [inline, virtual]
 

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

00403 {
00404    
00405    m_covariance(1,1) = value;
00406         
00407 }

void TrState::setErrY2 double    value [inline, virtual]
 

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

00410 {
00411    
00412    m_covariance(2,2) = value;
00413         
00414 }

void TrState::setQOverP double    value [inline, virtual]
 

Update the Q/P value of the state.

00396 {
00397    
00398    if ( m_state.type() == TrState::HasMomentum ) m_state[4] = value;
00399         
00400 }

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

Update the state vector (taken automatically to be of type TrState::StraightLine).

00357 {
00358    
00359    m_state[0] = x;
00360    m_state[1] = y;
00361    m_state[2] = tx;
00362    m_state[3] = ty;
00363    m_z        = z;
00364         
00365 }

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

Update the state vector (taken automatically to be of type TrState::HasMomentum).

00345 {
00346    
00347    m_state[0] = x;
00348    m_state[1] = y;
00349    m_state[2] = tx;
00350    m_state[3] = ty;
00351    m_state[4] = qOverP;
00352    m_z        = z;
00353         
00354 }

virtual void TrState::setState const HepVector &    state [virtual]
 

Update the state vector.

void TrState::setStateCovariance const HepSymMatrix &    value [inline]
 

Update the state covariance matrix.

00468 {
00469   m_stateCovariance = value; 
00470 }

void TrState::setTx double    value [inline, virtual]
 

Update the Tx slope of the state.

00382 {
00383    
00384    m_state[2] = value;
00385         
00386 }

void TrState::setTy double    value [inline, virtual]
 

Update the Ty slope of the state.

00389 {
00390    
00391    m_state[3] = value;
00392         
00393 }

void TrState::setType int    value [inline]
 

Update the type of the state.

00443 {
00444   m_type = value; 
00445 }

void TrState::setX double    value [inline, virtual]
 

Update the x-position of the state.

00368 {
00369    
00370    m_state[0] = value;
00371         
00372 }

void TrState::setY double    value [inline, virtual]
 

Update the y-position of the state.

00375 {
00376    
00377    m_state[1] = value;
00378         
00379 }

void TrState::setZ double    value [inline]
 

Update the z-position of the state.

00478 {
00479   m_z = value; 
00480 }

virtual HepVector3D TrState::slopes   const [virtual]
 

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

HepVector & TrState::state   [inline]
 

Retrieve the state vector (non-const).

00453 {
00454   return m_state;
00455 }

const HepVector & TrState::state   const [inline]
 

Retrieve the state vector.

00448 {
00449   return m_state;
00450 }

HepSymMatrix & TrState::stateCovariance   [inline]
 

Retrieve the state covariance matrix (non-const).

00463 {
00464   return m_stateCovariance;
00465 }

const HepSymMatrix & TrState::stateCovariance   const [inline]
 

Retrieve the state covariance matrix.

00458 {
00459   return m_stateCovariance;
00460 }

double TrState::tx   const [inline, virtual]
 

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

00288 {
00289    
00290    return m_state[2];
00291         
00292 }

double TrState::ty   const [inline, virtual]
 

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

00295 {
00296    
00297    return m_state[3];
00298         
00299 }

int TrState::type   const [inline]
 

Retrieve the type of the state.

00438 {
00439   return m_type;
00440 }

double TrState::x   const [inline, virtual]
 

Retrieve the x-position of the state.

00267 {
00268    
00269    return m_state[0];
00270         
00271 }

double TrState::y   const [inline, virtual]
 

Retrieve the y-position of the state.

00274 {
00275    
00276    return m_state[1];
00277         
00278 }

double TrState::z   const
 

Retrieve the z-position of the state.

double TrState::z   const [inline, virtual]
 

Retrieve the z-position of the state.

00281 {
00282    
00283    return m_z;
00284         
00285 }


Member Data Documentation

HepVector TrState::m_state [private]
 

the state vector.

HepSymMatrix TrState::m_stateCovariance [private]
 

the state covariance matrix.

int TrState::m_type [private]
 

the type of the state.

double TrState::m_z [private]
 

the z-position of the state.


The documentation for this class was generated from the following file:
Generated on Tue Sep 28 18:11:18 2004 for New Track Event Model by doxygen 1.2.14 written by Dimitri van Heesch, © 1997-2002