Project
Loading...
Searching...
No Matches
TrackFinderOriginal.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_MCH_TRACKFINDERORIGINAL_H_
18#define O2_MCH_TRACKFINDERORIGINAL_H_
19
20#include <array>
21#include <chrono>
22#include <list>
23
24#include <gsl/span>
25
27#include "MCHBase/ErrorMap.h"
28#include "MCHTracking/Track.h"
30
31namespace o2
32{
33namespace mch
34{
35
38{
39 public:
42
47
48 void init();
49 void initField(float l3Current, float dipoleCurrent);
50
51 const std::list<Track>& findTracks(gsl::span<const Cluster> clusters);
52
54 ErrorMap& getErrorMap() { return mErrorMap; }
55
57 void debug(int debugLevel) { mDebugLevel = debugLevel; }
58
59 void printStats() const;
60 void printTimers() const;
61
62 private:
63 void findTrackCandidates();
64 void findMoreTrackCandidates();
65 std::list<Track>::iterator findTrackCandidates(int ch1, int ch2, bool skipUsedPairs = false);
66 bool areUsed(const Cluster& cl1, const Cluster& cl2);
67 void createTrack(const Cluster& cl1, const Cluster& cl2);
68 std::list<Track>::iterator addTrack(const std::list<Track>::iterator& pos, const Track& track);
69 bool isAcceptable(const TrackParam& param) const;
70 void removeDuplicateTracks();
71 void removeConnectedTracks(int stMin, int stMax);
72 void followTracks(const std::list<Track>::iterator& itTrackBegin, const std::list<Track>::iterator& itTrackEnd, int nextStation);
73 std::list<Track>::iterator followTrackInStation(const std::list<Track>::iterator& itTrack, int nextStation);
74 std::list<Track>::iterator followLinearTrackInChamber(const std::list<Track>::iterator& itTrack, int nextChamber);
75 bool tryOneClusterFast(const TrackParam& param, const Cluster& cluster);
76 double tryOneCluster(const TrackParam& param, const Cluster& cluster, TrackParam& paramAtCluster, bool updatePropagator);
77 void updateTrack(Track& track, TrackParam& trackParamAtCluster);
78 void updateTrack(Track& track, TrackParam& trackParamAtCluster1, TrackParam& trackParamAtCluster2);
79 std::list<Track>::iterator recoverTrack(std::list<Track>::iterator& itTrack, int nextStation);
80 bool completeTracks();
81 void improveTracks();
82 void refineTracks();
83 void finalize();
84 uint8_t requestedStationMask() const;
85 int getTrackIndex(const std::list<Track>::iterator& itCurrentTrack) const;
86 void printTracks() const;
87 void printTrackParam(const TrackParam& trackParam) const;
88 template <class... Args>
89 void print(Args... args) const;
90
92 static constexpr double SMaxNonBendingDistanceToTrack = 1.;
94 static constexpr double SMaxBendingDistanceToTrack = 1.;
95 static constexpr double SMinBendingMomentum = 0.8;
97 static constexpr double SDefaultChamberZ[10] = {-526.16, -545.24, -676.4, -695.4, -967.5,
98 -998.5, -1276.5, -1307.5, -1406.6, -1437.6};
100 static constexpr double SChamberThicknessInX0[10] = {0.065, 0.065, 0.075, 0.075, 0.035,
101 0.035, 0.035, 0.035, 0.035, 0.035};
102
103 TrackFitter mTrackFitter{};
104
105 std::array<std::list<const Cluster*>, 10> mClusters{};
106
107 std::list<Track> mTracks{};
108
109 ErrorMap mErrorMap{};
110
111 double mChamberResolutionX2 = 0.;
112 double mChamberResolutionY2 = 0.;
113 double mBendingVertexDispersion2 = 0.;
114 double mMaxChi2ForTracking = 0.;
115 double mMaxChi2ForImprovement = 0.;
116
117 double mMaxMCSAngle2[10]{};
118
119 int mDebugLevel = 0;
120
121 std::size_t mNCandidates = 0;
122 std::size_t mNCallTryOneCluster = 0;
123 std::size_t mNCallTryOneClusterFast = 0;
124
125 std::chrono::duration<double> mTimeFindCandidates{};
126 std::chrono::duration<double> mTimeFindMoreCandidates{};
127 std::chrono::duration<double> mTimeFollowTracks{};
128 std::chrono::duration<double> mTimeCompleteTracks{};
129 std::chrono::duration<double> mTimeImproveTracks{};
130 std::chrono::duration<double> mTimeCleanTracks{};
131 std::chrono::duration<double> mTimeRefineTracks{};
132};
133
134} // namespace mch
135} // namespace o2
136
137#endif // O2_MCH_TRACKFINDERORIGINAL_H_
Definition of the MCH cluster minimal structure.
Definition of the MCH track for internal use.
void print() const
Definition of a class to fit a track to a set of clusters.
uint16_t pos
Definition RawData.h:3
A container class to summarize errors encountered during processing.
Definition ErrorMap.h:38
Class to reconstruct tracks with the original algorithm.
void initField(float l3Current, float dipoleCurrent)
const std::list< Track > & findTracks(gsl::span< const Cluster > clusters)
void debug(int debugLevel)
set the debug level defining the verbosity
ErrorMap & getErrorMap()
return the counting of encountered errors
TrackFinderOriginal(TrackFinderOriginal &&)=delete
TrackFinderOriginal & operator=(const TrackFinderOriginal &)=delete
TrackFinderOriginal(const TrackFinderOriginal &)=delete
TrackFinderOriginal & operator=(TrackFinderOriginal &&)=delete
track parameters for internal use
Definition TrackParam.h:34
track for internal use
Definition Track.h:33
GLenum GLfloat param
Definition glcorearb.h:271
a couple of static helper functions to create timestamp values for CCDB queries or override obsolete ...
cluster minimal structure
Definition Cluster.h:31
std::vector< Cluster > clusters