22#if !defined(GPUCA_STANDALONE)
38 if (numberOfKnots < 2) {
42 std::vector<int32_t> knots(numberOfKnots);
43 for (int32_t
i = 0;
i < numberOfKnots;
i++) {
46 recreate(nYdim, numberOfKnots, knots.data());
63 this->mYdim = (nYdim >= 0) ? nYdim : 0;
65 std::vector<int32_t> knotU;
68 std::vector<int32_t> tmp;
69 for (int32_t
i = 0;
i < numberOfKnots;
i++) {
70 tmp.push_back(inputKnots[
i]);
72 std::sort(tmp.begin(), tmp.end());
78 if (knotU.back() < u) {
82 if (knotU.back() < 1) {
87 this->mNumberOfKnots = knotU.size();
88 this->mUmax = knotU.back();
90 this->mXtoUscale = 1.;
93 int32_t parametersOffset = uToKnotMapOffset + (this->mUmax + 1) *
sizeof(int32_t);
94 int32_t bufferSize = parametersOffset;
95 if (this->mYdim > 0) {
96 parametersOffset = this->
alignSize(bufferSize, this->getParameterAlignmentBytes());
97 bufferSize = parametersOffset + this->getSizeOfParameters();
102 this->mUtoKnotMap =
reinterpret_cast<int32_t*
>(this->mFlatBufferPtr + uToKnotMapOffset);
103 this->mParameters =
reinterpret_cast<DataT*
>(this->mFlatBufferPtr + parametersOffset);
105 for (int32_t
i = 0;
i < this->getNumberOfParameters();
i++) {
106 this->mParameters[
i] = 0;
111 for (int32_t
i = 0;
i < this->mNumberOfKnots;
i++) {
115 for (int32_t
i = 0;
i < this->mNumberOfKnots - 1;
i++) {
116 s[
i].Li = 1. / (
s[
i + 1].u -
s[
i].u);
119 s[this->mNumberOfKnots - 1].Li = 0.;
123 int32_t* map = getUtoKnotMap();
125 const int32_t iKnotMax = this->mNumberOfKnots - 2;
133 for (int32_t u = 0, iKnot = 0; u <= this->mUmax; u++) {
134 if ((knotU[iKnot + 1] == u) && (iKnot < iKnotMax)) {
141template <
class DataT>
144 printf(
" Spline 1D: \n");
145 printf(
" mNumberOfKnots = %d \n", this->mNumberOfKnots);
146 printf(
" mUmax = %d\n", this->mUmax);
147 printf(
" mUtoKnotMap = %p \n", (
void*)this->mUtoKnotMap);
149 for (int32_t
i = 0;
i < this->mNumberOfKnots;
i++) {
150 printf(
"%d ", (int32_t)getKnot(
i).u);
155#if !defined(GPUCA_STANDALONE)
157template <
class DataT>
159 double xMin,
double xMax,
160 std::function<
void(
double x,
double f[])> F,
161 int32_t nAxiliaryDataPoints)
168template <
class DataT>
175template <
class DataT>
179 return FlatObject::readFromFile<Spline1DContainer<DataT, FlatObject>>(inpf,
name);
182template <
class DataT>
190template <
class DataT>
194 const char* oldFlatBufferPtr = obj.mFlatBufferPtr;
196 this->mYdim = obj.mYdim;
197 this->mNumberOfKnots = obj.mNumberOfKnots;
198 this->mUmax = obj.mUmax;
199 this->mXmin = obj.mXmin;
200 this->mXtoUscale = obj.mXtoUscale;
205template <
class DataT>
209 char* oldFlatBufferPtr = this->mFlatBufferPtr;
211 char* currFlatBufferPtr = this->mFlatBufferPtr;
212 this->mFlatBufferPtr = oldFlatBufferPtr;
213 setActualBufferAddress(currFlatBufferPtr);
216template <
class DataT>
217template <
class OtherFlatBase>
222 this->mYdim =
src.getYdimensions();
223 this->mNumberOfKnots =
src.getNumberOfKnots();
224 this->mUmax =
src.getUmax();
225 this->mXmin =
src.getXmin();
226 this->mXtoUscale =
src.getXtoUscale();
227 this->mFlatBufferSize =
src.getFlatBufferSize();
228 this->mUtoKnotMap =
nullptr;
229 this->mParameters =
nullptr;
232template <
class DataT>
235 this->mNumberOfKnots = 0;
239 this->mXtoUscale = 1.;
240 this->mUtoKnotMap =
nullptr;
241 this->mParameters =
nullptr;
245template <
class DataT>
252 this->mUtoKnotMap =
reinterpret_cast<int32_t*
>(this->mFlatBufferPtr + uToKnotMapOffset);
253 int32_t parametersOffset = uToKnotMapOffset + (this->mUmax + 1) *
sizeof(int32_t);
254 if (this->mYdim > 0) {
255 parametersOffset = this->
alignSize(parametersOffset, this->getParameterAlignmentBytes());
257 mParameters =
reinterpret_cast<DataT*
>(this->mFlatBufferPtr + parametersOffset);
260template <
class DataT>
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 s
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
Definition of Spline1DHelper class.
templateClassImp(o2::gpu::Spline1DContainer)
Definition of Spline1DSpec class.
void setFutureBufferAddress(char *futureFlatBufferPtr)
void destroy()
_______________ Utilities _______________________________________________
static T * relocatePointer(const char *oldBase, char *newBase, const T *ptr)
Relocates a pointer inside a buffer to the new buffer address.
void setActualBufferAddress(char *actualFlatBufferPtr)
_____________ Methods for moving the class with its external buffer to another location _____________...
static int32_t writeToFile(T &obj, TFile &outf, const char *name)
write a child class object to the file
void startConstruction()
_____________ Construction _________
void moveBufferTo(char *newBufferPtr)
void finishConstruction(int32_t flatBufferSize)
void cloneFromObject(const FlatObject &obj, char *newFlatBufferPtr)
void approximateFunction(Spline1DContainer< DataT, FlatObject > &spline, double xMin, double xMax, std::function< void(double x, double f[])> F, int32_t nAuxiliaryDataPoints=4)
Create best-fit spline parameters for a function F.
static int32_t test(const bool draw=0, const bool drawDataPoints=1)
Test the Spline1D class functionality.
GLuint const GLchar * name
size_t alignSize(size_t sizeBytes)
align size to given diven number of bytes
TCanvas * drawDataPoints(TMultiGraph *mg, double min, double max)