StFms  0.0.0
FMS software in the STAR framework
StMuFmsHit.h
Go to the documentation of this file.
1 /***************************************************************************
2  *
3  * $Id: StMuFmsHit.h,v 1.1 2010/01/25 03:57:39 tone421 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.1 2010/01/25 03:57:39 tone421
14  * Added FMS and Roman pot arrays
15  *
16  **************************************************************************/
17 #ifndef StMuFmsHit_hh
18 #define StMuFmsHit_hh
19 
20 #include <TObject.h>
21 
22 #include "Stiostream.h"
23 
24 class StMuFmsHit : public TObject {
25 public:
26  StMuFmsHit();
27  StMuFmsHit(unsigned short det, unsigned short ch,
28  unsigned short qtcrate, unsigned short qtslot,
29  unsigned short qtch, unsigned short adc,
30  unsigned short tdc, float e);
31  ~StMuFmsHit();
32 
33  unsigned short detectorId() const;
34  unsigned short channel() const;
35  unsigned short qtCrate() const;
36  unsigned short qtSlot() const;
37  unsigned short qtChannel() const;
38  unsigned short adc() const;
39  unsigned short tdc() const;
40  float energy() const;
41 
42  void setDetectorId(unsigned short);
43  void setChannel(unsigned short);
44  void setQtCrate(unsigned short);
45  void setQtSlot(unsigned short);
46  void setQtChannel(unsigned short);
47  void setAdc(unsigned short);
48  void setTdc(unsigned short);
49  void setEnergy(float);
50  void setMuFmsHit(unsigned short det, unsigned short ch,
51  unsigned short qtcrate, unsigned short qtslot,
52  unsigned short qtch, unsigned short adc,
53  unsigned short tdc, float e);
54 
55  void print(Option_t *option="") const;
56 
57 protected:
58  void encodeQTCrtSlotCh(unsigned short qtcrate, unsigned short qtslot, unsigned short qtch);
59 
60 protected:
61  UShort_t mDetectorId; // Detector Id
62  UShort_t mChannel; // Channel in the detector
63  UShort_t mQTCrtSlotCh; // QT Crate/Slot/Ch, 4 bits for Crate and Slot, 8 bits for channal
64  UShort_t mAdc; // ADC values
65  UShort_t mTdc; // TDC values
66  Float_t mEnergy; // corrected energy
67 
68  ClassDef(StMuFmsHit,1)
69 };
70 
71 ostream& operator<<(ostream&, const StMuFmsHit&);
72 #endif
unsigned short qtCrate() const
void setMuFmsHit(unsigned short det, unsigned short ch, unsigned short qtcrate, unsigned short qtslot, unsigned short qtch, unsigned short adc, unsigned short tdc, float e)
float energy() const
Float_t mEnergy
Definition: StMuFmsHit.h:66
void setAdc(unsigned short)
UShort_t mAdc
Definition: StMuFmsHit.h:64
void setQtChannel(unsigned short)
void setQtCrate(unsigned short)
void setTdc(unsigned short)
ostream & operator<<(ostream &, const StMuFmsHit &)
unsigned short qtSlot() const
unsigned short adc() const
unsigned short qtChannel() const
unsigned short tdc() const
UShort_t mQTCrtSlotCh
Definition: StMuFmsHit.h:63
unsigned short channel() const
void print(Option_t *option="") const
void setQtSlot(unsigned short)
UShort_t mTdc
Definition: StMuFmsHit.h:65
void setEnergy(float)
void setChannel(unsigned short)
UShort_t mDetectorId
Definition: StMuFmsHit.h:61
void setDetectorId(unsigned short)
void encodeQTCrtSlotCh(unsigned short qtcrate, unsigned short qtslot, unsigned short qtch)
UShort_t mChannel
Definition: StMuFmsHit.h:62
unsigned short detectorId() const