Project
Loading...
Searching...
No Matches
BuildTopologyDictionary.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
14
15#ifndef ALICEO2_ITS3_BUILDTOPOLOGYDICTIONARY_H
16#define ALICEO2_ITS3_BUILDTOPOLOGYDICTIONARY_H
17
21
22namespace o2::its3
23{
24
26{
27 public:
28 static constexpr float IgnoreVal = 999.;
29 void accountTopology(const itsmft::ClusterTopology& cluster, float dX = IgnoreVal, float dZ = IgnoreVal);
30 void setNCommon(unsigned int nCommon); // set number of common topologies
31 void setThreshold(double thr);
32 void setThresholdCumulative(double cumulative); // Considering the integral
34 friend std::ostream& operator<<(std::ostream& os, const BuildTopologyDictionary& BD);
35 void printDictionary(const std::string& fname);
36 void printDictionaryBinary(const std::string& fname);
37 void saveDictionaryRoot(const std::string& fname);
38
39 unsigned int getTotClusters() const { return mTotClusters; }
40 unsigned int getNotInGroups() const { return mNCommonTopologies; }
41 TopologyDictionary getDictionary() const { return mDictionary; }
42
43 private:
44 TopologyDictionary mDictionary;
45 std::map<unsigned long, itsmft::TopoStat> mTopologyMap;
46 std::vector<std::pair<unsigned long, unsigned long>> mTopologyFrequency;
47 unsigned int mTotClusters{0};
48 unsigned int mNCommonTopologies{0};
49 double mFrequencyThreshold{0.};
50
51 std::unordered_map<long unsigned, itsmft::TopologyInfo> mMapInfo;
52
53 ClassDefNV(BuildTopologyDictionary, 3);
54};
55} // namespace o2::its3
56
57#endif
Definition of the ClusterTopology class.
Definition of the BuildTopologyDictionary class for ITS3.
Definition of the BuildTopologyDictionary class.
friend std::ostream & operator<<(std::ostream &os, const BuildTopologyDictionary &BD)
void saveDictionaryRoot(const std::string &fname)
TopologyDictionary getDictionary() const
void printDictionary(const std::string &fname)
void accountTopology(const itsmft::ClusterTopology &cluster, float dX=IgnoreVal, float dZ=IgnoreVal)
void printDictionaryBinary(const std::string &fname)