206 GPUError(
"Model has too many Solenoid parametrization regions to fit in the designated uniform");
210 const auto numberOfParameterizationDipole = chebMap->getNumberOfParametersDip();
213 GPUError(
"Model has too many Dipole parametrization regions to fit in the designated uniform");
220 Int_t numberOfDistinctDim1Segments;
221 Int_t numberOfDistinctDim2Segments;
222 Int_t numberOfDistinctDim3Segments;
223 Float_t* coordinatesSegmentsDim1;
224 Float_t* coordinatesSegmentsDim2;
225 Float_t* coordinatesSegmentsDim3;
226 Int_t* beginningOfSegmentsDim2;
227 Int_t* beginningOfSegmentsDim3;
228 Int_t* numberOfSegmentsDim2;
229 Int_t* numberOfSegmentsDim3;
234 delete[] coordinatesSegmentsDim1;
235 delete[] coordinatesSegmentsDim2;
236 delete[] coordinatesSegmentsDim3;
237 delete[] beginningOfSegmentsDim2;
238 delete[] beginningOfSegmentsDim3;
239 delete[] numberOfSegmentsDim2;
240 delete[] numberOfSegmentsDim3;
245 TableInfo solenoidTableInfo, dipoleTableInfo;
247 const auto parameterizationSolenoid = std::make_unique<TObjArray>();
249 for (
auto i = 0;
i < numberOfParameterizationSolenoid; ++
i) {
250 parameterizationSolenoid->Add(chebMap->getParameterSolenoid(
i));
253 chebMap->buildTable(numberOfParameterizationSolenoid, parameterizationSolenoid.get(), solenoidTableInfo.numberOfDistinctDim1Segments,
254 solenoidTableInfo.numberOfDistinctDim2Segments, solenoidTableInfo.numberOfDistinctDim3Segments, solenoidTableInfo.minZ, solenoidTableInfo.maxZ,
255 &solenoidTableInfo.coordinatesSegmentsDim1, &solenoidTableInfo.coordinatesSegmentsDim2, &solenoidTableInfo.coordinatesSegmentsDim3,
256 &solenoidTableInfo.beginningOfSegmentsDim2, &solenoidTableInfo.numberOfSegmentsDim2, &solenoidTableInfo.beginningOfSegmentsDim3,
257 &solenoidTableInfo.numberOfSegmentsDim3, &solenoidTableInfo.segmentId);
259 LOGF(info,
"Solenoid minZ: %f maxZ: %f", solenoidTableInfo.minZ, solenoidTableInfo.maxZ);
260 LOGF(info,
"Solenoid segment count: Z %d P %d R %d", solenoidTableInfo.numberOfDistinctDim1Segments, solenoidTableInfo.numberOfDistinctDim2Segments, solenoidTableInfo.numberOfDistinctDim3Segments);
262 const auto parameterizationDipole = std::make_unique<TObjArray>();
264 for (
auto i = 0;
i < numberOfParameterizationDipole; ++
i) {
265 parameterizationDipole->Add(chebMap->getParameterDipole(
i));
268 chebMap->buildTable(numberOfParameterizationDipole, parameterizationDipole.get(), dipoleTableInfo.numberOfDistinctDim1Segments,
269 dipoleTableInfo.numberOfDistinctDim2Segments, dipoleTableInfo.numberOfDistinctDim3Segments, dipoleTableInfo.minZ, dipoleTableInfo.maxZ,
270 &dipoleTableInfo.coordinatesSegmentsDim1, &dipoleTableInfo.coordinatesSegmentsDim2, &dipoleTableInfo.coordinatesSegmentsDim3,
271 &dipoleTableInfo.beginningOfSegmentsDim2, &dipoleTableInfo.numberOfSegmentsDim2, &dipoleTableInfo.beginningOfSegmentsDim3,
272 &dipoleTableInfo.numberOfSegmentsDim3, &dipoleTableInfo.segmentId);
274 LOGF(info,
"Dipole minZ: %f maxZ: %f", dipoleTableInfo.minZ, dipoleTableInfo.maxZ);
275 LOGF(info,
"Dipole segment count: Z %d Y %d X %d", dipoleTableInfo.numberOfDistinctDim1Segments, dipoleTableInfo.numberOfDistinctDim2Segments, dipoleTableInfo.numberOfDistinctDim3Segments);
277 const auto getParameterSolenoid = [chebMap](Int_t
i) {
return chebMap->getParameterSolenoid(
i); };
278 const auto getParameterDipole = [chebMap](Int_t
i) {
return chebMap->getParameterDipole(
i); };
280 auto countArraySizes = [](
int32_t numberOfParametrization,
auto& getParameter) {
281 int32_t TotalRows = 0, TotalColumns = 0, TotalCoefficients = 0;
282 UShort_t MaxChebyshevOrder = 0;
284 for (
auto i = 0;
i < numberOfParametrization; ++
i) {
285 const auto param = getParameter(
i);
288 const auto calc =
param->getChebyshevCalc(
j);
290 const auto NRows = calc->getNumberOfRows();
293 const auto colsAtRow = calc->getNumberOfColumnsAtRow();
296 const auto NCols = colsAtRow[
row];
297 TotalColumns += NCols;
299 const auto col0 = calc->getColAtRowBg()[
row];
302 const auto ncoffs = calc->getCoefficientBound2D0()[col0 +
col];
303 MaxChebyshevOrder = std::max(MaxChebyshevOrder, ncoffs);
307 TotalCoefficients += calc->getNumberOfCoefficients();
311 return std::make_tuple(TotalRows, TotalColumns, TotalCoefficients, MaxChebyshevOrder);
314 const auto [TotalRowsSolenoid, TotalColumnsSolenoid, TotalCoefficientsSolenoid, MaxChebyshevOrderSolenoid] = countArraySizes(numberOfParameterizationSolenoid, getParameterSolenoid);
315 const auto [TotalRowsDipole, TotalColumnsDipole, TotalCoefficientsDipole, MaxChebyshevOrderDipole] = countArraySizes(numberOfParameterizationDipole, getParameterDipole);
317 LOGF(info,
"Solenoid Params: %d Rows %d Columns %d Coefficients %d MaxChebOrder: %d", numberOfParameterizationSolenoid, TotalRowsSolenoid, TotalColumnsSolenoid, TotalCoefficientsSolenoid, MaxChebyshevOrderSolenoid);
318 LOGF(info,
"Dipole Params: %d Rows %d Columns %d Coefficients %d MaxChebOrder: %d", numberOfParameterizationDipole, TotalRowsDipole, TotalColumnsDipole, TotalCoefficientsDipole, MaxChebyshevOrderDipole);
325 reason =
"Solenoid Z segment";
328 reason =
"Solenoid P segment";
331 reason =
"Solenoid R segment";
334 reason =
"Dipole Z Segment";
337 reason =
"Dipole Y Segment";
340 reason =
"Dipole X Segment";
343 reason =
"Solenoid Rows";
346 reason =
"Solenoid Columns";
349 reason =
"Solenoid Coefficients";
352 reason =
"Dipole Rows";
355 reason =
"Dipole Columns";
358 reason =
"Dipole Coefficients";
359 }
else if (std::max(MaxChebyshevOrderSolenoid, MaxChebyshevOrderDipole) >
MAX_CHEBYSHEV_ORDER) {
361 reason =
"Chebyshev Polynomial order";
365 GPUError(
"Model has too large %s to fit in the designated uniform", reason);
370 std::copy(info.coordinatesSegmentsDim1, info.coordinatesSegmentsDim1 + info.numberOfDistinctDim1Segments,
segments.SegDim1);
372 std::copy(info.beginningOfSegmentsDim2, info.beginningOfSegmentsDim2 + info.numberOfDistinctDim1Segments,
segments.BegSegDim2);
373 std::copy(info.numberOfSegmentsDim2, info.numberOfSegmentsDim2 + info.numberOfDistinctDim1Segments,
segments.NSegDim2);
375 std::copy(info.coordinatesSegmentsDim2, info.coordinatesSegmentsDim2 + info.numberOfDistinctDim2Segments,
segments.SegDim2);
377 std::copy(info.beginningOfSegmentsDim3, info.beginningOfSegmentsDim3 + info.numberOfDistinctDim2Segments,
segments.BegSegDim3);
378 std::copy(info.numberOfSegmentsDim3, info.numberOfSegmentsDim3 + info.numberOfDistinctDim2Segments,
segments.NSegDim3);
379 std::copy(info.coordinatesSegmentsDim3, info.coordinatesSegmentsDim3 + info.numberOfDistinctDim3Segments,
segments.SegDim3);
381 std::copy(info.segmentId, info.segmentId + info.numberOfDistinctDim3Segments,
segments.SegID);
390 auto initParametrization = [](
int32_t numberOfParametrization,
auto& getParameter,
auto& parametrizationUniform) {
391 int32_t ColsAtRowOffset = 0, CofsAtRowOffset = 0, CofsAtColOffset = 0, Coeffs = 0;
393 for (
auto i = 0;
i < numberOfParametrization; ++
i) {
394 const auto param = getParameter(
i);
401 const auto calc =
param->getChebyshevCalc(
j);
403 const auto NRows = calc->getNumberOfRows();
405 parametrizationUniform->NRows[
i *
DIMENSIONS +
j] = NRows;
406 parametrizationUniform->ColsAtRowOffset[
i *
DIMENSIONS +
j] = ColsAtRowOffset;
407 parametrizationUniform->CofsAtRowOffset[
i *
DIMENSIONS +
j] = CofsAtRowOffset;
409 const auto colsAtRow = calc->getNumberOfColumnsAtRow();
412 const auto NCols = colsAtRow[
row];
413 parametrizationUniform->NColsAtRow[ColsAtRowOffset +
row] = NCols;
414 parametrizationUniform->CofsAtColOffset[ColsAtRowOffset +
row] = CofsAtColOffset;
416 const auto col0 = calc->getColAtRowBg()[
row];
419 const auto ncoffs = calc->getCoefficientBound2D0()[col0 +
col];
420 const auto offset = calc->getCoefficientBound2D1()[col0 +
col];
422 parametrizationUniform->NCofsAtCol[CofsAtColOffset +
col] = ncoffs;
423 parametrizationUniform->AtColCoefOffset[CofsAtColOffset +
col] =
offset;
425 CofsAtColOffset += NCols;
428 ColsAtRowOffset += NRows;
429 CofsAtRowOffset += calc->getNumberOfCoefficients();
431 std::copy(calc->getCoefficients(), calc->getCoefficients() + calc->getNumberOfCoefficients(), ¶metrizationUniform->Coeffs[Coeffs]);
433 Coeffs += calc->getNumberOfCoefficients();
437 return std::make_tuple(ColsAtRowOffset, CofsAtColOffset, Coeffs);
443 const auto [SRows, SCols, SCoeffs] = initParametrization(numberOfParameterizationSolenoid, getParameterSolenoid,
mSolenoidParameterization);
444 const auto [DRows, DCols, DCoeffs] = initParametrization(numberOfParameterizationDipole, getParameterDipole,
mDipoleParameterization);
446 assert(TotalRowsSolenoid == SRows);
447 assert(TotalColumnsSolenoid == SCols);
448 assert(TotalCoefficientsSolenoid == SCoeffs);
449 assert(TotalRowsDipole == DRows);
450 assert(TotalColumnsDipole == DCols);
451 assert(TotalCoefficientsDipole == DCoeffs);
461 mDipoleSegments->ZSegments = dipoleTableInfo.numberOfDistinctDim1Segments;
463 mSolSegDim1 = solenoidTableInfo.numberOfDistinctDim1Segments;
464 mSolSegDim2 = solenoidTableInfo.numberOfDistinctDim2Segments;
465 mSolSegDim3 = solenoidTableInfo.numberOfDistinctDim3Segments;
472 mDipSegDim1 = dipoleTableInfo.numberOfDistinctDim1Segments;
473 mDipSegDim2 = dipoleTableInfo.numberOfDistinctDim2Segments;
474 mDipSegDim3 = dipoleTableInfo.numberOfDistinctDim3Segments;
configStandalone Reconstruction rec_tpc multiplier for the combined cluster track error during track following area in cm for the search of for z only used if decrease removal by when above this local occupancy rowx Shift of TPC revert cluster flag edge bit distance to edge exceeds this ZOffset for secondary multiple of radius max P of electron K BB bands crossing max P of electron p BB bands crossing max P of electron d BB bands crossing max P of electron t BB bands crossing min accepted dEdxMaxTPC of the track Additive extra cluster error for Y2 if edge flag set Additive extra cluster error for Y2 if single set Additive extra cluster error for Y2 if or single set Additive extra cluster error for Z2 if or single set Extra errors to add to track when crossing depending on addErrorsCECrossing Inner portion of y range in sector that is not used in searching for extrapolated track candidates factor2YS for track merging factor2K for track merging Margin in cm of Y position when rejecting edge clusters based on uncorrected track Y Max fraction of shared clusters for tracklet Except pad from cluster finding if total number of charges in a fragment is above this Except pad from cluster finding if number of consecutive charges in a fragment is above this Threshold where a timebin is considered disabling the noisy pad check for that pad Treat signal above this minimum as saturated Smoothing factor for the exponential Highly Ionising Particle tail filter Number of timebins to use for the averaging Add additional custom track errors when crossing relative as fraction of Do N fit passes in final fit of< 0:reject at max -n hits") AddOptionRTC(rejectIFCLowRadiusCluster, uint8_t, 1, "", 0, "Reject clusters that get the IFC mask error during refit") AddOptionRTC(dEdxTruncLow, uint8_t, 2, "", 0, "Low truncation threshold, fraction of 128") AddOptionRTC(dEdxTruncHigh, uint8_t, 77, "", 0, "High truncation threshold, fraction of 128") AddOptionRTC(extrapolationTracking, int8_t, 1, "", 0, "Enable Extrapolation Tracking(prolong tracks to adjacent sectors to find short segments)") AddOptionRTC(disableRefitAttachment, uint8_t, 0, "", 0, "Bitmask to disable certain attachment steps during refit(1:attachment, 2:propagation, 4:loop following, 8:mirroring)") AddOptionRTC(rejectionStrategy, uint8_t, o2::gpu::GPUSettings::RejectionStrategyA, "", 0, "Enable rejection of TPC clusters for compression(0=no, 1=strategy A, 2=strategy B)") AddOptionRTC(mergeLoopersAfterburner, uint8_t, 1, "", 0, "Run afterburner for additional looper merging") AddOptionRTC(compressionTypeMask, uint8_t, o2::gpu::GPUSettings::CompressionFull, "", 0, "TPC Compression mode bits(1=truncate charge/width LSB, 2=differences, 4=track-model)") AddOptionRTC(compressionSortOrder, uint8_t, o2::gpu::GPUSettings::SortTime, "", 0, "Sort order of TPC compression(0=time, 1=pad, 2=Z-time-pad, 3=Z-pad-time, 4=no sorting(use incoming order))") AddOptionRTC(sigBitsCharge, uint8_t, 4, "", 0, "Number of significant bits for TPC cluster charge in compression mode 1") AddOptionRTC(sigBitsWidth, uint8_t, 3, "", 0, "Number of significant bits for TPC cluster width in compression mode 1") AddOptionRTC(dropLoopers, uint8_t, 0, "", 0, "Drop looping tracks starting from second loop") AddOptionRTC(mergerInterpolateErrors, uint8_t, 1, "", 0, "Use interpolation instead of extrapolation for chi2 based cluster rejection") AddOptionRTC(mergerInterpolateRejectAlsoOnCurrentPosition, uint8_t, 1, "", 0, "When using mergerInterpolateErrors, reject based on chi2 twice computed with interpolated and current track position starting from NDF > mergerNonInterpolateRejectMinNDF Merge tracks accross the central electrode Enable PID response Add sub threshold clusters in TPC dEdx computation OR mask of TPC flags that will reject the cluster in alternative dEdx Reject edge clusters based on uncorrected track Y during track fit Increase decrease removal by when on this number of pads from the edge h configStandalone Reconstruction rec_trd Max chi2 for TRD tracklets to be matched to a track Chi2 cut for strict matching mode Number of sigmas for ITS TPC track time error estimate Addition to search road around track prolongation along Y in cm Optimal tracklet rphi resolution in maximum chi2 per attached tracklet for TRD tracks take into account the full likelihood of the slope including exponential tails Tracks with less attached tracklets are discarded after the tracking Post trigger Pile up integration time in BCs fits all iterations but the last one in projections Use material lookup table for TPC refit Apply workarounds to avoid cyclic merge should not be needed tpc dyn configStandalone Processing proc_rtc Replace constant variables static by constexpr expressions Compile RTC in deterministic with NO_FAST_MATH flags and GPUCA_DETERMINISTIC_MODE define Use RTC to optimize GPU code h configStandalone Processing proc_rtctech Use a file lock to serialize access to the cache folder int32_t