14#ifndef ALICEO2_EMCAL_CLUSTERIZER_H
15#define ALICEO2_EMCAL_CLUSTERIZER_H
32constexpr unsigned int NROWS = (24 + 1) * (6 + 4);
33constexpr unsigned int NCOLS = 48 * 2 + 1;
45template <
class InputType>
53 cellWithE() : energy(0.),
row(0), column(0) {}
59 cellWithE(
float e,
int r,
int c) : energy(
e),
row(
r), column(
c) {}
67 bool operator<(cellWithE
const& rhs)
const
69 return energy < rhs.energy;
79 struct InputwithIndex {
93 Clusterizer(
double timeCut,
double timeMin,
double timeMax,
double gradientCut,
bool doEnergyGradientCut,
double thresholdSeedE,
double thresholdCellE);
104 mFoundClusters.clear();
105 mInputIndices.clear();
116 void initialize(
double timeCut,
double timeMin,
double timeMax,
double gradientCut,
bool doEnergyGradientCut,
double thresholdSeedE,
double thresholdCellE);
123 void findClusters(
const gsl::span<InputType const>& inputArray);
146 void getClusterFromNeighbours(std::vector<InputwithIndex>& clusterInputs,
int row,
int column);
152 void getTopologicalRowColumn(
const InputType& input,
int&
row,
int& column);
155 std::array<cellWithE, NROWS * NCOLS> mSeedList;
156 std::array<std::array<InputwithIndex, NCOLS>,
NROWS> mInputMap;
157 std::array<std::array<bool, NCOLS>,
NROWS> mCellMask;
159 std::vector<Cluster> mFoundClusters;
160 std::vector<ClusterIndex> mInputIndices;
166 bool mDoEnergyGradientCut;
167 double mThresholdSeedEnergy;
168 double mThresholdCellEnergy;
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 Number of events to Number of iterations to Number of iterations to Number of initial iterations excluded from const char e
Meta class for recursive clusterizer.
void initialize(double timeCut, double timeMin, double timeMax, double gradientCut, bool doEnergyGradientCut, double thresholdSeedE, double thresholdCellE)
Initialize class member vars if not done in constructor.
void findClusters(const gsl::span< InputType const > &inputArray)
Find clusters based on a give input collection.
void clear()
Clear internal buffers of found clusters and cell indices.
Clusterizer()
Default constructor.
const std::vector< Cluster > * getFoundClusters() const
Get list of found clusters.
Geometry * getGeometry()
Get pointer to geometry.
~Clusterizer()=default
Destructor.
const std::vector< ClusterIndex > * getFoundClustersInputIndices() const
Get list of found cell indices.
void setGeometry(Geometry *geometry)
Set EMCAL geometry.
EMCAL geometry definition.
constexpr unsigned int NCOLS
constexpr unsigned int NROWS
a couple of static helper functions to create timestamp values for CCDB queries or override obsolete ...