14 #include "StarClassLibrary/StMemoryPool.hh"
15 #include "StEvent/StHit.h"
18 using namespace StIstConsts;
24 StIstHit(
unsigned char ladder = -1,
unsigned char sensor = -1,
float Charge = 0.,
float ChargeErr = 0.,
25 unsigned char maxTB = 0,
unsigned char nRawHits = 1,
unsigned char nRawHitsZ = 0,
26 unsigned char nRawHitsRPhi = 0);
28 unsigned char trackRefCount = 0);
30 StDetectorId detector()
const;
31 void setDetectorId(StDetectorId);
33 unsigned char getLadder()
const;
34 unsigned char getSensor()
const;
35 unsigned char getMaxTimeBin()
const;
36 float getChargeErr()
const;
37 unsigned char getNRawHits()
const;
38 unsigned char getNRawHitsZ()
const;
39 unsigned char getNRawHitsRPhi()
const;
40 float localPosition(
unsigned int )
const;
42 void setMaxTimeBin(
unsigned char tb);
43 void setChargeErr(
float chargeErr);
44 void setNRawHits(
unsigned char nRawHits);
45 void setNRawHitsZ(
unsigned char nRawHitsZ);
46 void setNRawHitsRPhi(
unsigned char nRawHitsRPhi);
47 void setLocalPosition(
float,
float,
float);
49 void*
operator new(
size_t sz,
void *p) {
return p; }
50 void*
operator new(size_t) {
return mPool.alloc(); }
51 void operator delete(
void* p) { mPool.free(p); }
59 Float_t mLocalPosition[3];
60 StDetectorId mDetectorId;
67 ostream &operator<<(ostream &,
const StIstHit &);
69 inline unsigned char StIstHit::getLadder()
const {
return 1 + (mHardwarePosition - 1) /
kIstNumSensorsPerLadder;};
70 inline unsigned char StIstHit::getSensor()
const {
return 1 + (mHardwarePosition - 1) %
kIstNumSensorsPerLadder;};
71 inline unsigned char StIstHit::getMaxTimeBin()
const {
return mMaxTimeBin; };
72 inline float StIstHit::getChargeErr()
const {
return mChargeErr; };
73 inline unsigned char StIstHit::getNRawHits()
const {
return mNRawHits; };
74 inline unsigned char StIstHit::getNRawHitsZ()
const {
return mNRawHitsZ; };
75 inline unsigned char StIstHit::getNRawHitsRPhi()
const {
return mNRawHitsRPhi; };
77 inline void StIstHit::setMaxTimeBin(
unsigned char tb) { mMaxTimeBin = tb; };
78 inline void StIstHit::setChargeErr(
float chargeErr) { mChargeErr = chargeErr; };
79 inline void StIstHit::setNRawHits(
unsigned char nRawHits) { mNRawHits = nRawHits; };
80 inline void StIstHit::setNRawHitsZ(
unsigned char nRawHitsZ) { mNRawHitsZ = nRawHitsZ; };
81 inline void StIstHit::setNRawHitsRPhi(
unsigned char nRawHitsRPhi) { mNRawHitsRPhi = nRawHitsRPhi; };
UChar_t mNRawHits
nRawHits: cluster size
UChar_t mNRawHitsZ
cluster size in Z direction
UChar_t mNRawHitsRPhi
cluster size in r-phi direction
Float_t mChargeErr
charge uncertainty
UChar_t mMaxTimeBin
max charge time bin
const int kIstNumSensorsPerLadder
6 sensor per one IST Ladder