BOSS 8.0.0
BESIII Offline Software System
Loading...
Searching...
No Matches
Reconstruction/MdcPatRec/TrkBase/include/TrkBase/TrkExchangePar.h
Go to the documentation of this file.
1//--------------------------------------------------------------------------
2// File and Version Information:
3// $Id: TrkExchangePar.h,v 1.3 2010/03/25 09:56:26 zhangy Exp $
4//
5// Description: Class to pass around a minimal set of track parameters from
6// one class to another. It has no functionality.
7//
8//
9// Environment:
10// Software developed for the BaBar Detector at the SLAC B-Factory.
11//
12// Authors: Steve Schaffner
13//
14// Revision History:
15// 20020417 M. Kelsey -- Add print(), printAll(), and operator<<
16//------------------------------------------------------------------------
17#ifndef TRKEXCHANGEPAR_H
18#define TRKEXCHANGEPAR_H
19#include "CLHEP/Matrix/Matrix.h"
20#include "CLHEP/Matrix/SymMatrix.h"
21#include "CLHEP/Matrix/Vector.h"
22
23#include <iosfwd>
24
25using CLHEP::Hep3Vector;
26using CLHEP::HepMatrix;
27using CLHEP::HepSymMatrix;
28using CLHEP::HepVector;
29// Class interface //
30class TrkExchangePar {
31public:
32 enum { nParam = 5 };
34
35 TrkExchangePar( const HepVector&, const HepMatrix& );
36 TrkExchangePar( const HepVector&, const HepSymMatrix& );
37 TrkExchangePar( const HepVector& );
38 TrkExchangePar( double d0In, double phi0In, double omegaIn, double z0In, double tanDipIn );
40
41 double d0() const { return paramVec[ex_d0]; }
42 double phi0() const { return paramVec[ex_phi0]; }
43 double omega() const { return paramVec[ex_omega]; }
44 double z0() const { return paramVec[ex_z0]; }
45 double tanDip() const { return paramVec[ex_tanDip]; }
46
47 const HepVector& params() const { return paramVec; }
48 HepVector& params() { return paramVec; }
49 const HepSymMatrix& covariance() const { return paramErr; }
50 HepSymMatrix& covariance() { return paramErr; }
51
52 void setD0( double in ) { paramVec[ex_d0] = in; }
53 void setPhi0( double in ) { paramVec[ex_phi0] = in; }
54 void setOmega( double in ) { paramVec[ex_omega] = in; }
55 void setZ0( double in ) { paramVec[ex_z0] = in; }
56 void setTanDip( double in ) { paramVec[ex_tanDip] = in; }
57 void setError( const HepSymMatrix& in ) { paramErr = in; }
58
59 void print( std::ostream& o ) const; // Print parameters on one line
60 void printAll( std::ostream& o ) const; // Print parameters and error matrix
61
62private:
63 HepVector paramVec;
64 HepSymMatrix paramErr;
65};
66
67// Output operator, useful for debugging
68std::ostream& operator<<( std::ostream& o, const TrkExchangePar& helix );
69
70#endif
std::ostream & operator<<(std::ostream &o, const TrkExchangePar &helix)
void print(std::ostream &o) const
TrkExchangePar(double d0In, double phi0In, double omegaIn, double z0In, double tanDipIn)
TrkExchangePar(const HepVector &, const HepSymMatrix &)
void printAll(std::ostream &o) const
TrkExchangePar(const HepVector &)
TrkExchangePar(const HepVector &, const HepMatrix &)