00001 #ifndef DST_TOFTRACK_H 00002 #define DST_TOFTRACK_H 00003 #include "GaudiKernel/ObjectVector.h" 00004 #include "GaudiKernel/ContainedObject.h" 00005 #include "EventModel/EventModel.h" 00006 #include <vector> 00007 00008 using namespace std; 00009 using namespace EventModel; 00010 00011 extern const CLID &CLID_DstTofTrack; 00012 00013 /* 00014 class RecBTofTrack ; 00015 class RecETofTrack ; 00016 */ 00017 00018 class DstTofTrack : virtual public ContainedObject { 00019 00020 public: 00021 DstTofTrack(); 00022 virtual ~DstTofTrack() {} 00023 00024 // Assignment constructor. 00025 /* 00026 DstTofTrack& operator=(const RecBTofTrack& source); 00027 void copy(const RecBTofTrack* orig); 00028 DstTofTrack(const RecBTofTrack& source); 00029 00030 DstTofTrack& operator=(const RecETofTrack& source); 00031 void copy(const RecETofTrack* orig); 00032 DstTofTrack(const RecETofTrack& source); 00033 */ 00034 00035 virtual const CLID& clID() const { return DstTofTrack::classID();} 00036 static const CLID& classID() { return CLID_DstTofTrack; } 00037 00038 public: 00039 00040 int tofTrackID() const { return m_tofTrackID; } 00041 int trackID() const { return m_trackID; } 00042 int tofID() const { return m_tofID; } 00043 00044 unsigned int status() const { return m_status; } 00045 00046 double path() const { return m_path; } 00047 double zrhit() const { return m_zrhit; } 00048 double ph() const { return m_ph; } 00049 double tof() const { return m_tof; } 00050 double errtof() const { return m_sigma[0]; } 00051 double beta() const { return m_beta; } 00052 00053 double texp(int i) const { return m_texp[i]; } 00054 double texpElectron() const { return m_texp[0]; } 00055 double texpMuon() const { return m_texp[1]; } 00056 double texpPion() const { return m_texp[2]; } 00057 double texpKaon() const { return m_texp[3]; } 00058 double texpProton() const { return m_texp[4]; } 00059 00060 double toffset(int i) const { return m_toffset[i]; } 00061 double toffsetElectron() const { return m_toffset[0]; } 00062 double toffsetMuon() const { return m_toffset[1]; } 00063 double toffsetPion() const { return m_toffset[2]; } 00064 double toffsetKaon() const { return m_toffset[3]; } 00065 double toffsetProton() const { return m_toffset[4]; } 00066 double toffsetAntiProton() const { return m_toffset[5]; } 00067 00068 double sigma(int i) const { return m_sigma[i]; } 00069 double sigmaElectron() const { return m_sigma[0]; } 00070 double sigmaMuon() const { return m_sigma[1]; } 00071 double sigmaPion() const { return m_sigma[2]; } 00072 double sigmaKaon() const { return m_sigma[3]; } 00073 double sigmaProton() const { return m_sigma[4]; } 00074 double sigmaAntiProton() const { return m_sigma[5]; } 00075 00076 int quality() const { return m_quality; } 00077 00078 double t0() const { return m_t0; } 00079 double errt0() const { return m_errt0; } 00080 00081 double errz() const { return m_errz; } 00082 double phi() const { return m_phi; } 00083 double errphi() const { return m_errphi; } 00084 double energy() const { return m_energy; } 00085 double errenergy() const { return m_errenergy; } 00086 00087 public: 00088 00089 void setTofTrackID(int tofTrackID) { m_tofTrackID = tofTrackID; } 00090 void setTrackID(int trackID) { m_trackID = trackID; } 00091 void setTofID(int tofID) { m_tofID = tofID; } 00092 void setStatus(unsigned int status) { m_status = status; } 00093 00094 void setPath(double path) { m_path = path; } 00095 void setZrHit(double zrhit) { m_zrhit = zrhit; } 00096 void setPh(double ph) { m_ph = ph; } 00097 void setTof(double tof) { m_tof = tof; } 00098 void setErrTof(double etof) { m_sigma[0] = etof; } 00099 void setBeta(double beta) { m_beta = beta; } 00100 00101 void setTexp(double texp[5]) { for(int i=0; i<5; i++) { m_texp[i]=texp[i];} } 00102 void setTexpElectron(double texpe) { m_texp[0] = texpe; } 00103 void setTexpMuon(double texpmu) { m_texp[1] = texpmu; } 00104 void setTexpPion(double texppi) { m_texp[2] = texppi; } 00105 void setTexpKaon(double texpk) { m_texp[3] = texpk; } 00106 void setTexpProton(double texpp) { m_texp[4] = texpp; } 00107 00108 void setToffset(double toffset[6]) { for(int i=0; i<6; i++) { m_toffset[i]=toffset[i];} } 00109 void setToffsetElectron(double toe) { m_toffset[0] = toe; } 00110 void setToffsetMuon(double tomu) { m_toffset[1] = tomu; } 00111 void setToffsetPion(double topi) { m_toffset[2] = topi; } 00112 void setToffsetKaon(double tok) { m_toffset[3] = tok; } 00113 void setToffsetProton(double top) { m_toffset[4] = top; } 00114 void setToffsetAntiProton(double topb){ m_toffset[5] = topb; } 00115 00116 void setSigma(double sigma[6]) { for(int i=0; i<6; i++) { m_sigma[i]=sigma[i];} } 00117 void setSigmaElectron(double se) { m_sigma[0] = se; } 00118 void setSigmaMuon(double smu) { m_sigma[1] = smu; } 00119 void setSigmaPion(double spi) { m_sigma[2] = spi; } 00120 void setSigmaKaon(double sk) { m_sigma[3] = sk; } 00121 void setSigmaProton(double sp) { m_sigma[4] = sp; } 00122 void setSigmaAntiProton(double spb) { m_sigma[5] = spb; } 00123 00124 void setQuality(int quality) { m_quality = quality; } 00125 00126 void setT0(double t0) { m_t0 = t0; } 00127 void setErrT0(double errt0) { m_errt0 = errt0; } 00128 00129 void setErrZ(double errz) { m_errz = errz; } 00130 void setPhi(double phi) { m_phi = phi; } 00131 void setErrPhi(double errphi) { m_errphi = errphi; } 00132 void setEnergy(double energy) { m_energy = energy; } 00133 void setErrEnergy(double errenergy) { m_errenergy = errenergy; } 00134 00135 private: 00136 00137 int m_tofTrackID; // The ID of Tof Cluster reconstruction 00138 int m_trackID; // Track ID from MDC / Shower ID from EMC. 00139 int m_tofID; // Tof Counter ID. 00140 unsigned int m_status; // Status. 00141 // 0x0000 0000 00142 // 0 0 0 0 0 0 0 0 00143 // | | | BR / 1 EC | | | raw 00144 // | | East / 1 West | | ReadOut Unit 00145 // No Hit | Counter 00146 // 01 1st Layer Cluster 00147 // 10 2nd Layer / 11 both Layers 00148 // 0x 00 00 00 00 00(used) 00149 // | | counter number 00150 // | east readout number 00151 // west readout number 00152 00153 double m_path; // Distance of flight. 00154 double m_zrhit; // Track extrapolate Z or R Hit position. 00155 double m_ph; // Pulse height. 00156 double m_tof; // Time of flight. 00157 double m_beta; // Beta value of the track. 00158 double m_texp[5]; // Expected time of flight of 5 sorts of particle. 00159 double m_toffset[6]; // Time offset of e, mu, pi, k and p and pbar. 00160 double m_sigma[6]; // Time resolution of 5+1 sorts of particle. 00161 int m_quality; // Data quality of reconstruction. 00162 // 1: good charged track 00163 // 2: neutral track with good hit 00164 // 0: ZT-ZTDC didnot match 00165 // 3: no hit in counter 00166 // 4: two hits in counter 00167 // 5: more than two hits in counter 00168 // 6: only single end output of one layer 00169 // 7: two hits in counter with bad match with ZTDC 00170 // 10: initialize 00171 // ...... 00172 double m_t0; // t0 from data set calibration. 00173 double m_errt0; // t0 sigma from tof calibration. 00174 00175 double m_errz; // Error of zTDC(m_zrhit) for neutral track. 00176 double m_phi; // Angle of phi used for neutral track. 00177 double m_errphi; // Error of angle of phi. 00178 double m_energy; // Energy deposit for neutral track 00179 double m_errenergy; // Error of energy deposit (m_ph) for neutral track. 00180 00181 }; 00182 00183 typedef ObjectVector<DstTofTrack> DstTofTrackCol; 00184 00185 #endif //DST_TOFTRACK_H