15#ifndef ALICEO2_TRK_CLUSTERER_H
16#define ALICEO2_TRK_CLUSTERER_H
20#define _ALLOW_DIAGONAL_TRK_CLUSTERS_
98 std::vector<std::pair<int, uint32_t>>
pixels;
113 void resetColumn(
int* buff)
const { std::memset(buff, -1,
sizeof(
int) * (
size - 2)); }
121 pixels.emplace_back(firstIndex, ip);
122 firstIndex =
pixels.size() - 1;
130 pixels.emplace_back(-1, ip);
146 std::vector<Cluster>* clustersOut, std::vector<unsigned char>* patternsOut,
150 uint32_t totalCharge,
bool doLabels,
int nlab,
151 uint16_t chipID,
int subDetID,
int layer,
int disk);
165 gsl::span<const DigROFRecord> digitROFs,
166 std::vector<o2::trk::Cluster>&
clusters,
167 std::vector<unsigned char>& patterns,
168 std::vector<o2::trk::ROFRecord>& clusterROFs,
171 gsl::span<const DigMC2ROFRecord> digMC2ROFs = {},
172 std::vector<o2::trk::MC2ROFRecord>* clusterMC2ROFs =
nullptr);
176 std::unique_ptr<ClustererThread> mThread;
177 std::vector<int> mSortIdx;
A const (ready only) version of MCTruthContainer.
Definition of a container to keep Monte Carlo truth external to simulation objects.
static constexpr uint8_t MaxRowSpan
static constexpr uint8_t MaxColSpan
static constexpr int MaxLabels
static constexpr int MaxHugeClusWarn
GLint GLint GLsizei GLint GLenum GLenum const void * pixels
GLenum GLuint GLint GLint layer
void adjust(uint16_t r, uint16_t c)
bool isAcceptableSize() const
bool isInside(uint16_t r, uint16_t c) const
void resetColumn(int *buff) const
swap current and previous column buffers
std::vector< Cluster > clusters
void updateChip(gsl::span< const Digit > digits, uint32_t ip)
std::vector< std::pair< int, uint32_t > > pixels
int * curr
current column pre-cluster indices
void processChip(gsl::span< const Digit > digits, int chipFirst, int chipN, std::vector< Cluster > *clustersOut, std::vector< unsigned char > *patternsOut, const ConstDigitTruth *labelsDigPtr, ClusterTruth *labelsClusPtr, GeometryTGeo *geom)
std::vector< int > preClusterHeads
ClusterTruth labels
reset column buffer
int * prev
previous column pre-cluster indices
void finishChip(gsl::span< const Digit > digits, const ConstDigitTruth *labelsDigPtr, ClusterTruth *labelsClusPtr, GeometryTGeo *geom)
void finishChipSingleHitFast(gsl::span< const Digit > digits, uint32_t hit, const ConstDigitTruth *labelsDigPtr, ClusterTruth *labelsClusPtr, GeometryTGeo *geom)
void expandPreCluster(uint32_t ip, uint16_t row, int preClusterIndex)
start a new pre-cluster with pixel ip at given row
std::vector< unsigned char > patterns
ClustererThread(Clusterer *par=nullptr)
void addNewPreCluster(uint32_t ip, uint16_t row)
void streamCluster(const BBox &bbox, const std::vector< std::pair< uint16_t, uint16_t > > &pixbuf, uint32_t totalCharge, bool doLabels, int nlab, uint16_t chipID, int subDetID, int layer, int disk)
std::vector< std::pair< uint16_t, uint16_t > > pixArrBuff
(row,col) pixel buffer for pattern
ClustererThread & operator=(const ClustererThread &)=delete
void initChip(gsl::span< const Digit > digits, uint32_t first, GeometryTGeo *geom)
std::vector< int > preClusterIndices
ClustererThread(const ClustererThread &)=delete
void fetchMCLabels(uint32_t digID, const ConstDigitTruth *labelsDig, int &nfilled)
std::array< Label, MaxLabels > labelsBuff
MC label buffer for one cluster.
void swapColumnBuffers()
append pixel ip to the pre-cluster headed at preClusterIndex
std::vector< Cluster > clusters
std::vector< Digit > digits