Go to the documentation of this file.00001 #ifndef _TTrbHIT_H_
00002 #define _TTrbHIT_H_
00003
00004 #include "TTrbDefines.h"
00005
00006 #include "Rtypes.h"
00007
00008 class TTrbRawHit
00009 {
00010 public:
00012 TTrbRawHit () :
00013 iTDC (0), iChannel (0), fEdgeType (3),
00014 fLeadingEpoch(0), fLeadingCoarseTime (0), fLeadingFineTime (0),
00015 fTrailingEpoch(0), fTrailingCoarseTime (0), fTrailingFineTime (0)
00016 {
00017 fLeadingFineTimeCalibCorr = 0.;
00018 fTrailingFineTimeCalibCorr = 0.;
00019 }
00020
00022 TTrbRawHit (UShort_t TDC, UShort_t Channel, UChar_t EdgeType,
00023 UInt_t EdgeEpoch, UShort_t EdgeCoarseTime, UShort_t EdgeFineTime);
00024
00026 TTrbRawHit (UShort_t TDC, UShort_t Channel, UChar_t EdgeType,
00027 UInt_t LeadingEpoch, UShort_t LeadingCoarseTime, UShort_t LeadingFineTime,
00028 UInt_t TrailingEpoch, UShort_t TrailingCoarseTime, UShort_t TrailingFineTime);
00029
00031 UShort_t GetTDC ()
00032 { return this->iTDC; }
00033
00035 UShort_t GetChannel ()
00036 { return this->iChannel; }
00037
00039 UChar_t GetEdgeType ()
00040 { return this->fEdgeType; }
00041
00043 UInt_t GetLEpoch ()
00044 { return this->fLeadingEpoch; }
00045
00046 UShort_t GetLCTime ()
00047 { return this->fLeadingCoarseTime; }
00048
00049 UShort_t GetLFTime ()
00050 { return this->fLeadingFineTime; }
00051
00052 UInt_t GetTEpoch ()
00053 { return this->fTrailingEpoch; }
00054
00055 UShort_t GetTCTime ()
00056 { return this->fTrailingCoarseTime; }
00057
00058 UShort_t GetTFTime ()
00059 { return this->fTrailingFineTime; }
00060
00062 Double_t GetLeadingTimeCorr ()
00063 { return this->fLeadingFineTimeCalibCorr; }
00064
00065 Double_t GetTrailingTimeCorr ()
00066 { return this->fTrailingFineTimeCalibCorr; }
00067
00069 void SetLeadingTimeCorr (Double_t LFTimeCalibrCorr)
00070 { this->fLeadingFineTimeCalibCorr = LFTimeCalibrCorr; }
00071
00072 void SetTrailingTimeCorr (Double_t TFTimeCalibrCorr)
00073 { this->fTrailingFineTimeCalibCorr = TFTimeCalibrCorr; }
00074
00076 inline bool IsLeading() const { return (fEdgeType == 1) || (fEdgeType == 2); }
00077
00079 inline bool IsTrailing() const { return (fEdgeType == 0) || (fEdgeType == 2); }
00080
00081
00082 private:
00084 UShort_t iTDC;
00085 UShort_t iChannel;
00086
00093 UChar_t fEdgeType;
00094
00096 UInt_t fLeadingEpoch;
00097 UShort_t fLeadingCoarseTime;
00098 UShort_t fLeadingFineTime;
00099 UInt_t fTrailingEpoch;
00100 UShort_t fTrailingCoarseTime;
00101 UShort_t fTrailingFineTime;
00102
00104 Double_t fLeadingFineTimeCalibCorr;
00105 Double_t fTrailingFineTimeCalibCorr;
00106
00107 ClassDef(TTrbRawHit,1)
00108 };
00109
00110 class TTrbOutputHit
00111 {
00112 public:
00114 TTrbOutputHit () :
00115 iTDC (0), iChannel (0), fEdgeType (3),
00116 fFullTime(0.), fDeltaT (0.)
00117 {
00118 }
00119
00121 TTrbOutputHit (UShort_t TDC, UShort_t Channel, UChar_t EdgeType,
00122 Double_t FullTime, Double_t DeltaT) :
00123 iTDC (TDC), iChannel (Channel), fEdgeType (EdgeType), fFullTime(FullTime), fDeltaT(DeltaT) {}
00124
00126 UShort_t GetTDC() const { return iTDC; }
00127
00129 UShort_t GetChannel() const { return iChannel; }
00130
00132 UChar_t GetEdgeType() const { return fEdgeType; }
00133
00135 Double_t GetFullTime () const { return fFullTime; }
00136
00137 Double_t GetDeltaT() const { return fDeltaT; }
00138
00140 inline bool IsLeading() const { return (fEdgeType == 1) || (fEdgeType == 2); }
00141
00143 inline bool IsTrailing() const { return (fEdgeType == 0) || (fEdgeType == 2); }
00144
00146 void SetFullTime (Double_t FullTime)
00147 { fFullTime = FullTime; }
00148
00149 void SetDeltaT (Double_t DeltaT)
00150 { fDeltaT = DeltaT; }
00151
00152 private:
00154 UShort_t iTDC;
00155 UShort_t iChannel;
00156
00163 UChar_t fEdgeType;
00164
00166 Double_t fFullTime;
00167 Double_t fDeltaT;
00168
00169 ClassDef(TTrbOutputHit,1)
00170 };
00171
00172 #endif // _TTrbHIT_H_