Project
Loading...
Searching...
No Matches
PreClustersDE.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_PRECLUSTERSDE_H
18#define O2_MID_PRECLUSTERSDE_H
19
20#include <cstdint>
21#include <cstddef>
22#include <array>
23#include <vector>
24#include "MIDBase/MpArea.h"
25
26namespace o2
27{
28namespace mid
29{
30
31// Internal pre-cluster structure for MID clustering
33{
34 public:
35 struct NBP {
36 size_t index;
37 int paired;
38 std::array<MpArea, 7> area;
39 };
40
41 struct BP {
42 size_t index;
43 int paired;
45 };
46
48 NBP& getPreClusterNBP(int idx) { return mPreClustersNBP[idx]; }
49
51 const NBP& getPreClusterNBP(int idx) const { return mPreClustersNBP[idx]; }
52
54 BP& getPreClusterBP(int icolumn, int idx) { return mPreClustersBP[icolumn][idx]; }
55
57 const BP& getPreClusterBP(int icolumn, int idx) const { return mPreClustersBP[icolumn][idx]; }
58
60 size_t getNPreClustersNBP() const { return mPreClustersNBP.size(); }
61
63 size_t getNPreClustersBP(int icolumn) const { return mPreClustersBP[icolumn].size(); }
64
66 void setDEId(uint8_t deId) { mDEId = deId; }
67
69 uint8_t getDEId() const { return mDEId; }
70
71 std::vector<int> getNeighbours(int icolumn, int idx) const;
72
74 std::vector<NBP>& getPreClustersNBP() { return mPreClustersNBP; }
75
77 std::vector<BP>& getPreClustersBP(int icolumn) { return mPreClustersBP[icolumn]; }
78
79 bool init();
80 void reset();
81
82 private:
83 uint8_t mDEId;
84 std::vector<NBP> mPreClustersNBP;
85 std::array<std::vector<BP>, 7> mPreClustersBP;
86};
87} // namespace mid
88} // namespace o2
89
90#endif /* O2_MID_PRECLUSTERSDE_H */
Mapping area for MID.
void setDEId(uint8_t deId)
Sets the detection element ID.
std::vector< BP > & getPreClustersBP(int icolumn)
Gets the vector of pre-clusters in the BP in column icolumn.
NBP & getPreClusterNBP(int idx)
Gets the pre-cluster in the NBP.
const NBP & getPreClusterNBP(int idx) const
Gets the pre-cluster in the NBP (const version)
size_t getNPreClustersNBP() const
Gets the number of pre-clusters in the NBP.
const BP & getPreClusterBP(int icolumn, int idx) const
Gets pre-cluster in the BP (const version)
std::vector< int > getNeighbours(int icolumn, int idx) const
std::vector< NBP > & getPreClustersNBP()
Gets the vector of pre-clusters in the NBP.
uint8_t getDEId() const
Gets the detection element ID.
BP & getPreClusterBP(int icolumn, int idx)
Gets pre-cluster in the BP.
size_t getNPreClustersBP(int icolumn) const
Gets the number of pre-clusters in the BP.
a couple of static helper functions to create timestamp values for CCDB queries or override obsolete ...
size_t index
Index of input pre-cluster.
MpArea area
Is paired flag.
std::array< MpArea, 7 > area
Is paired flag.
size_t index
Index of input pre-cluster.