16#ifndef O2_ITS_TRACKING_TRACKHELPERS_H_
17#define O2_ITS_TRACKING_TRACKHELPERS_H_
40 return isBetter(
a.getNumberOfClusters(),
a.getChi2(),
b.getNumberOfClusters(),
b.getChi2());
57 static GPUhdi() int getEffectiveTrackLength(LayerMask hitLayerMask, LayerMask excludedLayerMask)
59 if (hitLayerMask.empty()) {
62 return hitLayerMask.length() - (LayerMask::span(hitLayerMask.first(), hitLayerMask.last()) & excludedLayerMask).
count();
65 static GPUhdi() LayerMask getEffectiveHoleMask(LayerMask hitLayerMask, LayerMask excludedLayerMask)
67 return hitLayerMask.holeMask() & ~excludedLayerMask;
72 const auto hitLayerMask =
seed.getHitLayerMask();
88 for (
int iLayer = minLayer + 1; iLayer <
maxLayer; ++iLayer) {
102 track.resetCovariance();
113 o2::gpu::CAMath::SinCos(tf3.alphaTrackingFrame, sa, ca);
114 const float sign =
reverse ? -1.f : 1.f;
115 const float x1 = (cluster1.xCoordinate * ca) + (cluster1.yCoordinate * sa);
116 const float y1 = (-cluster1.xCoordinate * sa) + (cluster1.yCoordinate * ca);
117 const float x2 = (cluster2.xCoordinate * ca) + (cluster2.yCoordinate * sa);
118 const float y2 = (-cluster2.xCoordinate * sa) + (cluster2.yCoordinate * ca);
119 const float x3 = tf3.xTrackingFrame;
120 const float y3 = tf3.positionTrackingFrame[0];
121 if (o2::gpu::CAMath::Abs(
bz) < 0.01f) {
122 const float dx = x3 -
x1;
123 const float dy = y3 -
y1;
124 snp = sign * dy / o2::gpu::CAMath::Hypot(dx, dy);
128 const float crv = math_utils::computeCurvature(x3, y3, x2, y2,
x1,
y1);
129 snp = sign * crv * (x3 - math_utils::computeCurvatureCentreX(x3, y3, x2, y2,
x1,
y1));
130 q2pt = sign * crv / (
bz * o2::constants::math::B2C);
133 const float tgl = -0.5f * sign * (math_utils::computeTanDipAngle(
x1,
y1, x2, y2, cluster1.zCoordinate, cluster2.zCoordinate) + math_utils::computeTanDipAngle(x2, y2, x3, y3, cluster2.zCoordinate, tf3.positionTrackingFrame[1]));
135 return {x3, tf3.alphaTrackingFrame, {y3, tf3.positionTrackingFrame[1], snp, tgl, q2pt}, {tf3.covarianceTrackingFrame[0], tf3.covarianceTrackingFrame[1], tf3.covarianceTrackingFrame[2], 0.f, 0.f,
o2::track::kCSnp2max, 0.f, 0.f, 0.f,
o2::track::kCTgl2max, 0.f, 0.f, 0.f, 0.f, sg2q2pt}};
138template <
int NLayers>
150 for (
int iL{0}; iL < NLayers; ++iL) {
151 const int idx =
seed.getCluster(iL);
160 if (ncl < reseedIfShorter && ncl > 2) {
166 temporaryTrack.paramIn = buildTrackSeed(cluster2GL, cluster1GL, cluster0TF,
bz,
true);
175template <
int NLayers>
189template <
int NLayers>
198 o2::track::TrackPar* linRef =
nullptr)
200 for (
int iLayer{
start}; iLayer !=
end; iLayer +=
step) {
201 const int clsIdx = trk.getClusterIndex(iLayer);
217 if (
ctx.matCorrType == o2::base::PropagatorF::MatCorrType::USEMatCorrNONE) {
232 if (
ctx.matCorrType == o2::base::PropagatorF::MatCorrType::USEMatCorrNONE) {
240 if ((
nCl >= 3 && predChi2 >
ctx.maxChi2ClusterAttachment) || predChi2 < 0.f) {
243 trk.setChi2(trk.getChi2() + predChi2);
247 if (linRef &&
ctx.shiftRefToCluster) {
257template <
int NLayers>
259 const TrackFitContext<NLayers>&
ctx,
260 const
float minPt = -1.
f)
265 bool fitSuccess = fitTrack(track, track.paramIn, 0,
ctx.nLayers, 1,
266 o2::constants::math::VeryBig, 0,
ctx, &linRef);
271 track.paramOut = track.paramIn;
272 linRef = track.paramOut;
275 fitSuccess = fitTrack(track, track.paramIn,
ctx.nLayers - 1, -1, -1,
276 50.f, 0,
ctx, &linRef);
280 if (minPt > 0.f &&
track.getPt() < minPt) {
283 if (
ctx.repeatRefitOut) {
286 float saveChi2 =
track.getChi2();
287 track.paramOut = saveInw;
290 fitSuccess = fitTrack(track,
track.paramOut, 0,
ctx.nLayers, 1,
291 o2::constants::math::VeryBig, 0,
ctx, &linRef);
295 track.paramIn = saveInw;
296 track.setChi2(saveChi2);
301template <
int NLayers>
302GPUdi()
bool refitTrackSeed(const TrackSeed<NLayers>& trackSeed,
304 const TrackFitContext<NLayers>&
ctx,
configStandalone Light OpenGL display display_light Apply smoothing to points Enable Z buffer Highlight links Highlight seeds Highlight sector tracks Highlight final tracks Show individual Show related Highlight grid Show only individual collision Color clusters belonging to track objects Set line Enable drawing TPC data Enable drawing TOF data Enable drawing magnetic field Set field line step count Invert colors configStandalone Heavy OpenGL display display_heavy Show tracks with ITS contribution Show tracks with TOF contribution Enable propagation of loopers Show clusters at nominal x of pad row for early transformed data Split CE tracks when they cross the central Mark clusters Mark adjacent clusters Hide rejected tracks Apply filter on tracks to be displayed Separate increase X h configStandalone Camera window renderer OpenGL display display_camera Orient the camera such that the y axis is always upwards Full Screen MultiSample Anti Downsampling Anti Enable Vertical Sync Target frame or if the backend cannot limit to the refresh Use OpenGL indirect draws to reduce number of draw calls Display h configStandalone Vulkan display display_vulkan Have uniform buffers in host accessible device memory h configStandalone Internal display display_internal Number of updates the Qt GUI may send ahead of the last one the display has before it waits for the display Opacity of the console background Number of console lines the history is shortened to this when it reaches twice the size Time in seconds an info message fades out after setInfoTime h OpenGL display display Font size Do not use Freetype for font auto
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 false
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
o2::track::TrackParCov TrackParCov
std::array< int, 64 > reverse(std::array< int, 64 > a)
Definition of the ITS track.
HMPID cluster implementation.
GLuint GLfloat GLfloat GLfloat GLfloat y1
GLuint GLfloat GLfloat GLfloat x1
GLboolean GLboolean GLboolean b
GLsizei GLsizei GLfloat distance
typedef void(APIENTRYP PFNGLCULLFACEPROC)(GLenum mode)
GLboolean GLboolean GLboolean GLboolean a
constexpr int UnusedIndex
constexpr float UnsetValue
o2::track::TrackParCov int int int float maxQoverPt
const TrackingFrameInfo *const * foundTrackingFrameInfo
resetTrackCovariance(temporaryTrack.paramIn)
const TrackingFrameInfo *const const Cluster *const * unsortedClusters
int const float * layerRadii
GPUhdi() bool isBetter(const int nClustersA
int const float const TrackSeed< NLayers > & seed
const float const int nClustersB
o2::track::TrackParCov int int int float int const TrackFitContext< NLayers > & ctx
o2::track::TrackParCov int int end
o2::track::TrackParCov int int int step
const TrackingFrameInfo *const const Cluster *const const float const float const int reseedIfShorter
const float const int const float chi2B
o2::track::TrackParCov int int int float int nCl
const TrackingFrameInfo *const const Cluster *const const float const float bz
GPUdi() int selectReseedMidLayer(int minLayer
const bool const int TrackITSInternal< NLayers > & track
a couple of static helper functions to create timestamp values for CCDB queries or override obsolete ...
o2::track::TrackParCov paramIn
std::array< float, 2 > positionTrackingFrame
std::array< float, 3 > covarianceTrackingFrame
o2::base::PropagatorF::MatCorrType matCorrType
const TrackingFrameInfo *const * tfInfos
float maxChi2ClusterAttachment
const o2::base::Propagator * propagator
LayerMask nonSeedingLayerMask
GPUhd() TrackSeedSelector(float maxQ2Pt
std::vector< Cluster > clusters