15#ifndef ALICEO2_TRK_CLUSTERER_H
16#define ALICEO2_TRK_CLUSTERER_H
20#define _ALLOW_DIAGONAL_TRK_CLUSTERS_
47 static_assert(
DetID == o2::detectors::DetID::TRK ||
DetID == o2::detectors::DetID::FT3,
"only TRK and FT3 clusterers are supported");
102 std::vector<std::pair<int, uint32_t>>
pixels;
117 void resetColumn(
int* buff)
const { std::memset(buff, -1,
sizeof(
int) * (
size - 2)); }
125 pixels.emplace_back(firstIndex, ip);
126 firstIndex =
pixels.size() - 1;
134 pixels.emplace_back(-1, ip);
150 std::vector<ClusterType>* clustersOut, std::vector<unsigned char>* patternsOut,
154 uint32_t totalCharge,
bool doLabels,
int nlab,
155 uint16_t chipID,
int subDetID,
int layer);
169 gsl::span<const DigROFRecord> digitROFs,
171 std::vector<unsigned char>& patterns,
172 std::vector<o2::trkft3::ROFRecord>& clusterROFs,
177 float yPlaneMLOT = 0.f) noexcept;
A const (ready only) version of MCTruthContainer.
Definition of a container to keep Monte Carlo truth external to simulation objects.
Static class with identifiers, bitmasks and names for ALICE detectors.
static constexpr uint8_t MaxRowSpan
static constexpr uint8_t MaxColSpan
std::unique_ptr< ClustererThread > mThread
std::vector< int > mSortIdx
reusable per-ROF sort buffer
static constexpr int MaxLabels
static constexpr int MaxHugeClusWarn
static o2::math_utils::Point3D< float > getClusterLocalCoordinates(const ClusterType &cluster, const uint8_t *patt, float yPlaneMLOT=0.f) noexcept
virtual void process(gsl::span< const Digit > digits, gsl::span< const DigROFRecord > digitROFs, std::vector< ClusterType > &clusters, std::vector< unsigned char > &patterns, std::vector< o2::trkft3::ROFRecord > &clusterROFs, const ConstDigitTruth *digitLabels=nullptr, ClusterTruth *clusterLabels=nullptr)
GLint GLint GLsizei GLint GLenum GLenum const void * pixels
GLenum GLuint GLint GLint layer
a couple of static helper functions to create timestamp values for CCDB queries or override obsolete ...
bool isInside(uint16_t r, uint16_t c) const
void adjust(uint16_t r, uint16_t c)
bool isAcceptableSize() const
void updateChip(gsl::span< const Digit > digits, uint32_t ip)
void finishChip(gsl::span< const Digit > digits, const ConstDigitTruth *labelsDigPtr, ClusterTruth *labelsClusPtr, GeometryTGeo *geom)
void initChip(gsl::span< const Digit > digits, uint32_t first, GeometryTGeo *geom)
std::array< Label, MaxLabels > labelsBuff
MC label buffer for one cluster.
std::vector< std::pair< int, uint32_t > > pixels
int * prev
previous column pre-cluster indices
void addNewPreCluster(uint32_t ip, uint16_t row)
Clusterer< DetID > * parent
void finishChipSingleHitFast(gsl::span< const Digit > digits, uint32_t hit, const ConstDigitTruth *labelsDigPtr, ClusterTruth *labelsClusPtr, GeometryTGeo *geom)
std::vector< int > preClusterIndices
void processChip(gsl::span< const Digit > digits, int chipFirst, int chipN, std::vector< ClusterType > *clustersOut, std::vector< unsigned char > *patternsOut, const ConstDigitTruth *labelsDigPtr, ClusterTruth *labelsClusPtr, GeometryTGeo *geom)
std::vector< std::pair< uint16_t, uint16_t > > pixArrBuff
(row,col) pixel buffer for pattern
void swapColumnBuffers()
append pixel ip to the pre-cluster headed at preClusterIndex
ClustererThread(Clusterer< DetID > *par=nullptr)
void resetColumn(int *buff) const
swap current and previous column buffers
std::vector< int > preClusterHeads
ClustererThread(const ClustererThread &)=delete
std::vector< unsigned char > patterns
ClusterTruth labels
reset column buffer
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)
std::vector< ClusterType > clusters
void fetchMCLabels(uint32_t digID, const ConstDigitTruth *labelsDig, int &nfilled)
ClustererThread & operator=(const ClustererThread &)=delete
void expandPreCluster(uint32_t ip, uint16_t row, int preClusterIndex)
start a new pre-cluster with pixel ip at given row
int * curr
current column pre-cluster indices
std::vector< Cluster > clusters
std::vector< Digit > digits