15#include "FairLogger.h"
22#include <TStopwatch.h>
33void Clusterer::Dig2Clu(gsl::span<const o2::hmpid::Digit>
digs, std::vector<o2::hmpid::Cluster>& clus,
float* pUserCut,
bool isUnfold)
49 int padChX = 0, padChY = 0,
module = 0;
50 std::vector<Pad> vPad;
51 std::vector<const Digit*> digVec;
54 for (
size_t iDig = 0; iDig <
digs.size(); iDig++) {
56 vPad.push_back({padChX, padChY,
module});
58 padMap(padChX, padChY) = iDig;
62 for (
size_t iDig = 0; iDig <
digs.size(); iDig++) {
64 if (vPad.at(iDig).m != iCh || (pUsedDig =
UseDig(vPad.at(iDig).x, vPad.at(iDig).y, padMap)) == -1) {
72 clu.
solve(&clus, pUserCut, isUnfold);
133 cx[cnt] = padChX - 1;
138 cx[cnt] = padChX + 1;
144 cy[cnt] = padChY - 1;
149 cy[cnt] = padChY + 1;
153 for (
int i = 0;
i < cnt;
i++) {
154 pDig =
UseDig(cx[
i], cy[
i], pDigMap);
170 int iDig = (
int)pPadMap(padX, padY);
171 pPadMap(padX, padY) = -1;
188 if (pDig->
getQ() > 4.) {
Definition of the HMPID cluster finder.
Definition of a container to keep Monte Carlo truth external to simulation objects.
HMPID cluster implementation.
void setDigits(std::vector< const o2::hmpid::Digit * > *v=nullptr)
void digAdd(const o2::hmpid::Digit *pDig)
int solve(std::vector< o2::hmpid::Cluster > *pCluLst, float *pSigmaCut, bool isUnfold)
static void Dig2Clu(gsl::span< const o2::hmpid::Digit > digs, std::vector< o2::hmpid::Cluster > &clus, float *pUserCut, bool isUnfold=kTRUE)
static int UseDig(int padX, int padY, TMatrixF &pDigMap)
static void FormClu(Cluster &pClu, int pDig, gsl::span< const o2::hmpid::Digit > digs, TMatrixF &pDigMap)
bool IsDigSurvive(Digit *pDig) const
static void pad2Absolute(uint32_t pad, int *Module, int *x, int *y)
std::vector< Digit > digs