75#ifndef ALICEO2_TPC_KrBoxClusterFinder_H_
76#define ALICEO2_TPC_KrBoxClusterFinder_H_
110 static constexpr size_t MaxPads = 138;
111 static constexpr size_t MaxRows = 152;
112 size_t mMaxTimes = 114048;
124 void loadGainMapFromFile(
const std::string_view calDetFileName,
const std::string_view gainMapName =
"GainMap");
127 std::vector<std::tuple<int, int, int>>
findLocalMaxima(
bool directFilling =
true,
const int timeOffset = 0);
131 KrCluster buildCluster(
int clusterCenterPad,
int clusterCenterRow,
int clusterCenterTime,
bool directFilling =
false,
const int timeOffset = 0);
137 const std::vector<KrCluster>&
getClusters()
const {
return mClusters; }
158 void setMaxClusterSize(
int maxClusterSizeRowIROC,
int maxClusterSizeRowOROC1,
int maxClusterSizeRowOROC2,
int maxClusterSizeRowOROC3,
159 int maxClusterSizePadIROC,
int maxClusterSizePadOROC1,
int maxClusterSizePadOROC2,
int maxClusterSizePadOROC3,
160 int maxClusterSizeTime)
162 mMaxClusterSizeRowIROC = maxClusterSizeRowIROC;
163 mMaxClusterSizeRowOROC1 = maxClusterSizeRowOROC1;
164 mMaxClusterSizeRowOROC2 = maxClusterSizeRowOROC2;
165 mMaxClusterSizeRowOROC3 = maxClusterSizeRowOROC3;
167 mMaxClusterSizePadIROC = maxClusterSizePadIROC;
168 mMaxClusterSizePadOROC1 = maxClusterSizePadOROC1;
169 mMaxClusterSizePadOROC2 = maxClusterSizePadOROC2;
170 mMaxClusterSizePadOROC3 = maxClusterSizePadOROC3;
172 mMaxClusterSizeTime = maxClusterSizeTime;
186 int mMaxClusterSizeTime = 3;
187 int mMaxClusterSizeRow;
188 int mMaxClusterSizePad;
190 int mMaxClusterSizeRowIROC = 3;
191 int mMaxClusterSizeRowOROC1 = 2;
192 int mMaxClusterSizeRowOROC2 = 2;
193 int mMaxClusterSizeRowOROC3 = 1;
195 int mMaxClusterSizePadIROC = 5;
196 int mMaxClusterSizePadOROC1 = 3;
197 int mMaxClusterSizePadOROC2 = 3;
198 int mMaxClusterSizePadOROC3 = 3;
200 float mQThresholdMax = 30.0;
201 float mQThreshold = 1.0;
202 int mMinNumberOfNeighbours = 2;
204 float mCutMinSigmaTime{0};
205 float mCutMaxSigmaTime{1000};
206 float mCutMinSigmaPad{0};
207 float mCutMaxSigmaPad{1000};
208 float mCutMinSigmaRow{0};
209 float mCutMaxSigmaRow{1000};
210 float mCutMaxQtot{1e10};
211 float mCutQtot0{1e10};
212 float mCutQtotSizeSlope{0};
213 unsigned char mCutMaxSize{255};
214 bool mApplyCuts{
false};
217 std::unique_ptr<CalPad> mGainMap;
220 static constexpr size_t MaxRowsIROC = 63;
221 static constexpr size_t MaxRowsOROC1 = 34;
222 static constexpr size_t MaxRowsOROC2 = 30;
223 static constexpr size_t MaxRowsOROC3 = 25;
227 std::vector<o2::tpc::KrCluster> mClusters;
232 KrCluster mTempCluster;
234 using TimeSliceSector = std::array<std::array<float, MaxPads>, MaxRows>;
240 size_t mFirstDigit = 0;
260 std::deque<TimeSliceSector> mSetOfTimeSlices{};
263 struct ThresholdInfo {
264 bool digitAboveThreshold{};
265 std::array<bool, MaxRows> rowAboveThreshold{};
268 std::deque<ThresholdInfo> mThresholdInfo{};
270 void createInitialMap(
const gsl::span<const Digit> eventSector);
271 void popFirstTimeSliceFromMap()
273 mSetOfTimeSlices.pop_front();
274 mThresholdInfo.pop_front();
276 void fillADCValueInLastSlice(
int cru,
int rowInSector,
int padInRow,
float adcValue);
277 void addTimeSlice(
const gsl::span<const Digit> eventSector,
const int timeSlice);
283 void updateTempCluster(
float tempCharge,
int tempPad,
int tempRow,
int tempTime);
285 void updateTempClusterFinal(
const int timeOffset = 0);
288 int signnum(
int val) {
return (0 <
val) - (
val < 0); }
291 bool acceptCluster(
const KrCluster& cl);
configStandalone Light OpenGL display display_light Apply smoothing to points Enable Z buffer Highlight links Highlight seeds Highlight sector tracks Highlight final tracks Show individual sector
Parameter class for the Kr box cluster finder.
void loopOverSector(const std::vector< Digit > &eventSector, const int sector)
KrBoxClusterFinder()=default
void resetClusters()
reset cluster vector
void loadGainMapFromFile(const std::string_view calDetFileName, const std::string_view gainMapName="GainMap")
KrBoxClusterFinder(int sector)
void init()
initialize the parameters from KrBoxClusterFinderParam
void setMaxTimes(int maxTimes)
Set Function for minimal charge required for maxCharge of a cluster.
void setMinNumberOfNeighbours(int minNumberOfNeighbours)
Set Function for minimum number of direct neighbours required.
void setSector(int sector)
set sector of this instance
std::vector< KrCluster > & getClusters()
void loopOverSector(const gsl::span< const Digit > eventSector, const int sector)
std::vector< std::tuple< int, int, int > > findLocalMaxima(bool directFilling=true, const int timeOffset=0)
After the map is created, we look for local maxima with this function:
void setMinQTreshold(int minQThreshold)
Set Function for minimal charge required for maxCharge of a cluster.
int getSector() const
ger sector of this instance
KrCluster buildCluster(int clusterCenterPad, int clusterCenterRow, int clusterCenterTime, bool directFilling=false, const int timeOffset=0)
void setMaxClusterSize(int maxClusterSizeRowIROC, int maxClusterSizeRowOROC1, int maxClusterSizeRowOROC2, int maxClusterSizeRowOROC3, int maxClusterSizePadIROC, int maxClusterSizePadOROC1, int maxClusterSizePadOROC2, int maxClusterSizePadOROC3, int maxClusterSizeTime)
Set Function for maximal cluster sizes in different ROCs.
const std::vector< KrCluster > & getClusters() const
static Mapper & instance(const std::string mappingDir="")
a couple of static helper functions to create timestamp values for CCDB queries or override obsolete ...