17 #include "StMuFmsHit.h"
30 StMuFmsHit::StMuFmsHit(
unsigned short det,
unsigned short ch,
31 unsigned short qtcrate,
unsigned short qtslot,
32 unsigned short qtch,
unsigned short adc,
33 unsigned short tdc,
float e)
35 setMuFmsHit(det, ch, qtcrate, qtslot, qtch, adc, tdc, e);
38 StMuFmsHit::~StMuFmsHit() {}
41 StMuFmsHit::detectorId()
const {
return mDetectorId;}
44 StMuFmsHit::channel()
const {
return mChannel;}
47 StMuFmsHit::adc()
const {
return mAdc;}
50 StMuFmsHit::tdc()
const {
return mTdc;}
53 StMuFmsHit::energy()
const {
return mEnergy;}
56 StMuFmsHit::qtCrate()
const {
return (mQTCrtSlotCh>>12) & 0x0f;}
59 StMuFmsHit::qtSlot()
const {
return (mQTCrtSlotCh>>8 ) & 0x0f;}
62 StMuFmsHit::qtChannel()
const {
return (mQTCrtSlotCh ) & 0xff;}
65 StMuFmsHit::encodeQTCrtSlotCh(
unsigned short qtcrate,
unsigned short qtslot,
68 mQTCrtSlotCh = (qtcrate<<12) + (qtslot<<8) + qtch;
71 void StMuFmsHit::setQtCrate(
unsigned short val) { mQTCrtSlotCh |= (val<<12); }
72 void StMuFmsHit::setQtSlot(
unsigned short val) { mQTCrtSlotCh |= (val<<8); }
73 void StMuFmsHit::setQtChannel(
unsigned short val) { mQTCrtSlotCh |= val; }
74 void StMuFmsHit::setDetectorId(
unsigned short val) { mDetectorId = val; }
75 void StMuFmsHit::setChannel(
unsigned short val) { mChannel = val; }
76 void StMuFmsHit::setAdc(
unsigned short val) { mAdc = val; }
77 void StMuFmsHit::setTdc(
unsigned short val) { mTdc = val; }
78 void StMuFmsHit::setEnergy(
float val) { mEnergy = val; }
79 void StMuFmsHit::setMuFmsHit(
unsigned short det,
unsigned short ch,
80 unsigned short qtcrate,
unsigned short qtslot,
81 unsigned short qtch,
unsigned short adc,
82 unsigned short tdc, Float_t e){
88 encodeQTCrtSlotCh(qtcrate, qtslot, qtch);
91 void StMuFmsHit::print(Option_t *option)
const {cout<< *
this <<endl;}
93 ostream& operator<<(ostream& os,
const StMuFmsHit& v)
95 return os <<
"StMuFmsHit: mDetectorId\t"<<v.detectorId()
96 <<
"\tmChannel\t" <<v.channel()
97 <<
"\tQTCrate\t" <<v.qtCrate()
98 <<
"\tQTSlot\t" <<v.qtSlot()
99 <<
"\tQTCh\t" <<v.qtChannel()
100 <<
"\tmAdc\t" <<v.adc()
101 <<
"\tmTdc\t" <<v.tdc()
102 <<
"\tmEnergy\t" <<v.energy();