29 #include "StTofCell.h"
31 #include "StThreeVectorD.hh"
33 static const char rcsid[] =
"$Id: StTofCell.cxx,v 2.5 2007/09/19 17:32:02 ullrich Exp $";
38 : mTrayIndex(0), mModuleIndex(0), mCellIndex(0), mDaqIndex(0), mAdc(0), mTdc(0),
39 mLeadingEdgeTime(0), mTrailingEdgeTime(0), mAssociatedTrack(0), mZhit(0),
43 StTofCell::StTofCell(
int trayId,
int moduleId,
int cellId,
int daqId,
46 : mTrayIndex(trayId), mModuleIndex(moduleId), mCellIndex(cellId),
47 mDaqIndex(daqId), mAdc(rawAdc), mTdc(rawTdc),
48 mLeadingEdgeTime(0.), mTrailingEdgeTime(0.),
49 mAssociatedTrack(track), mZhit(zhit), mMatchFlag(flag), mPosition(pos)
52 StTofCell::StTofCell(
int trayId,
int moduleId,
int cellId,
int daqId,
55 : mTrayIndex(trayId), mModuleIndex(moduleId), mCellIndex(cellId),
56 mDaqIndex(daqId), mAdc(0), mTdc(0),
57 mLeadingEdgeTime(0.), mTrailingEdgeTime(0.),
58 mAssociatedTrack(track), mZhit(zhit), mMatchFlag(flag), mPosition(pos)
61 StTofCell::~StTofCell() { }
64 StTofCell::setAssociatedTrack(
StTrack* val)
66 mAssociatedTrack = val;
70 StTofCell::associatedTrack() {
return mAssociatedTrack;}
73 StTofCell::associatedTrack()
const {
return mAssociatedTrack;}
79 StTofCell::position()
const {
return mPosition;}
82 StTofCell::operator==(
const StTofCell& p)
const
84 return ( (p.mTrayIndex == mTrayIndex && p.mModuleIndex == mModuleIndex &&
85 p.mCellIndex == mCellIndex && p.mDaqIndex == mDaqIndex &&
86 p.mAdc == mAdc && p.mTdc == mTdc &&
87 p.mAssociatedTrack == mAssociatedTrack &&
89 p.mMatchFlag == mMatchFlag) ||
90 (p.mTrayIndex == mTrayIndex && p.mModuleIndex == mModuleIndex &&
91 p.mCellIndex == mCellIndex && p.mDaqIndex == mDaqIndex &&
92 p.mLeadingEdgeTime == mLeadingEdgeTime &&
93 p.mTrailingEdgeTime == mTrailingEdgeTime &&
94 p.mAssociatedTrack == mAssociatedTrack &&
96 p.mMatchFlag == mMatchFlag) );
100 StTofCell::operator!=(
const StTofCell& p)
const
102 return !(*
this == p);