StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
StMuFttRawHit.cxx
1 /***************************************************************************
2  *
3  * $Id: StMuFttRawHit.cxx
4  *
5  * Author: jdb, Nov 2021
6  ***************************************************************************
7  *
8  * Description:
9  *
10  ***************************************************************************/
11 #include "StMuFttRawHit.h"
12 #include "StEvent/StFttRawHit.h"
13 #include <cmath>
14 #include <iostream>
15 
16 
18 : mSector(0),
19 mRDO(0),
20 mFEB(0),
21 mVMM(0),
22 mChannel(0),
23 mADC(0),
24 mBCID(0),
25 mTB(-32000),
26 mPlane(255),
27 mQuadrant(kFttUnknownQuadrant),
28 mRow(255),
29 mStrip(255),
30 mOrientation(kFttUnknownOrientation)
31 { /*noop*/ }
32 
34  set( stHit );
35 } // ctor from StEvent
36 
37 StMuFttRawHit::StMuFttRawHit( UChar_t mSector, UChar_t mRDO, UChar_t mFEB,
38  UChar_t mVMM, UChar_t mChannel, UShort_t mADC,
39  UShort_t mBCID, Short_t mTB, Short_t mBCIDDelta){
40  setRaw( mSector, mRDO, mFEB, mVMM, mChannel, mADC, mBCID, mTB, mBCIDDelta);
41 } // ctor setRaw
42 
43 void StMuFttRawHit::setRaw( UChar_t mSector, UChar_t mRDO, UChar_t mFEB,
44  UChar_t mVMM, UChar_t mChannel, UShort_t mADC,
45  UShort_t mBCID, Short_t mTB, Short_t mBCIDDelta){
46  this->mSector = mSector;
47  this->mRDO = mRDO;
48  this->mFEB = mFEB;
49  this->mVMM = mVMM;
50  this->mChannel = mChannel;
51  this->mADC = mADC;
52  this->mBCID = mBCID;
53  this->mTB = mTB;
54  this->mBCIDDelta = mBCIDDelta;
55 } // setRaw
56 
57 void StMuFttRawHit::setMapping( UChar_t mPlane, UChar_t mQuadrant,
58  UChar_t mRow, UChar_t mStrip, UChar_t mOrientation ){
59  this->mPlane = mPlane;
60  this->mQuadrant = mQuadrant;
61  this->mRow = mRow;
62  this->mStrip = mStrip;
63  this->mOrientation = mOrientation;
64 } // setMapping
65 
66 void StMuFttRawHit::set( StFttRawHit * stHit ){
67  setRaw( stHit->sector(), stHit->rdo(), stHit->feb(), stHit->vmm(), stHit->channel(), stHit->adc(), stHit->bcid(), stHit->tb(), stHit->dbcid());
68  setMapping( stHit->plane(), stHit->quadrant(), stHit->row(), stHit->strip(), stHit->orientation() );
69 } // set from StEvent object
70 
71 
72 
73 ostream&
74 operator<<( ostream &os, const StMuFttRawHit& rh )
75 {
76  using namespace std;
77  os << " StMuFttRawHit( " << endl;
78  os << "\tmSector = " << (int)rh.sector() << endl;
79  os << "\tmRDO = " << (int)rh.rdo() << endl;
80  os << "\tmFEB = " << (int)rh.feb() << endl;
81  os << "\tmVMM = " << (int)rh.vmm() << endl;
82  os << "\tmChannel = " << (int)rh.channel() << endl;
83  os << "\tmADC = " << (int)rh.adc() << endl;
84  os << "\tmBCID = " << (int)rh.bcid() << endl;
85  os << "\tmBCIDDelta = " << (int)rh.dbcid() << endl;
86  os << "\tmTB = " << (int)rh.tb() << endl;
87  os << "\tmPlane = " << (int)rh.plane() << endl;
88  os << "\tmQuadrant = " << (int)rh.quadrant() << endl;
89  os << "\tmRow = " << (int)rh.row() << endl;
90  os << "\tmStrip = " << (int)rh.strip() << endl;
91  os << "\tmOrientation = " << (int)rh.orientation() << " ) " << endl;
92  return os;
93 } // operator<< ostream
StMuFttRawHit()
Default constructor.