StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
StFmsHit.h
1 /***************************************************************************
2  *
3  * $Id: StFmsHit.h,v 2.1 2010/01/08 22:42:31 ullrich Exp $
4  *
5  * Author: Jingguo Ma, Dec 2009
6  ***************************************************************************
7  *
8  * Description: StFmsHit is data for individual cell
9  *
10  ***************************************************************************
11  *
12  * $Log: StFmsHit.h,v $
13  * Revision 2.1 2010/01/08 22:42:31 ullrich
14  * Initial Revision.
15  *
16  **************************************************************************/
17 #ifndef StFmsHit_hh
18 #define StFmsHit_hh
19 
20 #include "Stiostream.h"
21 #include "StObject.h"
22 
23 class StFmsHit : public StObject {
24 public:
25  StFmsHit();
26  StFmsHit(unsigned short det, unsigned short ch,
27  unsigned short qtcrate, unsigned short qtslot,
28  unsigned short qtch, unsigned short adc,
29  unsigned short tdc, float e);
30  ~StFmsHit();
31 
32  unsigned short detectorId() const;
33  unsigned short channel() const;
34  unsigned short qtCrate() const;
35  unsigned short qtSlot() const;
36  unsigned short qtChannel() const;
37  unsigned short adc() const;
38  unsigned short tdc() const;
39  float energy() const;
40 
41  void setDetectorId(unsigned short);
42  void setChannel(unsigned short);
43  void setQtCrate(unsigned short);
44  void setQtSlot(unsigned short);
45  void setQtChannel(unsigned short);
46  void setAdc(unsigned short);
47  void setTdc(unsigned short);
48  void setEnergy(float);
49  void setFmsHit(unsigned short det, unsigned short ch,
50  unsigned short qtcrate, unsigned short qtslot,
51  unsigned short qtch, unsigned short adc,
52  unsigned short tdc, float e);
53 
54  void print(Option_t *option="") const;
55 
56 protected:
57  void encodeQTCrtSlotCh(unsigned short qtcrate, unsigned short qtslot, unsigned short qtch);
58 
59 protected:
60  UShort_t mDetectorId; // Detector Id
61  UShort_t mChannel; // Channel in the detector
62  UShort_t mQTCrtSlotCh; // QT Crate/Slot/Ch, 4 bits for Crate and Slot, 8 bits for channal
63  UShort_t mAdc; // ADC values
64  UShort_t mTdc; // TDC values
65  Float_t mEnergy; // corrected energy
66 
67  ClassDef(StFmsHit,1)
68 };
69 
70 ostream& operator<<(ostream&, const StFmsHit&);
71 #endif