BOSS 8.0.0
BESIII Offline Software System
Loading...
Searching...
No Matches
TRecMdcTrack.cxx
Go to the documentation of this file.
1#include "RootEventData/TRecMdcTrack.h"
2#include <cmath>
3
5
6//************************************************
7//
9//************************************************
10//
12
13Int_t TRecMdcTrack::charge() const {
14 Int_t charge;
15 Double_t temp = m_helix[2];
16 if ( temp > 0.0000000001 ) charge = 1;
17 else if ( temp < -0.0000000001 ) charge = -1;
18 else charge = 0;
19 return charge;
20}
21
22Double_t TRecMdcTrack::x() const { return m_helix[0] * cos( m_helix[1] ); }
23
24Double_t TRecMdcTrack::y() const { return m_helix[0] * sin( m_helix[1] ); }
25
26Double_t TRecMdcTrack::z() const { return m_helix[3]; }
27
28Double_t TRecMdcTrack::r() const { return sqrt( x() * x() + y() * y() ); }
29
30Double_t TRecMdcTrack::pxy() const {
31 if ( m_helix[2] != 0 ) return 1. / fabs( m_helix[2] );
32 else return 0.;
33}
34
35Double_t TRecMdcTrack::px() const { return pxy() * ( -sin( m_helix[1] ) ); }
36
37Double_t TRecMdcTrack::py() const { return pxy() * cos( m_helix[1] ); }
38
39Double_t TRecMdcTrack::pz() const { return pxy() * m_helix[4]; }
40
41Double_t TRecMdcTrack::p() const { return sqrt( px() * px() + py() * py() + pz() * pz() ); }
42
43Double_t TRecMdcTrack::theta() const { return acos( pz() / p() ); }
44
45Double_t TRecMdcTrack::phi() const { return atan2( py(), px() ); }
ClassImp(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