15#ifndef ALICEO2_TRK_CLUSTERER_H
16#define ALICEO2_TRK_CLUSTERER_H
20#define _ALLOW_DIAGONAL_TRK_CLUSTERS_
53 static_assert(
DetID == o2::detectors::DetID::TRK ||
DetID == o2::detectors::DetID::FT3,
"only TRK and FT3 clusterers are supported");
66 using GeometryTGeo = std::conditional_t<DetID == o2::detectors::DetID::TRK, o2::trk::GeometryTGeo, o2::ft3::GeometryTGeo>;
110 std::vector<std::pair<int, uint32_t>>
pixels;
125 void resetColumn(
int* buff)
const { std::memset(buff, -1,
sizeof(
int) * (
size - 2)); }
133 pixels.emplace_back(firstIndex, ip);
134 firstIndex =
pixels.size() - 1;
142 pixels.emplace_back(-1, ip);
158 std::vector<ClusterType>* clustersOut, std::vector<unsigned char>* patternsOut,
162 uint32_t totalCharge,
bool doLabels,
int nlab,
177 gsl::span<const DigROFRecord> digitROFs,
179 std::vector<unsigned char>& patterns,
180 std::vector<o2::trkft3::ROFRecord>& clusterROFs,
185 float yPlaneMLOT = 0.f) noexcept;
A const (ready only) version of MCTruthContainer.
unsigned short int uint16_t
Timeframe settings Average distance in cm of events merged into Randomize distance around average distance of merged events Simulate correct bunch interactions instead of placing only the average number of events A value[n] sets TFlen for[n] collisions in Number of bunches per trainsort Number of bunch trains Instantaneous interaction rate Do not simulate border Total number of collisions to be placed in the interior of all time Do not select random but walk over array of events in stride steps h Event generator settings h configStandalone Use CPU for GPU Force usage of the specified GPU device no CPU fallback Continue processing after an error First event to process
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::conditional_t< DetID==o2::detectors::DetID::TRK, o2::trk::GeometryTGeo, o2::ft3::GeometryTGeo > GeometryTGeo
The geometry that gives a chip's sub-detector and layer.
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
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