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;
104 [](
Cluster& c1,
Cluster& c2) { return c1.indexTableBin < c2.indexTableBin; });
110 for (jClsLayer = 1; jClsLayer < nClsInLayer; ++jClsLayer) {
115 clsMaxIndex = jClsLayer - 1;
120 clsMinIndex = jClsLayer;
124 clsMaxIndex = jClsLayer - 1;
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);
216 return std::acos(cosAngle);
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};
249 auto nClusters = track.getNumberOfPoints();
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.
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.
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 > &)
bool fitTracks(ROframe< T > &)
GLenum GLuint GLint GLint layer
constexpr Int_t LayersNumber
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