PndMvdPixelClusterFinder.h Simple cluster finder for pixel detectors.
It takes the first hit in the DigiArray and moves it into a new cluster. Then it looks through the remaining hits in the DigiArray if there are hits which are in the area around the first hit and moves them into the cluster. The radius is given by the first parameter. Then it takes the new hits in the cluster and looks if there are other hits which are in the range of these hits and moves them into the cluster, too. This process is repeated until no hits around the cluster are found The the first hit of the remaining DigiHits is taken to create a new hit and the cluster search process is started again.
params: Number of columns in a front-end Number of rows in a front-end Range as Int_t at which a pixel belongs to a cluster or not params are taken from parameter database
Definition at line 24 of file PndMvdPixelClusterFinder.h.
std::vector< std::vector< Int_t > > PndMvdPixelClusterFinder::GetClusters |
( |
std::vector< PndSdsDigiPixel * > & |
hits | ) |
|
Main method which searches for the clusters. It returns a matrix of ints where a column corresponds to a cluster and an integer to a hit in the DigiArray
Definition at line 9 of file PndMvdPixelClusterFinder.cxx.
References i, IsInRange(), MoveHit(), and push_back().
Referenced by PndMQMvdPixelDigiProcessorBursts::ProcessData(), and PndMQFileSinkBursts::Run().
13 std::vector<Int_t> posHits;
14 for (UInt_t
i = 0;
i <
hits.size();
i++){
19 std::vector<std::vector<Int_t> > result;
20 Int_t sizeTempHits = posHits.size();
22 while (sizeTempHits != 0) {
23 std::vector<Int_t> tempInt;
24 tempInt.push_back(
MoveHit(&posHits, 0));
25 result.push_back(tempInt);
26 Int_t sizeResultI = (result.end() - 1)->size();
27 for (Int_t
i = 0;
i < sizeResultI;
i++) {
28 sizeTempHits = posHits.size();
29 for (Int_t j = 0; j < sizeTempHits; j++) {
30 if (
hits[(*(result.end() - 1))[
i]]->GetSensorID() ==
hits[posHits[j]]->GetSensorID()) {
36 sizeTempHits = posHits.size();
38 sizeResultI = (result.end() - 1)->size();
labels push_back("electron")
bool IsInRange(PndSdsDigiPixel *hit1, PndSdsDigiPixel *hit2) const
Int_t MoveHit(std::vector< Int_t > *hitVector, Int_t index) const