00001
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024 #ifndef StRnDHit_hh
00025 #define StRnDHit_hh
00026 #include "StHit.h"
00027 #include "StMemoryPool.hh"
00028 #include "StEnumerations.h"
00029
00030 class StRnDHit : public StHit
00031 {
00032 public:
00033 StRnDHit();
00034 StRnDHit(const StThreeVectorF& position,
00035 const StThreeVectorF& error,
00036 unsigned int hwPosition, float charge, unsigned char trackRefCount = 0,
00037 unsigned short idTruth=0, unsigned short quality=0, unsigned short id =0,
00038 StDetectorId = kUnknownId);
00039 ~StRnDHit();
00040
00041 StDetectorId detector() const;
00042
00043 short layer() const;
00044 short ladder() const;
00045 short wafer() const;
00046
00047 int extraByte0() const;
00048 int extraByte1() const;
00049
00050 int key() const;
00051 int volumeId() const;
00052
00053 double double0() const;
00054 double double1() const;
00055 double double2() const;
00056 double double3() const;
00057 double double4() const;
00058
00059 void setLayer(short);
00060 void setLadder(short);
00061 void setWafer(short);
00062 void setExtraByte0(int);
00063 void setExtraByte1(int);
00064 void setDetectorId(StDetectorId);
00065
00066 void setKey(int);
00067 void setVolumeId(int);
00068
00069 void setDouble0(double);
00070 void setDouble1(double);
00071 void setDouble2(double);
00072 void setDouble3(double);
00073 void setDouble4(double);
00074
00075 void* operator new(size_t sz,void *p) { return p;}
00076 void* operator new(size_t) { return mPool.alloc(); }
00077 void operator delete(void* p) { mPool.free(p); }
00078
00079 friend ostream& operator<<(ostream& os, const StRnDHit& h);
00080
00081 protected:
00082 Short_t mLayer;
00083 Short_t mLadder;
00084 Short_t mWafer;
00085
00086
00087 Int_t mExtraByte0;
00088 Int_t mExtraByte1;
00089
00090
00091 Int_t mKey;
00092 Int_t mVolumeId;
00093
00094
00095 Double_t mDouble0;
00096 Double_t mDouble1;
00097 Double_t mDouble2;
00098 Double_t mDouble3;
00099 Double_t mDouble4;
00100
00101
00102
00103 StDetectorId mDetectorId;
00104
00105 static StMemoryPool mPool;
00106
00107 ClassDef(StRnDHit,1)
00108 };
00109
00110 inline short StRnDHit::layer() const {return mLayer;}
00111 inline short StRnDHit::ladder() const {return mLadder;}
00112 inline short StRnDHit::wafer() const {return mWafer;}
00113 inline int StRnDHit::extraByte0() const {return mExtraByte0;}
00114 inline int StRnDHit::extraByte1() const {return mExtraByte1;}
00115 inline int StRnDHit::key() const {return mKey;}
00116 inline int StRnDHit::volumeId() const {return mVolumeId;}
00117 inline double StRnDHit::double0() const {return mDouble0;}
00118 inline double StRnDHit::double1() const {return mDouble1;}
00119 inline double StRnDHit::double2() const {return mDouble2;}
00120 inline double StRnDHit::double3() const {return mDouble3;}
00121 inline double StRnDHit::double4() const {return mDouble4;}
00122
00123 inline void StRnDHit::setLayer(short v) {mLayer = v;}
00124 inline void StRnDHit::setLadder(short v) {mLadder = v;}
00125 inline void StRnDHit::setWafer(short v) {mWafer = v;}
00126 inline void StRnDHit::setExtraByte0(int v) {mExtraByte0=v;}
00127 inline void StRnDHit::setExtraByte1(int v) {mExtraByte1=v;}
00128 inline void StRnDHit::setKey(int v) {mKey = v;}
00129 inline void StRnDHit::setVolumeId(int v) {mVolumeId=v;}
00130 inline void StRnDHit::setDouble0(double val) {mDouble0 = val;}
00131 inline void StRnDHit::setDouble1(double val) {mDouble1 = val;}
00132 inline void StRnDHit::setDouble2(double val) {mDouble2 = val;}
00133 inline void StRnDHit::setDouble3(double val) {mDouble3 = val;}
00134 inline void StRnDHit::setDouble4(double val) {mDouble4 = val;}
00135
00136 #endif