Creates a cluster from the neighbouring pixels, joining only two pixels with charge above m_chargeThreshold.
40{
41 std::list<const xAOD::AFPSiHit*> hitsAboveThreshold;
42
43
46 hitsAboveThreshold.push_back(theHit);
47
48 while (!hitsAboveThreshold.empty()) {
50 hitsAboveThreshold.pop_front();
51
53 float horizID = pixelHorizID;
57
58 const std::list<const xAOD::AFPSiHit*>::iterator neighbourEnd = hitsAboveThreshold.end();
59 std::list<const xAOD::AFPSiHit*>::iterator neighbourIter = hitsAboveThreshold.begin();
60 while (neighbourIter != neighbourEnd) {
62
65
68
70
71 hitsAboveThreshold.erase(neighbourIter);
72
73
74 AFPSiClusterBasicObj& theCluster = outputClusters.back();
78 theCluster.
hits().push_back(neighbour);
79 break;
80 }
81 ++neighbourIter;
82 }
83
84 }
85
86
87 return StatusCode::SUCCESS;
88}
double charge(const T &p)
void setCharge(const double charge)
std::list< const xAOD::AFPSiHit * > & hits()
list of pixels used to form the cluster
void setVertID(const float vertID)
void setHorizID(const float horizID)
static const int nearestNeighbour
Nearest neighbour algorithm.
float depositedCharge() const
Charge deposited in the pixel.
int pixelHorizID() const
Index of the pixel along X axis in LHC coordinate system.
int pixelVertID() const
Index of the pixel along Y axis in LHC coordinate system.