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;
175 void loopOverSector(
const gsl::span<const Digit> eventSector,
const int sector);
179 loopOverSector(gsl::span(eventSector.data(), eventSector.size()), sector);
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);
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 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.