StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
StTpcPixel.h
1 
5 /***************************************************************************
6  *
7  * $Id: StTpcPixel.h,v 2.8 2015/10/09 17:46:15 ullrich Exp $
8  *
9  * Author: Thomas Ullrich, Jan 1999
10  ***************************************************************************
11  *
12  * Description:
13  *
14  ***************************************************************************
15  *
16  * $Log: StTpcPixel.h,v $
17  * Revision 2.8 2015/10/09 17:46:15 ullrich
18  * Changed type of mIdTruth from ushort to int.
19  *
20  * Revision 2.7 2009/11/23 22:20:51 ullrich
21  * Minor cleanup performed, fixed compiler warnings.
22  *
23  * Revision 2.6 2004/08/06 15:37:43 fisyak
24  * Add clster id
25  *
26  * Revision 2.5 2004/04/26 16:33:35 fisyak
27  * Make use of StTpcPixel
28  *
29  * Revision 2.4 2002/02/22 22:56:52 jeromel
30  * Doxygen basic documentation in all header files. None of this is required
31  * for QM production.
32  *
33  * Revision 2.3 2001/04/05 04:00:44 ullrich
34  * Replaced all (U)Long_t by (U)Int_t and all redundant ROOT typedefs.
35  *
36  * Revision 2.2 1999/12/13 20:16:34 ullrich
37  * Changed numbering scheme for hw_position unpack methods (STAR conventions).
38  *
39  * Revision 2.1 1999/10/13 19:44:04 ullrich
40  * Initial Revision
41  *
42  **************************************************************************/
43 #ifndef StTpcPixel_hh
44 #define StTpcPixel_hh
45 
46 #include "StObject.h"
47 #include "Stiostream.h"
48 #include "StEnumerations.h"
49 
50 class StTpcPixel : public StObject {
51 public:
52  StTpcPixel(unsigned char Detector = 0, unsigned char Sector = 0, unsigned char Row = 0,
53  unsigned char Pad = 0, unsigned short TimeBin = 0,unsigned short Adc=0,
54  int IdTruth=0, short Id=0) :
55  mDetector(Detector), mSector(Sector), mRow(Row),
56  mPad(Pad), mTimeBin(TimeBin), mAdc(Adc), mIdTruth(IdTruth), mId(Id) {}
57  virtual ~StTpcPixel() {}
58  unsigned char detector() const;
59  unsigned char sector() const;
60  unsigned char padrow() const;
61  unsigned char pad() const;
62  unsigned short timebin() const;
63  unsigned short adc() const;
64  int idTruth() const;
65  short id() const;
66  virtual void Print(Option_t *option="") const;
67 
68 protected:
69  UChar_t mDetector;
70  UChar_t mSector;
71  UChar_t mRow;
72  UChar_t mPad;
73  UShort_t mTimeBin;
74  UShort_t mAdc;
75  Int_t mIdTruth;
76  Short_t mId; // Cluster Id
77 
78  ClassDef(StTpcPixel, 2) //StTpcPixel structure
79 };
80 
81 inline unsigned char StTpcPixel::detector() const {return mDetector;}
82 inline unsigned char StTpcPixel::sector() const {return mSector;}
83 inline unsigned char StTpcPixel::padrow() const {return mRow;}
84 inline unsigned char StTpcPixel::pad() const {return mPad;}
85 inline unsigned short StTpcPixel::timebin() const {return mTimeBin;}
86 inline unsigned short StTpcPixel::adc() const {return mAdc;}
87 inline int StTpcPixel::idTruth() const {return mIdTruth;}
88 inline short StTpcPixel::id() const {return mId;}
89 
90 ostream& operator<< (ostream&, const StTpcPixel&);
91 #endif