BOSS 6.6.4.p01
BESIII Offline Software System
Loading...
Searching...
No Matches
TRecMdcTrack.cxx
Go to the documentation of this file.
2#include <cmath>
3
5
6//************************************************
7//
9 Clear();
10 }
11//************************************************
12//
14 Clear();
15 }
16
17
18 const Int_t TRecMdcTrack::charge() const {
19 Int_t charge;
20 Double_t temp = m_helix[2];
21 if (temp >0.0000000001)
22 charge = 1 ;
23 else if (temp < -0.0000000001)
24 charge = -1;
25 else
26 charge = 0;
27 return charge;
28 }
29
30 const Double_t TRecMdcTrack::x() const {
31 return m_helix[0]*cos(m_helix[1]);
32 }
33
34 const Double_t TRecMdcTrack::y() const {
35 return m_helix[0]*sin(m_helix[1]);
36 }
37
38 const Double_t TRecMdcTrack::z() const {
39 return m_helix[3];
40 }
41
42 const Double_t TRecMdcTrack::r() const {
43 return sqrt(x()*x()+y()*y());
44 }
45
46 const Double_t TRecMdcTrack::pxy() const {
47 if(m_helix[2] != 0)
48 return 1./fabs(m_helix[2]);
49 else return 0.;
50 }
51
52 const Double_t TRecMdcTrack::px() const {
53 return pxy()*(-sin(m_helix[1]));
54 }
55
56 const Double_t TRecMdcTrack::py() const {
57 return pxy()*cos(m_helix[1]);
58 }
59
60 const Double_t TRecMdcTrack::pz() const {
61 return pxy()*m_helix[4];
62 }
63
64 const Double_t TRecMdcTrack::p() const {
65 return sqrt(px()*px() + py()*py() + pz()*pz());
66 }
67
68 const Double_t TRecMdcTrack::theta() const {
69 return acos(pz()/p());
70 }
71
72 const Double_t TRecMdcTrack::phi() const {
73 return atan2(py(),px());
74 }
75
double sin(const BesAngle a)
Definition: BesAngle.h:210
double cos(const BesAngle a)
Definition: BesAngle.h:213
ClassImp(TRecMdcTrack) TRecMdcTrack
Definition: TRecMdcTrack.cxx:4
const Double_t x() const
const Double_t phi() const
const Double_t pz() const
const Double_t z() const
const Double_t p() const
const Double_t px() const
const Double_t y() const
const Double_t pxy() const
const Double_t theta() const
const Double_t r() const
const Int_t charge() const
const Double_t py() const