00001
00002
00003
00004
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 #include "StBTofHit.h"
00031 #include "StTrack.h"
00032 const Float_t StBTofHit::mBTofPadWidth = 3.45;
00033 ClassImp(StBTofHit);
00034
00035 StBTofHit::StBTofHit() {
00036 mTray = 0;
00037 mModule = 0;
00038 mCell = 0;
00039 mLeadingEdgeTime = 0.;
00040 mTrailingEdgeTime = 0.;
00041 mAssociatedTrack = 0;
00042 }
00043
00044 const StTrack* StBTofHit::associatedTrack() const { return mAssociatedTrack; }
00045 StTrack* StBTofHit::associatedTrack() { return mAssociatedTrack; }
00046
00047 void
00048 StBTofHit::setAssociatedTrack(StTrack* val) { mAssociatedTrack = val; }
00049
00050 const StThreeVectorF& StBTofHit::position() const {
00051 static StThreeVectorF pos;
00052 pos.set(0.,mBTofPadWidth*(cell() - 3.5), 0.);
00053 return *&pos;
00054 }
00055
00056 ostream& operator<<(ostream &os, const StBTofHit& hit) {
00057 os << " Tray:" << hit.tray() << " Module:" << hit.module()
00058 << " Cell:" << hit.cell()
00059 << " LeTime " << hit.leadingEdgeTime()
00060 << " TeTime " << hit.trailingEdgeTime()
00061 << " Track " << (hit.associatedTrack() ? hit.associatedTrack()->key() : 0)
00062 << " IdTruth " << hit.idTruth() << " Quality " << hit.qaTruth();
00063 return os;
00064 }
00065