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 mIdTruth(0),
32 mQaTruth(0)
33 { /*noop*/ }
34 
36  set( stHit );
37 } // ctor from StEvent
38 
39 StMuFttRawHit::StMuFttRawHit( UChar_t mSector, UChar_t mRDO, UChar_t mFEB,
40  UChar_t mVMM, UChar_t mChannel, UShort_t mADC,
41  UShort_t mBCID, Short_t mTB, Short_t mBCIDDelta){
42  setRaw( mSector, mRDO, mFEB, mVMM, mChannel, mADC, mBCID, mTB, mBCIDDelta);
43 } // ctor setRaw
44 
45 void StMuFttRawHit::setRaw( UChar_t mSector, UChar_t mRDO, UChar_t mFEB,
46  UChar_t mVMM, UChar_t mChannel, UShort_t mADC,
47  UShort_t mBCID, Short_t mTB, Short_t mBCIDDelta){
48  this->mSector = mSector;
49  this->mRDO = mRDO;
50  this->mFEB = mFEB;
51  this->mVMM = mVMM;
52  this->mChannel = mChannel;
53  this->mADC = mADC;
54  this->mBCID = mBCID;
55  this->mTB = mTB;
56  this->mBCIDDelta = mBCIDDelta;
57 } // setRaw
58 
59 void StMuFttRawHit::setMapping( UChar_t mPlane, UChar_t mQuadrant,
60  UChar_t mRow, UChar_t mStrip, UChar_t mOrientation ){
61  this->mPlane = mPlane;
62  this->mQuadrant = mQuadrant;
63  this->mRow = mRow;
64  this->mStrip = mStrip;
65  this->mOrientation = mOrientation;
66 } // setMapping
67 
68 void StMuFttRawHit::set( StFttRawHit * stHit ){
69  setRaw( stHit->sector(), stHit->rdo(), stHit->feb(), stHit->vmm(), stHit->channel(), stHit->adc(), stHit->bcid(), stHit->tb(), stHit->dbcid());
70  setMapping( stHit->plane(), stHit->quadrant(), stHit->row(), stHit->strip(), stHit->orientation() );
71  setIdTruth( stHit->idTruth() );
72  setQaTruth( stHit->qaTruth() );
73 } // set from StEvent object
74 
75 
76 
77 ostream&
78 operator<<( ostream &os, const StMuFttRawHit& rh )
79 {
80  using namespace std;
81  os << " StMuFttRawHit( " << endl;
82  os << "\tmSector = " << (int)rh.sector() << endl;
83  os << "\tmRDO = " << (int)rh.rdo() << endl;
84  os << "\tmFEB = " << (int)rh.feb() << endl;
85  os << "\tmVMM = " << (int)rh.vmm() << endl;
86  os << "\tmChannel = " << (int)rh.channel() << endl;
87  os << "\tmADC = " << (int)rh.adc() << endl;
88  os << "\tmBCID = " << (int)rh.bcid() << endl;
89  os << "\tmBCIDDelta = " << (int)rh.dbcid() << endl;
90  os << "\tmTB = " << (int)rh.tb() << endl;
91  os << "\tmPlane = " << (int)rh.plane() << endl;
92  os << "\tmQuadrant = " << (int)rh.quadrant() << endl;
93  os << "\tmRow = " << (int)rh.row() << endl;
94  os << "\tmStrip = " << (int)rh.strip() << endl;
95  os << "\tmOrientation = " << (int)rh.orientation() << endl;
96  os << "\tidTruth = " << (int)rh.idTruth() << endl;
97  os << "\tqaTruth = " << (int)rh.qaTruth() << endl;
98  os << " ) " << endl;
99  return os;
100 } // operator<< ostream
StMuFttRawHit()
Default constructor.