4 #include "FairLogger.h"
10 std::vector<Int_t> posHits;
11 for (UInt_t
i = 0;
i <
fHits.size();
i++) posHits.push_back(
i);
12 std::vector< std::vector< Int_t> > result;
13 Int_t sizeTempHits = posHits.size();
15 while (sizeTempHits != 0){
16 std::vector<Int_t> tempInt;
19 sizeTempHits = posHits.size();
22 tempInt.push_back(
MoveHit(&posHits,0));
23 result.push_back(tempInt);
24 Int_t sizeResultI = (result.end()-1)->size();
25 for (Int_t
i = 0;
i < sizeResultI;
i++){
26 sizeTempHits = posHits.size();
27 for (Int_t j = 0; j < sizeTempHits; j++){
31 std::cout <<
"Charge too low!" << std::endl;
35 if (
fHits[(*(result.end()-1))[
i]].GetSensorID() ==
fHits[posHits[j]].GetSensorID()){
40 std::cout <<
"Hit added to cluster: " << result.size()-1 << std::endl;
45 sizeTempHits = posHits.size();
47 sizeResultI = (result.end()-1)->size();
58 if (index < (Int_t)hitVector->size()){
59 result = (*hitVector)[index];
60 hitVector->erase(hitVector->begin()+index);
73 std::cout <<
" -I- PndSdsSimplePixelClusterFinder::IsInRange():"<<std::endl;
74 std::cout <<
"Hit1: ";
76 std::cout <<
"Hit2: ";
78 std::cout <<
"col1: " << col1 <<
" col2: " << col2 <<
" row1: " << row1 <<
" row2: " << row2 << std::endl;
79 std::cout <<
"col1 - col2: " << (col1-col2) <<
" row1 - row2 " << (row1-row2) << std::endl;
81 result1 = (col1-col2);
83 result2 = (row1-row2);
87 std::cout <<
"IsInRange result: " <<
TMath::Sqrt(result1) <<
" Radius " <<
fradius << std::endl;
Int_t GetPixelRow() const
void PrintResult(std::vector< std::vector< Int_t > > clusters)
static T Sqrt(const T &x)
Int_t GetPixelColumn() const
labels push_back("electron")
bool IsInRange(PndSdsDigiPixel hit1, PndSdsDigiPixel hit2) const
virtual Double_t DigiValueToCharge(Double_t digi)=0
Converts a given digitized charge into charge in electrons.
PndSdsChargeConversion * fChargeConverter
std::vector< std::vector< Int_t > > GetClusters(std::vector< PndSdsDigiPixel > hits)
std::vector< PndSdsDigiPixel > fHits
Int_t MoveHit(std::vector< Int_t > *hitVector, Int_t index) const
Data class to store the digi output of a pixel module.