Project
Loading...
Searching...
No Matches
Tracker.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
16
17#ifndef O2_MID_TRACKER_H
18#define O2_MID_TRACKER_H
19
20#include <vector>
21#include <unordered_set>
22#include <gsl/gsl>
27
28namespace o2
29{
30namespace mid
31{
34{
35 public:
36 Tracker(const GeometryTransformer& geoTrans);
37
39 inline float getImpactParamCut() const { return mImpactParamCut; }
41 inline float getSigmaCut() const { return mSigmaCut; }
42
43 void process(gsl::span<const Cluster> clusters, bool accumulate = false);
44 void process(gsl::span<const Cluster> clusters, gsl::span<const ROFRecord> rofRecords);
45 bool init(bool keepAll = false);
46
48 const std::vector<Track>& getTracks() { return mTracks; }
49
51 const std::vector<Cluster>& getClusters() { return mClusters; }
52
54 const std::vector<ROFRecord>& getTrackROFRecords() { return mTrackROFRecords; }
55
57 const std::vector<ROFRecord>& getClusterROFRecords() { return mClusterROFRecords; }
58
59 private:
60 void processSide(bool isRight, bool isInward);
61 void tryAddTrack(const Track& track);
62 void followTrackKeepAll(Track& track, bool isRight, bool isInward);
63 bool findAllClusters(const Track& track, bool isRight, int chamber, int firstRPC, int lastRPC, int nextChamber,
64 std::unordered_set<int>& excludedClusters, bool excludeClusters);
65 void followTrackKeepBest(Track& track, bool isRight, bool isInward);
66 void findNextCluster(const Track& track, bool isRight, bool isInward, int chamber, int firstRPC, int lastRPC, Track& bestTrack) const;
67 int getFirstNeighbourRPC(int rpc) const;
68 int getLastNeighbourRPC(int rpc) const;
69 bool loadClusters(gsl::span<const Cluster>& clusters);
70 bool makeTrackSeed(Track& track, const Cluster& cl1, const Cluster& cl2) const;
71 void runKalmanFilter(Track& track, const Cluster& cluster) const;
72 bool tryOneCluster(const Track& track, int chamber, int clIdx, Track& newTrack) const;
73 void excludeUsedClusters(const Track& track, int ch1, int ch2, std::unordered_set<int>& excludedClusters) const;
74 bool skipOneChamber(Track& track) const;
75
76 static constexpr float SMT11Z = -1603.5;
77
78 float mImpactParamCut = 210.;
79 float mSigmaCut = 5.;
80 float mMaxChi2 = 50.;
81
82 std::vector<int> mClusterIndexes[72];
83 std::vector<Cluster> mClusters{};
84
85 std::vector<Track> mTracks{};
86 std::vector<ROFRecord> mTrackROFRecords{};
87 std::vector<ROFRecord> mClusterROFRecords{};
88 size_t mFirstTrackOffset{0};
89 size_t mTrackOffset{0};
90 int mNTracksStep1{0};
91
92 GeometryTransformer mTransformer{};
93
94 typedef void (Tracker::*TrackerMemFn)(Track&, bool, bool);
95 TrackerMemFn mFollowTrack{&Tracker::followTrackKeepAll};
96};
97} // namespace mid
98} // namespace o2
99
100#endif /* O2_MID_TRACKER_H */
Reconstructed MID cluster.
Reconstructed MID track.
Geometry transformer for MID.
Definition of the MID event record.
This class defines the MID track.
Definition Track.h:30
Tracking algorithm for MID.
Definition Tracker.h:34
const std::vector< ROFRecord > & getClusterROFRecords()
Gets the vector of cluster RO frame records.
Definition Tracker.h:57
bool init(bool keepAll=false)
Definition Tracker.cxx:38
const std::vector< Cluster > & getClusters()
Gets the array of associated clusters.
Definition Tracker.h:51
float getSigmaCut() const
Gets number of sigmas for cuts.
Definition Tracker.h:41
float getImpactParamCut() const
Gets the impact parameter cut.
Definition Tracker.h:39
const std::vector< Track > & getTracks()
Gets the array of reconstructes tracks.
Definition Tracker.h:48
const std::vector< ROFRecord > & getTrackROFRecords()
Gets the vector of tracks RO frame records.
Definition Tracker.h:54
typedef void(APIENTRYP PFNGLCULLFACEPROC)(GLenum mode)
o2::track::TrackParCov Track
std::vector< Cluster > clusters
a couple of static helper functions to create timestamp values for CCDB queries or override obsolete ...
cluster structure for MID
Definition Cluster.h:30