12#ifndef O2_ITS_CLUSTERLINES_H
13#define O2_ITS_CLUSTERLINES_H
39 for (
int i = 0;
i < 3; ++
i) {
42 const float norm = o2::gpu::GPUCommonMath::Sqrt(norm2);
43 for (
int i = 0;
i < 3; ++
i) {
54 float delta[3], proj = 0.f;
55 for (
int i = 0;
i < 3; ++
i) {
56 delta[
i] =
point[
i] - line.originPoint[
i];
57 proj += delta[
i] * line.cosinesDirector[
i];
60 for (
int i = 0;
i < 3; ++
i) {
61 const float residual = delta[
i] - proj * line.cosinesDirector[
i];
62 d2 += residual * residual;
70 float delta[3], proj = 0.f;
71 for (
int i = 0;
i < 3; ++
i) {
72 delta[
i] = line.originPoint[
i] -
point[
i];
73 proj += delta[
i] * line.cosinesDirector[
i];
76 for (
int i = 0;
i < 3; ++
i) {
77 r[
i] = delta[
i] - proj * line.cosinesDirector[
i];
83 out[1] = std::hypot(
r[0],
r[1]);
84 out[3] = std::hypot(
r[0],
r[2]);
85 out[4] = std::hypot(
r[1],
r[2]);
87 out[1] = o2::gpu::GPUCommonMath::Hypot(
r[0],
r[1]);
88 out[3] = o2::gpu::GPUCommonMath::Hypot(
r[0],
r[2]);
89 out[4] = o2::gpu::GPUCommonMath::Hypot(
r[1],
r[2]);
95 const float ux = line.cosinesDirector[0];
96 const float uy = line.cosinesDirector[1];
104 z = line.originPoint[2] +
s0 * line.cosinesDirector[2];
136 if (
par.propagateParamToDCA({beamX, beamY, 0.f},
bz)) {
154 const double d0 = line.cosinesDirector[0], d1 = line.cosinesDirector[1], d2 = line.cosinesDirector[2];
155 const double o0 = line.originPoint[0], o1 = line.originPoint[1],
o2 = line.originPoint[2];
156 const double det = d0 * d0 + d1 * d1 + d2 * d2;
160 mA[0] += (det - d0 * d0) / det;
161 mA[1] += (-d0 * d1) / det;
162 mA[2] += (-d0 * d2) / det;
163 mA[3] += (det - d1 * d1) / det;
164 mA[4] += (-d1 * d2) / det;
165 mA[5] += (det - d2 * d2) / det;
166 const double dDotO = d0 * o0 + d1 * o1 + d2 *
o2;
167 mB[0] += (d0 * dDotO - det * o0) / det;
168 mB[1] += (d1 * dDotO - det * o1) / det;
169 mB[2] += (d2 * dDotO - det *
o2) / det;
176 const double c00 =
mA[3] *
mA[5] -
mA[4] *
mA[4];
177 const double c01 =
mA[2] *
mA[4] -
mA[1] *
mA[5];
178 const double c02 =
mA[1] *
mA[4] -
mA[2] *
mA[3];
179 const double c11 =
mA[0] *
mA[5] -
mA[2] *
mA[2];
180 const double c12 =
mA[1] *
mA[2] -
mA[0] *
mA[4];
181 const double c22 =
mA[0] *
mA[3] -
mA[1] *
mA[1];
182 const double det =
mA[0] * c00 +
mA[1] * c01 +
mA[2] * c02;
183 if (o2::gpu::GPUCommonMath::Abs(det) < 1.e-12) {
186 const double invDet = 1. / det;
187 const double x0 = (c00 *
mB[0] + c01 *
mB[1] + c02 *
mB[2]) * invDet;
188 const double x1 = (c01 *
mB[0] + c11 *
mB[1] + c12 *
mB[2]) * invDet;
189 const double x2 = (c02 *
mB[0] + c12 *
mB[1] + c22 *
mB[2]) * invDet;
190 vertex[0] =
static_cast<float>(-
x0);
191 vertex[1] =
static_cast<float>(-
x1);
192 vertex[2] =
static_cast<float>(-x2);
205 GPUhdi()
float getR() const noexcept {
return o2::gpu::GPUCommonMath::Sqrt(getR2()); }
210 double mA[6] = {0., 0., 0., 0., 0., 0.};
211 double mB[3] = {0., 0., 0.};
213 float mRMS2[6] = {0.f, 0.f, 0.f, 0.f, 0.f, 0.f};
231 if (!LineFit::add(line)) {
253 for (
int i = 0;
i < 6; ++
i) {
268struct WarpFit :
public LineFit {
269 uint32_t tLo = 0, tHi = 0xffffffffu;
271 GPUdi()
void add(
const Line& l)
273 if (LineFit::add(l)) {
274 tLo = o2::gpu::GPUCommonMath::Max(tLo, l.mTime.lower());
275 tHi = o2::gpu::GPUCommonMath::Min(tHi, l.mTime.upper());
283 for (
int i = 0;
i < 6; ++
i) {
284 mA[
i] = warp_reduce_add<Width>(mA[
i]);
286 for (
int i = 0;
i < 3; ++
i) {
287 mB[
i] = warp_reduce_add<Width>(mB[
i]);
289 tLo = warp_reduce_max<Width>(tLo);
290 tHi = warp_reduce_min<Width>(tHi);
291 mNContributors = warp_reduce_add<Width>(mNContributors);
292 mTime = TimeEstBC{tLo, tHi - tLo};
298 Line::getDCAComponents(l,
vertex, dca);
299 for (
int i = 0;
i < 6; ++
i) {
300 rms2Sum[
i] += dca[
i];
302 dist2Sum += Line::getDistance2FromPoint(l,
vertex);
309 for (
int i = 0;
i < 6; ++
i) {
310 mRMS2[
i] = warp_reduce_add<Width>(rms2Sum[
i]) /
n;
312 mAvgDistance2 = warp_reduce_add<Width>(dist2Sum) /
n;
315 double rms2Sum[6] = {0., 0., 0., 0., 0., 0.};
316 double dist2Sum = 0.;
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 bool
configStandalone Reconstruction rec_tpc float
CellSeed: connections of three clusters.
Least-squares vertex fit over a set of lines (the normal equations AX = -B).
GPUhdDefault() ClusterLines()=default
GPUhdi() void addResidual(const Line &line)
Running-mean update of the RMS2 and average distance about the stored vertex.
bool operator==(const ClusterLines &rhs) const noexcept
GPUhdi() void addResidual(const Line &line
Running-mean update about an externally solved vertex.
Line::getDCAComponents(line, vertex, dca)
GPUhdi() float getR2() const noexcept
GPUhdi() int getNContributors() const noexcept
GPUhdi() const float *getRMS2() const noexcept
GPUhdi() bool solve(float vertex[3]) const
Solve the symmetric 3x3 system into vertex (= -A^-1 B); false if it is singular.
GPUhdi() const TimeEstBC &getTimeStamp() const noexcept
GPUhdi() bool add(const Line &line)
Accumulate one line.
GPUhdi() const float *getVertex() const noexcept
GPUhdi() float getAvgDistance2() const noexcept
GPUhdi() bool isValid() const noexcept
GPUhdi() float getR() const noexcept
GPUhdi() void computeClusterCentroid()
Solve into the stored vertex, setting the validity flag.
GPUhdi() int getSize() const noexcept
GLuint GLfloat GLfloat GLfloat x1
typedef void(APIENTRYP PFNGLCULLFACEPROC)(GLenum mode)
GLenum GLint GLint * precision
GLdouble GLdouble GLdouble z
GLuint GLfloat GLfloat GLfloat GLfloat GLfloat GLfloat s0
constexpr float Tolerance
const float const float const float const float curvatureScale
o2::track::TrackParametrization< float > par
std::array< float, 3 > dcaOrigin
const float const float beamY
const float const float const float bz
const float const float const float const float std::array< float, 3 > std::array< float, 3 > & direction
std::array< float, 3 > dcaDirection
const float const float const float const float std::array< float, 3 > & origin
a couple of static helper functions to create timestamp values for CCDB queries or override obsolete ...
bool isValid(std::string alias)
GPUhdi() bool isEmpty() const noexcept
bool operator==(const Line &) const =default
static float getDistance2FromPoint(const Line &line, const std::array< float, 3 > &point)
GPUhdi() static float getDistance2FromPoint(const Line &line
static float getDCA2(const Line &, const Line &, const float precision=constants::Tolerance)
static float getDCA(const Line &, const Line &, const float precision=constants::Tolerance)
GPUhdi() Line(const float origin[3]
GPUhdi() static void getDCAComponents(const Line &line
Packed symmetric DCA components in {XX, XY, YY, XZ, YZ, ZZ} order.
Line(const std::array< float, 3 > &origin, const std::array< float, 3 > &direction, const TimeEstBC &time)
GPUhdDefault() Line()=default
const float const TimeEstBC & time
static float getDistanceFromPoint(const Line &line, const std::array< float, 3 > &point)
const float const float beamY