#include <TrState.h>
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... |
|
|
|
00054 {HasMomentum,StraightLine}; |
|
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 } |
|
Default Constructor.
00070 : m_type(0), 00071 m_state(), 00072 m_stateCovariance(), 00073 m_z(0.0) {} |
|
Destructor.
00076 {} |
|
00248 { 00249 return CLID_TrState; 00250 } |
|
Retrieve pointer to class definition structure.
00243 { 00244 return TrState::classID(); 00245 } |
|
Clone the state.
|
|
Retrieve the errors on the momentum vector of the state.
|
|
Retrieve the squared error on the momentum of the state.
|
|
Retrieve the error on the 3D-position vector of the state.
|
|
Retrieve the squared error on the charge-over-momentum Q/P of the state.
|
|
Retrieve the errors on the slopes of the state.
|
|
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 } |
|
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 } |
|
Retrieve the squared error on the x-position of the state.
00317 { 00318 00319 return m_covariance.fast(1,1); 00320 00321 } |
|
Retrieve the squared error on the y-position of the state.
00324 { 00325 00326 return m_covariance.fast(2,2); 00327 00328 } |
|
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 } |
|
Retrieve the momentum vector of the state.
|
|
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 } |
|
Retrieve the 3D-position vector of the state.
|
|
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 } |
|
Retrieve the 6D covariance matrix (x,y,z,px,py,pz) of the state.
|
|
Retrieve the transverse momentum of the state.
|
|
Retrieve the charge-over-momentum Q/P of the state.
00302 { 00303 00304 return m_state[4]; 00305 00306 } |
|
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 } |
|
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 } |
|
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 } |
|
set the squared error on the Tx=dx/dz slope of the state.
00417 { 00418 00419 m_covariance(3,3) = value; 00420 00421 } |
|
set the squared error on the Ty=dy/dz slope of the state.
00424 { 00425 00426 m_covariance(4,4) = value; 00427 00428 } |
|
set the squared error on the x-position of the state.
00403 { 00404 00405 m_covariance(1,1) = value; 00406 00407 } |
|
set the squared error on the y-position of the state.
00410 { 00411 00412 m_covariance(2,2) = value; 00413 00414 } |
|
Update the Q/P value of the state.
00396 { 00397 00398 if ( m_state.type() == TrState::HasMomentum ) m_state[4] = value; 00399 00400 } |
|
Update the state vector (taken automatically to be of type TrState::StraightLine).
|
|
Update the state vector (taken automatically to be of type TrState::HasMomentum).
|
|
Update the state vector.
|
|
Update the state covariance matrix.
00468 { 00469 m_stateCovariance = value; 00470 } |
|
Update the Tx slope of the state.
00382 { 00383 00384 m_state[2] = value; 00385 00386 } |
|
Update the Ty slope of the state.
00389 { 00390 00391 m_state[3] = value; 00392 00393 } |
|
Update the type of the state.
00443 { 00444 m_type = value; 00445 } |
|
Update the x-position of the state.
00368 { 00369 00370 m_state[0] = value; 00371 00372 } |
|
Update the y-position of the state.
00375 { 00376 00377 m_state[1] = value; 00378 00379 } |
|
Update the z-position of the state.
00478 { 00479 m_z = value; 00480 } |
|
Retrieve the slopes (Tx=dx/dz,Ty=dy/dz,1) of the state.
|
|
Retrieve the state vector (non-const).
00453 { 00454 return m_state; 00455 } |
|
Retrieve the state vector.
00448 { 00449 return m_state; 00450 } |
|
Retrieve the state covariance matrix (non-const).
00463 { 00464 return m_stateCovariance; 00465 } |
|
Retrieve the state covariance matrix.
00458 { 00459 return m_stateCovariance; 00460 } |
|
Retrieve the Tx=dx/dz slope of the state.
00288 { 00289 00290 return m_state[2]; 00291 00292 } |
|
Retrieve the Ty=dy/dz slope of the state.
00295 { 00296 00297 return m_state[3]; 00298 00299 } |
|
Retrieve the type of the state.
00438 { 00439 return m_type; 00440 } |
|
Retrieve the x-position of the state.
00267 { 00268 00269 return m_state[0]; 00270 00271 } |
|
Retrieve the y-position of the state.
00274 { 00275 00276 return m_state[1]; 00277 00278 } |
|
Retrieve the z-position of the state.
|
|
Retrieve the z-position of the state.
00281 { 00282 00283 return m_z; 00284 00285 } |
|
the state vector.
|
|
the state covariance matrix.
|
|
the type of the state.
|
|
the z-position of the state.
|