StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
StMuFmsHit.h
1 /***************************************************************************
2  *
3  * $Id: StMuFmsHit.h,v 1.3 2016/07/08 16:07:31 jdb Exp $
4  *
5  * Author: Jingguo Ma, Jan 2010
6  ***************************************************************************
7  *
8  * Description: StMuFmsHit is data for individual cell
9  *
10  ***************************************************************************
11  *
12  * $Log: StMuFmsHit.h,v $
13  * Revision 1.3 2016/07/08 16:07:31 jdb
14  * Did not increment the version number in last commit, doing so now. StMuFmsHit v1->v2 due to change from StObject->TObject
15  *
16  * Revision 1.2 2015/08/28 18:36:04 jdb
17  * Added Akios FMS codes
18  *
19  * Revision 1.1 2010/01/25 03:57:39 tone421
20  * Added FMS and Roman pot arrays
21  *
22  **************************************************************************/
23 #ifndef StMuFmsHit_hh
24 #define StMuFmsHit_hh
25 
26 #include <TObject.h>
27 
28 #include "Stiostream.h"
29 
30 class StMuFmsHit : public TObject {
31 public:
32  StMuFmsHit();
33  StMuFmsHit(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);
37  ~StMuFmsHit();
38 
39  unsigned short detectorId() const;
40  unsigned short channel() const;
41  unsigned short qtCrate() const;
42  unsigned short qtSlot() const;
43  unsigned short qtChannel() const;
44  unsigned short adc() const;
45  unsigned short tdc() const;
46  float energy() const;
47 
48  void setDetectorId(unsigned short);
49  void setChannel(unsigned short);
50  void setQtCrate(unsigned short);
51  void setQtSlot(unsigned short);
52  void setQtChannel(unsigned short);
53  void setAdc(unsigned short);
54  void setTdc(unsigned short);
55  void setEnergy(float);
56  void setMuFmsHit(unsigned short det, unsigned short ch,
57  unsigned short qtcrate, unsigned short qtslot,
58  unsigned short qtch, unsigned short adc,
59  unsigned short tdc, float e);
60 
61  void print(Option_t *option="") const;
62 
63 protected:
64  void encodeQTCrtSlotCh(unsigned short qtcrate, unsigned short qtslot, unsigned short qtch);
65 
66 protected:
67  UShort_t mDetectorId; // Detector Id
68  UShort_t mChannel; // Channel in the detector
69  UShort_t mQTCrtSlotCh; // QT Crate/Slot/Ch, 4 bits for Crate and Slot, 8 bits for channal
70  UShort_t mAdc; // ADC values
71  UShort_t mTdc; // TDC values
72  Float_t mEnergy; // corrected energy
73 
74  ClassDef(StMuFmsHit,2)
75 };
76 
77 ostream& operator<<(ostream&, const StMuFmsHit&);
78 #endif