/home/bes3soft/bes3soft/Boss/7.0.2/dist/7.0.2/Event/DstEvent/DstEvent-00-02-51/src/DstMdcKalTrack.cxx

Go to the documentation of this file.
00001 /*
00002 * @class : MdcTrack                                                            
00003 *                                                                              
00004 *  this class models "Kalman Track" from Mdc 
00005 *                                                                              
00006 * ********************************************************/
00007 
00008 #include "DstEvent/DstMdcKalTrack.h"
00009 
00010 enum DstMdcKalTrack::PidType DstMdcKalTrack::m_pidType = pion;
00011 
00012 DstMdcKalTrack::DstMdcKalTrack() 
00013 {   
00014   HepVector za(5,0);
00015   HepSymMatrix zea(5,0);
00016   HepPoint3D poca(0,0,0);
00017   m_trackId = -1;
00018   for(int pid=0; pid<5; pid++) {
00019     m_zhelixs.push_back(za);
00020     m_zerrors.push_back(zea);
00021     m_fhelixs.push_back(za);
00022     m_ferrors.push_back(zea);
00023     m_pocas.push_back(poca);   
00024     m_mass[pid] = 1;
00025     m_charge[pid] = 1;
00026     m_stat[0][pid] = 0;
00027     m_stat[1][pid] = 0;
00028 
00029     m_ndf[0][pid] = 0;
00030     m_ndf[1][pid] = 0;
00031     m_nster[0][pid] = 0;
00032     m_nster[1][pid] = 0;
00033     m_nlayer[pid] = 0;
00034     m_firstLayer[0][pid] = 0;
00035     m_firstLayer[1][pid] = 0;
00036     m_lastLayer[0][pid] = 0;
00037     m_lastLayer[1][pid] = 0;
00038     m_pxy[pid] = 0;
00039     m_px[pid] = 0;
00040     m_py[pid] = 0;
00041     m_pz[pid] = 0;
00042     m_p[pid] = 0;
00043     m_theta[pid] = 0;
00044     m_phi[pid] = 0;
00045     m_x[pid] = 0;
00046     m_y[pid] = 0;
00047     m_z[pid] = 0;
00048     m_r[pid] = 0;
00049     m_stat[0][pid] = 0;         
00050     m_stat[1][pid] = 0;
00051     m_chisq[0][pid] = 0;
00052     m_chisq[1][pid] = 0;  
00053     m_ndf[0][pid] = 0;     
00054     m_ndf[1][pid] = 0;
00055     
00056   }
00057 }
00058 
00059 
00060 DstMdcKalTrack::DstMdcKalTrack( const DstMdcKalTrack& other )
00061   :m_trackId(other.m_trackId),
00062    m_pocas(other.m_pocas),   
00063    m_zhelixs(other.m_zhelixs),
00064    m_zerrors(other.m_zerrors),
00065    m_fhelixs(other.m_fhelixs),
00066    m_ferrors(other.m_ferrors)
00067 {
00068   for(int i=0;i<5;i++){
00069        m_charge[i]        = other.m_charge[i];
00070        m_stat[0][i]       = other.m_stat[0][i];
00071        m_stat[1][i]       = other.m_stat[1][i];
00072        m_nster[0][i]      = other.m_nster[0][i];
00073        m_nster[1][i]      = other.m_nster[1][i];
00074        m_nlayer[i]        = other.m_nlayer[i];
00075        m_firstLayer[0][i] = other.m_firstLayer[0][i];
00076        m_firstLayer[1][i] = other.m_firstLayer[1][i];
00077        m_lastLayer[0][i]  = other.m_lastLayer[0][i];
00078        m_lastLayer[1][i]  = other.m_lastLayer[1][i]; 
00079        m_mass[i]       = other.m_mass[i];
00080  
00081        m_pxy[i]        = other.m_pxy[i];
00082        m_px[i]         = other.m_px[i];
00083        m_py[i]         = other.m_py[i];
00084        m_pz[i]         = other.m_pz[i];
00085        m_p[i]          = other.m_p[i];
00086        m_theta[i]      = other.m_theta[i];
00087        m_phi[i]        = other.m_phi[i];
00088        m_x[i]          = other.m_x[i];
00089        m_y[i]          = other.m_y[i];
00090        m_z[i]          = other.m_z[i];
00091        m_r[i]          = other.m_r[i];
00092        m_chisq[0][i]   = other.m_chisq[0][i];  
00093        m_chisq[1][i]   = other.m_chisq[1][i];
00094        m_ndf[0][i]     = other.m_ndf[0][i];   
00095        m_ndf[1][i]     = other.m_ndf[1][i];
00096        m_nhits[i]      = other.m_nhits[i];
00097   }
00098 }
00099 
00100 DstMdcKalTrack& DstMdcKalTrack::operator=(const DstMdcKalTrack& other){
00101   if(&other != this){
00102      m_trackId = other.m_trackId;
00103      m_pocas   = other.m_pocas;
00104      m_zhelixs = other.m_zhelixs;
00105      m_zerrors = other.m_zerrors;
00106      m_fhelixs = other.m_fhelixs;
00107      m_ferrors = other.m_ferrors;
00108        for(int i=0;i<5;i++){
00109          m_charge[i]     = other.m_charge[i];
00110          m_stat[0][i]       = other.m_stat[0][i];
00111          m_stat[1][i]       = other.m_stat[1][i];
00112          m_nster[0][i]      = other.m_nster[0][i];
00113          m_nster[1][i]      = other.m_nster[1][i];
00114          m_nlayer[i]        = other.m_nlayer[i];
00115          m_firstLayer[0][i] = other.m_firstLayer[0][i];
00116          m_firstLayer[1][i] = other.m_firstLayer[1][i];
00117          m_lastLayer[0][i]  = other.m_lastLayer[0][i];
00118          m_lastLayer[1][i]  = other.m_lastLayer[1][i];
00119          m_mass[i]       = other.m_mass[i];
00120          m_chisq[0][i]      = other.m_chisq[0][i];
00121          m_chisq[1][i]      = other.m_chisq[1][i];
00122          m_pxy[i]        = other.m_pxy[i];
00123          m_px[i]         = other.m_px[i];
00124          m_py[i]         = other.m_py[i];
00125          m_pz[i]         = other.m_pz[i];
00126          m_p[i]          = other.m_p[i];
00127          m_theta[i]      = other.m_theta[i];
00128          m_phi[i]        = other.m_phi[i];
00129          m_x[i]          = other.m_x[i];
00130          m_y[i]          = other.m_y[i];
00131          m_z[i]          = other.m_z[i];
00132          m_r[i]          = other.m_r[i];
00133          //m_chi2[i]       = other.m_chi2[i];
00134          m_ndf[0][i]        = other.m_ndf[0][i];
00135          m_ndf[1][i]        = other.m_ndf[1][i];
00136          m_nhits[i]      = other.m_nhits[i];
00137        }
00138   }
00139   return *this;
00140 }
00141 
00142 
00143 DstMdcKalTrack::~DstMdcKalTrack() {
00144    
00145    }
00146 
00147 
00148 const HepLorentzVector DstMdcKalTrack::p4() const{
00149   const HepLorentzVector p_LV( px(), py(), pz(), sqrt(pow(mass(),2)+pow(p(),2)) ); 
00150   return p_LV; 
00151 }
00152 
00153 
00154 const HepLorentzVector DstMdcKalTrack::p4(double v_mass) const{
00155   const HepLorentzVector p_LV( px(), py(), pz(), sqrt(pow(v_mass,2)+pow(p(),2)) ); 
00156   return p_LV; 
00157 }
00158 
00159 const Hep3Vector DstMdcKalTrack::p3() const {
00160         const Hep3Vector p3( px(), py(), pz() ); 
00161         return p3; 
00162 }
00163 
00164 const HepPoint3D DstMdcKalTrack::x3() const {
00165         return HepPoint3D(m_x[m_pidType],m_y[m_pidType],m_z[m_pidType]);
00166 }

Generated on Tue Nov 29 22:58:24 2016 for BOSS_7.0.2 by  doxygen 1.4.7