00001
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040
00041
00042 #ifndef StTofCell_hh
00043 #define StTofCell_hh
00044
00045 #include "StObject.h"
00046 #include "StThreeVectorD.hh"
00047 #include "StContainers.h"
00048
00049 class StTrack;
00050
00051 class StTofCell : public StObject {
00052 public:
00053 StTofCell();
00054 StTofCell(int, int, int, int, int, int, StTrack*,
00055 float, int, const StThreeVectorD&);
00056 StTofCell(int, int, int, int, StTrack*,
00057 float, int, const StThreeVectorD&);
00058 ~StTofCell();
00059
00060 int operator==(const StTofCell&) const;
00061 int operator!=(const StTofCell&) const;
00062
00063 int trayIndex() const;
00064 int moduleIndex() const;
00065 int cellIndex() const;
00066 int daqIndex() const;
00067 int adc() const;
00068 int tdc() const;
00069 double leadingEdgeTime() const;
00070 double trailingEdgeTime() const;
00071 float tot() const;
00072 StTrack* associatedTrack();
00073 const StTrack* associatedTrack() const;
00074 float zHit() const;
00075 int matchFlag() const;
00076 const StThreeVectorD& position() const;
00077
00078 void setTrayIndex(int);
00079 void setModuleIndex(int);
00080 void setCellIndex(int);
00081 void setDaqIndex(int);
00082 void setAdc(int);
00083 void setTdc(int);
00084 void setLeadingEdgeTime(double);
00085 void setTrailingEdgeTime(double);
00086 void setAssociatedTrack(StTrack*);
00087 void setZHit(float);
00088 void setMatchFlag(int);
00089 void setPosition(const StThreeVectorD&);
00090
00091 protected:
00092 Int_t mTrayIndex;
00093 Int_t mModuleIndex;
00094 Int_t mCellIndex;
00095 Int_t mDaqIndex;
00096 Int_t mAdc;
00097 Int_t mTdc;
00098 Double_t mLeadingEdgeTime;
00099 Double_t mTrailingEdgeTime;
00100
00101 #ifdef __CINT__
00102 StObjLink mAssociatedTrack;
00103 #else
00104 StLink<StTrack> mAssociatedTrack;
00105 #endif //__CINT__
00106 Float_t mZhit;
00107 Int_t mMatchFlag;
00108 StThreeVectorD mPosition;
00109
00110 ClassDef(StTofCell,4)
00111 };
00112
00113
00114 inline void
00115 StTofCell::setTrayIndex(int trayId)
00116 {
00117 mTrayIndex = trayId;
00118 }
00119
00120 inline void
00121 StTofCell::setModuleIndex(int moduleId)
00122 {
00123 mModuleIndex = moduleId;
00124 }
00125
00126 inline void
00127 StTofCell::setCellIndex(int cellId)
00128 {
00129 mCellIndex = cellId;
00130 }
00131
00132 inline void
00133 StTofCell::setDaqIndex(int daqId)
00134 {
00135 mDaqIndex = daqId;
00136 }
00137
00138 inline void
00139 StTofCell::setAdc(int rawAdc)
00140 {
00141 mAdc = rawAdc;
00142 }
00143
00144 inline void
00145 StTofCell::setTdc(int rawTdc)
00146 {
00147 mTdc = rawTdc;
00148 }
00149
00150 inline void
00151 StTofCell::setLeadingEdgeTime(double val)
00152 {
00153 mLeadingEdgeTime = val;
00154 }
00155
00156 inline void
00157 StTofCell::setTrailingEdgeTime(double val)
00158 {
00159 mTrailingEdgeTime = val;
00160 }
00161
00162 inline void
00163 StTofCell::setZHit(float zhit) {mZhit = zhit;}
00164
00165 inline void
00166 StTofCell::setMatchFlag(int flag)
00167 {
00168 mMatchFlag = flag;
00169 }
00170
00171 inline int
00172 StTofCell::trayIndex() const
00173 {
00174 return mTrayIndex;
00175 }
00176
00177 inline int
00178 StTofCell::moduleIndex() const
00179 {
00180 return mModuleIndex;
00181 }
00182
00183 inline int
00184 StTofCell::cellIndex() const
00185 {
00186 return mCellIndex;
00187 }
00188
00189 inline int
00190 StTofCell::daqIndex() const
00191 {
00192 return mDaqIndex;
00193 }
00194
00195 inline int
00196 StTofCell::adc() const
00197 {
00198 return mAdc;
00199 }
00200
00201 inline int
00202 StTofCell::tdc() const
00203 {
00204 return mTdc;
00205 }
00206
00207 inline double
00208 StTofCell::leadingEdgeTime() const
00209 {
00210 return mLeadingEdgeTime;
00211 }
00212
00213 inline double
00214 StTofCell::trailingEdgeTime() const
00215 {
00216 return mTrailingEdgeTime;
00217 }
00218
00219 inline float
00220 StTofCell::tot() const
00221 {
00222 return mTrailingEdgeTime - mLeadingEdgeTime;
00223 }
00224
00225 inline int
00226 StTofCell::matchFlag() const
00227 {
00228 return mMatchFlag;
00229 }
00230
00231 inline float
00232 StTofCell::zHit() const
00233 {
00234 return mZhit;
00235 }
00236
00237 #endif