/home/bes3soft/bes3soft/Boss/7.0.2/dist/7.0.2/Mdc/MdcRecEvent/MdcRecEvent-00-05-14/src/RecMdcKalTrack.cxx

Go to the documentation of this file.
00001 /*
00002  *                                                                              
00003  *  this class models "Kalman Track" used in Mdc Reconstruction        
00004  *
00005  * ********************************************************/
00006 
00007 #include "MdcRecEvent/RecMdcKalTrack.h"
00008 //#include "MdcRecEvent/MdcKalHelixSeg.h"
00009 
00010 #include <cstdio>
00011 #include <fstream>
00012 
00013 RecMdcKalTrack::RecMdcKalTrack() 
00014 :DstMdcKalTrack() 
00015 {
00016         HepVector a(5,0);
00017         HepSymMatrix Ea(5,0);
00018         HepPoint3D poca(0,0,0);
00019         HepPoint3D point(0.,0.,0);
00020         HepPoint3D pivot(0.,0.,0);
00021 
00022         m_ta(5,0);
00023         m_tEa(5,0);
00024         m_trackId = -1;
00025 
00026         pidSeg=4;
00027         
00028         for(int pid=0; pid<5; pid++){
00029                 m_lhelixs.push_back(a);
00030                 m_lerrors.push_back(Ea);
00031                 //    m_fhelixs.push_back(a);
00032                 //    m_ferrors.push_back(Ea);
00033                 m_lpoints.push_back(point);
00034                 m_lpivots.push_back(pivot);
00035 
00036                 m_length[pid] = 0.0;
00037                 m_tof[pid] = 0.0;
00038                 m_nhits[pid] = 0;
00039                 m_pathSM[pid] = 0.0;
00040                 m_fiTerm[pid] = 0.0;
00041                 m_stat[0][pid] = -1;
00042                 m_stat[1][pid] = -1;
00043                 m_nster[0][pid] = -1;
00044                 m_nster[1][pid] = -1;
00045                 m_firstLayer[0][pid] = 0;
00046                 m_firstLayer[1][pid] = 0;
00047                 m_lastLayer[0][pid] = 43; 
00048                 m_lastLayer[1][pid] = 43;
00049                 m_chisq[0][pid] = 999.0;        
00050                 m_chisq[1][pid] = 999.0;   
00051                 m_ndf[0][pid] = 0;
00052                 m_ndf[1][pid] = 0;
00053         }
00054         for( int i=0; i<43; i++) {   
00055                 m_pathl[i] = 0.0;
00056         }
00057         for(int j=0; j<5; j++) {
00058                 m_thelix[j] = 0.0;
00059         }
00060         for(int k=0; k<15; k++){
00061                 m_terror[k]= 0.;
00062         }
00063 }
00064 
00065 
00066 RecMdcKalTrack::RecMdcKalTrack( const RecMdcKalTrack& trk )
00067 :DstMdcKalTrack(trk)
00068 {   
00069         for(int i=0; i<5; i++) m_vechelixsegs[i]=trk.m_vechelixsegs[i];
00070 }
00071 
00072 RecMdcKalTrack::RecMdcKalTrack( const DstMdcKalTrack& dstrk )
00073 :DstMdcKalTrack(dstrk)
00074 {
00075         HepVector a(5,-99);
00076         HepSymMatrix Ea(5,-99);
00077         HepPoint3D poca(-99.,-99.,-99.);
00078         HepPoint3D point(0.,0.,0);
00079         HepPoint3D pivot(0.,0.,0);
00080 
00081         m_ta(5,0);
00082         m_tEa(5,0);
00083 
00084         //m_trackId = -1;
00085         for(int pid=0; pid<5; pid++){
00086                 //m_pocas.push_back(poca);
00087                 //m_zhelixs.push_back(a);
00088                 //m_zerrors.push_back(Ea);
00089                 m_lhelixs.push_back(a);
00090                 m_lerrors.push_back(Ea);
00091                 //   m_fhelixs.push_back(a);
00092                 //   m_ferrors.push_back(Ea);
00093                 m_lpoints.push_back(point);
00094                 m_lpivots.push_back(pivot);
00095 
00096                 m_length[pid] = 0.0;
00097                 m_tof[pid] = 0.0;
00098                 m_nhits[pid] = 0;
00099                 m_pathSM[pid] = 0.0;
00100                 m_fiTerm[pid] = 0.0;
00101 
00102                 m_stat[0][pid] = -1;
00103                 m_stat[1][pid] = -1;
00104                 m_nster[0][pid] = -1;
00105                 m_nster[1][pid] = -1;
00106                 m_firstLayer[0][pid] = 0;
00107                 m_firstLayer[1][pid] = 0;
00108                 m_lastLayer[0][pid] = 43;
00109                 m_lastLayer[1][pid] = 43;
00110                 m_chisq[0][pid] = 999.0;
00111                 m_chisq[1][pid] = 999.0;
00112                 m_ndf[0][pid] = 0;
00113                 m_ndf[1][pid] = 0;
00114         }
00115         for(int i=0; i<43; i++) {
00116                 m_pathl[i] = 0.0;
00117         }
00118         for(int j=0; j<5; j++) {
00119                 m_thelix[j] = 0.0;
00120         }
00121         for(int k=0; k<15; k++){
00122                 m_terror[k]= 0.;
00123         }
00124 }
00125 
00126 RecMdcKalTrack& RecMdcKalTrack::operator=(const DstMdcKalTrack& dstrk)
00127 {
00128         if( &dstrk != this ){
00129                 DstMdcKalTrack::operator=(dstrk);
00130                 HepVector a(5,0);
00131                 HepSymMatrix Ea(5,0);
00132                 HepPoint3D poca(-99.,-99.,-99.);
00133                 HepPoint3D point(0.,0.,0.); 
00134                 HepPoint3D pivot(0.,0.,0.);
00135 
00136                 //m_trackId = -1;
00137                 //m_pocas.clear();
00138                 //m_zhelixs.clear();
00139                 //m_zerrors.clear();
00140                 m_lhelixs.clear();
00141                 m_lerrors.clear();
00142                 //   m_fhelixs.clear();
00143                 //   m_ferrors.clear();
00144                 m_lpoints.clear();
00145                 m_lpivots.clear();
00146                 m_ta(5,0) ;  
00147                 m_tEa(5,0);
00148                 for(int pid=0; pid<5; pid++){
00149                         //m_pocas.push_back(poca);
00150                         //m_zhelixs.push_back(a);
00151                         //m_zerrors.push_back(Ea);
00152                         m_lhelixs.push_back(a);
00153                         m_lerrors.push_back(Ea);
00154                         //     m_fhelixs.push_back(a);
00155                         //     m_ferrors.push_back(Ea);
00156                         m_lpoints.push_back(point);
00157 
00158 
00159                         m_length[pid] = 0.0;
00160                         m_tof[pid] = 0.0;
00161                         m_nhits[pid] = 0;
00162                         m_pathSM[pid] = 0.;
00163                         m_fiTerm[pid] = 0.;
00164                 }
00165 
00166                 for(int i=0; i<43; i++) {
00167                         m_pathl[i] = 0.0;
00168                 }
00169                 for(int j=0; j<5; j++) {
00170                         m_thelix[j] = 0.0;
00171                 }
00172                 for(int k=0; k<15; k++){
00173                         m_terror[k]= 0.;
00174                 }
00175         }
00176         return  *this;
00177 }
00178 
00179 // 2011-05-06
00180 HelixSegRefVec RecMdcKalTrack::getVecHelixSegs(int pid) const 
00181 {
00182         if(pid>=0&&pid<5) return m_vechelixsegs[pid];
00183         else {
00184                 return m_vechelixsegs[pidSeg];
00185         }
00186 }
00187 
00188 // 2011-05-06
00189 void RecMdcKalTrack::setVecHelixSegs(const HelixSegRefVec& vechelixsegs, int pid){
00190         if(pid>=0&&pid<5) {
00191                 m_vechelixsegs[pid] = vechelixsegs;
00192                 pidSeg=pid;
00193         }
00194         else std::cout<<"RecMdcKalTrack::setVecHelixSegs error, wrong particle id"<<std::endl;
00195 }
00196 
00197 RecMdcKalTrack::~RecMdcKalTrack() {
00198 
00199 }

Generated on Tue Nov 29 23:12:54 2016 for BOSS_7.0.2 by  doxygen 1.4.7