Project
Loading...
Searching...
No Matches
SemiregularSpline2D3D.cxx
Go to the documentation of this file.
1// Copyright 2019-2020 CERN and copyright holders of ALICE O2.
2// See https://alice-o2.web.cern.ch/copyright for details of the copyright holders.
3// All rights not expressly granted are reserved.
4//
5// This software is distributed under the terms of the GNU General Public
6// License v3 (GPL Version 3), copied verbatim in the file "COPYING".
7//
8// In applying this license CERN does not waive the privileges and immunities
9// granted to it by virtue of its status as an Intergovernmental Organization
10// or submit itself to any jurisdiction.
11
17
19
20namespace o2
21{
22namespace gpu
23{
24
26 : FlatObject(),
27 mGridV(),
28 mNumberOfRows(0),
29 mNumberOfKnots(0),
30 mDataIndexMapOffset(0)
31{
33}
34
36{
37 mNumberOfRows = 0;
38 mDataIndexMapOffset = 0;
39 mNumberOfKnots = 0;
41}
42
43void SemiregularSpline2D3D::relocateBufferPointers(const char* oldBuffer, char* actualBuffer)
44{
46
47 /*char *bufferV = FlatObject::relocatePointer( oldBuffer, actualBuffer, mGridV.getFlatBufferPtr() );
48 mGridV.setActualBufferAddress( bufferV );*/
49
50 /*for( int32_t i=0; i<mNumberOfRows; i++) {
51 char *bufferUi = FlatObject::relocatePointer(oldBuffer, actualBuffer, mSplineArray[i].getFlatBufferPtr() );
52 mSplineArray[i].setActualBufferAddress( bufferUi );
53 }*/
54}
55
56void SemiregularSpline2D3D::cloneFromObject(const SemiregularSpline2D3D& obj, char* newFlatBufferPtr)
57{
59
60 FlatObject::cloneFromObject(obj, newFlatBufferPtr);
61 mNumberOfRows = obj.mNumberOfRows;
62 mNumberOfKnots = obj.mNumberOfKnots;
63 mGridV = obj.mGridV;
64 mDataIndexMapOffset = obj.mDataIndexMapOffset;
65}
66
67void SemiregularSpline2D3D::moveBufferTo(char* newFlatBufferPtr)
68{
70 const char* oldFlatBufferPtr = mFlatBufferPtr;
71 FlatObject::moveBufferTo(newFlatBufferPtr);
72 relocateBufferPointers(oldFlatBufferPtr, mFlatBufferPtr);
73}
74
75void SemiregularSpline2D3D::setActualBufferAddress(char* actualFlatBufferPtr)
76{
78 const char* oldFlatBufferPtr = mFlatBufferPtr;
79 FlatObject::setActualBufferAddress(actualFlatBufferPtr);
80 relocateBufferPointers(oldFlatBufferPtr, mFlatBufferPtr);
81}
82
83void SemiregularSpline2D3D::setFutureBufferAddress(char* futureFlatBufferPtr)
84{
86 /*const char* oldFlatBufferPtr = mFlatBufferPtr;
87
88 char *bufferV = relocatePointer( oldFlatBufferPtr, futureFlatBufferPtr, mGridV.getFlatBufferPtr() );
89 mGridV.setFutureBufferAddress( bufferV );*/
90
91 /*for( int32_t i=0; i<mNumberOfRows; i++ ) {
92 char *bufferUi = relocatePointer( oldFlatBufferPtr, futureFlatBufferPtr, mSplineArray[i].getFlatBufferPtr() );
93 mSplineArray[i].setFutureBufferAddress( bufferUi );
94 }*/
95
96 FlatObject::setFutureBufferAddress(futureFlatBufferPtr);
97}
98
99void SemiregularSpline2D3D::construct(const int32_t numberOfRowsInput, const int32_t numbersOfKnots[])
100{
105
106 int32_t numberOfRows = numberOfRowsInput;
107 if (numberOfRows < 5) {
108 numberOfRows = 5;
109 }
110
112
113 // construct regular grid for v
114 mGridV.construct(numberOfRows);
115
116 // For each x element numbersOfKnots may be a single RegularSpline1D with x knots.
117 // so first create the array
118 RegularSpline1D splineArray[numberOfRows];
119
120 // And construct them
121 for (int32_t i = 0; i < numberOfRowsInput; i++) {
122 splineArray[i].construct(numbersOfKnots[i]);
123 }
124 for (int32_t i = numberOfRowsInput; i < numberOfRows; i++) {
125 splineArray[i].construct(5);
126 }
127
128 // this is the space which is taken just by the RegularSpline1D's
129 mDataIndexMapOffset = numberOfRows * sizeof(RegularSpline1D);
130
131 // The buffer size is the size of the array
132 FlatObject::finishConstruction(mDataIndexMapOffset + numberOfRows * sizeof(int32_t));
133
134 // Array for the 1D-Splines inside the buffer
135 RegularSpline1D* bufferSplines = getSplineArrayNonConst();
136
137 // paste local splineArray to the buffer
138 for (int32_t i = 0; i < numberOfRows; i++) {
139 bufferSplines[i] = splineArray[i];
140 }
141
142 // Just calculating the total number of knots in this 2D3D spline.
143 int32_t numberOfKnots = 0;
144 for (int32_t i = 0; i < numberOfRows; i++) {
146 numberOfKnots += knotsU;
147 }
148
149 // save the numberOfRows and numberOfKnots
150 mNumberOfRows = numberOfRows;
151 mNumberOfKnots = numberOfKnots;
152
153 // map to save the starting data index for each v-coordinate
154 int32_t* dataIndexMap = getDataIndexMapNonConst();
155
156 // this will count the amount of u-knots "under" a v-coordinate
157 int32_t uSum = 0;
158
159 // count the amount of knots which are in gridU's lower than i
160 for (int32_t dv = 0; dv < mNumberOfRows; dv++) {
161 dataIndexMap[dv] = uSum;
162 uSum += numbersOfKnots[dv];
163 }
164}
165
166} // namespace gpu
167} // namespace o2
int32_t i
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 SemiregularSpline2D3D class.
void setFutureBufferAddress(char *futureFlatBufferPtr)
Definition FlatObject.h:569
void destroy()
_______________ Utilities _______________________________________________
Definition FlatObject.h:361
void setActualBufferAddress(char *actualFlatBufferPtr)
_____________ Methods for moving the class with its external buffer to another location _____________...
Definition FlatObject.h:559
void startConstruction()
_____________ Construction _________
Definition FlatObject.h:354
void moveBufferTo(char *newBufferPtr)
Definition FlatObject.h:408
void finishConstruction(int32_t flatBufferSize)
Definition FlatObject.h:370
void cloneFromObject(const FlatObject &obj, char *newFlatBufferPtr)
Definition FlatObject.h:385
void construct(int32_t numberOfKnots)
Constructor. Number of knots will be set to at least 5.
int32_t getNumberOfKnots() const
Get number of knots.
void setFutureBufferAddress(char *futureFlatBufferPtr)
void cloneFromObject(const SemiregularSpline2D3D &obj, char *newFlatBufferPtr)
Construction interface.
void construct(const int32_t numberOfRows, const int32_t numbersOfKnots[])
_______________ Construction interface ________________________
const RegularSpline1D & getGridU(const int32_t i) const
Get 1-D grid for V coordinate.
void setActualBufferAddress(char *actualFlatBufferPtr)
Moving the class with its external buffer to another location.
SemiregularSpline2D3D()
_____________ Constructors / destructors __________________________
void moveBufferTo(char *newBufferPtr)
a couple of static helper functions to create timestamp values for CCDB queries or override obsolete ...