218 DataT* Fparameters,
const double DataPointF[])
const
222 int32_t numberOfKnots[mXdimensions];
224 numberOfKnots[
i] = mHelpers[
i].getSpline().getNumberOfKnots();
227 int32_t numberOfDataPoints[mXdimensions];
229 numberOfDataPoints[
i] = mHelpers[
i].getNumberOfDataPoints();
234 numberOfAllKnots *= numberOfKnots[
i];
237 LOG(info) <<
"total number of knots: " << numberOfAllKnots <<
", ";
239 int32_t numberOfAllDataPoints = 1;
241 numberOfAllDataPoints *= numberOfDataPoints[
i];
248 int32_t numberOfParameterTypes = (
int32_t)(pow(2.0, mXdimensions));
253 std::unique_ptr<double[]> allParameters[numberOfParameterTypes];
254 for (
int32_t i = 0;
i < numberOfParameterTypes;
i++) {
255 allParameters[
i] = std::unique_ptr<double[]>(
new double[numberOfAllDataPoints * mFdimensions]);
258 for (
int32_t i = 0;
i < numberOfAllDataPoints;
i++) {
260 allParameters[0][
i * mFdimensions +
f] = DataPointF[
i * mFdimensions +
f];
262 int32_t p0indices[mXdimensions];
263 arraytopoints(
i, p0indices, numberOfDataPoints, mXdimensions);
266 if (!mHelpers[
j].getDataPoint(p0indices[
j]).isKnot) {
272 int32_t knotindices[mXdimensions];
275 knotindices[
j] = p0indices[
j] / ((numberOfDataPoints[
j] - 1) / (numberOfKnots[
j] - 1));
279 int32_t knotind = pointstoarray(knotindices, numberOfKnots, mXdimensions);
282 Fparameters[knotind * numberOfParameterTypes * mFdimensions +
f] = DataPointF[
i * mFdimensions +
f];
289 std::unique_ptr<double[]> dataPointF1D[mXdimensions];
291 dataPointF1D[
i] = std::unique_ptr<double[]>(
new double[numberOfDataPoints[
i] * mFdimensions]);
294 std::unique_ptr<DataT[]> par[mXdimensions];
295 std::unique_ptr<double[]> parD[mXdimensions];
298 par[
i] = std::unique_ptr<DataT[]>(
new DataT[numberOfKnots[
i] * mFdimensions * 2]);
299 parD[
i] = std::unique_ptr<double[]>(
new double[numberOfKnots[
i] * mFdimensions * 2]);
305 for (
int32_t p = 1; p < numberOfParameterTypes; p++) {
308 if (p % (
int32_t)(pow(2.0,
i)) == 0) {
317 int32_t nrOf1DSplines = (numberOfAllDataPoints / numberOfDataPoints[dimension]);
321 int32_t currentNumbers[mXdimensions - 1];
323 currentNumbers[
i] = numberOfDataPoints[
i];
325 for (
int32_t i = dimension;
i < mXdimensions - 1;
i++) {
326 currentNumbers[
i] = numberOfDataPoints[
i + 1];
329 for (
int32_t i = 0;
i < mXdimensions - 1;
i++) {
337 arraytopoints(
s,
indices, currentNumbers, mXdimensions - 1);
338 int32_t startpoint[mXdimensions];
342 startpoint[dimension] = 0;
343 for (
int32_t i = dimension + 1;
i < mXdimensions;
i++) {
347 int32_t startdatapoint = pointstoarray(startpoint, numberOfDataPoints, mXdimensions);
354 for (
int32_t i = 0;
i < numberOfDataPoints[dimension];
i++) {
356 dataPointF1D[dimension][
i * mFdimensions +
f] = allParameters[currentDataPointF][startdatapoint * mFdimensions + (
i *
distance +
f)];
359 mHelpers[dimension].approximateFunction(par[dimension].get(), dataPointF1D[dimension].get());
360 for (
int32_t i = 0;
i < numberOfKnots[dimension] * mFdimensions * 2;
i++) {
361 parD[dimension][
i] = par[dimension][
i];
365 int32_t redistributionindex[mXdimensions];
367 redistributionindex[
i] = startpoint[
i];
370 for (
int32_t i = 0;
i < numberOfKnots[dimension];
i++) {
371 redistributionindex[dimension] = mHelpers[dimension].getKnotDataPoint(
i);
372 int32_t finalposition = pointstoarray(redistributionindex, numberOfDataPoints, mXdimensions);
375 allParameters[p][finalposition * mFdimensions +
f] = par[dimension][2 *
i * mFdimensions + mFdimensions +
f];
380 if (!mHelpers[
j].getDataPoint(redistributionindex[
j]).isKnot) {
387 int32_t knotindices[mXdimensions];
390 knotindices[
j] = redistributionindex[
j] / ((numberOfDataPoints[
j] - 1) / (numberOfKnots[
j] - 1));
394 int32_t knotind = pointstoarray(knotindices, numberOfKnots, mXdimensions);
396 Fparameters[knotind * numberOfParameterTypes * mFdimensions + p * mFdimensions +
f] = par[dimension][2 *
i * mFdimensions + mFdimensions +
f];
402 for (
int32_t i = 0;
i < numberOfDataPoints[dimension];
i++) {
403 redistributionindex[dimension] =
i;
406 if (!mHelpers[
j].getDataPoint(redistributionindex[
j]).isKnot) {
411 double splineF[mFdimensions];
412 double u = mHelpers[dimension].getDataPoint(
i).u;
413 mHelpers[dimension].getSpline().interpolateAtU(mFdimensions, parD[dimension].get(), u, splineF);
414 for (
int32_t dim = 0; dim < mFdimensions; dim++) {
416 allParameters[p - (
int32_t)(pow(2.0, dimension))][(
int32_t)(startdatapoint * mFdimensions +
i *
distance + dim)] = splineF[dim];
421 int32_t knotindices[mXdimensions];
424 knotindices[
j] = redistributionindex[
j] / ((numberOfDataPoints[
j] - 1) / (numberOfKnots[
j] - 1));
427 int32_t currentknotarrayindex = pointstoarray(knotindices, numberOfKnots, mXdimensions);
430 Fparameters[currentknotarrayindex * numberOfParameterTypes * mFdimensions + (p - (
int32_t)(pow(2.0, dimension))) * mFdimensions +
f] = splineF[
f];
453 int32_t nAxiliaryDatapoints[nDimX];
460 nAxiliaryDatapoints[
i] = 4;
464 const int32_t nTerms1D = 2 * (Fdegree + 1);
470 double Fcoeff[nFcoeff];
472 auto F = [&](
const double x[nDimX],
double f[nDimY]) {
479 double t = (
x[
d] - xMin[
d]) * TMath::Pi() / (xMax[
d] - xMin[
d]);
481 double c = (
i % 2) ? cos((
i / 2) *
t) : cos((
i / 2) *
t);
484 assert(nb <= nFcoeff);
494 for (
int32_t dim = 0; dim < nDimY; dim++) {
497 f[dim] +=
a[
i] * (*
c++);
502 auto F2D = [&](
double x1,
double x2,
double f[nDimY]) {
503 double x[2] = {
x1, x2};
507 for (
int32_t seed = 1; seed < 10; seed++) {
509 gRandom->SetSeed(seed);
513 Fcoeff[
i] = gRandom->Uniform(-1, 1);
519 knotsU[
i][
j] =
j * 4;
526 spline.approximateFunction(xMin, xMax, F, nAxiliaryDatapoints);
527 spline2D.approximateFunction(xMin[0], xMax[0], xMin[1], xMax[1],
528 F2D, nAxiliaryDatapoints[0], nAxiliaryDatapoints[0]);
548 spline.interpolate(xf,
s);
549 spline2D.interpolate(xf[0], xf[1], s2D);
551 for (
int32_t dim = 0; dim < nDimY; dim++) {
552 statDf += (
s[dim] -
f[dim]) * (
s[dim] -
f[dim]);
553 statDf2D += (s2D[dim] -
f[dim]) * (s2D[dim] -
f[dim]);
557 for (; dim < nDimX; dim++) {
559 if (
x[dim] <= xMax[dim]) {
569 LOG(info) <<
"\n std dev for SplineND : " << sqrt(statDf / statN);
570 LOG(info) <<
"\n std dev for Spline2D : " << sqrt(statDf2D / statN);
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