00001
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040
00041
00042
00043
00044
00045
00046
00047
00048
00049
00050
00051
00052
00053
00054
00055
00056 #ifndef StSsdHit_hh
00057 #define StSsdHit_hh
00058
00059 #include "StHit.h"
00060 #include "StMemoryPool.hh"
00061
00062 class StSsdHit : public StHit {
00063 public:
00064 StSsdHit();
00065 StSsdHit(const StThreeVectorF&,
00066 const StThreeVectorF&,
00067 unsigned int, float, unsigned char = 0);
00068
00069
00070 ~StSsdHit();
00071
00072 void* operator new(size_t sz,void *p) { return p;}
00073 void* operator new(size_t) { return mPool.alloc(); }
00074 void operator delete(void* p) { mPool.free(p); }
00075
00076 unsigned int ladder() const;
00077 unsigned int wafer() const;
00078 unsigned int centralStripNSide() const;
00079 unsigned int centralStripPSide() const;
00080 unsigned int clusterSizeNSide() const;
00081 unsigned int clusterSizePSide() const;
00082 float localPosition(unsigned int) const;
00083 static unsigned int sector(unsigned int);
00084 unsigned int sector() const;
00085 void setLocalPosition(float, float);
00086 virtual int volumeID() const;
00087 void Print(const Option_t *option="") const;
00088
00089 protected:
00090 static StMemoryPool mPool;
00091 Float_t mLocalPosition[2];
00092
00093 private:
00094 enum {mWaferPerLadder=16};
00095 ClassDef(StSsdHit,2)
00096 };
00097
00098 inline unsigned int
00099 StSsdHit::sector(unsigned int ladder) {
00100 if (ladder <= 2 || ladder == 20) return 1;
00101 if (ladder >= 3 && ladder <= 9) return 2;
00102 if (ladder >= 10 && ladder <= 12) return 3;
00103 if (ladder >= 13 && ladder <= 19) return 4;
00104 return 0;
00105 }
00106
00107 inline unsigned int
00108 StSsdHit::sector() const {return sector(ladder()); }
00109
00110 ostream& operator<<(ostream& os, StSsdHit const & v);
00111
00112 #endif