Project
Loading...
Searching...
No Matches
LookUp.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
20
21#ifndef ALICEO2_ITS3_LOOKUP_H
22#define ALICEO2_ITS3_LOOKUP_H
23
26
27namespace o2::its3
28{
29class LookUp
30{
31 public:
32 LookUp() = default;
33 LookUp(std::string fileName);
34 static int groupFinder(int nRow, int nCol);
35 int findGroupID(int nRow, int nCol, const unsigned char patt[itsmft::ClusterPattern::MaxPatternBytes]) const;
36 int getTopologiesOverThreshold() const { return mTopologiesOverThreshold; }
37 void loadDictionary(std::string fileName);
38 void setDictionary(const TopologyDictionary* dict);
39 bool isGroup(int id) const { return mDictionary.isGroup(id); }
40 int size() const { return mDictionary.getSize(); }
41 auto getPattern(int id) const { return mDictionary.getPattern(id); }
42 auto getDictionaty() const { return mDictionary; }
43
44 private:
45 TopologyDictionary mDictionary{};
46 int mTopologiesOverThreshold{0};
47
48 ClassDefNV(LookUp, 2);
49};
50} // namespace o2::its3
51
52#endif
Definition of the ClusterTopology class.
Definition of the BuildTopologyDictionary class for ITS3.
bool isGroup(int id) const
Definition LookUp.h:39
LookUp()=default
auto getPattern(int id) const
Definition LookUp.h:41
int size() const
Definition LookUp.h:40
int findGroupID(int nRow, int nCol, const unsigned char patt[itsmft::ClusterPattern::MaxPatternBytes]) const
Definition LookUp.cxx:64
void loadDictionary(std::string fileName)
Definition LookUp.cxx:31
auto getDictionaty() const
Definition LookUp.h:42
static int groupFinder(int nRow, int nCol)
Definition LookUp.cxx:45
int getTopologiesOverThreshold() const
Definition LookUp.h:36
void setDictionary(const TopologyDictionary *dict)
Definition LookUp.cxx:37
int getSize() const
Returns the number of elements in the dicionary;.
bool isGroup(int n) const
Returns true if the element corresponds to a group of rare topologies.
const itsmft::ClusterPattern & getPattern(int n) const
Returns the pattern of the topology.
static constexpr int MaxPatternBytes