8 std::vector<Int_t> posHits;
9 for (UInt_t
i = 0;
i <
fHits.size();
i++) posHits.push_back(
i);
10 std::vector< std::vector< Int_t> > result;
11 Int_t sizeTempHits = posHits.size();
14 while (sizeTempHits != 0){
15 std::vector<Int_t> tempInt;
16 if (
fHits[posHits[0]].GetCharge() == 0){
18 std::cout <<
"Charge too low for pixel: " << std::endl;
19 fHits[posHits[0]].Print();
24 tempInt.push_back(
MoveHit(&posHits,0));
25 result.push_back(tempInt);
27 sizeTempHits = posHits.size();
28 for (Int_t j = 0; j < sizeTempHits; j++){
29 if (
fHits[posHits[j]].GetCharge() == 0){
32 std::cout <<
"Charge too low for pixel: " << std::endl;
33 fHits[posHits[0]].Print();
38 if (
fHits[(*(result.end()-1))[0]].GetSensorID() ==
fHits[posHits[j]].GetSensorID()){
43 std::cout <<
"Hit added to cluster: " << result.size()-1 << std::endl;
48 sizeTempHits = posHits.size();
60 if (index < (Int_t)hitVector->size()){
61 result = (*hitVector)[index];
62 hitVector->erase(hitVector->begin()+index);
void PrintResult(std::vector< std::vector< Int_t > > clusters)
bool IsInRange(PndSdsDigiPixel hit1, PndSdsDigiPixel hit2) const
Int_t GetIndex(int i=0) const
labels push_back("electron")
Int_t MoveHit(std::vector< Int_t > *hitVector, Int_t index) const
std::vector< std::vector< Int_t > > GetClusters(std::vector< PndSdsDigiPixel > hits)
std::vector< PndSdsDigiPixel > fHits
Data class to store the digi output of a pixel module.