42 #include "StMemoryPool.hh"
49 StPxlHit(
const double localPos[3],
unsigned int sector,
unsigned int ladder,
51 unsigned int hwPosition,
float charge,
unsigned char trackRefCount = 0,
52 unsigned short idTruth=0,
unsigned short quality=0,
unsigned short id=0);
53 StPxlHit(
const double localPos[3],
unsigned int sector,
unsigned int ladder,
54 unsigned int sensor,
unsigned short idTruth);
55 StPxlHit(
float meanRow,
float meanColumn,
unsigned int sector,
unsigned int ladder,
59 StDetectorId detector()
const;
61 unsigned int sector()
const;
62 unsigned int ladder()
const;
63 unsigned int sensor()
const;
64 float meanRow()
const;
65 float meanColumn()
const;
66 unsigned int nRawHits()
const;
67 unsigned int layer()
const ;
69 float localPosition(
unsigned int)
const;
70 const float* localPosition()
const;
71 void setLocalPosition(
float,
float,
float);
72 void setLocalY(
float y);
74 void setSector(
unsigned char);
75 void setLadder(
unsigned char);
76 void setSensor(
unsigned char);
77 void setDetectorId(StDetectorId);
78 void setMeanRow(
float);
79 void setMeanColumn(
float);
80 void setNRawHits(
unsigned char);
82 virtual bool isSortable()
const;
84 void*
operator new(
size_t sz,
void *p) {
return p;}
85 void*
operator new(size_t) {
return mPool.alloc(); }
86 void operator delete(
void* p) { mPool.free(p); }
97 Float_t mLocalPosition[3];
101 StDetectorId mDetectorId;
108 ostream& operator<<(ostream&,
const StPxlHit&);
110 inline unsigned int StPxlHit::sector()
const {
return mSector;}
111 inline unsigned int StPxlHit::ladder()
const {
return mLadder;}
112 inline unsigned int StPxlHit::sensor()
const {
return mSensor;}
113 inline float StPxlHit::meanRow()
const {
return mMeanRow;}
114 inline float StPxlHit::meanColumn()
const {
return mMeanColumn;}
115 inline unsigned int StPxlHit::nRawHits()
const {
return mNRawHits;}
116 inline unsigned int StPxlHit::layer()
const {
return (mLadder==1)? 1 : 2;}
117 inline const Float_t* StPxlHit::localPosition()
const {
return mLocalPosition; }
118 inline void StPxlHit::setLocalY(
float y) { mLocalPosition[1] = y; }
119 inline void StPxlHit::setSector(
unsigned char v) {mSector = v;}
120 inline void StPxlHit::setLadder(
unsigned char v) {mLadder = v;}
121 inline void StPxlHit::setSensor(
unsigned char v) {mSensor = v;}
122 inline void StPxlHit::setMeanRow(
float v) {mMeanRow = v;}
123 inline void StPxlHit::setMeanColumn(
float v) {mMeanColumn = v;}
124 inline void StPxlHit::setNRawHits(
unsigned char v) {mNRawHits = v;}
126 inline bool StPxlHit::isSortable()
const {
return true; }