StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
StFtpcHit.h
1 
5 /***************************************************************************
6  *
7  * $Id: StFtpcHit.h,v 2.13 2016/02/25 17:10:20 ullrich Exp $
8  *
9  * Author: Thomas Ullrich, Jan 1999
10  ***************************************************************************
11  *
12  * Description:
13  *
14  ***************************************************************************
15  *
16  * $Log: StFtpcHit.h,v $
17  * Revision 2.13 2016/02/25 17:10:20 ullrich
18  * Implemented detector() which is now a pure abstract method in StHit.
19  *
20  * Revision 2.12 2009/11/23 16:34:06 fisyak
21  * Cleanup, remove dependence on dst tables, clean up software monitors
22  *
23  * Revision 2.11 2004/07/15 16:36:24 ullrich
24  * Removed all clone() declerations and definitions. Use StObject::clone() only.
25  *
26  * Revision 2.10 2004/05/07 15:05:28 calderon
27  * Adding constructor based on StFtpcPoint from Markus.
28  *
29  * Revision 2.9 2004/04/08 19:02:33 ullrich
30  * Added additional data member and access methods to hold the position in
31  * pad and time units including their std deviation. Constructors updated.
32  *
33  * Revision 2.8 2003/01/08 19:43:11 perev
34  * CleanUp
35  *
36  * Revision 2.7 2002/02/22 22:56:48 jeromel
37  * Doxygen basic documentation in all header files. None of this is required
38  * for QM production.
39  *
40  * Revision 2.6 2001/04/05 04:00:37 ullrich
41  * Replaced all (U)Long_t by (U)Int_t and all redundant ROOT typedefs.
42  *
43  * Revision 2.5 2001/03/24 03:34:46 perev
44  * clone() -> clone() const
45  *
46  * Revision 2.4 1999/12/13 20:16:15 ullrich
47  * Changed numbering scheme for hw_position unpack methods (STAR conventions).
48  *
49  * Revision 2.3 1999/12/06 18:28:24 ullrich
50  * Changed method names xxxInCluster to xxxInHit
51  *
52  * Revision 2.2 1999/11/09 19:35:12 ullrich
53  * Memory now allocated using StMemoryPool via overloaded new/delete
54  *
55  * Revision 2.1 1999/10/28 22:25:19 ullrich
56  * Adapted new StArray version. First version to compile on Linux and Sun.
57  *
58  * Revision 2.0 1999/10/12 18:42:07 ullrich
59  * Completely Revised for New Version
60  *
61  **************************************************************************/
62 #ifndef StFtpcHit_hh
63 #define StFtpcHit_hh
64 
65 #include "StHit.h"
66 #include "StMemoryPool.hh"
67 
68 class StFtpcPoint;
69 
70 class StFtpcHit : public StHit {
71 public:
72  StFtpcHit();
74  const StThreeVectorF&,
75  unsigned int, float, unsigned char = 0);
76  StFtpcHit(const StFtpcPoint&);
77  // StFtpcHit(const StFtpcHit&); use default
78  // StFtpcHit& operator=(const StFtpcHit&); use default
79  ~StFtpcHit();
80 
81  void* operator new(size_t sz,void *p) { return p;}
82  void* operator new(size_t) { return mPool.alloc(); }
83  void operator delete(void* p) { mPool.free(p); }
84 
85  unsigned int sector() const; // 1-6
86  unsigned int plane() const; // 1-20
87  unsigned int padsInHit() const;
88  unsigned int timebinsInHit() const;
89 
90  void update(const StFtpcPoint&);
91 
92  double padPosition() const;
93  double timePosition() const;
94  double sigmaPadPosition() const;
95  double sigmaTimePosition() const;
96 
97  void setPadPosition(float);
98  void setTimePosition(float);
99  void setSigmaPadPosition(float);
100  void setSigmaTimePosition(float);
101 
102  StDetectorId detector() const;
103 
104 
105 protected:
106  static StMemoryPool mPool;
107 
108  Float_t mPadPos; // pad position of hit
109  Float_t mTimePos; // time position of hit
110  Float_t mPadPosSigma; // sigma pad position of hit
111  Float_t mTimePosSigma; // sigma time position of hit
112 
113  ClassDef(StFtpcHit,2)
114 };
115 
116 inline StDetectorId StFtpcHit::detector() const {return static_cast<StDetectorId>(StHit::bits(0, 4));}
117 
118 inline double StFtpcHit::padPosition() const {return mPadPos;}
119 inline double StFtpcHit::timePosition() const {return mTimePos;}
120 inline double StFtpcHit::sigmaPadPosition() const {return mPadPosSigma;}
121 inline double StFtpcHit::sigmaTimePosition() const {return mTimePosSigma;}
122 inline void StFtpcHit::setPadPosition(float val) {mPadPos = val;}
123 inline void StFtpcHit::setTimePosition(float val) {mTimePos = val;}
124 inline void StFtpcHit::setSigmaPadPosition(float val) {mPadPosSigma = val;}
125 inline void StFtpcHit::setSigmaTimePosition(float val) {mTimePosSigma = val;}
126 
127 #endif
Definition: StHit.h:125