CGEM BOSS 6.6.5.g
BESIII Offline Software System
Loading...
Searching...
No Matches
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/Vector.h"
20#include "CLHEP/Matrix/Matrix.h"
21#include "CLHEP/Matrix/SymMatrix.h"
22
23#include <iosfwd>
24
25using CLHEP::Hep3Vector;
26using CLHEP::HepVector;
27using CLHEP::HepMatrix;
28using CLHEP::HepSymMatrix;
29// Class interface //
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,
39 double z0In, double tanDipIn);
41
42 double d0() const {return paramVec[ex_d0];}
43 double phi0() const {return paramVec[ex_phi0];}
44 double omega() const {return paramVec[ex_omega];}
45 double z0() const {return paramVec[ex_z0];}
46 double tanDip() const {return paramVec[ex_tanDip];}
47
48 const HepVector& params() const {return paramVec;}
49 HepVector& params() {return paramVec;}
50 const HepSymMatrix& covariance() const {return paramErr;}
51 HepSymMatrix& covariance() {return paramErr;}
52
53 void setD0(double in) {paramVec[ex_d0] = in;}
54 void setPhi0(double in) {paramVec[ex_phi0] = in;}
55 void setOmega(double in) {paramVec[ex_omega] = in;}
56 void setZ0(double in) {paramVec[ex_z0] = in;}
57 void setTanDip(double in) {paramVec[ex_tanDip] = in;}
58 void setError(const HepSymMatrix& in) {paramErr = in;}
59
60 void print(std::ostream& o) const; // Print parameters on one line
61 void printAll(std::ostream& o) const; // Print parameters and error matrix
62
63private:
64 HepVector paramVec;
65 HepSymMatrix paramErr;
66
67};
68
69// Output operator, useful for debugging
70std::ostream& operator<<(std::ostream& o, const TrkExchangePar& helix);
71
72#endif
std::ostream & operator<<(std::ostream &o, const TrkExchangePar &helix)
void setZ0(double in)
double phi0() const
double omega() const
void setPhi0(double in)
double z0() const
const HepVector & params() const
void setD0(double in)
double d0() const
void print(std::ostream &o) const
void setError(const HepSymMatrix &in)
HepVector & params()
void setOmega(double in)
void setTanDip(double in)
double tanDip() const
const HepSymMatrix & covariance() const
void printAll(std::ostream &o) const
HepSymMatrix & covariance()