/home/bes3soft/bes3soft/Boss/7.0.2/dist/7.0.2/Event/RootEventData/RootEventData-00-03-80/src/TMdcTrack.cxx

Go to the documentation of this file.
00001 #include "RootEventData/TMdcTrack.h"
00002 #include <cmath>
00003 
00004 using namespace std;
00005 
00006  ClassImp(TMdcTrack)
00007         
00008 //************************************************
00009         //
00010  TMdcTrack::TMdcTrack() {
00011     Clear();
00012  }
00013 //************************************************
00014 //
00015  TMdcTrack::~TMdcTrack (){
00016     Clear();
00017  }
00018  const Int_t     TMdcTrack::charge() const { 
00019    Int_t charge;
00020    Double_t temp = m_helix[2];  
00021    if (temp >0.0000000001)
00022      charge = 1 ;
00023    else if (temp < -0.0000000001)
00024      charge = -1;
00025    else
00026      charge = 0;
00027    return charge; 
00028  }
00029 
00030  const Double_t TMdcTrack::x()       const {
00031    return  m_helix[0]*cos(m_helix[1]);
00032  }
00033 
00034  const Double_t TMdcTrack::y()       const {
00035    return  m_helix[0]*sin(m_helix[1]);
00036  }
00037 
00038  const Double_t TMdcTrack::z()       const {
00039    return  m_helix[3];
00040  }
00041 
00042  const Double_t TMdcTrack::r()       const { 
00043 //    return  sqrt(x()*x()+y()*y());
00044    return  fabs(m_helix[0]);
00045  }
00046 
00047  const Double_t  TMdcTrack::pxy()    const { 
00048    if(m_helix[2] != 0) 
00049      return 1./fabs(m_helix[2]);
00050    else return 0.;
00051  }
00052   
00053  const Double_t  TMdcTrack::px()     const { 
00054    return pxy()*(-sin(m_helix[1]));
00055  }
00056   
00057  const Double_t  TMdcTrack::py()     const { 
00058    return pxy()*cos(m_helix[1]);
00059  }
00060   
00061  const Double_t  TMdcTrack::pz()     const { 
00062    return  pxy()*m_helix[4];
00063  }
00064         
00065  const Double_t  TMdcTrack::p()      const { 
00066 //    return  sqrt(px()*px() + py()*py() + pz()*pz());  
00067    return  pxy()*sqrt(1. + m_helix[4]*m_helix[4]);
00068  }
00069         
00070  const Double_t  TMdcTrack::theta()  const {
00071    return acos(pz()/p());
00072  }
00073         
00074  const Double_t  TMdcTrack::phi()    const {
00075    return atan2(py(),px()); 
00076  }
00077 
00078  void TMdcTrack::setHelix(const Double_t helix[5]) {
00079    for(Int_t i=0; i<5; i++) {
00080      m_helix[i] = helix[i];
00081    }
00082  }
00083 
00084  void TMdcTrack::setErr(const Double_t er[15] )   {
00085    for (Int_t i=0;i<15;i++) {
00086      m_err[i]  = er[i];
00087    }
00088  }
00089 

Generated on Tue Nov 29 23:11:41 2016 for BOSS_7.0.2 by  doxygen 1.4.7