Project
Loading...
Searching...
No Matches
Clusterizer.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_CLUSTERIZER_H
18#define O2_MID_CLUSTERIZER_H
19
20#include <functional>
21#include <unordered_map>
22#include <unordered_set>
23#include <vector>
24#include <gsl/gsl>
27#include "MIDBase/MpArea.h"
31
32namespace o2
33{
34namespace mid
35{
38{
39 public:
42 bool init(std::function<void(size_t, size_t)> func = [](size_t, size_t) {});
43
47 void process(gsl::span<const PreCluster> preClusters, bool accumulate = false);
48
52 void process(gsl::span<const PreCluster> preClusters, gsl::span<const ROFRecord> rofRecords);
53
55 const std::vector<Cluster>& getClusters() { return mClusters; }
56
58 const std::vector<ROFRecord>& getROFRecords() { return mROFRecords; }
59
60 private:
62 void reset();
63
67 bool loadPreClusters(gsl::span<const PreCluster>& preClusters);
68
72 bool makeClusters(PreClustersDE& pcs);
73
78 void makeCluster(const MpArea& areaBP, const MpArea& areaNBP, uint8_t deId);
79
84 void makeCluster(const MpArea& area, const uint8_t deId, int cathode);
85
91 void makeCluster(const PreClustersDE::BP& pcBP, const PreClustersDE::BP& pcBPNeigh, const PreClustersDE::NBP& pcNBP, uint8_t deId);
92
93 gsl::span<const PreCluster> mPreClusters;
94 std::unordered_map<uint8_t, PreClustersDE> mPreClustersDE{};
95 std::unordered_set<uint8_t> mActiveDEs{};
96 PreClusterHelper mPreClusterHelper{};
97 std::vector<Cluster> mClusters{};
98 std::vector<ROFRecord> mROFRecords{};
99 size_t mPreClusterOffset{0};
100
101 std::function<void(size_t, size_t)> mFunction{[](size_t, size_t) {}};
102};
103} // namespace mid
104} // namespace o2
105
106#endif /* O2_MID_CLUSTERIZER_H */
Reconstructed MID cluster.
Timeframe settings Average distance in cm of events merged into Randomize distance around average distance of merged events Simulate correct bunch interactions instead of placing only the average number of events A value[n] sets TFlen for[n] collisions in Number of bunches per trainsort Number of bunch trains Instantaneous interaction rate Do not simulate border Total number of collisions to be placed in the interior of all time Do not select random but walk over array of events in stride steps h Event generator settings h configStandalone Use CPU for GPU Force usage of the specified GPU device no CPU fallback Continue processing after an error First event to process
Pre-cluster structure for MID.
Definition of the MID event record.
Mapping area for MID.
Pre-clusters helper for MID.
Structure with pre-clusters in the MID detection element.
Clusterizing algorithm for MID.
Definition Clusterizer.h:38
const std::vector< Cluster > & getClusters()
Gets the vector of reconstructed clusters.
Definition Clusterizer.h:55
const std::vector< ROFRecord > & getROFRecords()
Gets the vector of clusters RO frame records.
Definition Clusterizer.h:58
bool init(std::function< void(size_t, size_t)> func=[](size_t, size_t) {})
typedef void(APIENTRYP PFNGLCULLFACEPROC)(GLenum mode)
gsl::span< const PreCluster > preClusters(preClusterizer.getPreClusters().data(), preClusterizer.getPreClusters().size())
a couple of static helper functions to create timestamp values for CCDB queries or override obsolete ...