Project
Loading...
Searching...
No Matches
TrackTPC.h
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
12#ifndef ALICEO2_TPC_TRACKTPC
13#define ALICEO2_TPC_TRACKTPC
14
15#include "GPUCommonDef.h"
20
21namespace o2
22{
23namespace tpc
24{
27
29
31{
33
34 public:
35 enum Flags : unsigned short {
36 HasASideClusters = 0x1 << 0,
37 HasCSideClusters = 0x1 << 1,
38 HasBothSidesClusters = HasASideClusters | HasCSideClusters, // track has clusters on both sides
39 FullMask = 0xffff
40 };
41
42 using o2::track::TrackParCov::TrackParCov; // inherit
43
45 GPUdDefault() TrackTPC() = default;
46
48 GPUdDefault() ~TrackTPC() = default;
49
50 GPUd() unsigned short getFlags() const { return mFlags; }
51 GPUd() unsigned short getClustersSideInfo() const { return mFlags & HasBothSidesClusters; }
52 GPUd() bool hasASideClusters() const { return mFlags & HasASideClusters; }
53 GPUd() bool hasCSideClusters() const { return mFlags & HasCSideClusters; }
54 GPUd() bool hasBothSidesClusters() const { return (mFlags & (HasASideClusters | HasCSideClusters)) == (HasASideClusters | HasCSideClusters); }
55 GPUd() bool hasASideClustersOnly() const { return (mFlags & HasBothSidesClusters) == HasASideClusters; }
56 GPUd() bool hasCSideClustersOnly() const { return (mFlags & HasBothSidesClusters) == HasCSideClusters; }
57
58 GPUd() void setHasASideClusters() { mFlags |= HasASideClusters; }
59 GPUd() void setHasCSideClusters() { mFlags |= HasCSideClusters; }
60
61 GPUd() float getTime0() const { return mTime0; }
62 GPUd() float getDeltaTBwd() const { return mDeltaTBwd; }
63 GPUd() float getDeltaTFwd() const { return mDeltaTFwd; }
64 GPUd() void setDeltaTBwd(float t) { mDeltaTBwd = t; }
65 GPUd() void setDeltaTFwd(float t) { mDeltaTFwd = t; }
66
67 GPUd() float getChi2() const { return mChi2; }
68 GPUd() const o2::track::TrackParCov& getOuterParam() const { return mOuterParam; }
69 GPUd() const o2::track::TrackParCov& getParamOut() const { return mOuterParam; } // to have method with same name as other tracks
70 GPUd() o2::track::TrackParCov& getParamOut() { return mOuterParam; } // to have method with same name as other tracks
71 GPUd() void setTime0(float v) { mTime0 = v; }
72 GPUd() void setChi2(float v) { mChi2 = v; }
73 GPUd() void setOuterParam(o2::track::TrackParCov&& v) { mOuterParam = v; }
74 GPUd() void setParamOut(o2::track::TrackParCov&& v) { mOuterParam = v; } // to have method with same name as other tracks
75 GPUd() const ClusRef& getClusterRef() const { return mClustersReference; }
76 GPUd() void shiftFirstClusterRef(int dif) { mClustersReference.setFirstEntry(dif + mClustersReference.getFirstEntry()); }
77 GPUd() int getNClusters() const { return mClustersReference.getEntries(); }
78 GPUd() int getNClusterReferences() const { return getNClusters(); }
79 GPUd() void setClusterRef(uint32_t entry, uint16_t ncl) { mClustersReference.set(entry, ncl); }
80
81 template <class T>
82 GPUdi() static void getClusterReference(T& clinfo, int nCluster,
84 {
85 // data for given tracks starts at clinfo[ ref.getFirstEntry() ],
86 // 1st ref.getEntries() cluster indices are stored as uint32_t
87 // then sector indices as uint8_t, then row indices ar uin8_t
88
89 // const uint32_t* clIndArr = &clinfo[ ref.getFirstEntry() ];
90 const uint32_t* clIndArr = reinterpret_cast<const uint32_t*>(&clinfo[ref.getFirstEntry()]); // TODO remove this trick
92 const uint8_t* srIndexArr = reinterpret_cast<const uint8_t*>(clIndArr + ref.getEntries());
94 rowIndex = srIndexArr[nCluster + ref.getEntries()];
95 }
96
97 template <class T>
98 GPUdi() void getClusterReference(T& clinfo, int nCluster,
100 {
101 getClusterReference<T>(clinfo, nCluster, sectorIndex, rowIndex, clusterIndex, mClustersReference);
102 }
103
104 template <class T>
105 GPUdi() static const o2::tpc::ClusterNative& getCluster(T& clinfo, int nCluster,
107 {
109 getClusterReference<T>(clinfo, nCluster, sectorIndex, rowIndex, clusterIndex, ref);
110 return (clusters.clusters[sectorIndex][rowIndex][clusterIndex]);
111 }
112
113 template <class T>
114 GPUdi() const o2::tpc::ClusterNative& getCluster(T& clinfo, int nCluster,
116 {
117 return getCluster<T>(clinfo, nCluster, clusters, sectorIndex, rowIndex, mClustersReference);
118 }
119
120 template <class T>
121 GPUdi() const o2::tpc::ClusterNative& getCluster(T& clinfo, int nCluster,
123 {
125 return (getCluster<T>(clinfo, nCluster, clusters, sectorIndex, rowIndex));
126 }
127
128 GPUd() const dEdxInfo& getdEdx() const { return mdEdx; }
129 GPUd() void setdEdx(const dEdxInfo& v) { mdEdx = v; }
130
131 GPUd() const dEdxInfo& getdEdxAlt() const { return mdEdxAlt; }
132 GPUd() void setdEdxAlt(const dEdxInfo& v) { mdEdxAlt = v; }
133
134 private:
135 float mTime0 = 0.f;
136 float mDeltaTFwd = 0;
137 float mDeltaTBwd = 0;
138 short mFlags = 0;
139 float mChi2 = 0.f; // Chi2 of the track
140 o2::track::TrackParCov mOuterParam; // Track parameters at outer end of TPC.
141 dEdxInfo mdEdx; // dEdx Information
142 dEdxInfo mdEdxAlt; // dEdx alternative Information
143 ClusRef mClustersReference; // reference to externale cluster indices
144
145 ClassDefNV(TrackTPC, 5);
146};
147
148} // namespace tpc
149} // namespace o2
150
151#endif
Class of a TPC cluster in TPC-native coordinates (row, time)
Base track model for the Barrel, params only, w/o covariance.
unsigned short int uint16_t
unsigned int uint32_t
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
Class to refer to the 1st entry and N elements of some group in the continuous container.
o2::track::TrackParCov TrackParCov
Definition Recon.h:39
GPUd() void setClusterRef(uint32_t entry
GPUd() bool hasBothSidesClusters() const
Definition TrackTPC.h:54
GPUd() int getNClusters() const
Definition TrackTPC.h:77
GPUd() const o2
Definition TrackTPC.h:68
GPUd() void setDeltaTFwd(float t)
set max possible increment to getTimeVertex
Definition TrackTPC.h:65
GPUd() const dEdxInfo &getdEdxAlt() const
Definition TrackTPC.h:131
GPUd() void setHasASideClusters()
Definition TrackTPC.h:58
GPUd() unsigned short getClustersSideInfo() const
Definition TrackTPC.h:51
GPUdi() const o2
Definition TrackTPC.h:114
GPUdi() void getClusterReference(T &clinfo
GPUd() void setChi2(float v)
Definition TrackTPC.h:72
GPUd() bool hasCSideClustersOnly() const
Definition TrackTPC.h:56
GPUd() unsigned short getFlags() const
Definition TrackTPC.h:50
int uint8_t & sectorIndex
Definition TrackTPC.h:83
GPUd() void setOuterParam(o2
Definition TrackTPC.h:73
GPUd() bool hasASideClusters() const
Definition TrackTPC.h:52
GPUd() void shiftFirstClusterRef(int dif)
Definition TrackTPC.h:76
GPUd() const ClusRef &getClusterRef() const
Definition TrackTPC.h:75
GPUd() void setParamOut(o2
Definition TrackTPC.h:74
GPUd() float getTime0() const
Reference time of the track, i.e. t-bins of a primary track with eta=0.
Definition TrackTPC.h:61
const uint8_t * srIndexArr
Definition TrackTPC.h:92
GPUd() bool hasCSideClusters() const
Definition TrackTPC.h:53
@ HasCSideClusters
track has clusters on C side
Definition TrackTPC.h:37
@ HasASideClusters
track has clusters on A side
Definition TrackTPC.h:36
GPUd() float getDeltaTBwd() const
max possible decrement to getTimeVertex
Definition TrackTPC.h:62
GPUd() float getDeltaTFwd() const
max possible increment to getTimeVertex
Definition TrackTPC.h:63
GPUd() void setDeltaTBwd(float t)
set max possible decrement to getTimeVertex
Definition TrackTPC.h:64
GPUd() int getNClusterReferences() const
Definition TrackTPC.h:78
GPUd() void setTime0(float v)
Definition TrackTPC.h:71
GPUdDefault() TrackTPC()=default
Default constructor.
int uint8_t uint8_t uint32_t & clusterIndex
Definition TrackTPC.h:83
GPUd() void setdEdxAlt(const dEdxInfo &v)
Definition TrackTPC.h:132
GPUdi() static const o2
Definition TrackTPC.h:105
int uint8_t uint8_t & rowIndex
Definition TrackTPC.h:83
int uint8_t uint8_t uint32_t &clusterIndex const
Definition TrackTPC.h:100
GPUd() float getChi2() const
Definition TrackTPC.h:67
GPUd() bool hasASideClustersOnly() const
Definition TrackTPC.h:55
GPUd() void setHasCSideClusters()
Definition TrackTPC.h:59
GPUdi() static void getClusterReference(T &clinfo
const GLdouble * v
Definition glcorearb.h:832
typedef void(APIENTRYP PFNGLCULLFACEPROC)(GLenum mode)
GLint ref
Definition glcorearb.h:291
uint32_t TPCClRefElem
TrackParCovF TrackParCov
Definition Track.h:33
a couple of static helper functions to create timestamp values for CCDB queries or override obsolete ...
std::vector< Cluster > clusters