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

Go to the documentation of this file.
00001 #include "DstEvent/DstTofTrack.h"
00002 #include "DstEvent/TofHitStatus.h"
00003 /* 
00004    the following code maybe cause 
00005    DstEvent and RecEvent use each other
00006    to avoid conflict, comment it
00007 
00008 #include "TofRecEvent/RecBTofTrack.h"
00009 #include "TofRecEvent/RecETofTrack.h"
00010 
00011 class RecBTofTrack ;
00012 class RecETofTrack ;
00013 
00014 */
00015 
00016 DstTofTrack::DstTofTrack() {
00017 
00018   m_tofTrackID = -1;
00019   m_trackID = -1;
00020   m_tofID   = -1;
00021   m_status  = -1;
00022   m_path    = 9999.0;
00023   m_zrhit   = 9999.0;
00024   m_ph      = 9999.0;
00025   m_tof     = 9999.0;
00026   m_beta    = 9999.0;
00027   for( int i=0; i<6; i++ ) {
00028     m_toffset[i] = 9999.0;
00029     m_sigma[i]   = 9999.0;
00030   }
00031   m_quality = 10;
00032   m_t0      = 0.0;
00033   m_errt0   = 0.0;
00034 
00035   m_errz    = 9999.0;
00036   m_phi     = 9999.0;
00037   m_errphi  = 9999.0;
00038   m_energy  = 9999.0;
00039   m_errenergy = 9999.0;
00040 
00041 }
00042 
00043 
00044 int DstTofTrack::tofID() {
00045   if( m_tofID < 0 ) return m_tofID;
00046   if( TofHitStatus::is_mrpc( m_status ) ) {
00047     return static_cast<int>( m_tofID/12 );
00048   }
00049   else {
00050     return m_tofID;
00051   }
00052   return -1;
00053 }
00054 
00055 
00056 int DstTofTrack::strip() {
00057   if( m_tofID<0 ) return -1;
00058   if( TofHitStatus::is_mrpc( m_status ) ) {
00059     return static_cast<int>( m_tofID%12 );
00060   }
00061   return -1;
00062 }
00063 
00064 
00065 /*
00066 DstTofTrack& 
00067 DstTofTrack::operator=(const RecBTofTrack& source){
00068 
00069   m_tofTrackID = source.m_tofTrackID;
00070   m_trackID = source.m_trackID;
00071   m_tofID   = source.m_tofID;
00072   m_status  = source.m_status;
00073   m_path    = source.m_path;
00074   m_zrhit   = source.m_zrhit;
00075   m_ph      = source.m_ph;
00076   m_tof     = source.m_tof;
00077   m_beta    = source.m_beta;
00078   for( int i=0; i<6; i++ ) {
00079     m_toffset[i] = source.m_toffset[i];
00080     m_sigma[i]   = source.m_sigma[i];
00081   }
00082   m_quality = source.m_quality;
00083   m_t0      = source.m_t0;
00084   m_errt0   = source.m_errt0;
00085 
00086   m_errz    = source.m_errz;
00087   m_phi     = source.m_phi;
00088   m_errphi  = source.m_errphi;
00089   m_errenergy = source.m_errenergy;
00090 
00091   return *this;
00092 }
00093 
00094 
00095 void
00096 DstTofTrack::copy(const RecBTofTrack* orig) {
00097 
00098   m_tofTrackID = orig->m_tofTrackID;
00099   m_trackID = orig->m_trackID;
00100   m_tofID   = orig->m_tofID;
00101   m_status  = orig->m_status;
00102   m_path    = orig->m_path;
00103   m_zrhit   = orig->m_zrhit;
00104   m_ph      = orig->m_ph;
00105   m_tof     = orig->m_tof;
00106   m_beta    = orig->m_beta;
00107   for( int i=0; i<6; i++ ) {
00108     m_toffset[i] = orig->m_toffset[i];
00109     m_sigma[i]   = orig->m_sigma[i];
00110   }
00111   m_quality = orig->m_quality;
00112   m_t0      = orig->m_t0;
00113   m_errt0   = orig->m_errt0;
00114 
00115   m_errz    = orig->m_errz;
00116   m_phi     = orig->m_phi;
00117   m_errphi  = orig->m_errphi;
00118   m_errenergy = orig->m_errenergy;
00119 }
00120 
00121 
00122 DstTofTrack::DstTofTrack(const RecBTofTrack& source) {
00123 
00124   m_tofTrackID = source.m_tofTrackID;
00125   m_trackID = source.m_trackID;
00126   m_tofID   = source.m_tofID;
00127   m_status  = source.m_status;
00128   m_path    = source.m_path;
00129   m_zrhit   = source.m_zrhit;
00130   m_ph      = source.m_ph;
00131   m_tof     = source.m_tof;
00132   m_beta    = source.m_beta;
00133   for( int i=0; i<6; i++ ) {
00134     m_toffset[i] = source.m_toffset[i];
00135     m_sigma[i]   = source.m_sigma[i];
00136   }
00137   m_quality = source.m_quality;
00138   m_t0      = source.m_t0;
00139   m_errt0   = source.m_errt0;
00140 
00141   m_errz    = source.m_errz;
00142   m_phi     = source.m_phi;
00143   m_errphi  = source.m_errphi;
00144   m_errenergy = source.m_errenergy;
00145 }
00146 
00147 
00148 DstTofTrack& 
00149 DstTofTrack::operator=(const RecETofTrack& source){
00150 
00151   m_tofTrackID = source.m_tofTrackID;
00152   m_trackID = source.m_trackID;
00153   m_tofID   = source.m_tofID;
00154   m_status  = source.m_status;
00155   m_path    = source.m_path;
00156   m_zrhit   = source.m_zrhit;
00157   m_ph      = source.m_ph;
00158   m_tof     = source.m_tof;
00159   m_beta    = source.m_beta;
00160   for( int i=0; i<6; i++ ) {
00161     m_toffset[i] = source.m_toffset[i];
00162     m_sigma[i]   = source.m_sigma[i];
00163   }
00164   m_quality = source.m_quality;
00165   m_t0      = source.m_t0;
00166   m_errt0   = source.m_errt0;
00167 
00168   m_errz    = source.m_errz;
00169   m_phi     = source.m_phi;
00170   m_errphi  = source.m_errphi;
00171   m_errenergy = source.m_errenergy;
00172 
00173   return *this;
00174 }
00175 
00176 
00177 void
00178 DstTofTrack::copy(const RecETofTrack* orig) {
00179 
00180   m_tofTrackID = orig->m_tofTrackID;
00181   m_trackID = orig->m_trackID;
00182   m_tofID   = orig->m_tofID;
00183   m_status  = orig->m_status;
00184   m_path    = orig->m_path;
00185   m_zrhit   = orig->m_zrhit;
00186   m_ph      = orig->m_ph;
00187   m_tof     = orig->m_tof;
00188   m_beta    = orig->m_beta;
00189   for( int i=0; i<6; i++ ) {
00190     m_toffset[i] = orig->m_toffset[i];
00191     m_sigma[i]   = orig->m_sigma[i];
00192   }
00193   m_quality = orig->m_quality;
00194   m_t0      = orig->m_t0;
00195   m_errt0   = orig->m_errt0;
00196 
00197   m_errz    = orig->m_errz;
00198   m_phi     = orig->m_phi;
00199   m_errphi  = orig->m_errphi;
00200   m_errenergy = orig->m_errenergy;
00201 }
00202 
00203 
00204 DstTofTrack::DstTofTrack(const RecETofTrack& source) {
00205 
00206   m_tofTrackID = source.m_tofTrackID;
00207   m_trackID = source.m_trackID;
00208   m_tofID   = source.m_tofID;
00209   m_status  = source.m_status;
00210   m_path    = source.m_path;
00211   m_zrhit   = source.m_zrhit;
00212   m_ph      = source.m_ph;
00213   m_tof     = source.m_tof;
00214   m_beta    = source.m_beta;
00215   for( int i=0; i<6; i++ ) {
00216     m_toffset[i] = source.m_toffset[i];
00217     m_sigma[i]   = source.m_sigma[i];
00218   }
00219   m_quality = source.m_quality;
00220   m_t0      = source.m_t0;
00221   m_errt0   = source.m_errt0;
00222 
00223   m_errz    = source.m_errz;
00224   m_phi     = source.m_phi;
00225   m_errphi  = source.m_errphi;
00226   m_errenergy = source.m_errenergy;
00227 }
00228 */

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