24 static const char rcsid[] =
"$Id: StSstHit.cxx,v 2.2 2015/05/21 14:11:43 ullrich Exp $";
32 mLocalPosition[0] = 0;
33 mLocalPosition[1] = 0;
34 mLocalPosition[2] = 0;
40 unsigned int hw,
float q,
unsigned char c)
41 :
StHit(p, e, hw, q, c)
43 mLocalPosition[0] = 0;
44 mLocalPosition[1] = 0;
45 mLocalPosition[2] = 0;
49 StSstHit::~StSstHit() {}
52 StSstHit::ladder()
const
54 unsigned long numwaf = (mHardwarePosition>>4) & ~(~0UL<<9);
55 return (numwaf/mWaferPerLadder+1);
59 StSstHit::wafer()
const
61 unsigned long numwaf = (mHardwarePosition>>4) & ~(~0UL<<9);
62 return (numwaf-(numwaf/mWaferPerLadder)*mWaferPerLadder+1);
66 StSstHit::centralStripNSide()
const
72 StSstHit::centralStripPSide()
const
74 return (bits(23, 5)+bits(13,10)-15);
78 StSstHit::clusterSizeNSide()
const
84 StSstHit::clusterSizePSide()
const
90 StSstHit::localPosition(
unsigned int i)
const
93 return mLocalPosition[i];
99 StSstHit::setLocalPosition(
float u,
float v,
float w)
101 mLocalPosition[0] = u;
102 mLocalPosition[1] = v;
103 mLocalPosition[2] = w;
106 void StSstHit::setADC(
unsigned short adcp,
unsigned short adcn)
112 int StSstHit::getADC(
unsigned int i)
const
121 StSstHit::volumeID()
const {
return 10000 * sector() + 7000 + 100 * wafer() + ladder();}
123 ostream& operator<<(ostream& os,
const StSstHit& v)
125 return os << Form(
"Sst l:%2i w:%2i",v.ladder(), v.wafer())
127 << Form(
" Luv: %8.3f %8.3f %8.3f",v.localPosition(0),v.localPosition(1),v.localPosition(2));
130 void StSstHit::Print(
const Option_t *option)
const { cout << *
this << endl;}