BOSS 7.1.2
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 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 Double_t TRecMdcTrack::x() const {
31 return m_helix[0]*cos(m_helix[1]);
32 }
33
34 Double_t TRecMdcTrack::y() const {
35 return m_helix[0]*sin(m_helix[1]);
36 }
37
38 Double_t TRecMdcTrack::z() const {
39 return m_helix[3];
40 }
41
42 Double_t TRecMdcTrack::r() const {
43 return sqrt(x()*x()+y()*y());
44 }
45
46 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 Double_t TRecMdcTrack::px() const {
53 return pxy()*(-sin(m_helix[1]));
54 }
55
56 Double_t TRecMdcTrack::py() const {
57 return pxy()*cos(m_helix[1]);
58 }
59
60 Double_t TRecMdcTrack::pz() const {
61 return pxy()*m_helix[4];
62 }
63
64 Double_t TRecMdcTrack::p() const {
65 return sqrt(px()*px() + py()*py() + pz()*pz());
66 }
67
68 Double_t TRecMdcTrack::theta() const {
69 return acos(pz()/p());
70 }
71
72 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
Double_t y() const
Double_t theta() const
Double_t p() const
Double_t px() const
Double_t x() const
Double_t py() const
Double_t z() const
Double_t pz() const
Double_t pxy() const
Double_t phi() const
Double_t r() const
Int_t charge() const