16#ifndef O2_MFT_TRACKER_H_
17#define O2_MFT_TRACKER_H_
90 void runForwardInRoad();
92 void updateCellStatusInRoad();
96 Int_t nClsInLayer, binPrevIndex, clsMinIndex, clsMaxIndex, jClsLayer;
98 for (Int_t iLayer = 0; iLayer < constants::mft::LayersNumber; ++iLayer) {
104 [](
Cluster& c1,
Cluster& c2) { return c1.indexTableBin < c2.indexTableBin; });
110 for (jClsLayer = 1; jClsLayer < nClsInLayer; ++jClsLayer) {
115 clsMaxIndex = jClsLayer - 1;
117 mClusterBinIndexRange[iLayer][binPrevIndex] = std::pair<Int_t, Int_t>(clsMinIndex, clsMaxIndex);
120 clsMinIndex = jClsLayer;
124 clsMaxIndex = jClsLayer - 1;
132 for (Int_t iLayer = 0; iLayer < constants::mft::LayersNumber; ++iLayer) {
133 for (Int_t iBin = 0; iBin <=
mRPhiBins + 1; ++iBin) {
139 const Int_t isDiskFace(Int_t
layer)
const {
return (
layer % 2); }
141 void getBinClusterRange(
const ROframe<T>&,
const Int_t,
const Int_t, Int_t&, Int_t&)
const;
142 const Float_t getCellDeviation(
const Cell&,
const Cell&)
const;
143 const Bool_t getCellsConnect(
const Cell&,
const Cell&)
const;
144 void addCellToCurrentTrackCA(
const Int_t,
const Int_t, ROframe<T>&);
145 void addCellToCurrentRoad(ROframe<T>&,
const Int_t,
const Int_t,
const Int_t,
const Int_t, Int_t&);
149 std::vector<MCCompLabel> mTrackLabels;
150 std::unique_ptr<o2::mft::TrackFitter<T>> mTrackFitter =
nullptr;
152 Int_t mMaxCellLevel = 0;
157 struct TrackElement {
158 TrackElement() =
default;
159 TrackElement(Int_t la, Int_t
id)
178 Float_t dxSeed, dySeed, dzSeed, invdzSeed, dz, dR2, xSeed, ySeed;
179 dxSeed = cluster2.getX() - cluster1.getX();
180 dySeed = cluster2.getY() - cluster1.getY();
181 dzSeed = cluster2.getZ() - cluster1.getZ();
182 dz = cluster.getZ() - cluster1.getZ();
183 invdzSeed = dz / dzSeed;
184 xSeed = cluster1.getX() + dxSeed * invdzSeed;
185 ySeed = cluster1.getY() + dySeed * invdzSeed;
186 dR2 = (cluster.getX() - xSeed) * (cluster.getX() - xSeed) + (cluster.getY() - ySeed) * (cluster.getY() - ySeed);
192inline void Tracker<T>::getBinClusterRange(
const ROframe<T>&
event,
const Int_t
layer,
const Int_t bin, Int_t& clsMinIndex, Int_t& clsMaxIndex)
const
194 const auto& pair = getClusterBinIndexRange(
layer, bin);
195 clsMinIndex = pair.first;
196 clsMaxIndex = pair.second;
201inline const Float_t Tracker<T>::getCellDeviation(
const Cell& cell1,
const Cell& cell2)
const
203 Float_t cell1dx = cell1.getX2() - cell1.getX1();
204 Float_t cell1dy = cell1.getY2() - cell1.getY1();
205 Float_t cell1dz = cell1.getZ2() - cell1.getZ1();
207 Float_t cell2dx = cell2.getX2() - cell2.getX1();
208 Float_t cell2dy = cell2.getY2() - cell2.getY1();
209 Float_t cell2dz = cell2.getZ2() - cell2.getZ1();
211 Float_t cell1mod = std::sqrt(cell1dx * cell1dx + cell1dy * cell1dy + cell1dz * cell1dz);
212 Float_t cell2mod = std::sqrt(cell2dx * cell2dx + cell2dy * cell2dy + cell2dz * cell2dz);
214 Float_t cosAngle = (cell1dx * cell2dx + cell1dy * cell2dy + cell1dz * cell2dz) / (cell1mod * cell2mod);
215 if (std::abs(cosAngle) < o2::constants::math::Almost1) {
216 return std::acos(cosAngle);
218 return cosAngle > 0 ? 0. : -o2::constants::math::PI;
224inline const Bool_t Tracker<T>::getCellsConnect(
const Cell& cell1,
const Cell& cell2)
const
226 Float_t cell1x2 = cell1.getX2();
227 Float_t cell1y2 = cell1.getY2();
228 Float_t cell2x1 = cell2.getX1();
229 Float_t cell2y1 = cell2.getY1();
230 Float_t dx = cell1x2 - cell2x1;
231 Float_t dy = cell1y2 - cell2y1;
232 Float_t dr2 = dx * dx + dy * dy;
245 for (
auto& track :
tracks) {
246 MCCompLabel maxOccurrencesValue{-1, -1, -1,
false};
248 bool isFakeTrack{
false};
250 for (
int iCluster = 0; iCluster <
nClusters; ++iCluster) {
251 const MCCompLabel& currentLabel =
track.getMCCompLabels()[iCluster];
252 if (currentLabel == maxOccurrencesValue) {
259 maxOccurrencesValue = currentLabel;
265 for (
int iCluster = 0; iCluster <
nClusters; ++iCluster) {
266 if (
track.getMCCompLabels()[iCluster] == maxOccurrencesValue) {
272 if (labelratio < mTrueTrackMCThreshold) {
274 maxOccurrencesValue.setFakeFlag();
276 mTrackLabels.emplace_back(maxOccurrencesValue);
General auxilliary methods.
A simple structure for the MFT cluster, used by the standalone track finder.
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
Header of the General Run Parameters object.
Class to delimit start and end IR of certain time period.
Definition of a class to fit a track to a set of clusters.
std::vector< o2::its::TrackITS > tracks
Definition of a container to keep Monte Carlo truth external to simulation objects.
The main container for the standalone track finding within a read-out-frame.
HMPID cluster implementation.
std::vector< Cluster > & getClustersInLayer(Int_t layerId)
std::array< std::array< std::pair< Int_t, Int_t >, constants::index_table::MaxRPhiBins >, constants::mft::LayersNumber > mClusterBinIndexRange
bool mFullClusterScan
Special track finder for TED shots and cosmics, with full scan of the clusters.
Tracker(const Tracker &)=delete
void findLTFTracks(ROframe< T > &)
const Float_t getBz() const
void findCATracks(ROframe< T > &)
void findTracks(ROframe< T > &rofData)
Tracker & operator=(const Tracker &)=delete
void configure(const MFTTrackingParam &trkParam, int trackerID)
void computeTracksMClabels(const std::vector< T > &)
GLenum GLuint GLint GLint layer
const bool const int TrackITSInternal< NLayers > & track
constexpr Float_t Resolution
std::function< bool(const ROFRecord &)> ROFFilter
a couple of static helper functions to create timestamp values for CCDB queries or override obsolete ...
std::array< std::vector< ROFRecord >, NEvTypes > rofData