CGEM BOSS 6.6.5.h
BESIII Offline Software System
Loading...
Searching...
No Matches
TCgemTrack.cxx
Go to the documentation of this file.
2#include <cmath>
3
4using namespace std;
5
7
8//************************************************
9 //
11 Clear();
12 }
13//************************************************
14//
16 Clear();
17 }
18 const Int_t TCgemTrack::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 TCgemTrack::x() const {
31 return m_helix[0]*cos(m_helix[1]);
32 }
33
34 const Double_t TCgemTrack::y() const {
35 return m_helix[0]*sin(m_helix[1]);
36 }
37
38 const Double_t TCgemTrack::z() const {
39 return m_helix[3];
40 }
41
42 const Double_t TCgemTrack::r() const {
43// return sqrt(x()*x()+y()*y());
44 return fabs(m_helix[0]);
45 }
46
47 const Double_t TCgemTrack::pxy() const {
48 if(m_helix[2] != 0)
49 return 1./fabs(m_helix[2]);
50 else return 0.;
51 }
52
53 const Double_t TCgemTrack::px() const {
54 return pxy()*(-sin(m_helix[1]));
55 }
56
57 const Double_t TCgemTrack::py() const {
58 return pxy()*cos(m_helix[1]);
59 }
60
61 const Double_t TCgemTrack::pz() const {
62 return pxy()*m_helix[4];
63 }
64
65 const Double_t TCgemTrack::p() const {
66// return sqrt(px()*px() + py()*py() + pz()*pz());
67 return pxy()*sqrt(1. + m_helix[4]*m_helix[4]);
68 }
69
70 const Double_t TCgemTrack::theta() const {
71 return acos(pz()/p());
72 }
73
74 const Double_t TCgemTrack::phi() const {
75 return atan2(py(),px());
76 }
77
78 void TCgemTrack::setHelix(const Double_t helix[5]) {
79 for(Int_t i=0; i<5; i++) {
80 m_helix[i] = helix[i];
81 }
82 }
83
84 void TCgemTrack::setErr(const Double_t er[15] ) {
85 for (Int_t i=0;i<15;i++) {
86 m_err[i] = er[i];
87 }
88 }
89
double sin(const BesAngle a)
Definition BesAngle.h:210
double cos(const BesAngle a)
Definition BesAngle.h:213
ClassImp(TCgemTrack) TCgemTrack
Definition TCgemTrack.cxx:6
const Double_t x() const
const Double_t p() const
const Double_t r() const
void setErr(const Double_t err[15])
const Double_t y() const
void setHelix(const Double_t helix[5])
const Double_t theta() const
const Int_t charge() const
const Double_t z() const
const Double_t pz() const
const Double_t phi() const
const Double_t helix(Int_t i) const
Definition TCgemTrack.h:14
const Double_t px() const
const Double_t py() const
const Double_t pxy() const