33 StFmsHit::StFmsHit(
unsigned short det,
unsigned short ch,
34 unsigned short qtcrate,
unsigned short qtslot,
35 unsigned short qtch,
unsigned short adc,
36 unsigned short tdc,
float e)
38 setFmsHit(det, ch, qtcrate, qtslot, qtch, adc, tdc, e);
41 StFmsHit::~StFmsHit() {}
44 StFmsHit::detectorId()
const {
return mDetectorId;}
47 StFmsHit::channel()
const {
return mChannel;}
50 StFmsHit::adc()
const {
return mAdc;}
53 StFmsHit::tdc()
const {
return mTdc;}
56 StFmsHit::energy()
const {
return mEnergy;}
59 StFmsHit::qtCrate()
const {
return (mQTCrtSlotCh>>12) & 0x0f;}
62 StFmsHit::qtSlot()
const {
return (mQTCrtSlotCh>>8 ) & 0x0f;}
65 StFmsHit::qtChannel()
const {
return (mQTCrtSlotCh ) & 0xff;}
68 StFmsHit::encodeQTCrtSlotCh(
unsigned short qtcrate,
unsigned short qtslot,
71 mQTCrtSlotCh = (qtcrate<<12) + (qtslot<<8) + qtch;
74 void StFmsHit::setQtCrate(
unsigned short val) { mQTCrtSlotCh |= (val<<12); }
75 void StFmsHit::setQtSlot(
unsigned short val) { mQTCrtSlotCh |= (val<<8); }
76 void StFmsHit::setQtChannel(
unsigned short val) { mQTCrtSlotCh |= val; }
77 void StFmsHit::setDetectorId(
unsigned short val) { mDetectorId = val; }
78 void StFmsHit::setChannel(
unsigned short val) { mChannel = val; }
79 void StFmsHit::setAdc(
unsigned short val) { mAdc = val; }
80 void StFmsHit::setTdc(
unsigned short val) { mTdc = val; }
81 void StFmsHit::setEnergy(
float val) { mEnergy = val; }
82 void StFmsHit::setFmsHit(
unsigned short det,
unsigned short ch,
83 unsigned short qtcrate,
unsigned short qtslot,
84 unsigned short qtch,
unsigned short adc,
85 unsigned short tdc, Float_t e){
91 encodeQTCrtSlotCh(qtcrate, qtslot, qtch);
94 void StFmsHit::print(Option_t *option)
const {cout<< *
this <<endl;}
96 ostream& operator<<(ostream& os,
const StFmsHit& v)
98 return os << Form(
"StFmsHit: detId=%2d ch=%3d QTCrt=%1d QTSlot=%2d QTCh=%2d adc=%4d tdc=%4d E=%6.2f",
99 v.detectorId(),v.channel(),v.qtCrate(),v.qtSlot(),v.qtChannel()
100 ,v.adc(),v.tdc(),v.energy());