BOSS 7.0.9
BESIII Offline Software System
Loading...
Searching...
No Matches
TrkExchangeData Class Reference

#include <TrkExchangeData.h>

Public Member Functions

 TrkExchangeData ()
 
 TrkExchangeData (const TrkExchangePar *)
 
 TrkExchangeData (const TrkExchangeData &)
 
TrkExchangeDataoperator= (const TrkExchangeData &)
 
 ~TrkExchangeData ()
 
TrkExchangeParexchange () const
 
const d_UShortparameters (int index) const
 

Friends

class TrkExchangeDataK
 

Detailed Description

Definition at line 30 of file TrkExchangeData.h.

Constructor & Destructor Documentation

◆ TrkExchangeData() [1/3]

TrkExchangeData::TrkExchangeData ( )

Definition at line 57 of file TrkExchangeData.cxx.

57 {
58 for(unsigned ipar=0;ipar<TrkExchangePar::nParam;ipar++)
59 _params[ipar] = 0;
60}

◆ TrkExchangeData() [2/3]

TrkExchangeData::TrkExchangeData ( const TrkExchangePar traj)

Definition at line 62 of file TrkExchangeData.cxx.

62 {
63// pack the parameters and the diagonal errors
64 assert(traj != 0);
65 for(int ipar=TrkExchangePar::ex_d0;ipar<TrkExchangePar::nParam;ipar++){
66 unsigned parpack(0);
67 const ComPackBase<double>& packpar = paramPacker(ipar);
68// convert from tandip to dip
69 double pval(0) ;
70 switch (ipar) {
72 pval = traj->d0();
73 break;
75 pval = traj->phi0();
76 break;
78 pval = traj->omega();
79 break;
81 pval = traj->z0();
82 break;
84 pval = atan(traj->tanDip());
85 break;
86 }
87 ComPackBaseBase::StatusCode pcode = packpar.pack(pval,parpack);
88 assert(pcode !=ComPackBaseBase::TAG_BAD);
89 _params[ipar] = parpack;
90 }
91}
virtual StatusCode pack(const T, d_ULong &) const =0
double phi0() const
double omega() const
double z0() const
double d0() const
double tanDip() const

◆ TrkExchangeData() [3/3]

TrkExchangeData::TrkExchangeData ( const TrkExchangeData other)

Definition at line 93 of file TrkExchangeData.cxx.

93 {
94 *this = other;
95}

◆ ~TrkExchangeData()

TrkExchangeData::~TrkExchangeData ( )

Definition at line 106 of file TrkExchangeData.cxx.

106{}

Member Function Documentation

◆ exchange()

TrkExchangePar * TrkExchangeData::exchange ( ) const

Definition at line 109 of file TrkExchangeData.cxx.

109 {
110// unpack the parameters and the errors
111 HepVector pvec(5,0);
112 for(int ipar=TrkExchangePar::ex_d0;ipar<TrkExchangePar::nParam;ipar++){
113 const ComPackBase<double>& packpar = paramPacker(ipar);
114 ComPackBaseBase::StatusCode pcode = packpar.unpack(_params[ipar],pvec[ipar]);
115 assert(pcode != ComPackBaseBase::TAG_BAD );
116 }
117// convert back from dip to tandip
119 return new TrkExchangePar(pvec);
120}
double tan(const BesAngle a)
Definition: BesAngle.h:216
virtual StatusCode unpack(const d_ULong, T &) const =0

◆ operator=()

TrkExchangeData & TrkExchangeData::operator= ( const TrkExchangeData other)

Definition at line 98 of file TrkExchangeData.cxx.

98 {
99 if(this != &other){
100 for (int ipar=TrkExchangePar::ex_d0;ipar<TrkExchangePar::nParam;ipar++)
101 _params[ipar] = other._params[ipar];
102 }
103 return *this;
104}

◆ parameters()

const d_UShort & TrkExchangeData::parameters ( int  index) const
inline

Definition at line 45 of file TrkExchangeData.h.

45 {
46 return _params[index]; }

Friends And Related Function Documentation

◆ TrkExchangeDataK

friend class TrkExchangeDataK
friend

Definition at line 48 of file TrkExchangeData.h.


The documentation for this class was generated from the following files: