13 #include "StarClassLibrary/StMemoryPool.hh"
14 #include "StEvent/StHit.h"
16 #include "StEvent/StFstConsts.h"
23 StFstHit(
unsigned char disk = -1,
unsigned char wedge = -1,
unsigned char sensor = -1,
unsigned char apv = -1,
float Charge = 0.,
float ChargeErr = 0.,
24 unsigned char maxTB = 0,
float meanRStrip = -1,
float meanPhiStrip = -1,
unsigned char nRawHits = 1,
unsigned char nRawHitsR = 0,
25 unsigned char nRawHitsPhi = 0);
27 unsigned char trackRefCount = 0);
29 StDetectorId detector()
const;
30 void setDetectorId(StDetectorId);
32 unsigned char getDisk()
const;
33 unsigned char getWedge()
const;
34 unsigned char getSensor()
const;
35 unsigned char getApv()
const;
36 unsigned char getMaxTimeBin()
const;
37 float getMeanPhiStrip()
const;
38 float getMeanRStrip()
const;
39 float getChargeErr()
const;
40 unsigned char getNRawHits()
const;
41 unsigned char getNRawHitsR()
const;
42 unsigned char getNRawHitsPhi()
const;
43 float localPosition(
unsigned int )
const;
45 void setDiskWedgeSensor(
unsigned char disk,
unsigned char wedge,
unsigned char sensor);
46 void setDisk(
unsigned char disk);
47 void setWedge(
unsigned char wedge);
48 void setSensor(
unsigned char sensor);
49 void setApv(
unsigned char apv);
50 void setMaxTimeBin(
unsigned char tb);
51 void setChargeErr(
float chargeErr);
52 void setMeanPhiStrip(
float meanPhiStrip);
53 void setMeanRStrip(
float meanRStrip);
54 void setNRawHits(
unsigned char nRawHits);
55 void setNRawHitsR(
unsigned char nRawHitsR);
56 void setNRawHitsPhi(
unsigned char nRawHitsPhi);
57 void setLocalPosition(
float,
float,
float);
59 void*
operator new(
size_t sz,
void *p) {
return p; }
60 void*
operator new(size_t) {
return mPool.alloc(); }
61 void operator delete(
void* p) { mPool.free(p); }
73 StDetectorId mDetectorId;
80 std::ostream &operator<<(std::ostream &,
const StFstHit &);
82 inline unsigned char StFstHit::getDisk()
const {
return 1 + (mHardwarePosition - 1) / kFstNumSensorsPerWedge / kFstNumWedgePerDisk;};
83 inline unsigned char StFstHit::getWedge()
const {
return 1 + (mHardwarePosition - 1) / kFstNumSensorsPerWedge;};
84 inline unsigned char StFstHit::getSensor()
const {
return (mHardwarePosition - 1) % kFstNumSensorsPerWedge;};
85 inline unsigned char StFstHit::getApv()
const {
return mApv; };
86 inline unsigned char StFstHit::getMaxTimeBin()
const {
return mMaxTimeBin; };
87 inline float StFstHit::getMeanPhiStrip()
const {
return mMeanPhiStrip; };
88 inline float StFstHit::getMeanRStrip()
const {
return mMeanRStrip; };
89 inline float StFstHit::getChargeErr()
const {
return mChargeErr; };
90 inline unsigned char StFstHit::getNRawHits()
const {
return mNRawHits; };
91 inline unsigned char StFstHit::getNRawHitsR()
const {
return mNRawHitsR; };
92 inline unsigned char StFstHit::getNRawHitsPhi()
const {
return mNRawHitsPhi; };
94 inline void StFstHit::setDiskWedgeSensor(
unsigned char disk,
unsigned char wedge,
unsigned char sensor) { setHardwarePosition(
95 (1+disk)*kFstNumWedgePerDisk * kFstNumSensorsPerWedge*0 + (1 + (wedge - 1)*kFstNumSensorsPerWedge + sensor) ); }
96 inline void StFstHit::setApv(
unsigned char apv) {
mApv = apv; };
97 inline void StFstHit::setMaxTimeBin(
unsigned char tb) {
mMaxTimeBin = tb; };
98 inline void StFstHit::setMeanPhiStrip(
float meanPhiStrip) {
mMeanPhiStrip = meanPhiStrip; };
99 inline void StFstHit::setMeanRStrip(
float meanRStrip) {
mMeanRStrip = meanRStrip; };
100 inline void StFstHit::setChargeErr(
float chargeErr) {
mChargeErr = chargeErr; };
101 inline void StFstHit::setNRawHits(
unsigned char nRawHits) {
mNRawHits = nRawHits; };
102 inline void StFstHit::setNRawHitsR(
unsigned char nRawHitsR) {
mNRawHitsR = nRawHitsR; };
103 inline void StFstHit::setNRawHitsPhi(
unsigned char nRawHitsPhi) {
mNRawHitsPhi = nRawHitsPhi; };
Float_t mMeanPhiStrip
Hit's mean phistrip.
Float_t mLocalPosition[3]
local position of hit inside the sensor
Float_t mMeanRStrip
Hit's mean rstrip.
Float_t mChargeErr
charge uncertainty
UChar_t mMaxTimeBin
max charge time bin
UChar_t mNRawHitsR
cluster size in Z direction
UChar_t mApv
Apv id the hit belongs to.
UChar_t mNRawHits
nRawHits: cluster size
UChar_t mNRawHitsPhi
cluster size in r-phi direction