3 #include "StPxlDigiHit.h"
6 const double StPxlDigiHit::mFirstPixelX = (StPxlConsts::kPxlNumRowsPerSensor - 1) * StPxlConsts::kPixelSize / 2;
7 const double StPxlDigiHit::mFirstPixelZ = -(StPxlConsts::kPxlNumColumnsPerSensor - 1) * StPxlConsts::kPixelSize / 2;
10 StPxlDigiHit::StPxlDigiHit() :
StPxlHit()
16 StPxlDigiHit::StPxlDigiHit(
const double (&localPos)[3],
unsigned sector,
unsigned ladder,
unsigned sensor,
17 unsigned short idTruth) :
18 StPxlHit(localPos, sector, ladder, sensor, idTruth)
21 mMeanRow = -(mLocalPosition[0] - mFirstPixelX) / StPxlConsts::kPixelSize;
22 mMeanColumn = (mLocalPosition[2] - mFirstPixelZ) / StPxlConsts::kPixelSize;
27 StPxlDigiHit::StPxlDigiHit(
const StPxlCluster &cluster,
unsigned sector,
unsigned ladder,
unsigned sensor) :
28 StPxlHit(cluster.rowCenter(), cluster.columnCenter(), sector, ladder, sensor)
33 mLocalPosition[0] = mFirstPixelX - StPxlConsts::kPixelSize * mMeanRow;
34 mLocalPosition[1] = 0;
35 mLocalPosition[2] = mFirstPixelZ + StPxlConsts::kPixelSize * mMeanColumn;
39 StPxlDigiHit::StPxlDigiHit(
const double (&localPos)[3],
unsigned sector,
unsigned ladder,
unsigned sensor,
41 float charge,
unsigned char trackRefCount,
unsigned short idTruth,
unsigned short quality,
unsigned short id) :
42 StPxlHit(localPos, sector, ladder, sensor, position, error,
43 hwPosition, charge, trackRefCount, idTruth, quality, id)
46 mMeanRow = -(mLocalPosition[0] - mFirstPixelX) / StPxlConsts::kPixelSize;
47 mMeanColumn = (mLocalPosition[2] - mFirstPixelZ) / StPxlConsts::kPixelSize;
55 mLocalPosition[0] = mFirstPixelX - StPxlConsts::kPixelSize * mMeanRow;
63 mLocalPosition[2] = mFirstPixelZ + StPxlConsts::kPixelSize * mMeanColumn;
70 std::copy(coords, coords+3, mLocalPosition);
72 mMeanRow = -(mLocalPosition[0] - mFirstPixelX) / StPxlConsts::kPixelSize;
73 mMeanColumn = (mLocalPosition[2] - mFirstPixelZ) / StPxlConsts::kPixelSize;
void setMeanColumn(double val)
void setMeanRow(double val)
Int_t idTruth() const
for embedding, 0 as background, most frequent raw hit idTruth as idTruth of the cluster ...
Int_t nRawHits() const
number of raw hits
void setLocalPosition(const double(&coords)[3])