StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
StMuMtdRawHit.cxx
1 #include "StMuMtdRawHit.h"
2 #include "StEvent/StEvent.h"
3 #include "StEvent/StMtdHit.h"
4 #include "StEvent/StMtdRawHit.h"
5 
6 ClassImp(StMuMtdRawHit)
7 
8 StMuMtdRawHit::StMuMtdRawHit() : mFlag(-1), mBackLeg(-1), mChannel(-1), mTdc(-1)
9 {
10  // default constructor
11 }
12 
13 StMuMtdRawHit::StMuMtdRawHit(const StMtdRawHit *hit){
14 
15  mFlag = hit->flag();;
16  mBackLeg = hit->backleg();
17  mChannel = hit->channel();
18  mTdc = hit->tdc();
19 
20 }
21 
22 bool StMuMtdRawHit::leadingEdge() const { return (mFlag>0);}
23 bool StMuMtdRawHit::trailingEdge() const{ return (mFlag<0);}
24 int StMuMtdRawHit::fiberId() const { return abs(static_cast<int>(mFlag)) - 1;}
25 int StMuMtdRawHit::flag() const {return mFlag;}
26 int StMuMtdRawHit::backleg() const {return mBackLeg;}
27 int StMuMtdRawHit::channel() const{return mChannel;}
28 unsigned int StMuMtdRawHit::tdc() const { return mTdc;}