StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
StRichHit.h
1 
5 /***************************************************************************
6  *
7  * $Id: StRichHit.h,v 2.8 2016/02/25 17:10:20 ullrich Exp $
8  *
9  * Author: Brian Lasiuk, May 2000
10  ***************************************************************************
11  *
12  * Description: Definition of the persistent Hit object
13  *
14  ***************************************************************************
15  *
16  * $Log: StRichHit.h,v $
17  * Revision 2.8 2016/02/25 17:10:20 ullrich
18  * Implemented detector() which is now a pure abstract method in StHit.
19  *
20  * Revision 2.7 2004/07/15 16:36:25 ullrich
21  * Removed all clone() declerations and definitions. Use StObject::clone() only.
22  *
23  * Revision 2.6 2003/09/02 17:58:05 perev
24  * gcc 3.2 updates + WarnOff
25  *
26  * Revision 2.5 2002/02/22 22:56:49 jeromel
27  * Doxygen basic documentation in all header files. None of this is required
28  * for QM production.
29  *
30  * Revision 2.4 2001/04/05 04:00:40 ullrich
31  * Replaced all (U)Long_t by (U)Int_t and all redundant ROOT typedefs.
32  *
33  * Revision 2.3 2001/03/24 03:34:54 perev
34  * clone() -> clone() const
35  *
36  * Revision 2.2 2000/11/01 16:44:22 lasiuk
37  * SCHEMA EVOL: cluster number is now signed and the number of pads
38  * that were used in creating a hit is stored. Bit manipulation
39  * functions were changed to use StRichHitFlags from StEnumerations.
40  *
41  * Revision 2.1 2000/05/22 21:44:50 ullrich
42  * Initial Revision
43  *
44  **************************************************************************/
45 #ifndef StRichHit_hh
46 #define StRichHit_hh
47 
48 #include <Stiostream.h>
49 #include "StHit.h"
50 
51 class StRichHit : public StHit {
52 public:
53  StRichHit();
54  StRichHit(const StThreeVectorF& xg, const StThreeVectorF& dx);
55  StRichHit(const StThreeVectorF& xg, const StThreeVectorF& dx,
56  unsigned int hp, float q, float maxAdc, unsigned char tc);
57 
58  virtual ~StRichHit();
59  //StRichHit(const StRichHit&){ /* nopt */ }
60  //StRichHit& operator=(const StRichHit&){/* nopt */}
61 
62  const StThreeVectorF& local() const;
63  const StThreeVectorF& internal() const;
64  float maxAmplitude() const;
65 // unsigned int clusterNumber() const;
66  int clusterNumber() const;
67  unsigned int track() const;
68  unsigned short numberOfPads() const;
69 
70  // used for flags
71  unsigned int reservedLong() const;
72  float reservedFloat() const;
73 
74  StThreeVectorF& local();
75  StThreeVectorF& internal();
76 
77  void setMaxAmplitude(float);
78  void setClusterNumber(int);
79 // void setClusterNumber(unsigned int);
80  void setNumberOfPads(unsigned short);
81  void setTrack(unsigned int);
82 
83  void setReservedLong(unsigned int);
84  void setReservedFloat(float);
85 
86  bool isSet(StRichHitFlag f) const;
87  void setBit(StRichHitFlag f);
88  void unSetBit(StRichHitFlag f);
89  unsigned int flags() const;
90  StDetectorId detector() const;
91 
92 protected:
93  StThreeVectorF mLocal;
94  StThreeVectorF mLError;
95  StThreeVectorF mInternal;
96  StThreeVectorF mSigma;
97 
98  Float_t mMaxAmplitude;
99  Int_t mClusterNumber;
100 // UInt_t mClusterNumber;
101  UInt_t mTrack;
102 
103  UInt_t mReservedLong;
104  Float_t mReservedFloat;
105 
106  UInt_t mNumberOfPads;
107 
108  ClassDef(StRichHit,1)
109 };
110 
111 inline StDetectorId StRichHit::detector() const {return kRichId;}
112 
113 inline const StThreeVectorF& StRichHit::local() const {return mLocal;}
114 inline StThreeVectorF& StRichHit::local() {return mLocal;}
115 inline const StThreeVectorF& StRichHit::internal() const {return mInternal;}
116 inline StThreeVectorF& StRichHit::internal() {return mInternal;}
117 inline void StRichHit::setMaxAmplitude(float m) {mMaxAmplitude = m;}
118 inline float StRichHit::maxAmplitude() const {return mMaxAmplitude;}
119 inline void StRichHit::setClusterNumber(int no) {mClusterNumber = no;}
120 inline int StRichHit::clusterNumber() const {return mClusterNumber;}
121 // inline void StRichHit::setClusterNumber(unsigned int no) {mClusterNumber = no;}
122 // inline unsigned int StRichHit::clusterNumber() const {return mClusterNumber;}
123 inline void StRichHit::setTrack(unsigned int tck) { mTrack = tck;}
124 inline unsigned int StRichHit::track() const {return mTrack;}
125 inline unsigned short StRichHit::numberOfPads() const { return mNumberOfPads;}
126 inline void StRichHit::setNumberOfPads(unsigned short n) { mNumberOfPads = n;}
127 
128 inline unsigned int StRichHit::reservedLong() const {return mReservedLong; }
129 inline float StRichHit::reservedFloat() const {return mReservedFloat; }
130 inline void StRichHit::setReservedLong(unsigned int el) {mReservedLong = el;}
131 inline void StRichHit::setReservedFloat(float fl) {mReservedFloat = fl;}
132 
133 inline bool StRichHit::isSet(StRichHitFlag f) const { return (mReservedLong & f); }
134 inline void StRichHit::setBit(StRichHitFlag f) { mReservedLong |= f; }
135 inline void StRichHit::unSetBit(StRichHitFlag f) { mReservedLong &= ~(f);}
136 inline unsigned int StRichHit::flags() const{ return (mReservedLong); }
137 
138 //non-members
139 ostream& operator<<(ostream& os, const StRichHit& hit);
140 
141 #endif
Definition: StHit.h:125
StRichHitFlag