00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019 #include "StTrack.h"
00020 #include "StBTofHit.h"
00021 #include "StMuBTofHit.h"
00022
00023 ClassImp(StMuBTofHit)
00024
00025
00026 StMuBTofHit::StMuBTofHit()
00027 {
00028 mTray = 0;
00029 mModule = 0;
00030 mCell = 0;
00031
00032 mLeadingEdgeTime = 0.0;
00033 mTrailingEdgeTime = 0.0;
00034 mAssociatedTrackId = -1;
00035 mIndex2Primary = -1;
00036 mIndex2Global = -1;
00037 mIdTruth = 0;
00038 mQuality = 0;
00039 }
00040
00042 StMuBTofHit::StMuBTofHit(const StBTofHit* tofHit)
00043 {
00044 mTray = tofHit->tray();
00045 mModule = tofHit->module();
00046 mCell = tofHit->cell();
00047
00048 mLeadingEdgeTime = tofHit->leadingEdgeTime();
00049 mTrailingEdgeTime = tofHit->trailingEdgeTime();;
00050 mAssociatedTrackId = (tofHit->associatedTrack()) ? tofHit->associatedTrack()->key() : -1;
00051 mIndex2Primary = -1;
00052 mIndex2Global = -1;
00053 mIdTruth = tofHit->idTruth();
00054 mQuality = tofHit->qaTruth();
00055 }
00056
00057 StMuBTofHit::~StMuBTofHit()
00058 {}
00059
00060 void
00061 StMuBTofHit::setIdTruth(int idtru,int qatru)
00062 {
00063 if (qatru==0) qatru = (idtru>>16);
00064 idtru = idtru&((1<<16)-1);
00065 mIdTruth = static_cast<UShort_t>(idtru);
00066 mQuality = static_cast<UShort_t>(qatru);
00067 }