Project
Loading...
Searching...
No Matches
TrackerConfig.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
15
16#ifndef ALICEO2_MFT_TRACKERCONFIG_H_
17#define ALICEO2_MFT_TRACKERCONFIG_H_
18
19#include <mutex>
22
23namespace o2
24{
25namespace mft
26{
27
28using namespace constants::mft;
29using BinContainer = std::array<std::array<std::array<std::vector<Int_t>, constants::index_table::MaxRPhiBins>, (constants::mft::LayersNumber - 1)>, (constants::mft::LayersNumber - 1)>;
30using RArray = std::array<Float_t, constants::mft::LayersNumber>;
31using PhiArray = std::array<Int_t, constants::mft::LayersNumber>;
32
34{
35 public:
36 TrackerConfig() = default;
37 TrackerConfig(const TrackerConfig& conf) = default;
38 TrackerConfig& operator=(const TrackerConfig& conf) = default;
39
40 void initialize(const MFTTrackingParam& trkParam);
41
42 const Int_t getRBinIndex(const Float_t r, const Int_t layer) const;
43 const Int_t getPhiBinIndex(const Float_t phi) const;
44 const Int_t getBinIndex(const Int_t rIndex, const Int_t phiIndex) const;
45
46 static void initBinContainers();
47
48 const std::pair<Int_t, Int_t>& getClusterBinIndexRange(Int_t layerId, Int_t bin) const { return mClusterBinIndexRange[layerId][bin]; }
49
50 protected:
51 // tracking configuration parameters
60 Int_t mRBins{};
61 Int_t mPhiBins{};
62 Int_t mRPhiBins{};
67 Bool_t mCAConeRadius{};
69 bool mFullClusterScan = false;
70 Float_t mTrueTrackMCThreshold{}; // Minimum fraction of correct MC labels to tag True tracks
71
72 static std::mutex sTCMutex;
73
76
80
81 static std::unique_ptr<BinContainer> mBins;
82 static std::unique_ptr<BinContainer> mBinsS;
84
86};
87
90
94inline std::unique_ptr<BinContainer> TrackerConfig::mBins;
95inline std::unique_ptr<BinContainer> TrackerConfig::mBinsS;
96
97inline const Int_t TrackerConfig::getRBinIndex(const Float_t r, const Int_t layer) const
98{
100}
101
102inline const Int_t TrackerConfig::getPhiBinIndex(const Float_t phi) const
103{
104 return (Int_t)((phi - constants::index_table::PhiMin) * mInversePhiBinSize);
105}
106
107inline const Int_t TrackerConfig::getBinIndex(const Int_t rIndex, const Int_t phiIndex) const
108{
109 if (0 <= rIndex && rIndex < mRBins && 0 <= phiIndex && phiIndex < mPhiBins) {
110 return (phiIndex * mRBins + rIndex);
111 }
112 return (mRBins * mPhiBins);
113}
114
115} // namespace mft
116} // namespace o2
117
118#endif
Some constants, fixed parameters and look-up-table functions.
std::array< std::array< std::pair< Int_t, Int_t >, constants::index_table::MaxRPhiBins >, constants::mft::LayersNumber > mClusterBinIndexRange
static std::unique_ptr< BinContainer > mBins
static std::unique_ptr< BinContainer > mBinsS
const Int_t getBinIndex(const Int_t rIndex, const Int_t phiIndex) const
void initialize(const MFTTrackingParam &trkParam)
bool mFullClusterScan
Special track finder for TED shots and cosmics, with full scan of the clusters.
const Int_t getPhiBinIndex(const Float_t phi) const
static RArray mRBinSize
static PhiArray mPhiBinWin
const Int_t getRBinIndex(const Float_t r, const Int_t layer) const
static RArray mInverseRBinSize
static Float_t mInversePhiBinSize
static void initBinContainers()
static std::mutex sTCMutex
static Float_t mPhiBinSize
ClassDefNV(TrackerConfig, 3)
TrackerConfig & operator=(const TrackerConfig &conf)=default
const std::pair< Int_t, Int_t > & getClusterBinIndexRange(Int_t layerId, Int_t bin) const
TrackerConfig(const TrackerConfig &conf)=default
GLenum GLuint GLint GLint layer
Definition glcorearb.h:1310
GLboolean r
Definition glcorearb.h:1233
constexpr std::array< Float_t, o2::mft::constants::mft::LayersNumber > RMin
Definition Constants.h:58
constexpr Int_t LayersNumber
Definition Constants.h:37
std::array< Float_t, constants::mft::LayersNumber > RArray
std::array< Int_t, constants::mft::LayersNumber > PhiArray
std::array< std::array< std::array< std::vector< Int_t >, constants::index_table::MaxRPhiBins >,(constants::mft::LayersNumber - 1)>,(constants::mft::LayersNumber - 1)> BinContainer
a couple of static helper functions to create timestamp values for CCDB queries or override obsolete ...